/* ============================================================
   FORWARD MOTION IN THE PARK - Leyton Jubilee Park, Sat 29 May 2027
   Ticket sign-up. Client: Forward Motion.

   DIRECTION
   The artwork is a summer daytime photograph: a deep blue sky over
   a packed festival crowd, with the white lockup on the sky. The
   page IS that photograph. The plate runs full-bleed with the crowd
   anchored to the bottom edge; the lockup sits on the sky on the
   left, crisp and exactly as supplied (no glow, no feathering:
   client, 8 Oct); the sign-up sits on the right.

   The plates carry a graduated sky, baked offline: the pale haze
   above the treeline (#B9D5E3, ~1.6:1 under white) is pulled toward
   the zenith blue and released before the trees, so the lockup's
   small venue line clears 3.4:1 on every common desktop shape.

   COLOUR - literal pixels from the client's layers:
     #002A4E  zenith (desktop_background.png, top-left)
     #0086C0  mid sky
     #B9D5E3  horizon haze (structure only, never under text)
     #78BC80  the IN THE PARK bar (logo_text.png)
     #FCFCFC  lockup white
     #1D2420  the crowd

   TYPE - Martian Mono (OFL), the lockup's own date-line face,
   for titles and the button. Reading copy in the system Helvetica.

   SIGNATURE - the button is the lockup's IN THE PARK bar: flat park
   green, square, mono caps in zenith navy (6.5:1). The bright green
   appears only there and on the title hook.
   ============================================================ */

@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/martian-mono-latin-400.woff2?v=20261008-2") format("woff2");
}
@font-face {
  font-family: "Martian Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/martian-mono-latin-700.woff2?v=20261008-2") format("woff2");
}

:root {
  --zenith:   #002A4E;   /* top of the sky - glass, button type */
  --sky:      #0086C0;   /* mid sky */
  --park:     #78BC80;   /* the IN THE PARK bar - button, title hook, focus */
  --chalk:    #FCFCFC;   /* lockup white */
  --crowd:    #1D2420;
  --field:    #01213F;   /* form field - OPAQUE on purpose, see autofill note */
  --mist:     #C7D9E6;   /* reading copy: 12.4:1 on --field */
  --mist-dim: #8FA9BC;   /* placeholders, secondary: 6.9:1 on --field */
  --danger:   #FFB8A6;

  --display: "Martian Mono", "Courier New", monospace;
  --text: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

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

/* Ground colour lives on html, NOT body: an opaque body paints over the
   z-index:-2 .bg layer and the photograph disappears. */
html {
  -webkit-text-size-adjust: 100%;
  background: var(--zenith);
}

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

/* ---------- the photograph ----------
   Crowd anchored to the bottom edge. Chosen by aspect ratio, not width
   alone, so squarish windows never fall in a gap. Preloads in index.html
   use these exact conditions. */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--zenith);
  background-image: url("/assets/images/bg-mobile-sm.webp?v=20261008-2");
  background-position: 50% 100%;
  background-size: cover;
}
@media (max-aspect-ratio: 7/10) and (min-width: 501px) {
  .bg { background-image: url("/assets/images/bg-mobile.webp?v=20261008-2"); }
}
@media (min-aspect-ratio: 7/10) {
  .bg { background-image: url("/assets/images/bg-desktop-sm.webp?v=20261008-2"); }
}
@media (min-aspect-ratio: 7/10) and (min-width: 1281px) {
  .bg { background-image: url("/assets/images/bg-desktop.webp?v=20261008-2"); }
}

/* ============================================================
   STAGE
   ============================================================ */
.stage {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;                 /* auto at EVERY breakpoint - never plain 0 */
  padding: clamp(24px, 6vw, 48px) 16px clamp(28px, 4vw, 48px);
  display: flex;
  align-items: flex-start;
}
.stage__inner {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: clamp(22px, 5vw, 36px);
  align-items: start;
}

/* ---------- the lockup ---------- */
.bill {
  justify-self: center;
  width: min(80vw, 360px);
}
.bill__h1 { margin: 0; line-height: 0; }
.bill__art {
  display: block;
  width: 100%;
  height: auto;
  animation: rise 1s ease-out both;
}

/* The one orchestrated moment: the lockup comes up on the sky, then the
   panel settles beside it. */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes settle {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ============================================================
   SIGNUP PANEL - glass in the zenith blue
   ============================================================ */
.signup {
  justify-self: center;
  width: 100%;
  max-width: 430px;
  position: relative;
  z-index: 1;
}
.panel {
  width: 100%;
  position: relative;
  isolation: isolate;             /* keeps the country dropdown above the glass */
  animation: settle .8s .3s cubic-bezier(.16,.84,.36,1) both;
}
/* The glass. Drawn on a pseudo-element (z-index 0) rather than on .panel,
   so nothing here can ever clip or cover the country dropdown. */
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, rgba(0,36,68,.80) 0%, rgba(0,28,54,.88) 100%);
  border: 1px solid rgba(252,252,252,.14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 34px 70px -34px rgba(0,16,32,.85);
}
.panel__inner {
  position: relative;
  z-index: 2;
  padding: clamp(24px, 3vw, 34px) clamp(22px, 3vw, 34px) clamp(26px, 3.2vw, 34px);
}

/* --- 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: 700;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  text-transform: uppercase;
  color: var(--chalk);
  text-wrap: balance;
}
/* House pattern: the second line carries the accent, in the park green.
   <em> keeps the emphasis in the markup; reset from italic. */
.panel__title em {
  font-style: normal;
  color: var(--park);
}
.panel__lede {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--mist);
  max-width: 42ch;
}
.panel__lede--last { margin-bottom: 20px; }
.panel__lede strong { color: var(--chalk); font-weight: 600; }
.panel__success-note { margin: 0 0 12px; color: var(--park); font-size: 14px; }
.panel__note { margin: 14px 0 0; font-size: 13px; color: var(--mist); }

/* ============================================================
   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 {
  width: 100%;
  padding: 14px 14px;
  font-family: var(--text);
  font-size: 16px;                /* 16px minimum or iOS zooms the page on focus */
  color: var(--chalk);
  background: var(--field);       /* OPAQUE - see the autofill rule below */
  border: 1px solid rgba(199,217,230,.26);
  border-radius: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.form__input::placeholder { color: var(--mist-dim); opacity: 1; }
.form__input:hover { border-color: rgba(199,217,230,.5); }
.form__input:focus {
  outline: none;
  border-color: var(--park);
  box-shadow: 0 0 0 3px rgba(120,188,128,.25);
}

/* Chrome paints autofilled inputs pale lavender and IGNORES background on
   :-webkit-autofill; a huge inset box-shadow is the only reliable override.
   A box-shadow cannot be translucent, so it must be the flattened opaque
   colour of the field - trivially --field, because the field is opaque on
   purpose. Keep it opaque or recompute this. The 9999s transition stops the
   lavender flashing in first. */
.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(--chalk) !important;
  caret-color: var(--chalk);
  transition: background-color 9999s ease-in-out 0s;
}

.form__error { margin: 7px 0 0; font-size: 13px; line-height: 1.45; 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. */
.hp-row { display: none !important; }

.form__row--check { margin: 16px 0 20px; }
.form__check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--mist);
  cursor: pointer;
}
.form__check input {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin: 1px 0 0;
  accent-color: var(--park);
  cursor: pointer;
}
.form__check a { color: var(--chalk); text-decoration: underline; text-underline-offset: 2px; }
.form__check a:hover { color: var(--park); }

/* ---------- button: the IN THE PARK bar ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 18px 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(.98rem, 3.4vw, 1.08rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;            /* shrink the type before it can ever wrap */
  text-align: center;
  text-decoration: none;
  color: var(--zenith);           /* 6.5:1 on the park green */
  background: var(--park);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .18s ease, transform .12s ease;
}
.btn:hover:not(:disabled) { background: #8ACB91; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: default; }

/* ============================================================
   intl-tel-input v25
   ============================================================ */
.iti { width: 100%; display: block; }
/* app.js re-measures and sets padding-left inline (sanity-gated); 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: #00182F;
  border: 1px solid rgba(120,188,128,.55);
  border-radius: 0;
  box-shadow: 0 26px 56px -18px rgba(0,10,20,.9);
  overflow: hidden;
}
.iti__search-input {
  /* Keep the vendor's horizontal reservation (icon left, clear button right).
     A padding shorthand that drops it puts the magnifier on the placeholder. */
  padding: 10px 30px 10px 32px;
  width: 100%;
  font-family: var(--text);
  font-size: 15px;
  color: var(--chalk);
  background: var(--field);
  border: 0;
  border-bottom: 1px solid rgba(199,217,230,.24);
}
.iti__search-input::placeholder { color: var(--mist-dim); }
.iti__search-input:focus { outline: none; background: #032A4E; }
.iti__country-list { background: #00182F; max-height: 240px; }
.iti__country {
  padding: 9px 12px;
  font-size: 14px;
  color: var(--mist);
}
.iti__country:hover,
.iti__country.iti__highlight { background: rgba(120,188,128,.16); }
.iti__dial-code { color: var(--mist-dim); }
.iti__country-name { color: var(--mist); }
.iti__selected-country:hover,
.iti__selected-country-primary:hover { background: rgba(199,217,230,.08); }
.iti__selected-dial-code { color: var(--chalk); font-size: 15px; }
.iti__arrow { border-top-color: var(--mist-dim); }
.iti__arrow--up { border-bottom-color: var(--mist-dim); }

/* ============================================================
   FOOTER - fleet band (basslayerz pattern), credit in a pill
   ============================================================ */
.foot {
  flex-shrink: 0;
  width: 100%;
  margin: 0;
  padding: 16px clamp(16px, 4vw, 40px) 22px;
  background: rgba(0,20,38,.84);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(120,188,128,.28);
  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(--mist-dim); letter-spacing: .02em; }
.foot__legal a { color: var(--mist-dim); text-decoration: none; }
.foot__legal a:hover { color: var(--park); }
.site-built { margin: 0; }
.site-built a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  font-size: 11px;
  letter-spacing: .03em;
  color: var(--mist-dim);
  text-decoration: none;
  border: 1px solid rgba(199,217,230,.22);
  border-radius: 999px;
  transition: border-color .16s ease, color .16s ease;
}
.site-built a:hover { border-color: var(--park); color: var(--chalk); }
.site-built img { display: block; opacity: .9; }

/* ============================================================
   RESPONSIVE - aspect-ratio thresholds, not width alone
   ============================================================ */

/* --- stacked (phones, tablets, tall windows): lockup on the sky, panel
   below over the crowd --- */
@media (max-width: 899px), (max-aspect-ratio: 7/10) {
  .foot { justify-content: center; text-align: center; }
  .foot__left { justify-content: center; }
}

/* --- two columns: lockup left, sign-up right ---
   Both tracks hug their content and the pair is centred on the page as one
   unit horizontally (Adam, 8 Oct), with lockup and panel centred on each
   other. Vertically the block stays anchored near the TOP: vertical centring
   was tried and reverted the same day (Adam) because it drops the venue line
   onto the pale horizon and the trees. Height-capped with width auto, so
   max-width 100% sits beside it (gotcha 38: tall windows otherwise run it
   under the panel). */
@media (min-width: 900px) and (min-aspect-ratio: 7/10) {
  .stage { padding-top: clamp(28px, 7vh, 90px); }
  .stage__inner {
    grid-template-columns: auto minmax(360px, 430px);
    justify-content: center;
    align-items: center;
    column-gap: clamp(36px, 5vw, 80px);
  }
  .bill { justify-self: center; width: auto; }
  .bill__art { width: auto; max-width: 100%; max-height: min(52svh, 540px); }
  .signup { justify-self: 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; }
}

/* --- landscape phones are a first-class layout ---
   844x390 / 932x430 / 667x375 satisfy the desktop conditions with almost no
   height. Compact side by side, placed AFTER the desktop block so it wins at
   equal specificity. */
@media (min-width: 640px) and (min-aspect-ratio: 7/10) and (max-height: 520px) {
  .stage { padding: 12px clamp(12px, 3vw, 26px); }
  .stage__inner {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 22px;
    align-items: start;
  }
  .bill { width: auto; justify-self: center; }
  .bill__art { width: auto; max-width: 100%; max-height: min(calc(100svh - 60px), 300px); }
  .signup { justify-self: stretch; max-width: 460px; }
  .panel__inner { padding: 16px 18px 18px; }
  .panel__title { font-size: 1.15rem; margin-bottom: 8px; }
  .panel__idle .panel__lede { display: none; }   /* the lockup beside it states place + date */
  .form__row { margin-bottom: 9px; }
  .form__input { padding: 10px 13px; }
  .form__row--check { margin: 11px 0 12px; }
  .form__check { font-size: 11px; line-height: 1.45; }
  .btn { padding: 12px 16px 11px; }
  .iti__country-list { max-height: 150px; }
  .foot { padding-top: 11px; padding-bottom: 13px; }
}

/* --- small phones --- */
@media (max-width: 380px) {
  .panel__inner { padding-left: 18px; padding-right: 18px; }
}

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

/* ============================================================
   LEGAL PAGE (privacy.html) - flat ground, comfortable measure
   ============================================================ */
body.legal-wrap {
  display: block;
  min-height: 0;
  background: var(--zenith);
  color: var(--mist);
  line-height: 1.65;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem) 4rem;
}
.legal { max-width: 720px; margin: 0 auto; }
.legal__back {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 2.5rem;
  padding: .4rem 1.05rem .4rem .4rem;
  border: 1px solid rgba(120,188,128,.45);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .18s ease, background-color .18s ease;
}
.legal__back:hover { border-color: var(--park); background: rgba(120,188,128,.08); }
.legal__back-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--park);
  color: var(--zenith);
  transition: transform .18s ease;
}
.legal__back:hover .legal__back-arrow { transform: translateX(-3px); }
.legal__back-arrow svg { width: 13px; height: 13px; display: block; }
.legal__back-label { display: inline-flex; flex-direction: column; line-height: 1.15; }
.legal__back-text { font-size: 10px; letter-spacing: .06em; color: var(--mist-dim); }
.legal__back-brand { font-size: 13px; color: var(--chalk); }
.legal h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  line-height: 1.12;
  text-transform: uppercase;
  margin: 0 0 2rem;
  color: var(--chalk);
  text-wrap: balance;
}
.legal h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  color: var(--park);
  margin: 2.2rem 0 .7rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid rgba(120,188,128,.25);
}
.legal h3 { font-weight: 600; font-size: 14px; color: var(--chalk); margin: 1.8rem 0 .4rem; }
.legal p, .legal li { font-size: 15px; color: var(--mist); }
.legal ul { padding-left: 1.1rem; margin: .5rem 0 1rem; }
.legal li { margin-bottom: .45rem; }
.legal a:not(.legal__back) { color: var(--park); text-decoration: underline; text-underline-offset: 2px; }
.legal strong { color: var(--chalk); font-weight: 600; }
.legal__meta {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(120,188,128,.25);
  font-size: 12px;
  color: var(--mist-dim);
}
