/* Hybrid Minds: Atmosphere, Finsbury Park, Friday 6 August 2027 - sign-up (2026-10-22).
   Client: Hybrid Minds International Ltd, with Krankbrother.

   Concept: the poster's sticker language, made into the UI. Every piece of
   type on the artwork is cream with a thick black outline and a hard black
   extrusion, and the "FULL LINEUP INCOMING" tag is a lime pill in a black
   keyline. The card borrows exactly that: cream, a black keyline, a hard
   black drop with no blur. The button is the lime pill, and it presses
   down into its own shadow. Everything else stays quiet.

   The tree plate (no-face version) is the full-bleed ground; the poster's
   four layers (HYBRID MINDS, the smiley globe, ATMOSPHERE, date block) are
   restacked at their original positions as one transparent <h1>.

   Palette sampled from literal pixels of the layers:
     cream    #E8E4D3  (logo2.png interior, #E0E0D0..#E8E8D8)
     ink      #000000  (the artwork's outlines are pure black)
     sky      #4E3DF7  (desktop plate, top band)
     violet   #3A26D9  sky deepened for text: 6.7:1 on cream
     lime     #8CD65E  (lineup.png pill) with ink text: 11.9:1
     yellow   #F2C922  (face.png) - hover/focus only
   Ink on cream 16.5:1, ink-2 on cream 9.1:1.

   Type: Rammetto One (OFL) for titles and the button. It is the free near-twin
   of the client's Goodhers Hooney (Jolicia Type, commercial licence, NOT
   embedded): same wide, heavy, round-shouldered build. The artwork's own
   lettering only ever appears as the client's images. Rubik (OFL, variable)
   for everything else. Both self-hosted. */

@font-face {
  font-family: "Rammetto One";
  src: url("/assets/fonts/RammettoOne.woff2?v=20261022-1") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("/assets/fonts/Rubik-var.woff2?v=20261022-1") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --sky:     #4E3DF7;
  --cream:   #E8E4D3;
  --card:    #E8E4D3;
  --field:   #FFFDF5;   /* OPAQUE on purpose - the autofill rule reuses it */
  --ink:     #000000;
  --ink-2:   #3B3550;
  --hint:    #6C6680;
  --violet:  #3A26D9;
  --lime:    #8CD65E;
  --yellow:  #F2C922;
  --err:     #B3141B;
  --display: "Rammetto One", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body:    "Rubik", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --keyline: 3px;
  --drop:    7px 9px 0 var(--ink);
  --panel-w: 26.5rem;
  --hero-ratio: 1.400;  /* hero-*.webp is 3061x4285 */
}

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

/* html carries the base colour; body stays transparent so the fixed .bg layer
   is never painted over (gotcha 16). */
html { background: var(--sky); color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: transparent;
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }

/* ---------- the park ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--sky);
  background-image: url("/assets/images/bg-mobile.jpg?v=20261022-1");
  background-image: image-set(url("/assets/images/bg-mobile.webp?v=20261022-1") type("image/webp"), url("/assets/images/bg-mobile.jpg?v=20261022-1") type("image/jpeg"));
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}
/* switches with the layout (1/1, was 7/10): the wide plate's centre is the gap
   between the trees, so near-square stacked windows showed only sky (22 Oct) */
@media (min-aspect-ratio: 1/1) {
  .bg {
    background-image: url("/assets/images/bg-desktop.jpg?v=20261022-2");
    background-image: image-set(url("/assets/images/bg-desktop.webp?v=20261022-2") type("image/webp"), url("/assets/images/bg-desktop.jpg?v=20261022-2") type("image/jpeg"));
    background-position: center bottom;   /* trim sky, never the trunks (Adam, 22 Oct) */
  }
}

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}

/* ---------- stage: stacked by default (phones, portrait tablets) ---------- */
.stage {
  --hero-w: min(calc(100vw - 24px), 520px);
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: start;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 10px 16px clamp(40px, 10vw, 60px);
}

.hero { margin: 0; width: var(--hero-w); line-height: 0; }
.hero__img { display: block; width: 100%; height: auto; }

.rig {
  position: relative;
  z-index: 1;
  /* leave room on the right for the hard drop so it never clips */
  width: min(calc(100% - 9px), var(--panel-w));
  /* Stacked layout: tuck the card up over the faded tail of the lilac ground
     under KRANKBROTHER (~15.6% of the art's width), keeping about half of it
     as the gap (Adam, 22 Oct: "reduce the space a little"). Scales with the art. */
  margin: calc(var(--hero-w) * -0.07) 9px 0 0;
}

/* ---------- the card: a sticker cut from the lockup's cream ---------- */
.panel {
  position: relative;
  padding: clamp(24px, 6.5vw, 34px) clamp(20px, 6vw, 34px) clamp(24px, 6vw, 30px);
  color: var(--ink);
  background: var(--card);
  border: var(--keyline) solid var(--ink);
  border-radius: 26px;
  box-shadow: var(--drop);
  color-scheme: light;   /* html is dark; keeps the native checkbox light */
}

/* state machine: exactly one wrapper visible */
.panel__state { display: none; }
.panel[data-form-state="idle"]    .panel__idle,
.panel[data-form-state="otp"]     .panel__otp,
.panel[data-form-state="success"] .panel__success { display: block; }

.panel__kicker {
  margin: 0 0 10px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  color: var(--violet);
}
.panel__title {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 9vw, 2.45rem);
  line-height: 1.02;
  letter-spacing: -.005em;
  text-transform: uppercase;      /* the artwork is set in caps */
  color: var(--ink);
  text-wrap: balance;
}
.panel__title em { font-style: normal; color: var(--violet); }
.panel__lede {
  margin: 0 0 20px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 44ch;
}
.panel__lede--last { margin-bottom: 22px; }
.panel__lede strong { color: var(--ink); font-weight: 700; }
.panel__hint { margin: 14px 0 0; font-size: 15px; color: var(--ink-2); }
.panel__success-note { margin: 0 0 12px; font-weight: 600; font-size: 15.5px; color: var(--ink); }

/* ---------- presale countdown: four little stickers ---------- */
.countdown { margin: 0 0 22px; }
.countdown__label {
  margin: 0 0 9px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.countdown__clock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.countdown__unit {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px 8px;
  background: var(--sky);
  color: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 4px 0 var(--ink);
}
.countdown__unit b {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.35rem, 6vw, 1.6rem); line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown__unit small { margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.countdown__live {
  display: none; margin: 0; padding: 12px;
  font-family: var(--display); font-size: 1.05rem; text-transform: uppercase; text-align: center;
  color: var(--ink); background: var(--lime);
  border: var(--keyline) solid var(--ink); border-radius: 999px;
}
.countdown.is-live .countdown__label,
.countdown.is-live .countdown__clock { display: none; }
.countdown.is-live .countdown__live { display: block; }

/* ---------- form ---------- */
.form__row { margin: 0 0 12px; }
/* labels stay for screen readers; placeholders carry the meaning visually */
.form__label,
.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;
}
.form__input {
  width: 100%;
  padding: 14px 15px;
  font-family: var(--body);
  font-size: 16px;                /* 16px minimum or iOS zooms on focus */
  color: var(--ink);
  background: var(--field);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  transition: box-shadow .15s ease;
}
.form__input::placeholder { color: var(--hint); opacity: 1; }
.form__input:focus { outline: none; box-shadow: 0 0 0 4px var(--yellow); }
.form__input--otp { font-size: 22px; letter-spacing: .4em; text-align: center; text-indent: .4em; }

/* Chrome paints autofilled inputs pale lavender and IGNORES background on
   :-webkit-autofill; a huge inset shadow is the only override. --field is
   already opaque, so it is its own flattened value. */
.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(--ink) !important;
  caret-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s;
}

.form__error {
  margin: 7px 0 0;
  padding-left: 10px;
  border-left: 3px solid var(--err);
  font-size: 14px;
  font-weight: 600;
  color: var(--err);
}
.form__error--global { margin-top: 16px; }

/* 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 22px; }
.form__check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  cursor: pointer;
}
.form__check input {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  margin: 1px 0 0;
  accent-color: var(--violet);
  cursor: pointer;
}
.form__check input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.form__check a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.form__check a:hover { color: var(--violet); }

.form__resend { margin: 14px 0 0; font-size: 14px; color: var(--ink-2); text-align: center; }
.form__resend-btn {
  font: inherit; font-weight: 600;
  color: var(--ink);
  background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
  cursor: pointer;
}
.form__resend-btn:disabled { color: var(--hint); cursor: default; text-decoration: none; }

/* ---------- button: the poster's lime tag, pressed into its own shadow ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 17px 18px 15px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1rem, 4.6vw, 1.15rem);
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  background: var(--lime);
  border: var(--keyline) solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 5px 0 var(--ink);
  cursor: pointer;
  transition: background-color .15s ease, transform .08s ease, box-shadow .08s ease;
}
.btn:hover:not(:disabled) { background: var(--yellow); }
.btn:active:not(:disabled) { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn:disabled { opacity: .75; cursor: default; }
.btn:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }

/* ---------- 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 flashes open on first paint (gotcha 19). */
.iti__dropdown-content.iti__hide { display: none !important; }
.iti__dropdown-content {
  background: var(--field);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  box-shadow: 4px 5px 0 var(--ink);
  overflow: hidden;
}
.iti__search-input {
  /* Keep the vendor's horizontal reservation (30px left for the magnifier,
     28px right for the clear button), gotcha 33. */
  padding: 10px 30px 10px 32px;
  width: 100%;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  background: var(--field);
  border: 0;
  border-bottom: 2px solid var(--ink);
}
.iti__search-input::placeholder { color: var(--hint); }
.iti__search-input:focus { outline: none; background: #FFF6CF; }
.iti__country-list { background: var(--field); max-height: 240px; }
.iti__country { padding: 9px 12px; font-family: var(--body); font-size: 15px; color: var(--ink); }
.iti__country:hover,
.iti__country.iti__highlight { background: var(--lime); }
.iti__dial-code { color: var(--ink-2); }
.iti__country-name { color: var(--ink); }
.iti__selected-country { border-radius: 12px 0 0 12px; }
.iti__selected-country:hover,
.iti__selected-country-primary:hover { background: rgba(140,214,94,.28); }
.iti__selected-dial-code { color: var(--ink); font-family: var(--body); font-size: 16px; }
.iti__arrow { border-top-color: var(--ink); }
.iti__arrow--up { border-bottom-color: var(--ink); }

/* ---------- footer: house pattern, credit in a pill ---------- */
.foot {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  width: 100%;
  padding: 14px clamp(16px, 4vw, 48px) 18px;
  border-top: var(--keyline) solid var(--ink);
  background: rgba(22,12,74,.88);
}
.foot__legal { margin: 0; font-size: 13px; color: rgba(232,228,211,.85); letter-spacing: .01em; }
.foot__legal a { color: rgba(232,228,211,.85); text-decoration: none; }
.foot__legal a:hover { color: var(--cream); text-decoration: underline; }
.site-built { margin: 0; }
.site-built a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  font-size: 11.5px;
  letter-spacing: .02em;
  color: rgba(232,228,211,.82);
  text-decoration: none;
  border: 1px solid rgba(232,228,211,.3);
  border-radius: 999px;
  transition: border-color .15s ease;
}
.site-built a:hover { border-color: var(--lime); }
.site-built img { display: block; opacity: .9; }
a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.panel a:focus-visible { outline-color: var(--violet); }

@media (max-width: 480px) {
  .foot { flex-direction: column; justify-content: center; text-align: center; }
}

/* ---------- the one orchestrated moment: the globe floats in like a balloon ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__img { animation: float-in 1.2s cubic-bezier(.22,1.3,.36,1) both; }
  .rig { animation: rise .7s cubic-bezier(.2,.8,.2,1) .4s both; }
  @keyframes float-in {
    from { opacity: 0; transform: translateY(26px) scale(.97); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ============================================================
   SPLIT LAYOUT - aspect-ratio threshold, not width alone (gotcha 20)
   Artwork left, standing on the footer; sign-up right, centred.
   Landscape-or-square only (min-aspect-ratio 1/1, was 7/10): portrait tablets
   and tall windows >= 900px wide (1024x1366, 900x1000) squeezed the art into a
   ~320-430px column with empty space round it (Adam, 22 Oct). They now get the
   stacked flow. Landscape phones have their own block below, so no gap.
   Starts at 1000px (was 900) with tighter chrome and a card that narrows to
   23rem, so the art column is ~520px at the switch, the same as the stacked
   art: shrinking the window never makes the logo and globe tiny (Adam, 22 Oct).
   ============================================================ */
@media (min-width: 1000px) and (min-aspect-ratio: 1/1) {
  .stage {
    --panel-w: clamp(23rem, 32vw, 26.5rem);
    grid-template-columns: minmax(0, 1fr) var(--panel-w);
    align-content: stretch;
    align-items: center;
    justify-items: center;
    column-gap: clamp(24px, 3.5vw, 100px);
    padding: clamp(14px, 2.5vh, 30px) clamp(20px, 4vw, 120px) 0;
    /* fills the window, so the footer sits below the fold and only
       appears on scroll (Adam, 22 Oct) */
    min-height: 100svh;
  }
  /* height-fitted so the whole lockup fits one screen, standing on the
     footer; max-width keeps a tall window from pushing it under the card
     (gotcha 38) */
  .hero {
    align-self: end;
    width: min(100%, calc((100svh - 40px) / var(--hero-ratio)));   /* footer no longer shares the screen */
    max-width: 100%;
  }
  .rig {
    width: calc(100% - 9px);
    margin: 0 9px clamp(28px, 5vh, 56px) 0;
  }
  .panel__title { font-size: clamp(2.2rem, 2.7vw, 2.55rem); }
}

/* Short landscape windows (1024x768 iPad, 1280x720, 1366x768 laptops): the
   full card is taller than the window, which grew the row and pushed the
   bottom-aligned art (FINSBURY PARK, KRANKBROTHER) off screen. Pin the art to
   the top and compact the card (22 Oct). */
@media (min-width: 1000px) and (min-aspect-ratio: 1/1) and (max-height: 860px) {
  .hero { align-self: start; }
  .rig { margin-bottom: 18px; }
  .panel { padding: 22px 26px 22px; }
  .panel__kicker { margin-bottom: 6px; }
  .panel__title { font-size: 2rem; margin-bottom: 10px; }
  .panel__lede { font-size: 15px; line-height: 1.5; margin-bottom: 14px; }
  .countdown { margin-bottom: 14px; }
  .countdown__label { margin-bottom: 6px; }
  .countdown__unit { padding: 7px 4px 6px; }
  .form__row { margin-bottom: 10px; }
  .form__input { padding: 12px 14px; }
  .form__row--check { margin: 12px 0 16px; }
  .btn { padding: 14px 18px 12px; }
}

/* Landscape phones (844x390, 932x430, 667x375): first-class, compact split.
   After the desktop block so it wins at equal specificity (gotcha 27). */
@media (min-width: 640px) and (min-aspect-ratio: 7/10) and (max-height: 520px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 23rem);
    align-content: start;
    align-items: start;
    justify-items: center;
    column-gap: 24px;
    min-height: 0;
    padding: 12px 20px 28px;
  }
  .hero {
    align-self: start;
    position: sticky;
    top: 12px;
    width: auto;
    max-width: 100%;               /* gotcha 38: width auto needs this */
  }
  .hero__img { width: auto; max-width: 100%; height: calc(100svh - 24px); }
  .rig { width: calc(100% - 9px); margin: 0 9px 0 0; }
  .panel { padding: 20px 20px 22px; border-radius: 20px; }
  .panel__kicker { margin-bottom: 6px; }
  .panel__title { font-size: 1.8rem; margin-bottom: 10px; }
  .panel__lede { font-size: 15px; margin-bottom: 14px; }
  .form__input { padding: 12px 14px; }
  .form__row--check { margin: 12px 0 16px; }
  .countdown { margin-bottom: 14px; }
  .countdown__unit { padding: 7px 4px 6px; }
}
