/* ============================================================
   Aly & Fila presents FUTURE SOUND OF EGYPT 1000 - Sheffield
   Signup page.

   Visual language derived from the supplied artwork: a colossal
   cracked-gold pharaonic head half-buried at dusk. The client
   backgrounds are composed WITH negative space for content, so
   they stay sharp; the blur happens behind the form panel, which
   is frosted glass over the live scene.

   Signature: the chamfered corner, cut from the FSOE logotype's
   own angular terminals. Used exactly twice - panel and primary
   button - and nowhere else.
   ============================================================ */

/* Chakra Petch (OFL) - chamfered terminals, echoes the FSOE logotype */
@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/ChakraPetch-500.woff2?v=20260726-10") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/ChakraPetch-600.woff2?v=20260726-10") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("/assets/fonts/ChakraPetch-700.woff2?v=20260726-10") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
/* Archivo (OFL) - one variable file covers the whole weight range */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/Archivo-var.woff2?v=20260726-10") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  /* Gold sampled from the lockup artwork itself (#F2CE82), not guessed */
  --gold:      #F2CE82;
  --gold-hi:   #FBE6B4;
  --gold-deep: #B8894A;
  --gold-line: rgba(242, 206, 130, 0.42);
  --sand:      #E4D2B4;
  --cream:     #F8F2E6;
  --void:      #0C0906;                      /* warm near-black, not neutral */
  --muted:     rgba(248, 242, 230, 0.68);
  --err:       #FF8A78;

  --panel-bg:  rgba(12, 9, 6, 0.76);         /* translucent: the scene blurs through */
  --cut:       clamp(18px, 2.6vw, 28px);     /* the chamfer */
  --cut-btn:   11px;

  --font:      "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-disp: "Chakra Petch", "Archivo", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--cream);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* html carries the base colour; body stays transparent so it can never
   paint over the z-index:-1 background layer */
html { background: var(--void); }
body {
  position: relative;
  background: transparent;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Honeypot - display:none ONLY. Off-screen positioning gets autofilled by
   Chrome/Edge, which silently blocks real signups. */
.hp-row { display: none !important; }

/* ============================================================
   BACKGROUND - the client scene, sharp, with a legibility scrim
   ============================================================ */
/* PORTRAIT: the v2 mobile art puts the face at the TOP, so the background is
   absolutely positioned (not fixed) and scrolls away with the page. A fixed
   layer would keep the face parked under scrolling content. */
.bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 118svh;
  z-index: -1;
  background: url("/assets/images/bg-mobile.webp?v=20260726-10") center top / cover no-repeat,
              var(--void);
}
/* Face stays clean at the top; the sand darkens progressively into the void
   so it reads as dusk falling toward the viewer. Without this the gold lockup
   would sit gold-on-gold over pale sand. */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(12, 9, 6, 0.10) 0%,
    rgba(12, 9, 6, 0.00) 22%,
    rgba(12, 9, 6, 0.42) 44%,
    rgba(12, 9, 6, 0.72) 66%,
    rgba(12, 9, 6, 0.93) 86%,
    var(--void) 100%);
}
@media (max-aspect-ratio: 7/10) and (max-width: 500px) {
  .bg { background-image: url("/assets/images/bg-mobile-sm.webp?v=20260726-10"); }
}

/* Landscape: the wide desert scene. Scrim leans right, where the panel sits
   over the sun flare - the brightest part of the frame.
   Keyed on aspect ratio ALONE, deliberately: gating this on min-width too
   would strand landscape phones (667x375) on the tall portrait artwork. */
@media (min-aspect-ratio: 7/10) {
  .bg {
    position: fixed;
    inset: 0;
    height: auto;
    /* v1 art (2.104:1) sits the head centre-frame, which lands it behind the
       sign-up panel. Anchoring the crop hard RIGHT slides the head as far left
       as the art allows, clear of the panel. Adam signed this off; 55% was
       tried and pushed the head back toward the box. */
    /* `right center` is already the furthest-left anchor cover allows, so to
       push the head further left we scale the art up slightly: the extra width
       spills off the right, carrying the head leftward with it. 105% covers any
       viewport up to 2.209:1; the guard below catches ultrawide. */
    background: url("/assets/images/bg-desktop.webp?v=20260726-10") right center / auto 105% no-repeat,
                var(--void);
  }
  /* Light touch on the left: the head is the hero and a heavy scrim turns it
     to mud. Legibility over it comes from text-shadow, not from drowning it. */
  .bg::after {
    background:
      linear-gradient(90deg, rgba(12, 9, 6, 0.34) 0%, rgba(12, 9, 6, 0.08) 30%, rgba(12, 9, 6, 0.66) 100%),
      linear-gradient(180deg, rgba(12, 9, 6, 0.22) 0%, rgba(12, 9, 6, 0) 32%, rgba(12, 9, 6, 0.52) 100%);
  }
}
@media (min-aspect-ratio: 7/10) and (max-width: 1500px) {
  .bg { background-image: url("/assets/images/bg-desktop-sm.webp?v=20260726-10"); }
}
/* Ultrawide: past 2.2:1 the 105% scale no longer spans the width, so fall back
   to plain cover rather than leave a strip of void down the right edge. */
@media (min-aspect-ratio: 22/10) {
  .bg { background-size: cover; }
}

/* ============================================================
   SHEET - structural wrapper only (no frame; the artwork is the frame)
   ============================================================ */
.sheet {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* ============================================================
   STAGE - lockup column + signup panel
   ============================================================ */
.stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.stage__inner {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(26px, 4vw, 56px) clamp(18px, 5vw, 60px);
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 4vw, 40px);
}

/* --- Brand column: the client lockup, rebuilt live over the scene --- */
.brand { text-align: center; }
.brand__lockup {
  display: block;
  width: min(66vw, 320px);
  height: auto;
  margin: 0 auto;
}
.brand__place {
  margin: clamp(14px, 2.4vw, 22px) 0 0;
  font-family: var(--font-disp);
  font-weight: 600;
  font-size: clamp(22px, 5.6vw, 34px);
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 2px 18px rgba(12, 9, 6, 0.8);
}
.brand__line {
  margin: clamp(10px, 1.8vw, 16px) auto 0;
  max-width: 46ch;
  font-size: clamp(14.5px, 1.5vw, 16px);
  color: var(--sand);
  text-shadow: 0 1px 4px rgba(12, 9, 6, 0.9), 0 0 16px rgba(12, 9, 6, 0.7);
}

/* --- Louder mark under the panel --- */
.signup__louder {
  display: block;
  width: clamp(58px, 6vw, 78px);
  height: auto;
  margin: 18px auto 0;
  opacity: 0.85;
}

/* ============================================================
   PANEL - frosted glass over the live scene, chamfered in gold.
   The chamfer is drawn by two stacked pseudo-elements rather than
   clip-path on .panel itself: clipping the panel would amputate the
   intl-tel-input country dropdown when it opens past the edge.
   ============================================================ */
.panel {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  clip-path: polygon(
    var(--cut) 0, 100% 0,
    100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%,
    0 100%, 0 var(--cut));
}
.panel::before {              /* gold shape - the 1px that shows is the hairline */
  inset: 0;
  background: var(--gold-line);
}
.panel::after {               /* dark shape sits 1px inside, blurring the scene */
  inset: 1px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.panel__inner {
  position: relative;
  z-index: 1;                 /* content clears both chamfer layers */
  padding: clamp(26px, 4vw, 38px) clamp(20px, 3.4vw, 34px) clamp(28px, 4vw, 38px);
}

/* --- state machine: exactly one state visible --- */
.panel__state { display: none; }
.panel[data-form-state="idle"]    .panel__idle    { display: block; }
.panel[data-form-state="otp"]     .panel__otp     { display: block; }
.panel[data-form-state="success"] .panel__success { display: block; }

/* --- panel type --- */
.panel__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-family: var(--font-disp);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}
.panel__eyebrow-hair {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-line), rgba(242, 206, 130, 0));
}
.panel__eyebrow-hair:first-child {
  background: linear-gradient(270deg, var(--gold-line), rgba(242, 206, 130, 0));
}
.panel__title {
  margin: 0 0 12px;
  font-family: var(--font-disp);
  font-size: clamp(29px, 4.1vw, 40px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-wrap: balance;
}
.panel__title em {
  font-style: normal;         /* the gold IS the emphasis */
  color: var(--gold);
}
/* Class-based only. A state-scoped element rule (.panel__success p {...})
   would out-specify .panel__eyebrow and silently restyle it. */
.panel__lede {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
}
.panel__lede strong { color: var(--cream); font-weight: 600; }
.panel__success-note {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 15px;
}

/* ============================================================
   FORM
   ============================================================ */
.form { margin: 0; }
.form__row { margin: 0 0 16px; }
.form__label {
  display: block;
  margin: 0 0 6px;
  font-family: var(--font-disp);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.form__input {
  display: block;
  width: 100%;
  padding: 13px 14px;
  background: rgba(248, 242, 230, 0.05);
  border: 1px solid rgba(248, 242, 230, 0.2);
  border-radius: 0;
  color: var(--cream);
  font-family: var(--font);
  font-size: 16px;            /* >=16px stops iOS zoom-on-focus */
  line-height: 1.3;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.form__input::placeholder { color: rgba(248, 242, 230, 0.32); }
.form__input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(248, 242, 230, 0.07);
}
.form__input--otp {
  letter-spacing: 0.42em;
  font-family: var(--font-disp);
  font-size: 22px;
  text-align: center;
}

.form__row--check { margin-top: 18px; }
.form__check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.form__check input {
  flex: 0 0 auto;
  width: 17px; height: 17px;
  margin: 2px 0 0;
  accent-color: var(--gold);
  cursor: pointer;
}
.form__check a { color: var(--gold); text-decoration: underline; }

.form__error {
  margin: 6px 0 0;
  color: var(--err);
  font-size: 13px;
}
.form__error--global { margin-top: 12px; }

.form__resend {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.form__resend-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold);
  font-family: var(--font);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.form__resend-btn:disabled { opacity: 0.5; cursor: default; }

/* --- buttons --- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 20px 0 0;
  padding: 15px 18px;
  border: 0;
  border-radius: 0;
  font-family: var(--font-disp);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
  /* the chamfer again - same corners as the panel, smaller cut */
  clip-path: polygon(
    var(--cut-btn) 0, 100% 0,
    100% calc(100% - var(--cut-btn)), calc(100% - var(--cut-btn)) 100%,
    0 100%, 0 var(--cut-btn));
}
.btn--primary {
  background: var(--gold);
  color: #17110A;
  /* shrink type before it can wrap - never let a CTA break to two lines */
  white-space: nowrap;
  font-size: clamp(0.85rem, 3.4vw, 1.05rem);
  letter-spacing: clamp(0.06em, 0.5vw, 0.14em);
  text-transform: uppercase;
}
.btn--primary:hover:not(:disabled) { background: var(--gold-hi); }
.btn--primary:disabled { opacity: 0.62; cursor: wait; }
.btn--whatsapp {
  background: rgba(242, 206, 130, 0.1);
  box-shadow: inset 0 0 0 1px var(--gold-line);
  color: var(--gold);
  white-space: nowrap;
  font-size: clamp(0.8rem, 3.2vw, 0.95rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.btn--whatsapp:hover { background: rgba(242, 206, 130, 0.18); }
.btn__icon { width: 20px; height: 20px; flex: 0 0 auto; }

/* ============================================================
   intl-tel-input - dark gold theme, styled searchable dropdown
   ============================================================ */
.iti { width: 100%; }
.iti input.form__input { padding-left: calc(52px + 0.7rem); } /* repadPhone() re-measures */

.iti__selected-country { background: transparent; color: var(--cream); }
.iti__selected-dial-code { color: var(--muted); font-size: 15px; }
.iti__arrow { border-top-color: var(--gold); }
.iti__arrow--up { border-bottom-color: var(--gold); }

.iti__dropdown-content {
  background: #16110B;
  border: 1px solid var(--gold-line);
  border-radius: 0;
  color: var(--cream);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6);
}
.iti__search-input {
  padding: 12px 13px;
  background: rgba(248, 242, 230, 0.05);
  border: none;
  border-bottom: 1px solid var(--gold-line);
  color: var(--cream);
  font-family: var(--font);
  font-size: 15px;
}
.iti__search-input::placeholder { color: rgba(248, 242, 230, 0.34); }
.iti__search-input:focus { outline: none; border-bottom-color: var(--gold); }
.iti__country-list { background: transparent; }
.iti__country { padding: 9px 13px; font-size: 14.5px; }
.iti__country.iti__highlight { background: rgba(242, 206, 130, 0.16); }
.iti__country:hover { background: rgba(242, 206, 130, 0.1); }
.iti__dial-code { color: var(--muted); }
/* dropdown must clear the panel's chamfer layers */
.iti--inline-dropdown .iti__dropdown-content { z-index: 50; }
/* hidden state must not wait on the vendor stylesheet, or the country list
   flashes open on first paint */
.iti__dropdown-content.iti__hide { display: none !important; }

/* ============================================================
   FOOTER - basslayerz pattern, full width
   ============================================================ */
.foot {
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  padding: 16px clamp(16px, 4vw, 40px) 20px;
  border-top: 1px solid rgba(242, 206, 130, 0.2);
  background: rgba(9, 7, 4, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.foot__left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot__legal { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
.foot__legal a { color: var(--muted); text-decoration: none; }
.foot__legal a:hover { color: var(--gold); }
.site-built { margin: 0; }
.site-built a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 11px;
  border: 1px solid rgba(248, 242, 230, 0.16);
  border-radius: 999px;
}
.site-built a:hover { border-color: var(--gold); color: var(--cream); }
.site-built img { display: block; opacity: 0.9; }
@media (max-width: 640px) {
  .foot { justify-content: center; text-align: center; }
  .foot__left { justify-content: center; }
}

/* ============================================================
   LAYOUT - two columns in landscape, stacked in portrait.
   Aspect-ratio thresholds, not width alone: width-only breakpoints
   leave gaps at squarish window shapes where neither treatment applies.
   ============================================================ */
@media (min-width: 768px) and (min-aspect-ratio: 7/10) {
  .stage__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    /* both columns centre on the same axis so the lockup reads as in line with
       the sign-up panel rather than floating above it (Adam, 2026-07-26) */
    align-items: center;
    gap: clamp(30px, 5vw, 72px);
  }
  /* nudged up 100px off the shared centre axis (Adam, 2026-07-26). max() keeps
     it from overshooting the stage padding on short desktop windows. */
  .brand { text-align: left; margin-top: max(-100px, -12vh); }
  .brand__lockup { margin: 0; width: min(30vw, 340px); }
  .brand__line { margin-left: 0; margin-right: 0; }
  /* Nudge the panel right (Adam, 2026-07-26): trim the stage's right padding and
     right-align the panel in its column. Done this way, not by re-weighting the
     grid, so the lockup's left edge does not move. margin-left stays auto - never
     margin:0, which is what left-shifts the panel at a single breakpoint. */
  .stage__inner { padding-right: clamp(14px, 2vw, 28px); }
  .panel { margin-left: auto; margin-right: 0; }
}

/* Portrait tablets: single column, scaled up */
@media (min-width: 768px) and (max-aspect-ratio: 7/10) {
  .brand__lockup { width: min(52vw, 400px); }
  .panel { max-width: 560px; }
}

/* PORTRAIT: push all content clear of the face at the top of the artwork.
   The face proper ends ~30% down the image; 36svh puts the lockup below it
   with margin to spare, so nothing ever sits across it. */
@media (max-aspect-ratio: 7/10), (max-width: 767px) {
  .stage__inner {
    padding-top: 36svh;
    gap: clamp(18px, 3.5vw, 28px);
  }
  .brand__lockup { width: min(52vw, 215px); }
}

/* Phones: panel runs the full frame width */
@media (max-width: 767px) {
  .stage__inner { padding-left: 14px; padding-right: 14px; }
  .panel { max-width: none; }
  /* the brand lede duplicates what the panel lede already says; dropping it
     on phones lifts the form ~80px closer to the fold */
  .brand__line { display: none; }
}

/* Landscape phones are a first-class layout, not an afterthought: a rotated
   phone satisfies the desktop width/aspect conditions but has almost no
   height. Placed AFTER the desktop blocks so it wins at equal specificity. */
@media (min-width: 640px) and (min-aspect-ratio: 7/10) and (max-height: 520px) {
  .stage__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    align-items: start;
    gap: clamp(18px, 3vw, 32px);
    padding: 14px clamp(14px, 3vw, 28px);
    min-height: 0;
  }
  .brand { text-align: left; align-self: center; margin-top: 0; }
  .brand__lockup { width: min(21vw, 165px); max-height: calc(100svh - 120px); object-fit: contain; }
  .brand__place { font-size: clamp(13px, 2.1vw, 17px); margin-top: 8px; letter-spacing: 0.12em; }
  /* the lede is the first thing to go: on a 390px-tall viewport every line it
     costs is a form field pushed under the fold */
  .brand__line { display: none; }
  .panel__inner { padding: 13px 15px 15px; }
  .panel__title { font-size: clamp(17px, 2.4vw, 22px); margin-bottom: 6px; }
  .panel__lede { margin-bottom: 10px; font-size: 12.5px; }
  .panel__eyebrow { margin-bottom: 7px; font-size: 10px; letter-spacing: 0.2em; }
  .form__row { margin-bottom: 8px; }
  .form__label { font-size: 10px; margin-bottom: 3px; }
  .form__input { padding: 9px 12px; }
  .form__check { font-size: 11.5px; line-height: 1.35; }
  .form__row--check { margin-top: 9px; }
  .btn { margin-top: 10px; padding: 10px 14px; }
  .signup__louder { margin-top: 9px; width: 46px; }
  .foot { padding: 8px 20px 10px; }
}

/* ============================================================
   MOTION - one orchestrated page-load reveal, nothing else
   ============================================================ */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.brand  { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.signup { animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.14s both; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.iti__selected-country:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
