/* Nile Rodgers & CHIC, Clifton Downs Bristol 2027 - sign-up (2026-10-12).
   Client: Feast Live.

   Concept: the poster, rebuilt as the page. The stage-at-sunset plate is the
   full-bleed background; the poster's own type layers and the Nile Rodgers
   cut-out are recomposed on it as one transparent piece (the <h1>), its
   cropped bottom faded into the plate. The sign-up card is cut from the
   lockup's cream, set in CHIC's Didone, and stays quiet next to the art.

   Palette sampled from literal pixels of the layers:
     lockup cream     #F8F7F2  (LOGO.png, opaque interior)  -> card #F8F5EE
     hot magenta      #C01A60  (desktop_background.png, right third)
                      deepened to #B0145A for the button: 6.23:1 with cream
     deep violet      #2B124A  (desktop_background.png, bottom right)
   Ink #2B0F35 on card 15.8:1, ink-2 8.5:1, hint on white field 5.6:1.

   Type: Montserrat (OFL, self-hosted, variable) throughout. It is the free
   near-twin of the poster's geometric sans (Gotham-style: spurred G,
   flat-topped A, wide round O/D), checked by rendering it against the
   artwork's own date line (Adam, 12 Oct: "the font is very different to the
   artwork" about the first Bodoni/Jost pass). Titles and the button use the
   poster's bold caps; "CHIC"'s Didone exists only inside the lockup image. */

@font-face {
  font-family: "Montserrat";
  src: url("/assets/fonts/Montserrat-var.woff2?v=20261012-3") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --violet:  #2B124A;
  --card:    #F8F5EE;
  --field:   #FFFFFF;   /* OPAQUE on purpose - the autofill rule reuses it */
  --ink:     #2B0F35;
  --ink-2:   #5A3D5F;
  --hint:    #76607B;
  --magenta: #B0145A;
  --plum:    #6E0D3E;   /* button hover */
  --err:     #B21E1E;
  --line:    rgba(43,15,53,.28);
  --tint:    rgba(176,20,90,.08);
  --cream:   #F8F7F2;
  --display: "Montserrat", "Gotham", "Helvetica Neue", Arial, sans-serif;
  --body:    "Montserrat", "Gotham", "Helvetica Neue", Arial, sans-serif;
  --panel-w: 26rem;
  --hero-ratio: 1.595;  /* hero-*.webp is 1320x2105 */
}

*, *::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(--violet); 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 stage at sunset ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--violet);
  background-image: url("/assets/images/bg-mobile.jpg?v=20261012-3");
  background-image: image-set(url("/assets/images/bg-mobile.webp?v=20261012-3") type("image/webp"), url("/assets/images/bg-mobile.jpg?v=20261012-3") type("image/jpeg"));
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}
@media (min-aspect-ratio: 7/10) {
  .bg {
    background-image: url("/assets/images/bg-desktop.jpg?v=20261012-3");
    background-image: image-set(url("/assets/images/bg-desktop.webp?v=20261012-3") type("image/webp"), url("/assets/images/bg-desktop.jpg?v=20261012-3") type("image/jpeg"));
    background-position: center center;
  }
}

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

/* ---------- stage: stacked by default (phones, portrait tablets) ----------
   The card sits BELOW the artwork, never over it (Adam, 12 Oct: the earlier
   overlap covered "Live on the Clifton Downs"). */
.stage {
  --hero-w: min(calc(100vw - 32px), 500px);
  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: 14px 16px clamp(36px, 9vw, 56px);
}

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

.rig {
  position: relative;
  z-index: 1;
  width: min(100%, var(--panel-w));
  margin-top: 18px;
}

/* ---------- the card ---------- */
.panel {
  position: relative;
  padding: clamp(26px, 6.5vw, 36px) clamp(22px, 6vw, 36px) clamp(24px, 6vw, 32px);
  color: var(--ink);
  background: var(--card);
  /* a programme-card hairline just inside the edge; outlines never take
     clicks, so this can't cover the flag dropdown (gotcha 5) */
  outline: 1px solid rgba(176,20,90,.38);
  outline-offset: -8px;
  box-shadow: 0 30px 70px -28px rgba(20,4,30,.75);
}

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

/* the poster's small "SUPPORT BY" line above "FOLAMOUR" */
.panel__kicker {
  margin: 0 0 8px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.2;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--magenta);
}
.panel__title {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.15rem, 9.6vw, 2.6rem);
  line-height: 1;
  letter-spacing: -.01em;
  text-transform: uppercase;      /* the artwork is set in caps */
  color: var(--ink);
  text-wrap: balance;
}
.panel__title em { font-style: normal; color: var(--magenta); }
.panel__lede {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 44ch;
}
.panel__lede--last { margin-bottom: 22px; }

/* ---------- presale countdown ---------- */
.countdown { margin: 4px 0 20px; }
.countdown__label {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .03em;
  text-transform: uppercase;
  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(--violet);
  color: #fff;
}
.countdown__unit b { font-size: 1.7rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown__unit small { margin-top: 5px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.countdown__live { display: none; margin: 0; padding: 12px; background: var(--magenta); color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; text-align: center; }
.countdown.is-live .countdown__label,
.countdown.is-live .countdown__clock { display: none; }
.countdown.is-live .countdown__live { display: block; }
.panel__hint { margin: 14px 0 0; font-size: 14.5px; color: var(--ink-2); }
.panel__success-note { margin: 0 0 12px; font-weight: 600; font-size: 15.5px; color: var(--ink); }

/* ---------- 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: 1.5px solid var(--line);
  border-radius: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form__input::placeholder { color: var(--hint); opacity: 1; }
.form__input:hover { border-color: rgba(43,15,53,.5); }
.form__input:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(176,20,90,.22); }
.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 white, 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: 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: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  cursor: pointer;
}
.form__check input {
  flex: 0 0 auto;
  width: 19px; height: 19px;
  margin: 1px 0 0;
  accent-color: var(--magenta);
  cursor: pointer;
}
/* html is dark; without this the native checkbox renders dark grey on cream */
.panel { color-scheme: light; }
.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(--magenta); }

.form__resend { margin: 14px 0 0; font-size: 13.5px; 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 bold geometric caps ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 17px 18px 16px;
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1rem, 4.4vw, 1.1rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .7; cursor: default; }
.btn--primary { color: var(--card); background: var(--magenta); }
.btn--primary:hover:not(:disabled) { background: var(--plum); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- 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: 1.5px solid var(--line);
  border-radius: 0;
  box-shadow: 0 22px 48px -18px rgba(43,15,53,.4);
  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: 1.5px solid var(--line);
}
.iti__search-input::placeholder { color: var(--hint); }
.iti__search-input:focus { outline: none; box-shadow: inset 0 -2px 0 var(--magenta); }
.iti__country-list { background: var(--field); max-height: 240px; }
.iti__country { padding: 9px 12px; font-family: var(--body); font-size: 14.5px; color: var(--ink); }
.iti__country:hover,
.iti__country.iti__highlight { background: var(--magenta); }
.iti__country:hover .iti__country-name,
.iti__country:hover .iti__dial-code,
.iti__country.iti__highlight .iti__country-name,
.iti__country.iti__highlight .iti__dial-code { color: var(--card); }
.iti__dial-code { color: var(--ink-2); }
.iti__country-name { color: var(--ink); }
.iti__selected-country:hover,
.iti__selected-country-primary:hover { background: var(--tint); }
.iti__selected-dial-code { color: var(--ink); font-family: var(--body); font-size: 16px; }
.iti__arrow { border-top-color: var(--ink-2); }
.iti__arrow--up { border-bottom-color: var(--ink-2); }

/* ---------- 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: 1px solid rgba(248,247,242,.16);
  background: rgba(30,8,36,.78);
}
.foot__brand { display: flex; align-items: center; gap: 14px; }
.foot__logo { display: block; width: 58px; height: auto; }
.foot__legal { margin: 0; font-size: 12.5px; color: rgba(248,247,242,.78); letter-spacing: .01em; }
.foot__legal a { color: rgba(248,247,242,.78); 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(248,247,242,.78);
  text-decoration: none;
  border: 1px solid rgba(248,247,242,.28);
  border-radius: 999px;
  transition: border-color .15s ease;
}
.site-built a:hover { border-color: #E2558F; }
.site-built img { display: block; opacity: .9; }
a:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.panel a:focus-visible { outline-color: var(--ink); }

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

/* ---------- the one orchestrated moment: the poster comes up like stage lights ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__img { animation: lights 1.3s cubic-bezier(.2,.7,.2,1) both; }
  .rig { animation: rise .8s cubic-bezier(.2,.8,.2,1) .35s both; }
  @keyframes lights {
    from { opacity: 0; filter: brightness(1.8) blur(6px); transform: scale(1.025); }
    to   { opacity: 1; filter: none; transform: none; }
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ============================================================
   SPLIT LAYOUT - aspect-ratio threshold, not width alone (gotcha 20)
   Poster left, standing on the footer; card right, centred.
   ============================================================ */
@media (min-width: 900px) and (min-aspect-ratio: 7/10) {
  .stage {
    grid-template-columns: minmax(0, 1fr) var(--panel-w);
    align-content: stretch;
    align-items: center;
    justify-items: center;
    column-gap: clamp(32px, 5vw, 100px);
    padding: clamp(20px, 3vh, 36px) clamp(28px, 6vw, 120px) 0;
  }
  /* height-fitted so the whole poster 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 - 110px) / var(--hero-ratio)));
    max-width: 100%;
  }
  .rig {
    width: 100%;
    margin: 0 0 clamp(28px, 5vh, 56px);
  }
  .panel__title { font-size: clamp(2.35rem, 2.9vw, 2.7rem); }
}

/* 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: 100%; margin: 0; }
  .panel { padding: 22px 22px 22px; outline-offset: -6px; }
  .panel__kicker { margin-bottom: 6px; }
  .panel__title { font-size: 1.95rem; margin-bottom: 10px; }
  .panel__lede { font-size: 15px; }
  .panel__lede--last { margin-bottom: 16px; }
  .form__input { padding: 12px 14px; }
  .form__row--check { margin: 12px 0 16px; }
}
