/* ============================================================
   HOT DUB TIME MACHINE - Outernet Live, London - Fri 19 March 2027
   Client: Louder Entertainment (Coalition Presents, TMRW).

   Option A, "Hands up" (Adam, 2026-10-08). The page is the client's crowd
   photo, full-bleed. HOT DUB hangs over the stage BEHIND the crowd's raised
   hands, and the date + venue sit over the crowd, as the poster stacks them.
   All of that is one flat plate per screen shape (hotdub-src/build_scene.py),
   so there are no runtime layers or animation. The sign-up sits straight on
   the plate at the right with no box; the darkness under it is a gradient.

   Palette sampled from literal pixels of the layers, 2026-10-08:
     --pink   #FF5DB5  the date line's ink, ~7.4:1 on --ink: text + CTA
     --haze   #F5ECE4  the beam haze, body text
     --ink    #010201  the crowd's silhouettes
   Fields are OPAQUE (--field) so the autofill inset shadow is that same
   value, with no flattening sum to get wrong.

   Type: the artwork face (Oldschool Grotesk, commercial, trial build in the
   PSD) only appears baked into the plates. Live type is Archivo variable,
   condensed + heavy, the free stand-in.
   ============================================================ */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/Archivo-var.woff2?v=20261008-1") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}

/* Layout custom properties live on :root, NOT .page: .bg sits outside
   .page and reads --signup-w for its gradient. Scoping them to .page gave
   carlcox-margate a zero-width plate layer (2026-10-02). */
:root {
  --pink:      #FF5DB5;
  --pink-glow: rgba(255, 93, 181, .55);
  --haze:      #F5ECE4;
  --haze-soft: rgba(245, 236, 228, .78);
  --haze-dim:  rgba(245, 236, 228, .56);
  --ink:       #010201;
  --field:     #140F13;   /* opaque, see header */
  --line:      rgba(245, 236, 228, .26);
  --danger:    #FF9A8A;   /* 9.6:1 on --ink */

  --display: "Archivo", "Arial Narrow", Arial, sans-serif;
  --body:    "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --signup-w: clamp(380px, 33vw, 500px);
  --gutter:   clamp(16px, 4vw, 72px);
}

*, *::before, *::after { box-sizing: border-box; }

/* The `hidden` attribute is only display:none in the UA stylesheet, the
   weakest rule there is; any display we set on a class beats it. Restore it. */
[hidden] { display: none !important; }

/* Ground colour lives on html, NOT body: an opaque body background paints
   over the fixed .bg layer (gotcha 16). */
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  color: var(--haze);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }

/* ---------- the scene plate ----------
   Four rules, mirrored exactly by the four <link rel=preload> in index.html.
   Desktop scene = the two-column layout below, (min-aspect-ratio: 10/9) and
   (min-width: 640px). NOT 7/10 (the engine default): on a 16:9 plate fitted to
   a portrait tablet's height, the art (13-47% across the plate) is cropped off
   the left edge below ~10:9, so iPad mini/Air/Pro portrait take the phone
   layout instead (Adam, 2026-10-08, "unsure about the tablet layout"). The plates are composed so the cover crop keeps the
   art: desktop focal point 30% across / 45% down, phone 50% / 26%. A 1920x960
   browser viewport shows 89% of the desktop plate height; the art spans 13-89%. */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--ink) url("/assets/images/scene-mobile-sm.webp?v=20261008-6") 50% 26% / cover no-repeat;
}
@media (min-width: 501px) {
  .bg { background-image: url("/assets/images/scene-mobile.webp?v=20261008-6"); }
}
@media (min-aspect-ratio: 10/9) and (min-width: 640px) {
  .bg { background-image: url("/assets/images/scene-desktop-sm.webp?v=20261008-5"); background-position: 30% 45%; }
}
@media (min-aspect-ratio: 10/9) and (min-width: 1501px) {
  .bg { background-image: url("/assets/images/scene-desktop.webp?v=20261008-5"); }
}

/* ============================================================
   PAGE - phones first: the scene fills the first screen, the
   sign-up scrolls up over it on its own darkness
   ============================================================ */
.page {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
/* Stacked layout: the art area ends just under the baked venue line, which
   sits at ~67% of the PLATE. The 9:16 plate is cover-fitted, so its height is
   max(100svh, 177.78vw) and it is cropped 26% from the top: the venue's foot
   lands at 0.67B + 0.26(V - B) = 0.41B + 0.26V. Phones (B = V) give 67svh;
   portrait tablets crop more and need more, so a fixed 70svh let the form
   slide up over the date there. */
.bill {
  flex: 0 0 auto;
  height: calc(0.41 * max(100svh, 177.78vw) + 0.26 * 100svh + 12px);
}

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

/* ============================================================
   SIGN-UP - straight on the plate, no box
   ============================================================ */
.signup {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding: 44px 20px 0;
  /* phones: the content scrolls over a fixed plate, so the sign-up carries
     its own darkness, faded in at the top edge rather than boxed */
  background: linear-gradient(to bottom, rgba(1,2,1,0) 0, rgba(1,2,1,.9) 56px, rgba(1,2,1,.96) 100%);
}
.panel {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
}

/* --- state machine (app.js flips data-form-state on .panel) --- */
.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__title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 860;
  font-size: clamp(46px, 13vw, 64px);
  line-height: .9;
  letter-spacing: -.005em;
  text-transform: uppercase;
  color: var(--haze);
  text-wrap: balance;
}
/* House pattern: the second line carries the accent. */
.panel__title em { font-style: normal; color: var(--pink); }
.panel__lede {
  margin: 0 0 10px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--haze-soft);
  max-width: 40ch;
}
.panel__lede--last { margin-bottom: 22px; }
.panel__lede strong { color: var(--haze); font-weight: 700; }
.panel__success-note { margin: 0 0 12px; color: var(--pink); font-size: 14.5px; font-weight: 700; }

/* ============================================================
   FORM
   ============================================================ */
.form__row { margin: 0 0 12px; }
/* labels stay for screen readers; placeholders carry the meaning visually */
.form__label {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.form__input {
  display: block;
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  font-family: var(--body);
  font-size: 16px;            /* 16px stops iOS zooming on focus */
  color: var(--haze);
  background: var(--field);
  border: 1.5px solid var(--line);
  border-radius: 6px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
          appearance: none;
}
.form__input::placeholder { color: var(--haze-dim); opacity: 1; }
.form__input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 93, 181, .22);
}
.form__input--otp {
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 760;
  font-size: 28px;
  letter-spacing: .4em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--pink);
}
.form__input--otp::placeholder { color: rgba(255, 93, 181, .28); }

/* Chrome paints autofilled inputs pale lavender and IGNORES background /
   background-color on :-webkit-autofill - a huge inset box-shadow is the only
   reliable override. It must be the field's FLATTENED OPAQUE colour, which is
   simply --field here because the field is opaque on purpose. */
.form__input:-webkit-autofill,
.form__input:-webkit-autofill:hover,
.form__input:-webkit-autofill:focus,
.form__input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--field) inset !important;
          box-shadow: 0 0 0 1000px var(--field) inset !important;
  -webkit-text-fill-color: var(--haze) !important;
  caret-color: var(--haze);
  transition: background-color 9999s ease-in-out 0s;   /* stops the lavender flashing in */
}

.form__error { margin: 7px 0 0; font-size: 13.5px; font-weight: 650; color: var(--danger); }
.form__error--global { margin-top: 14px; }

/* Honeypot. display:none ONLY - off-screen positioning stays an autofill
   target in Chrome/Edge, which fills it and silently blocks real signups.
   (The row also carries the hidden attribute; belt and braces.) */
.hp-row { display: none !important; }

.form__row--check { margin: 16px 0 18px; }
.form__check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 13px;
  line-height: 1.5;
  color: var(--haze-soft);
  cursor: pointer;
}
.form__check input {
  -webkit-appearance: none;
          appearance: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  border: 1.5px solid var(--haze-dim);
  border-radius: 4px;
  background: var(--field);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.form__check input::after {
  content: "";
  width: 10px; height: 6px;
  border-left: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform .12s ease;
}
.form__check input:checked { background: var(--pink); border-color: var(--pink); }
.form__check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.form__check a { color: var(--haze); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.form__check a:hover { color: var(--pink); }

.form__resend { margin: 16px 0 0; font-size: 14px; color: var(--haze-dim); }
.form__resend-btn {
  padding: 0;
  font: inherit;
  font-weight: 650;
  color: var(--haze);
  background: none;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.form__resend-btn:hover { color: var(--pink); }
.form__resend-btn:disabled { color: var(--haze-dim); cursor: default; text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 22px;
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 820;
  font-size: 21px;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, filter .15s ease;
}
.btn:disabled { opacity: .65; cursor: default; }
/* Ink on pink: ~7.4:1. A neon halo that tightens on press. */
.btn--primary {
  color: var(--ink);
  background: var(--pink);
  box-shadow: 0 0 0 0 rgba(255,93,181,0), 0 10px 30px -12px var(--pink-glow);
}
.btn--primary:hover:not(:disabled) { box-shadow: 0 0 0 4px rgba(255,93,181,.22), 0 12px 34px -10px var(--pink-glow); }
.btn--primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 0 0 2px rgba(255,93,181,.3); }
.btn--whatsapp {
  color: #FFFFFF;
  background: #128C4A;       /* WhatsApp green darkened to 4.9:1 under white */
}
.btn--whatsapp:hover { filter: brightness(1.08); }
.btn--whatsapp:active { transform: translateY(2px); }
.btn__icon { flex: 0 0 auto; width: 20px; height: 20px; }

.wa-hook { margin: 18px 0 12px; font-size: 14px; color: var(--haze-soft); }
.wa-hook strong { color: var(--haze); font-weight: 700; }

/* ============================================================
   intl-tel-input v25
   ============================================================ */
.iti { width: 100%; display: block; }
/* app.js re-measures and sets padding-left inline; this is the sane default
   before it runs. Anything >= 80px breaks 320-390px viewports. */
.iti input.form__input { padding-left: calc(52px + 0.7rem); }
.iti__country-container { z-index: 3; }
.iti--inline-dropdown .iti__dropdown-content { z-index: 50; }
/* Until the vendor stylesheet loads, the hidden state does not exist and the
   whole list plus search box flashes open on first paint. */
.iti__dropdown-content.iti__hide { display: none !important; }

.iti__dropdown-content {
  background: var(--field);
  border: 1.5px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 22px 44px -16px rgba(0,0,0,.9);
  overflow: hidden;
}
.iti__search-input {
  /* Keep the vendor's horizontal padding reservation: 30px left clears the
     absolutely positioned search icon, 28px right clears the clear button. A
     padding SHORTHAND that drops them puts the magnifier on top of the
     placeholder text. Set the vertical values, keep the horizontal ones. */
  padding: 10px 30px 10px 32px;
  width: 100%;
  font-family: var(--body);
  font-size: 15px;
  color: var(--haze);
  background: #1F171D;
  border: 0;
  border-bottom: 1.5px solid var(--line);
}
.iti__search-input::placeholder { color: var(--haze-dim); }
.iti__search-input:focus { outline: none; background: #2A1E27; }
.iti__search-icon { color: var(--haze-dim); }
.iti__country-list { background: var(--field); max-height: 240px; }
.iti__country {
  padding: 9px 12px;
  font-family: var(--body);
  font-size: 14px;
  color: var(--haze);
}
.iti__country:hover,
.iti__country.iti__highlight { background: rgba(255, 93, 181, .2); }
.iti__dial-code { color: var(--haze-dim); }
.iti__country-name { color: var(--haze); }
.iti__selected-country { border-radius: 6px 0 0 6px; }
.iti__selected-country:hover,
.iti__selected-country-primary:hover { background: rgba(255, 93, 181, .12); }
.iti__selected-dial-code { color: var(--haze); font-family: var(--body); font-size: 16px; }
.iti__arrow { border-top-color: var(--haze-dim); }
.iti__arrow--up { border-bottom-color: var(--haze-dim); }

/* ============================================================
   FOOTER - house footer, credit in a pill. Dark band, so the credit
   logo (white wordmark + teal roundel) is used as drawn.
   ============================================================ */
.foot {
  margin-top: auto;
  padding: 34px 0 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.foot__legal { margin: 0; font-size: 12px; color: var(--haze-dim); letter-spacing: .01em; }
.foot__legal a { color: var(--haze-dim); text-decoration: underline; text-underline-offset: 2px; }
.foot__legal a:hover { color: var(--haze); }
/* privacy + T&Cs of entry side by side, wrapping onto two centred lines on narrow phones */
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.site-built { margin: 0; }
.site-built a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--haze-dim);
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease;
}
.site-built a:hover { color: var(--haze); border-color: var(--pink); }
.site-built img { display: block; opacity: .9; }
/* promoter row: a small credit, never a feature (Adam, 2026-10-08) */
.foot__partners { display: block; width: 150px; height: auto; margin: 0 auto 6px; opacity: .85; }

/* ============================================================
   DESKTOP / WIDE: the scene full-bleed, the sign-up column on its
   right over a gradient. Aspect-ratio threshold, not orientation
   (gotcha 20); it matches the desktop plate rules exactly.
   ============================================================ */
@media (min-aspect-ratio: 10/9) and (min-width: 640px) {
  .bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to left,
        rgba(1,2,1,.93) 0,
        rgba(1,2,1,.86) calc(var(--signup-w) - 30px),
        rgba(1,2,1,0)   calc(var(--signup-w) + 12vw));
  }
  .page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--signup-w);
  }
  .bill { height: auto; }
  .signup {
    background: none;
    min-height: 100svh;
    padding: clamp(28px, 6svh, 64px) clamp(24px, 3vw, 56px) 0;
  }
  .panel { margin: auto 0 0; }
  .foot { margin-top: auto; padding-top: 30px; }
  .panel__title { font-size: clamp(50px, min(4.6vw, 8svh), 76px); }
  /* the promoter credit sits in the art's bottom-left corner */
  .foot__partners {
    position: fixed;
    left: clamp(20px, 3.4vw, 56px);
    bottom: clamp(18px, 4.6svh, 44px);
    width: clamp(120px, 10vw, 170px);
    margin: 0;
  }
}

/* --- landscape phones are a first-class layout (gotcha 27) ---
   844x390, 932x430, 667x375: desktop scene and columns, almost no height.
   Tighter type; the column scrolls with the page. Placed AFTER the desktop
   block so it wins at equal specificity. */
@media (min-aspect-ratio: 10/9) and (min-width: 640px) and (max-height: 520px) {
  :root { --signup-w: min(46vw, 400px); }
  .signup { padding: 18px 22px 0; }
  .panel__title { font-size: 40px; margin-bottom: 8px; }
  .panel__lede { font-size: 14px; }
  .panel__lede--last { margin-bottom: 14px; }
  .form__input { min-height: 48px; padding-top: 11px; padding-bottom: 11px; }
  .btn { min-height: 50px; font-size: 19px; }
  .foot { padding-top: 22px; }
  .foot__partners { width: 110px; bottom: 14px; left: 18px; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2.5px solid var(--pink);
  outline-offset: 3px;
}
.form__input:focus-visible { outline: none; }   /* the pink ring + border carry focus */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
