/* ============================================================
   Above & Beyond presents Anjunabeats Warehouse — Birmingham
   Signup page. Visual language from the supplied artwork:
   B/W band photo, teal #00E5D7, Barlow, hairline
   registration grid + crop-mark ticks.
   ============================================================ */

/* Barlow (OFL, self-hosted) */
@font-face {
  font-family: "Barlow";
  src: url("/assets/fonts/Barlow-Regular.woff2?v=20260716-3") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("/assets/fonts/Barlow-Medium.woff2?v=20260716-3") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink:        #0d0d0d;
  /* ONE teal only — #00E5D7, sampled from the flattened artwork logo.
     Alpha variants derive from the same hue so nothing reads as a
     different green. */
  --teal:       #00E5D7;
  --teal-soft:  rgba(0, 229, 215, 0.5);
  --white:      #ffffff;
  --muted:      rgba(255, 255, 255, 0.68);
  --panel-bg:   rgba(9, 11, 11, 0.94);  /* near-opaque: photo/grid must not bleed through the form */
  /* frame inset: the photo bleeds behind, the sheet frame sits this far in */
  --grid-inset: clamp(10px, 2vw, 26px);
  --err:        #ff7a6e;
  --font:       "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

html { background: var(--ink); }
/* body stays transparent: an opaque body background paints OVER the
   z-index:-1 .bg photo/grid layers and turns the page solid colour */
body {
  position: relative;          /* containing block for the portrait hero photo */
  background: transparent;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--grid-inset);   /* the photo bleeds full-width behind; the sheet frame sits inset */
}

.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) */
.hp-row { display: none !important; }

/* ============================================================
   BACKGROUND — photo + registration grid, two fixed layers
   ============================================================ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    url("/assets/images/bg-mobile.webp?v=20260716-3") center top / cover no-repeat,
    var(--ink);
}
.bg::after {
  /* keeps copy legible over the brightest parts of the photo */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,13,13,0.32) 0%, rgba(13,13,13,0.12) 40%, rgba(13,13,13,0.7) 100%);
}
/* Portrait (phones + portrait tablets): the photo is the FIRST SCREEN,
   not a fixed backdrop - it scrolls with the page and fades into ink,
   so content below never covers the band's faces (artwork demo_3:
   text only ever overlays the dark bottom third of the photo). */
@media (max-aspect-ratio: 7/10), (max-width: 767px) {
  .bg {
    position: absolute;
    top: 0; left: 0; right: 0;
    bottom: auto;
    height: 100svh;
  }
  .bg::after {
    background: linear-gradient(180deg,
      rgba(13,13,13,0.35) 0%,
      rgba(13,13,13,0.05) 35%,
      rgba(13,13,13,0.55) 74%,
      var(--ink) 100%);   /* blends the photo into the solid ink below */
  }
}

/* Landscape (desktop + landscape tablets): the wide photo.
   Portrait keeps the portrait artwork at every width — a landscape
   photo cover-cropped into a portrait tablet loses the band. */
@media (min-aspect-ratio: 7/10) and (min-width: 768px) {
  .bg {
    background:
      url("/assets/images/bg-desktop.webp?v=20260716-3") center / cover no-repeat,
      var(--ink);
  }
  .bg::after {
    background: linear-gradient(90deg, rgba(13,13,13,0.25) 0%, rgba(13,13,13,0.05) 45%, rgba(13,13,13,0.62) 100%);
  }
}

/* ============================================================
   THE SHEET — the registration-grid frame from the artwork.
   Everything lives INSIDE the frame (demo_3): the borders are
   the grid's verticals/horizontals, solid square ticks sit on
   the intersections, and each section is a band of the sheet.
   ============================================================ */
.sheet {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 2 * var(--grid-inset));
  border: 1px solid var(--teal-soft);
}
.sheet__ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.sheet::before, .sheet::after,
.sheet__ticks::before, .sheet__ticks::after {
  content: "";
  position: absolute;
  width: 7px; height: 7px;
  background: var(--teal);
  z-index: 2;
  pointer-events: none;
}
.sheet::before        { top: -4px;    left: -4px;  }
.sheet::after         { bottom: -4px; right: -4px; }
.sheet__ticks::before { top: -4px;    right: -4px; }
.sheet__ticks::after  { bottom: -4px; left: -4px;  }

/* ============================================================
   MASTHEAD — Above&Beyond logo + "presents", as in the artwork
   ============================================================ */
.masthead {
  position: relative;
  padding: clamp(16px, 2.6vw, 30px) clamp(16px, 4vw, 48px) clamp(14px, 2.2vw, 24px);
  border-bottom: 1px solid var(--teal-soft);   /* the artwork's line under the logo band */
}
/* ticks where the masthead line meets the frame verticals */
.masthead::before, .masthead::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 7px; height: 7px;
  background: var(--teal);
}
.masthead::before { left: -4px; }
.masthead::after  { right: -4px; }
.masthead__logo {
  display: block;
  width: clamp(220px, 38vw, 420px);
  height: auto;
}
.masthead__presents {
  margin: 0 0 0 2px;      /* sits tight under the logo, as in the artwork */
  line-height: 1.15;
  color: var(--teal);
  font-size: clamp(15px, 1.6vw, 19px);
  letter-spacing: 0.04em;
}

/* ============================================================
   STAGE — brand 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: 1240px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 44px) clamp(18px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 4vw, 56px);
  align-content: start;
}
/* Two columns only in landscape — in portrait (phones AND tablets)
   everything stacks and the panel centres */
@media (min-width: 768px) and (min-aspect-ratio: 7/10) {
  .stage__inner {
    /* full sheet width: the panel tracks the frame's right edge, sitting
       in the empty dark area of the photo right of the band */
    max-width: none;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: end;
  }
  .brand { align-self: end; }
}

/* Portrait tablets: scaled-up single column, roomier bands */
@media (min-width: 768px) and (max-aspect-ratio: 7/10) {
  .stage__inner { gap: clamp(34px, 5vw, 60px); }
  .panel { max-width: 560px; }
  .brand__date { font-size: clamp(38px, 5.4vw, 54px); }
  .brand__acts { font-size: clamp(30px, 4.2vw, 44px); }
  .brand__mark { width: clamp(96px, 11vw, 128px); }
  .brand__word { width: clamp(220px, 25vw, 290px); }
}

/* Portrait flow: the brand block sinks to the dark bottom third of the
   photo's first screen; the form starts below the photo, on solid ink */
@media (max-aspect-ratio: 7/10), (max-width: 767px) {
  .stage__inner {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 4vw, 24px);   /* tight gap: intro text → sign-up box */
    /* first screen = viewport minus frame insets and the masthead band */
    min-height: calc(100svh - 2 * var(--grid-inset) - clamp(88px, 26vw, 150px));
  }
  .brand { margin-top: auto; align-self: stretch; }  /* flex column: end would mean right-aligned */
  /* the blunt push that keeps the text off the band's faces now rides on
     the line-up (first block under the lockup), and is smaller because the
     line-up + date stack is itself ~230px taller than the old date alone */
  .brand__lineup { padding-top: clamp(140px, 22svh, 210px); }
  .signup { margin-top: 0; width: 100%; }
}

/* --- Brand lockup ------------------------------------------- */
.brand {
  padding-bottom: clamp(4px, 1vw, 12px);
}
.brand__lockup {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 22px);
}
.brand__mark {
  width: clamp(78px, 9vw, 112px);
  height: auto;
}
.brand__word {
  width: clamp(180px, 21vw, 250px);
  height: auto;
}
/* Line-up + date/time stack, set as live text in the artwork's language
   (supplied as flat PNGs, but they upscale soft and ship in a different
   tint than this page's teal - type stays sharp and stays teal). */
.brand__lineup {
  margin: clamp(18px, 2.6vw, 30px) 0 0;
}
.brand__az {
  margin: 0 0 2px;
  color: var(--teal);
  font-size: clamp(11px, 1.1vw, 13px);
  font-weight: 500;
  letter-spacing: 0.02em;
}
.brand__acts {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--teal);
  font-size: clamp(24px, 2.9vw, 33px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.005em;
  /* the stack is tall enough now to reach the photo's mid-grey zone -
     same shadow treatment .brand__line already uses to stay readable */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 14px rgba(0, 0, 0, 0.6);
}
/* the artwork's outlined "b2b" pill */
.b2b {
  display: inline-block;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.06em 0.44em 0.1em;
  font-size: 0.44em;
  font-weight: 500;
  letter-spacing: 0.01em;
  vertical-align: 0.28em;
}
/* the teal rule between line-up and date/time */
.brand__rule {
  max-width: min(100%, 520px);
  margin: clamp(14px, 2vw, 22px) 0 0;
  border: 0;
  border-top: 1px solid var(--teal-soft);
}
.brand__date {
  margin: clamp(14px, 2vw, 22px) 0 0;
  display: flex;
  flex-direction: column;
  color: var(--teal);
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.005em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 14px rgba(0, 0, 0, 0.6);
}
.brand__line {
  margin: clamp(14px, 2vw, 22px) 0 0;
  max-width: 44ch;
  color: var(--white);
  font-size: clamp(15px, 1.5vw, 16px);
  /* readable over the mid-grey photo, especially on mobile */
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 14px rgba(0, 0, 0, 0.6);
}
@media (max-width: 979px), (orientation: portrait) {
  .brand { order: 0; }
  .signup { order: 1; }
}

/* Organiser mark under the sign-up panel */
.signup__louder {
  display: block;
  width: clamp(60px, 6vw, 84px);
  height: auto;
  margin: 20px auto 0;      /* centered under the panel on mobile */
}
/* .signup__louder stays centred (base rule) so it tracks the centred panel */

/* ============================================================
   PANEL — the form, drawn in the artwork's print-proof language:
   hairline teal frame with crop-mark ticks at the corners
   ============================================================ */
.panel {
  position: relative;
  isolation: isolate;            /* frame pseudos never cover form children */
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--panel-bg);
  border: 1px solid var(--teal-soft);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
/* Desktop: the base margin:0 auto centres the panel within the right
   column, i.e. centred in the photo's empty area right of the band */
/* corner ticks: same square registration marks as the sheet frame —
   two corners on .panel, two on .panel__inner */
.panel::before, .panel::after,
.panel__inner::before, .panel__inner::after {
  content: "";
  position: absolute;
  width: 7px; height: 7px;
  background: var(--teal);
  z-index: 0;
  pointer-events: none;
}
.panel::before        { top: -4px;    left: -4px;  }
.panel::after         { bottom: -4px; right: -4px; }
.panel__inner::before { top: -4px;    right: -4px; }
.panel__inner::after  { bottom: -4px; left: -4px;  }

.panel__inner {
  position: static;              /* ticks anchor to .panel's box */
  padding: clamp(24px, 4vw, 38px) clamp(20px, 3.4vw, 34px) clamp(26px, 4vw, 38px);
}
.panel__inner > * { position: relative; z-index: 1; }

/* --- state machine ------------------------------------------ */
.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;
  color: var(--teal);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.panel__eyebrow-hair {
  flex: 1;
  height: 1px;
  background: var(--teal-soft);
}
.panel__title {
  margin: 0 0 12px;
  font-size: clamp(30px, 4.2vw, 42px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.panel__title em {
  font-style: normal;   /* no italic - the accent colour IS the emphasis */
  color: var(--teal);
}
.panel__lede {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
}
.panel__lede strong { color: var(--white); font-weight: 500; }
.panel__success-note {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 15px;
}

/* ============================================================
   FORM
   ============================================================ */
.form { margin: 0; }
.form__row { margin: 0 0 16px; }
.form__label {
  display: block;
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.form__input {
  display: block;
  width: 100%;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;             /* ≥16px stops iOS zoom-on-focus */
  line-height: 1.3;
  transition: border-color 0.15s ease;
}
.form__input::placeholder { color: rgba(255, 255, 255, 0.34); }
.form__input:focus {
  outline: none;
  border-color: var(--teal);
}
.form__input--otp {
  letter-spacing: 0.42em;
  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(--teal);
  cursor: pointer;
}
.form__check a { color: var(--teal); 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(--teal);
  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: 14px 18px;
  border-radius: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--primary {
  background: var(--teal);
  border: 1px solid var(--teal);
  color: #000;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.btn--primary:hover:not(:disabled) { background: #33ece1; border-color: #33ece1; }
.btn--primary:disabled { opacity: 0.6; cursor: wait; }
.btn--whatsapp {
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal);
}
.btn--whatsapp:hover { background: rgba(0, 229, 215, 0.12); }
.btn__icon { width: 20px; height: 20px; flex: 0 0 auto; }

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

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

.iti__dropdown-content {
  background: #101313;
  border: 1px solid var(--teal-soft);
  border-radius: 0;
  color: var(--white);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.iti__search-input {
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-bottom: 1px solid var(--teal-soft);
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
}
.iti__search-input::placeholder { color: rgba(255, 255, 255, 0.36); }
.iti__search-input:focus { outline: none; border-bottom-color: var(--teal); }
.iti__country-list { background: transparent; }
.iti__country { padding: 9px 12px; font-size: 14.5px; }
.iti__country.iti__highlight { background: rgba(0, 229, 215, 0.14); }
.iti__country:hover { background: rgba(0, 229, 215, 0.09); }
.iti__dial-code { color: var(--muted); }

/* ============================================================
   FOOTER — basslayerz pattern, full width
   ============================================================ */
.foot {
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  padding: 16px clamp(16px, 4vw, 40px) 20px;
  border-top: 1px solid var(--teal-soft);   /* bottom band of the sheet */
  background: rgba(9, 11, 11, 0.72);
  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(--teal); }
.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(255, 255, 255, 0.18);
  border-radius: 999px;
}
.site-built a:hover { border-color: var(--teal); color: var(--white); }
.site-built img { display: block; opacity: 0.9; }
@media (max-width: 640px) {
  .foot { justify-content: center; text-align: center; }
  .foot__left { justify-content: center; }
}

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

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

/* Mobile: sign-up box runs full width of the frame */
@media (max-width: 767px) {
  .stage__inner { padding-left: 10px; padding-right: 10px; }
  .panel { max-width: none; }
}

/* Squat narrow windows (wider than phones): photo faces sit lower in the
   crop, so the date needs a deeper push into the dark zone */
@media (min-width: 481px) and (max-width: 767px) {
  .brand__lineup { padding-top: clamp(60px, 14svh, 140px); }
}

/* Portrait tablets: taller viewport puts the faces lower in the crop, so
   the line-up needs a deeper push to clear them. NOTE this must live AFTER
   the generic portrait block above - equal specificity, so source order
   decides and an earlier media query would silently lose. */
@media (min-width: 768px) and (max-aspect-ratio: 7/10) {
  .brand__lineup { padding-top: clamp(200px, 27svh, 340px); }
}

/* Hidden state must not depend on the vendor stylesheet having loaded -
   prevents the country list flashing open on first paint */
.iti__dropdown-content.iti__hide { display: none !important; }
