/* ============================================================
   Serum's Gaff — The Big Night Out · Electric, Bristol
   Signup page. Visual language from the supplied artwork:
   hand-drawn night-sky cartoon, chunky bubble lettering with
   hard black drop shadows, beer amber + bonfire orange accents.
   Design system: "comic sticker" — thick ink outlines and hard
   offset shadows (no blur) on every card, tile and button.
   ============================================================ */

/* Luckiest Guy (OFL) — closest match to the artwork's chunky
   hand-drawn caps ("THE BIG NIGHT OUT"). Caps-only face. */
@font-face {
  font-family: "Luckiest Guy";
  src: url("/assets/fonts/LuckiestGuy-Regular.woff2?v=20260722-1") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Varela Round (OFL) — rounded body face matching the cartoon line weight */
@font-face {
  font-family: "Varela Round";
  src: url("/assets/fonts/VarelaRound-Regular.woff2?v=20260722-1") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --night-deep: #0a0f33;                 /* page base — darkest sky */
  --night:      #1c2765;                 /* mid sky, sampled from artwork */
  --panel-bg:   rgba(13, 18, 48, 0.93);  /* near-opaque: art must not bleed through the form */
  --ink:        #14162b;                 /* cartoon outline ink */
  --red:        #e12e45;                 /* Serum's Gaff bubble red (logo sample) */
  --red-soft:   rgba(225, 46, 69, 0.55);
  --amber:      #f7b32b;                 /* pint amber — CTA */
  --amber-hi:   #ffc94f;
  --fire:       #f4772e;                 /* bonfire orange */
  --cloud:      #c3cbe9;                 /* cloud lilac — muted text */
  --white:      #ffffff;
  --muted:      rgba(195, 203, 233, 0.8);
  --line:       rgba(195, 203, 233, 0.22);
  --err:        #ff8a7a;
  --font:       "Varela Round", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display:    "Luckiest Guy", "Arial Black", sans-serif;
  /* the hard comic shadow every sticker element shares */
  --stamp:      6px 6px 0 rgba(5, 7, 26, 0.55);
}

* { 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.55;
  -webkit-font-smoothing: antialiased;
}

html { background: var(--night-deep); }
/* body stays transparent: an opaque body background paints OVER the
   z-index:-1 .bg layers and turns the page solid colour */
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) */
.hp-row { display: none !important; }

/* ============================================================
   BACKGROUND — the blurred artwork street scene, fixed layer
   (blur is baked into the asset; the overlay keeps copy legible)
   ============================================================ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    url("/assets/images/bg-mobile.webp?v=20260722-1") center top / cover no-repeat,
    var(--night-deep);
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,15,51,0.30) 0%, rgba(10,15,51,0.42) 55%, rgba(10,15,51,0.78) 100%);
}
@media (min-aspect-ratio: 7/10) and (min-width: 768px) {
  .bg {
    background:
      url("/assets/images/bg-desktop.webp?v=20260722-1") center / cover no-repeat,
      var(--night-deep);
  }
  .bg::after {
    background: linear-gradient(90deg, rgba(10,15,51,0.30) 0%, rgba(10,15,51,0.22) 45%, rgba(10,15,51,0.72) 100%);
  }
}

/* ============================================================
   SHELL
   ============================================================ */
.sheet {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}

/* ============================================================
   STAGE — poster art left, signup right
   ============================================================ */
.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(26px, 4vw, 56px) clamp(18px, 5vw, 56px) clamp(28px, 4vw, 52px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(26px, 4vw, 56px);
  align-content: start;
}
/* Two columns only in landscape — portrait (phones AND tablets) stacks */
@media (min-width: 768px) and (min-aspect-ratio: 7/10) {
  .stage__inner {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    align-items: center;
  }
}

/* --- Poster (the main artwork, framed like a comic panel) ---- */
.brand { min-width: 0; }
.poster {
  position: relative;
  display: block;
  margin: 0 auto;
  max-width: min(100%, 560px);
  transform: rotate(-1.2deg);
}
.poster img {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--stamp);
  background: var(--night);
}
.brand__date {
  margin: clamp(18px, 2.6vw, 26px) auto 0;
  max-width: 560px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
  padding: 0;
  list-style: none;
}
.brand__date li {
  padding: 7px 14px 5px;
  background: rgba(13, 18, 48, 0.88);
  border: 3px solid var(--ink);
  border-radius: 11px;
  box-shadow: 4px 4px 0 rgba(5, 7, 26, 0.5);
  color: var(--amber);
  font-family: var(--display);
  font-size: clamp(13px, 1.5vw, 16px);
  letter-spacing: 0.05em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand__date li:nth-child(odd)  { transform: rotate(-1.6deg); }
.brand__date li:nth-child(even) { transform: rotate(1.2deg); }
.brand__power {
  margin: 12px auto 0;
  max-width: 560px;
  text-align: center;
  color: var(--muted);
  font-size: clamp(12px, 1.3vw, 13px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ============================================================
   PANEL — the signup card, comic-sticker language
   ============================================================ */
.signup { min-width: 0; }
.panel {
  position: relative;
  isolation: isolate;            /* nothing stacks over form children */
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--panel-bg);
  border: 3px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--stamp);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.panel__inner {
  padding: clamp(24px, 4vw, 36px) clamp(20px, 3.4vw, 32px) clamp(26px, 4vw, 36px);
}
.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(--red);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.panel__eyebrow-hair {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: var(--red-soft);
}
.panel__title {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.02;
  letter-spacing: 0.015em;
  text-wrap: balance;
  color: var(--white);
  /* the artwork's hard black drop */
  text-shadow: 3px 3px 0 rgba(5, 7, 26, 0.85);
}
.panel__title em {
  font-style: normal;   /* the bubble red IS the emphasis */
  color: var(--red);
}
.panel__lede {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}
.panel__lede strong { color: var(--white); font-weight: 400; }
.panel__success-note {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 15px;
}

/* ============================================================
   COUNTDOWN — tilted sticker tiles, the page's signature
   ============================================================ */
.count { margin: 0 0 18px; }
.count__label {
  margin: 0 0 10px;
  color: var(--amber);
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.08em;
  text-align: center;
}
.count__tiles {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 1.4vw, 12px);
}
.count__tile {
  flex: 0 1 76px;
  min-width: 58px;
  padding: 10px 4px 7px;
  background: #0e1440;
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 4px 4px 0 rgba(5, 7, 26, 0.5);
  text-align: center;
}
.count__tile:nth-child(odd)  { transform: rotate(-2deg); }
.count__tile:nth-child(even) { transform: rotate(1.6deg); }
.count__num {
  display: block;
  color: var(--amber);
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.count__unit {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
/* countdown finished → single "live" sticker */
.count__live {
  display: none;
  margin: 0 auto;
  padding: 10px 18px 7px;
  width: fit-content;
  background: var(--red);
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: 4px 4px 0 rgba(5, 7, 26, 0.5);
  color: var(--white);
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.06em;
  transform: rotate(-1.4deg);
}
.count--live .count__tiles { display: none; }
.count--live .count__live  { display: block; }

/* on-sale date rows under the countdown */
.dates {
  margin: 0 0 20px;
  padding: 12px 14px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  display: grid;
  gap: 6px;
}
.dates__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
}
.dates__row dt {
  margin: 0;
  color: var(--white);
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.dates__row--presale dt { color: var(--amber); }
.dates__row dd { margin: 0; color: var(--muted); text-align: right; }

/* ============================================================
   FORM
   ============================================================ */
.form { margin: 0; }
.form__row { margin: 0 0 16px; }
.form__label {
  display: block;
  margin: 0 0 6px;
  color: var(--cloud);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.form__input {
  display: block;
  width: 100%;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(195, 203, 233, 0.3);
  border-radius: 11px;
  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(195, 203, 233, 0.42); }
.form__input:focus {
  outline: none;
  border-color: var(--amber);
}
.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(--red);
  cursor: pointer;
}
.form__check a { color: var(--amber); 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(--amber);
  font-family: var(--font);
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}
.form__resend-btn:disabled { opacity: 0.5; cursor: default; }

/* --- buttons: pint-amber sticker slabs ----------------------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 20px 0 0;
  padding: 15px 18px 12px;
  border-radius: 12px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: 0.06em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn--primary {
  background: var(--amber);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 rgba(5, 7, 26, 0.55);
  color: var(--ink);
}
.btn--primary:hover:not(:disabled) {
  background: var(--amber-hi);
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 rgba(5, 7, 26, 0.55);
}
.btn--primary:disabled { opacity: 0.65; cursor: wait; }
/* CTA label must never wrap on small phones */
a.btn { white-space: nowrap; font-size: clamp(0.85rem, 4vw, 1.125rem); letter-spacing: clamp(0.03em, 0.4vw, 0.06em); }

/* ============================================================
   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(--amber); }
.iti__arrow--up { border-bottom-color: var(--amber); }

.iti__dropdown-content {
  background: #10173f;
  border: 3px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  color: var(--white);
  box-shadow: 6px 6px 0 rgba(5, 7, 26, 0.5);
}
.iti__search-input {
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-bottom: 2px solid var(--red-soft);
  color: var(--white);
  font-family: var(--font);
  font-size: 15px;
}
.iti__search-input::placeholder { color: rgba(195, 203, 233, 0.45); }
.iti__search-input:focus { outline: none; border-bottom-color: var(--amber); }
.iti__country-list { background: transparent; }
.iti__country { padding: 9px 12px; font-size: 14.5px; }
.iti__country.iti__highlight { background: rgba(225, 46, 69, 0.22); }
.iti__country:hover { background: rgba(225, 46, 69, 0.13); }
.iti__dial-code { color: var(--muted); }

/* 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; }

/* ============================================================
   FOOTER — basslayerz pattern, full width
   ============================================================ */
.foot {
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  padding: 18px clamp(16px, 4vw, 40px) 26px;
  background: rgba(6, 9, 26, 0.72);
  border-top: 1px solid var(--line);
  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(--amber); }
.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 var(--line);
  border-radius: 999px;
}
.site-built a:hover { border-color: var(--amber); 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: 3px solid var(--amber);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .poster, .brand__date li, .count__tile, .count__live { transform: none !important; }
}

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