/* =====================================================================
   Harbi Group × Under Armour — FW26 Launch Invitation
   Mobile-first, RTL, dark. No build step, no framework.
   ===================================================================== */

:root {
  --bg:        #080808;
  --bg-2:      #101010;
  --card:      #141414;
  --line:      rgba(255, 255, 255, .10);
  --line-soft: rgba(255, 255, 255, .06);
  --fg:        #ffffff;
  --fg-2:      rgba(255, 255, 255, .72);
  --fg-3:      rgba(255, 255, 255, .45);
  --accent:    #ffffff;

  /* One gold for the whole page — VIP mark and the location tile share it,
     so they read as the same accent rather than two near-misses. */
  --gold:      #f0cb5b;
  --gold-soft: rgba(240, 203, 91, .45);
  --gold-line: rgba(240, 203, 91, .9);

  --ok:        #34d399;
  --err:       #f87171;
  --radius:    14px;
  --maxw:      480px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Cairo", "Tajawal", -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  /* الخطوط المائلة الخفيفة في الخلفية — matches the poster texture */
  background-image:
    repeating-linear-gradient(
      -25deg,
      transparent 0 38px,
      rgba(255, 255, 255, .022) 38px 39px
    ),
    radial-gradient(120% 60% at 50% 0%, #1b1b1b 0%, var(--bg) 62%);
  background-attachment: fixed;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 20px 48px;
}

/* ---------- Logos ------------------------------------------------- */

.logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

/* ---------- VIP mark ---------------------------------------------- */

.vip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 32px;
}

/* Gold hairlines fading in toward the word from both sides. */
.vip::before,
.vip::after {
  content: "";
  width: 52px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line));
}
.vip::after { transform: scaleX(-1); }

/* Solid bright gold rather than a gradient: at this size a vertical gradient
   just reads as muddy, while a flat bright gold plus a soft glow actually
   looks metallic against the black. */
.vip span {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .38em;
  /* text-indent compensates for the trailing letter-space, keeping it centred */
  text-indent: .38em;
  color: var(--gold);
  text-shadow:
    0 0 1px rgba(255, 232, 150, .9),
    0 0 12px var(--gold-soft),
    0 1px 0 rgba(120, 88, 10, .55);
}

.logos img {
  height: 34px;
  width: auto;
  max-width: 42%;
  object-fit: contain;
  display: block;
}

/* Fallback wordmarks shown until real logo files are dropped in. */
.logo-text {
  font-weight: 800;
  letter-spacing: .16em;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}
.logo-text small {
  display: block;
  font-size: 7px;
  letter-spacing: .30em;
  color: var(--fg-3);
  font-weight: 500;
  margin-top: 3px;
}
.logo-sep {
  width: 1px;
  height: 30px;
  background: var(--line);
  flex: 0 0 auto;
}

/* ---------- Hero -------------------------------------------------- */

.hero { text-align: center; margin-bottom: 34px; }

.hero .kicker {
  font-size: clamp(23px, 7.2vw, 31px);
  font-weight: 800;
  line-height: 1.28;
  margin: 0;
}

.hero .sub-kicker {
  font-size: clamp(16px, 4.8vw, 20px);
  font-weight: 500;
  color: var(--fg-2);
  margin: 6px 0 22px;
}

.hero .title-band {
  display: inline-block;
  background: var(--fg);
  color: #000;
  font-weight: 800;
  font-size: clamp(17px, 5.2vw, 22px);
  padding: 7px 20px;
  border-radius: 3px;
}

.hero .year {
  font-size: clamp(76px, 27vw, 118px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.02em;
  margin: 10px 0 0;
  border-bottom: 6px solid var(--fg);
  display: inline-block;
  padding: 0 8px 8px;
  font-family: "Cairo", system-ui, sans-serif;
}

/* ---------- Info tiles -------------------------------------------- */

.info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 34px 0 30px;
}

.info .tile {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 8px 14px;
  text-align: center;
}

.info .tile svg {
  width: 27px;
  height: 27px;
  stroke: var(--fg);
  fill: none;
  stroke-width: 1.5;
  margin-bottom: 9px;
}

.info .tile span {
  display: block;
  font-size: 12px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--fg-2);
  word-break: break-word;
}

/* Venue tile as a map link — only styled once JS confirms a URL exists,
   so it never looks tappable when it isn't. */
.info a.tile {
  display: block;
  color: inherit;
  text-decoration: none;
}
.info a.tile.is-link {
  border-color: rgba(240, 203, 91, .42);
  cursor: pointer;
}
.info a.tile.is-link:active {
  background: #171717;
  border-color: var(--gold-line);
}

/* Same gold and the same soft halo as the VIP mark, scaled down. */
.tile-cta {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .06em;
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold-soft);
}

/* The pin icon on the linked tile picks up the accent too, so the whole
   tile reads as one gold element instead of a white icon with gold text. */
.info a.tile.is-link svg { stroke: var(--gold); }

/* ---------- Card / form ------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 22px 18px;
}

.card h2 {
  margin: 0 0 4px;
  font-size: 19px;
  font-weight: 800;
}

.card .hint {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--fg-3);
  line-height: 1.6;
}

.field { margin-bottom: 15px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--fg-2);
}

.field label .req { color: var(--err); }

.field input,
.field select {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS auto-zoom on focus */
  color: var(--fg);
  background: #0b0b0b;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  transition: border-color .15s, background .15s;
  appearance: none;
}

.field select {
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 38px;
}

.field input:focus,
.field select:focus {
  border-color: rgba(255, 255, 255, .55);
  background: #0f0f0f;
}

.field input::placeholder { color: rgba(255, 255, 255, .25); }

.field .error {
  display: none;
  font-size: 12px;
  color: var(--err);
  margin-top: 6px;
}
.field.invalid input,
.field.invalid select { border-color: var(--err); }
.field.invalid .error { display: block; }

/* Guest stepper */
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper input { text-align: center; flex: 1; }
.stepper button {
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: var(--fg);
  background: #0b0b0b;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
}
.stepper button:active { background: #1c1c1c; }

/* ---------- Buttons ----------------------------------------------- */

.btn {
  width: 100%;
  height: 54px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  color: #000;
  background: var(--fg);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity .15s, transform .06s;
}
.btn:active  { transform: scale(.99); }
.btn:disabled{ opacity: .55; cursor: not-allowed; }

.btn.ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

/* ---------- Success ----------------------------------------------- */

.success { text-align: center; padding: 12px 4px 6px; }

.success .check {
  width: 66px;
  height: 66px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 2px solid var(--ok);
  display: grid;
  place-items: center;
}
.success .check svg {
  width: 30px; height: 30px;
  stroke: var(--ok); fill: none;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}

.success h2 { margin: 0 0 8px; font-size: 21px; font-weight: 800; }
.success p  { margin: 0 0 6px; font-size: 14px; color: var(--fg-2); line-height: 1.7; }

.recap {
  margin: 20px 0 4px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  text-align: right;
}
.recap div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--line-soft);
}
.recap div:last-child { border-bottom: 0; }
.recap div b { font-weight: 700; }
.recap div span { color: var(--fg-3); }

/* ---------- Footer ------------------------------------------------ */

.footer {
  text-align: center;
  margin-top: 30px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--fg-3);
}

/* ---------- Banner (errors) --------------------------------------- */

.banner {
  display: none;
  padding: 12px 14px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
  border: 1px solid;
}
.banner.show { display: block; }
.banner.err  { background: rgba(248,113,113,.10); border-color: rgba(248,113,113,.35); color: #fecaca; }
.banner.ok   { background: rgba(52,211,153,.10);  border-color: rgba(52,211,153,.35);  color: #a7f3d0; }

/* ---------- Spinner ----------------------------------------------- */

.spin {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(0,0,0,.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -3px;
  margin-left: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   ADMIN
   ===================================================================== */

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}
.admin-head h1 { margin: 0; font-size: 20px; font-weight: 800; }
.admin-head button {
  font: inherit; font-size: 13px; font-weight: 600;
  color: var(--fg-2); background: transparent;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 8px 13px; cursor: pointer;
}

.kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.kpi {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px 14px;
}
.kpi b {
  display: block;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
}
.kpi span {
  display: block;
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 4px;
  font-weight: 600;
}

.by-day {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 6px 14px;
  margin-bottom: 18px;
}
.by-day .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.by-day .row:last-child { border-bottom: 0; }
.by-day .row b { font-weight: 800; }
.by-day .row em { font-style: normal; color: var(--fg-3); font-size: 12px; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th, td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line-soft); }
th { background: #0d0d0d; font-weight: 700; color: var(--fg-2); font-size: 12px; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td a { color: var(--fg); text-decoration: none; border-bottom: 1px dotted var(--fg-3); }

.empty { text-align: center; padding: 34px 16px; color: var(--fg-3); font-size: 14px; }

.actions { display: flex; gap: 10px; margin-top: 16px; }
.actions .btn { margin-top: 0; }
