/* ============================================================
   NYD NOBU 2027 Festival. Langley Park, Perth, Fri 1 Jan 2027.
   Client: Higher Grnd Touring Pty Ltd.

   DIRECTION
   The client's identity is pink type knocked out of black label bars,
   stepped like a staircase, over a blue halftone dot field that pulses
   in their motion piece. The page is built from that one device:
   - the halftone loop runs full bleed behind everything, with the flat
     dot field as poster and fallback (Adam, 7 Oct 2026);
   - the lockup and the venue continue the staircase, top left;
   - the sign-up is the biggest bar of all, a solid black column flush
     to the top, right and bottom edges. Full screen, no box (Adam: "more
     full screen than boxed");
   - fields carry a pink baseline: the underscores in N_O_B_U.
   The video is the only motion. Everything else holds still.

   COLOUR - literal pixels from the supplied files:
     #000000  bars and ground          (Logo.png, Background Pattern.png)
     #FB50A6  NOBU pink                (client value via Adam; the PNG
                                        renders #FE4BA6)
     #4AB7FF  dot blue                 (Background Pattern.png)
     #4299D5  video blue at full pulse (Homepage_2560_x_1440.mov)
   Pink on black 6.8:1, dot blue on black 9.6:1: both carry text.

   TYPE - the client's faces (Dinamo ABC Gravity, a TRIAL build, and
   ABC Areal) are licensed against public serving, so they are used only
   inside rendered images (the bill, OG, CRM and email artwork). Live
   text: Archivo variable (OFL) at full width and weight for titles and
   the button, the closest free relative of Gravity Ultra; Helvetica
   stack for everything you read.
   ============================================================ */

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

:root {
  --black:  #000000;
  --pink:   #FB50A6;
  --pink-hi:#FF6FB8;
  --dot:    #4AB7FF;
  --pulse:  #4299D5;
  --paper:  #FFFFFF;
  --muted:  #BDBDBD;   /* 11.1:1 on black */
  --line:   rgba(255,255,255,.30);
  --danger: #FF8C8C;   /* 9.4:1 on black, distinct from the pink accent */
  --field:  #000000;   /* fields: black on the black bar */
  --field-edge: #FB50A6;

  --display: "Archivo", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font:    "Helvetica Neue", Helvetica, Arial, "Nimbus Sans", "Liberation Sans", sans-serif;

  --panel-w: clamp(400px, 34vw, 520px);
  /* stacked layouts: the window of video above the sign-up bar */
  --window: min(62svh, 150vw);
  --gutter:  clamp(16px, 2.2vw, 40px);
}

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

/* The `hidden` attribute is only display:none in the UA stylesheet, so ANY
   author display rule beats it. Keep this ABOVE everything that sets display. */
[hidden] { display: none !important; }

/* Ground colour on html, NOT body: an opaque body paints over the fixed
   .ground layer. */
html {
  -webkit-text-size-adjust: 100%;
  background: var(--black);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font);
  color: var(--paper);
  background: transparent;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- ground: dot field (poster + fallback) under the video ---------- */
.ground {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--black) url("/assets/images/bg-desktop.webp?v=20261007-10") center / cover no-repeat;
}
@media (max-aspect-ratio: 1/1) {
  .ground { background-image: url("/assets/images/bg-mobile.webp?v=20261007-10"); }
}
/* Stacked layouts (phones, portrait tablets): the ground is only as tall as
   the window above the sign-up bar, so the video's centre (the ripple) sits
   in the middle of what is actually visible, not behind the form (Adam,
   7 Oct 2026). The two-column blocks below restore full height. */
.ground { bottom: auto; height: var(--window); }
.ground__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
}
.ground__video.is-playing { opacity: 1; }

/* ============================================================
   STAGE - stacked by default (phones, portrait tablets, squarish
   windows): the bill over the video, the black sign-up below it.
   ============================================================ */
.stage {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.bill {
  padding: var(--gutter);
  /* leave a window of the video showing under the bill on phones */
  min-height: var(--window);
}
.bill__h1 { margin: 0; }
.bill__img {
  display: block;
  width: 100%;
  max-width: 1000px;
  height: auto;
}

/* ============================================================
   SIGN-UP - the black bar
   ============================================================ */
.signup {
  position: relative;
  margin-top: auto;
  background: var(--black);
}
.panel {
  position: relative;
  isolation: isolate;          /* keeps the country dropdown above everything */
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 36px 22px 40px;
}

/* --- 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="success"] .panel__success { display: block; }

/* ============================================================
   PANEL COPY
   ============================================================ */
.panel__title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(1.9rem, 2.9vw, 2.6rem);
  line-height: .98;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--paper);
  text-wrap: balance;
}
/* House pattern across the fleet: the second line carries the accent.
   <em> so the emphasis is in the markup, reset from italic. */
.panel__title em { font-style: normal; color: var(--pink); }
.panel__lede {
  margin: 0 0 24px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 40ch;
}
.panel__success .panel__lede { margin-bottom: 14px; }
.panel__hint { margin: 0; font-size: 14px; color: var(--muted); }
.panel__success-note { margin: 0 0 12px; color: var(--dot); font-size: 15px; }

/* ============================================================
   FORM - each field is built like the lockup's top two lines: a
   short label bar sitting flush on the long field bar, the way
   "NYD" sits on "N_O_B_U_2027". Pink tab, black type; black field
   in a 2px pink frame that runs out of the tab. On focus the pair
   turns dot blue and a faint halftone field (the video's dots)
   comes up inside the box. Errors turn the pair the error colour.
   Border COLOUR changes only, never width, so nothing reflows.
   (Adam, 7 Oct 2026: underline, white, blue and thin-frame fields
   all read too basic.)
   ============================================================ */
.form__row { margin: 0 0 14px; }
/* first + last name side by side; stacks on narrow phones */
.form__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 360px) { .form__pair { grid-template-columns: 1fr; } }
.form__label {
  display: inline-block;
  margin: 0;
  padding: 6px 10px 4px;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 11.5px;
  line-height: 1.1;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--pink);
  transition: background-color .15s ease;
}
.form__input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 15px 13px;
  font-family: var(--font);
  font-size: 17px;                /* >= 16px or iOS zooms on focus */
  font-weight: 500;
  color: var(--paper);
  background-color: var(--black); /* OPAQUE: the autofill rule depends on it */
  background-image: radial-gradient(circle at center, rgba(74,183,255,0) 1.4px, transparent 1.6px);
  background-size: 8px 8px;
  border: 2px solid var(--pink);
  border-radius: 0;
  transition: border-color .15s ease, background-image .3s ease;
  -webkit-appearance: none;
          appearance: none;
}
.form__input::placeholder { color: #7D7D7D; }   /* 4.9:1 on black, example text */
.form__row:hover .form__input:not(:focus) { border-color: var(--pink-hi); }
.form__row:hover .form__label { background: var(--pink-hi); }
.form__input:focus {
  outline: none;
  border-color: var(--dot);
  background-image: radial-gradient(circle at center, rgba(74,183,255,.22) 1.4px, transparent 1.6px);
}
.form__row:focus-within .form__label { background: var(--dot); }
/* error: the row's own error line is showing */
.form__row:has(.form__error:not([hidden])) .form__label { background: var(--danger); }
.form__row:has(.form__error:not([hidden])) .form__input { border-color: var(--danger); }

/* Chrome paints autofilled inputs pale lavender and IGNORES background on
   :-webkit-autofill; a huge inset box-shadow is the only override. The field
   is opaque black on an opaque black bar, so the flattened colour IS #000.
   The frame is a border, so it survives this rule untouched. */
.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(--black) inset !important;
          box-shadow: 0 0 0 1000px var(--black) inset !important;
  -webkit-text-fill-color: var(--paper) !important;
  caret-color: var(--paper);
  transition: background-color 9999s ease-in-out 0s;   /* stops the lavender flashing in */
}

.form__error { margin: 7px 0 0; font-size: 14px; 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 markup also carries the `hidden` attribute as a second guard. */
.hp-row { display: none !important; }

.form__row--check { margin: 18px 0 22px; }
.form__check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
/* square, like everything in this identity; pink fill + black tick when on.
   The tick is a background image, not ::before (unreliable on inputs). */
.form__check input {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin: 0;
  -webkit-appearance: none;
          appearance: none;
  background: var(--black) center / 14px 14px no-repeat;
  border: 1.5px solid var(--pink);
  border-radius: 0;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.form__check input:checked {
  background-color: var(--pink);
  border-color: var(--pink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7.4l3 3 6-6.6' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='square'/%3E%3C/svg%3E");
}
.form__check input:focus-visible { outline: 2px solid var(--dot); outline-offset: 2px; }
.form__check a { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
.form__check a:hover { color: var(--pink); }

/* ---------- button: a pink bar with black type, the lockup inverted ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 18px 16px;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(1rem, 4.4vw, 1.2rem);
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;            /* shrink the type before it can ever wrap */
  text-align: center;
  text-decoration: none;
  color: var(--black);
  background: var(--pink);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .15s ease, transform .12s ease;
}
/* hover swaps to the dot blue: the identity's other colour, 9.6:1 with black */
.btn:hover:not(:disabled) { background: var(--dot); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: default; }

/* ============================================================
   intl-tel-input v25 - dark, on the bar
   ============================================================ */
.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: 0;
  border-radius: 0;
  box-shadow: 0 0 0 2px var(--pink), 0 26px 56px -18px 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. */
  padding: 11px 30px 11px 32px;
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  color: var(--paper);
  background: #000;
  border: 0;
  border-bottom: 1px solid var(--field-edge);
}
.iti__search-input::placeholder { color: #9A9A9A; }
.iti__search-input:focus { outline: none; box-shadow: inset 0 -2px 0 var(--pink); }
.iti__search-icon, .iti__search-clear { color: #9A9A9A; }
.iti__search-clear-x { fill: #9A9A9A; }
.iti__country-list { background: var(--field); max-height: 240px; }
.iti__country {
  padding: 9px 12px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--paper);
}
.iti__country:hover,
.iti__country.iti__highlight { background: rgba(251,80,166,.24); }
.iti__dial-code { color: #9A9A9A; }
.iti__country-name { color: var(--paper); }
.iti__selected-country { border-radius: 0; }
.iti__selected-country:hover,
.iti__selected-country-primary:hover { background: rgba(251,80,166,.14); }
.iti__selected-dial-code { color: var(--paper); font-family: var(--font); font-size: 16px; font-weight: 500; }
.iti__arrow { border-top-color: #9A9A9A; }
.iti__arrow--up { border-bottom-color: #9A9A9A; }
/* a thin divider between the country chip and the number, inside the bar */
.iti__selected-country-primary { border-right: 1px solid rgba(251,80,166,.45); }

/* ============================================================
   FOOTER - fleet band (basslayerz pattern, credit in a pill)
   ============================================================ */
.foot {
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  padding: 18px clamp(16px, 4vw, 40px) 24px;
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,.14);
  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: 13px; color: var(--muted); letter-spacing: .01em; }
.foot__legal a { color: var(--muted); text-decoration: none; }
.foot__legal a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.site-built { margin: 0; }
.site-built a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  transition: border-color .18s ease, color .18s ease;
}
.site-built a:hover { color: var(--paper); border-color: var(--pink); }
.site-built img { display: block; opacity: .9; }

@media (max-width: 899px) {
  .foot { justify-content: center; text-align: center; }
  .foot__left { justify-content: center; }
}
/* Phones: stack the footer rather than relying on the flex row wrapping. */
@media (max-width: 480px) {
  .foot { flex-direction: column; align-items: center; gap: 10px; padding-bottom: 22px; }
  .foot__left { flex-direction: column; align-items: center; gap: 10px; }
}

/* ============================================================
   TWO COLUMN - bill top left on the video, the sign-up bar flush
   to the right edge at full height. Aspect-ratio threshold, not
   width alone (gotcha 20): squarish windows stay stacked.
   The panel track is DEFINITE (--panel-w), never auto.
   ============================================================ */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  /* The ground stops where the sign-up bar starts, so the video's own
     centre (the ripple) sits in the middle of the visible left side rather
     than under the bar's edge (Adam, 7 Oct 2026). */
  .ground { right: var(--panel-w); bottom: 0; height: auto; }
  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--panel-w);
    min-height: 100vh;
    min-height: 100svh;
  }
  .bill {
    min-height: 0;
    padding: clamp(20px, 2.1vw, 40px);
    align-self: start;
  }
  .bill__img { max-width: min(100%, 1100px); }
  .signup {
    margin: 0;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
  }
  .panel {
    max-width: none;
    padding: 48px clamp(32px, 3.4vw, 64px);
  }
  .foot { border-top-color: rgba(255,255,255,.14); }
}

/* --- landscape phones are a first-class layout (gotcha 27) ---
   844x390, 932x430, 667x375: width but almost no height. Same side by
   side, narrower bar, tighter type; the bar scrolls, the bill stays.
   AFTER the desktop block so it wins at equal specificity. */
@media (min-width: 640px) and (min-aspect-ratio: 7/10) and (max-height: 520px) {
  :root { --panel-w: min(360px, 48vw); }
  .ground { right: var(--panel-w); bottom: 0; height: auto; }
  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--panel-w);
    min-height: 100vh;
    min-height: 100svh;
  }
  .bill {
    min-height: 0;
    padding: 16px;
    align-self: start;
    position: sticky;
    top: 0;
  }
  .bill__img { max-height: calc(100svh - 32px); width: auto; max-width: 100%; }
  .signup { margin: 0; min-height: 100svh; display: block; }
  .panel { max-width: none; padding: 18px 20px 20px; }
  .panel__title { font-size: 1.35rem; margin-bottom: 6px; }
  .panel__lede { font-size: 14px; margin-bottom: 12px; }
  .form__row { margin-bottom: 9px; }
  .form__input { min-height: 42px; padding: 9px 12px 8px; font-size: 16px; }
  .form__label { font-size: 10.5px; padding: 5px 8px 3px; }
  .form__row--check { margin: 10px 0 12px; }
  .form__check { font-size: 12.5px; }
  .btn { padding: 12px 16px 11px; font-size: 1rem; }
  .iti__country-list { max-height: 150px; }
}

@media (max-width: 400px) {
  .panel { padding: 30px 16px 34px; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--dot);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .ground__video { display: none; }
}

/* ============================================================
   LINE-UP (15 Oct 2026). Homepage: one more black bar under the
   bill, linking to /lineup.html. Line-up page: the client's poster
   type (bars + names, no halftone, from Poster-Master.ai) on the
   moving dot field, in the bill's place; the presale call takes
   the sign-up bar's place and sends people to the form.
   ============================================================ */
.bill__lineup {
  display: inline-block;
  margin-top: clamp(10px, 1.2vw, 18px);
  padding: .5em .7em .42em;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 125%;
  font-size: clamp(1.15rem, 2.3vw, 2rem);
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--pink);
  background: var(--black);
  transition: color .15s ease, background-color .15s ease;
}
.bill__lineup:hover { color: var(--black); background: var(--pink); }

/* the poster type is tall: the dot field runs behind all of it */
.page-lineup .ground { bottom: 0; height: auto; }
.bill--lineup {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 0;
  padding: var(--gutter) 12px;
}
.lineup__img {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
}

@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .bill--lineup {
    align-self: stretch;
    align-items: center;
    padding: clamp(20px, 2.1vw, 40px);
  }
  .lineup__img {
    width: auto;
    max-width: 100%;
    max-height: calc(100svh - 2 * clamp(20px, 2.1vw, 40px));
  }
}
@media (min-width: 640px) and (min-aspect-ratio: 7/10) and (max-height: 520px) {
  .bill--lineup { padding: 16px; }
  .lineup__img { width: auto; max-width: 100%; max-height: calc(100svh - 32px); }
}
