/* Julian Fijma UK & Europe Tour 2027 - sign-up (2026-10-12).

   Concept: the page is the drafting sheet from the client's layered artwork.
   The cream plate with its diagrams and chalk wireframe boxes is the full-bleed
   background; the photo + title lockup and the date table are rebuilt on it
   from their own layers. The sign-up panel is a box hanging on two strings,
   like the boxes in the artwork, drawn with the same depth offset.

   Palette sampled from literal pixels of the layers:
     title + dates green   #27694F  (title.png, dates copy 2.png, alpha>250)
     plate cream           #F1F0E4  (full_artwork.png right half, median)
     chalk lines           #FFFFFF  (Hanging boxes.png)
   --ink is the green deepened for body text. Contrast: ink on card 9.5:1,
   green on card 6.2:1, card on green (button) 6.2:1, hint on field 4.7:1.

   Type: Share Tech Mono (OFL, self-hosted) is the closest free match to the
   squared, chamfered monospace of the artwork's date table; it carries the
   display moments only. Body is the system Helvetica stack. The hatched bar
   between "UK" and "EUROPE TOUR" in the lockup becomes the panel rule. */

@font-face {
  font-family: "Share Tech Mono";
  src: url("/assets/fonts/ShareTechMono.woff2?v=20261012-2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --plate:  #F1F0E4;
  --card:   #FAF9F3;
  --field:  #FFFFFF;   /* OPAQUE on purpose - the autofill rule reuses it */
  --green:  #27694F;
  --ink:    #1C4A38;
  --ink-2:  #3F5E51;
  --hint:   #66786F;
  --err:    #A1321E;
  --tint:   rgba(39,105,79,.08);
  --string: rgba(39,105,79,.42);
  --display: "Share Tech Mono", "OCR A Std", ui-monospace, monospace;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --panel-w: 27rem;
  --depth: 12px;       /* the box's drawn depth, as on the artwork's chalk boxes */
}

*, *::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(--plate); color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }

/* ---------- the drafting sheet ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--plate);
  background-image: url("/assets/images/bg-mobile.jpg?v=20261012-2");
  background-image: image-set(url("/assets/images/bg-mobile.webp?v=20261012-2") type("image/webp"), url("/assets/images/bg-mobile.jpg?v=20261012-2") 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-2");
    background-image: image-set(url("/assets/images/bg-desktop.webp?v=20261012-2") type("image/webp"), url("/assets/images/bg-desktop.jpg?v=20261012-2") type("image/jpeg"));
    background-position: left center;
  }
}

.page {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;               /* the box depth + strings must never cause sideways scroll */
}

/* ---------- stage: stacked by default (phones, portrait tablets) ----------
   Phones read hero -> form -> dates; the date table is also inside the picker,
   so it is reference here, not a gate in front of the form. */
.stage {
  flex: 1 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "hero" "rig" "dates";
  justify-items: center;
  align-content: start;
  gap: clamp(26px, 6vw, 40px);
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(20px, 6vw, 36px) 16px clamp(40px, 9vw, 64px);
}

.hero  { grid-area: hero;  margin: 0; width: min(100%, 540px); line-height: 0; }
.dates { grid-area: dates; margin: 0; width: min(100%, 540px); }
.hero__img, .dates__img { display: block; width: 100%; height: auto; }

/* ---------- the hanging box ---------- */
.rig {
  grid-area: rig;
  position: relative;
  width: min(calc(100% - var(--depth)), var(--panel-w));
  margin-right: var(--depth);     /* room for the drawn depth on narrow phones */
}
/* the two strings (desktop + landscape only, see the split blocks) */
.rig::before,
.rig::after {
  content: "";
  display: none;
  position: absolute;
  bottom: 100%;
  width: 2px;
  height: 200vh;
  background: repeating-linear-gradient(to top, var(--string) 0 16px, transparent 16px 24px, var(--string) 24px 27px, transparent 27px 35px);
  pointer-events: none;
}
.rig::before { left: 16%; }
.rig::after  { right: 16%; }

.panel {
  position: relative;
  isolation: isolate;             /* depth lines stack only against the panel (gotcha 5) */
  padding: clamp(24px, 6vw, 34px) clamp(20px, 5.5vw, 34px) clamp(24px, 5.5vw, 32px);
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--green);
  /* the box's back edge: a plate-filled offset with a green outline */
  box-shadow:
    var(--depth) var(--depth) 0 -2px var(--plate),
    var(--depth) var(--depth) 0 0 var(--green);
}
/* the two visible depth edges joining front face to back face */
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: calc(var(--depth) * 1.4142);
  height: 2px;
  background: var(--green);
  transform-origin: 0 50%;
  transform: rotate(45deg);
}
.panel::before { left: calc(100% + 1px); top: -2px; }   /* centred on the border line */
.panel::after  { left: -1px; top: 100%; }

/* 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 12px;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: .04em;
  color: var(--green);
}
.panel__title {
  margin: 0 0 16px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 10.5vw, 2.95rem);
  line-height: .98;
  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(--green); }
/* the hatched bar from the lockup */
.panel__rule {
  height: 14px;
  margin: 0 0 18px;
  border: 2px solid var(--green);
  background: repeating-linear-gradient(-55deg, var(--green) 0 2px, transparent 2px 9px);
}
.panel__lede {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 44ch;
}
.panel__lede--last { margin-bottom: 20px; }
.panel__hint { margin: 14px 0 0; font-size: 14px; color: var(--ink-2); }
.panel__success-note { margin: 0 0 12px; font-weight: 700; font-size: 15px; 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: 2px solid var(--green);
  border-radius: 0;
  transition: box-shadow .15s ease;
}
.form__input::placeholder { color: var(--hint); opacity: 1; }
.form__input:focus { outline: none; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.form__input--otp { font-family: var(--display); 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: 700;
  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(--green);
  cursor: pointer;
}
.form__check input:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.form__check a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.form__check a:hover { text-decoration-thickness: 2px; }
.form__note { margin: 8px 0 0 30px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.form__note a { color: var(--ink); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

.form__resend { margin: 14px 0 0; font-size: 13.5px; color: var(--ink-2); text-align: center; }
.form__resend-btn {
  font: inherit; font-weight: 700;
  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; }

/* ---------- show picker: the artwork's date table as a dropdown ---------- */
.picker__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 15px;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.3;
  text-align: left;
  color: var(--hint);
  background: var(--field);
  border: 2px solid var(--green);
  border-radius: 0;
  cursor: pointer;
}
.picker--filled .picker__trigger { color: var(--ink); font-weight: 700; }
.picker__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker__chev {
  flex: 0 0 auto;
  width: 10px; height: 10px;
  margin-top: -5px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(45deg);
  transition: transform .2s ease, margin .2s ease;
}
.picker[data-open="true"] .picker__chev { transform: rotate(225deg); margin-top: 5px; }
.picker__trigger:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.picker[data-open="true"] .picker__trigger { border-bottom-style: dashed; }

/* opens in the flow (never an overlay), animating its height */
.picker__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .26s cubic-bezier(.2,.8,.2,1);
}
.picker[data-open="true"] .picker__panel { grid-template-rows: 1fr; }
.picker__inner {
  min-height: 0;
  overflow: hidden;
  container: picker / inline-size;   /* on the div, not the fieldset (fieldset containment is unreliable) */
  background: var(--field);
  border: 0 solid var(--green);
  border-width: 0 2px;
}
.picker[data-open="true"] .picker__inner { border-bottom-width: 2px; }
.picker__list {
  margin: 0;
  padding: 6px 0;
  border: 0;
  min-width: 0;
}
.picker__opt {
  position: relative;
  display: grid;
  grid-template-columns: 20px 3.9em minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background-color .12s ease;
}
.picker__opt:hover { background: var(--tint); }
.picker__opt:has(input:checked) { background: var(--tint); }
.picker__opt--all {
  grid-template-columns: 20px minmax(0, 1fr);
  margin-bottom: 4px;
  padding-bottom: 11px;
  border-bottom: 1px dashed var(--string);
}
/* the real checkbox stays in the tab order, drawn by .picker__box */
.picker__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.picker__box {
  position: relative;
  width: 20px; height: 20px;
  border: 2px solid var(--green);
  background: var(--field);
}
.picker__opt input:checked + .picker__box { background: var(--green); }
.picker__opt input:checked + .picker__box::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 6px; height: 11px;
  border-right: 2px solid var(--card);
  border-bottom: 2px solid var(--card);
  transform: rotate(45deg);
}
.picker__opt input:indeterminate + .picker__box::after {
  content: "";
  position: absolute;
  left: 3px; right: 3px; top: 7px;
  height: 2px;
  background: var(--green);
}
.picker__opt input:focus-visible + .picker__box { outline: 3px solid var(--ink); outline-offset: 2px; }
.picker__date {
  font-family: var(--display);
  font-size: 17px;
  line-height: 1;
  color: var(--green);
  white-space: nowrap;
}
.picker__date sup { font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase; vertical-align: 6px; margin-left: 1px; }
.picker__city { font-weight: 700; font-size: 15px; color: var(--ink); min-width: 0; }
.picker__venue { font-size: 13.5px; color: var(--ink-2); text-align: right; white-space: nowrap; }
/* narrow phones: venue drops under the city rather than squeezing */
@container picker (max-width: 270px) {
  .picker__opt:not(.picker__opt--all) { grid-template-columns: 20px 3.6em minmax(0, 1fr); row-gap: 1px; }
  .picker__opt .picker__box,
  .picker__opt .picker__date { grid-row: span 2; }
  .picker__venue { text-align: left; }
}
.picker__done {
  display: block;
  margin: 2px 14px 12px auto;
  padding: 6px 2px;
  font-family: var(--display);
  font-size: 15px;
  color: var(--green);
  background: none;
  border: 0;
  border-bottom: 2px solid var(--green);
  cursor: pointer;
}
.picker__done:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- button ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 18px 15px;
  font-family: var(--display);
  font-size: clamp(1.15rem, 5vw, 1.3rem);
  letter-spacing: .14em;
  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(--green); }
.btn--primary:hover:not(:disabled) { background: var(--ink); }
.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: 2px solid var(--green);
  border-radius: 0;
  box-shadow: 0 22px 48px -18px rgba(28,74,56,.35);
  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(--green);
}
.iti__search-input::placeholder { color: var(--hint); }
.iti__search-input:focus { outline: none; box-shadow: inset 0 -2px 0 var(--ink); }
.iti__country-list { background: var(--field); max-height: 240px; }
.iti__country { padding: 9px 12px; font-family: var(--body); font-size: 14px; color: var(--ink); }
.iti__country:hover,
.iti__country.iti__highlight { background: var(--green); }
.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(--green); }
.iti__arrow--up { border-bottom-color: var(--green); }

/* ---------- footer: house pattern, credit in a pill ---------- */
.foot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  width: 100%;
  padding: 16px clamp(16px, 4vw, 48px) 22px;
  border-top: 1px solid rgba(39,105,79,.25);
  background: rgba(241,240,228,.82);
}
.foot__legal { margin: 0; font-size: 12.5px; color: var(--ink-2); letter-spacing: .01em; }
.foot__legal a { color: var(--ink-2); text-decoration: none; }
.foot__legal a:hover { color: var(--ink); 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: var(--ink-2);
  text-decoration: none;
  border: 1px solid rgba(39,105,79,.4);
  border-radius: 999px;
  transition: border-color .15s ease;
}
.site-built a:hover { border-color: var(--green); }
/* light ground: darken + saturate the teal roundel, never invert (turns it maroon) */
.site-built img { display: block; filter: brightness(.36) saturate(1.45); }
a:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

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

/* ---------- the one orchestrated moment: the box is lowered on its strings ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rig { transform-origin: 50% -40vh; animation: lower 1.1s cubic-bezier(.25,.9,.3,1) .2s both; }
  @keyframes lower {
    0%   { transform: translateY(-48px) rotate(-1.4deg); opacity: 0; }
    45%  { transform: translateY(0) rotate(.7deg); opacity: 1; }
    75%  { transform: rotate(-.25deg); }
    100% { transform: none; }
  }
}

/* ============================================================
   SPLIT LAYOUT - aspect-ratio threshold, not width alone (gotcha 20)
   Artwork left (hero over dates, as on the poster), hanging box right.
   ============================================================ */
@media (min-width: 900px) and (min-aspect-ratio: 7/10) {
  .stage {
    grid-template-columns: minmax(0, 1fr) var(--panel-w);
    grid-template-areas: "hero rig" "dates rig";
    /* Pinned to the top, and the second row soaks up any extra height: the box
       spans both rows, so with centring + two auto rows, opening the show
       picker stretched the rows and re-centred the grid, pushing the artwork
       down (Adam, 12 Oct). Now only the box grows, downward. The artwork is
       sized to ~ the viewport height, so top-aligned reads as centred. */
    grid-template-rows: auto 1fr;
    align-content: start;
    align-items: start;
    justify-items: start;
    column-gap: clamp(48px, 6vw, 120px);
    row-gap: clamp(14px, 2.4vh, 30px);
    padding: clamp(28px, 5vh, 56px) clamp(28px, 7vw, 150px) clamp(36px, 6vh, 64px);
  }
  /* hero (1309x1098) + gap + dates (1312x630) stack to ~1.39x their width:
     size them from the viewport height so the whole poster fits one screen. */
  .hero, .dates { width: min(100%, calc((100svh - 150px) * .72)); }
  .rig {
    align-self: start;
    grid-row: 1 / span 2;
    width: calc(100% - var(--depth));
    margin-right: var(--depth);
  }
  .rig::before, .rig::after { display: block; }
  .panel__title { font-size: clamp(2.6rem, 3.4vw, 3rem); }
}

/* 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);
    grid-template-areas: "hero rig" "dates rig";
    grid-template-rows: auto 1fr;
    align-items: start;
    align-content: start;
    justify-items: start;
    column-gap: 30px;
    row-gap: 14px;
    min-height: 0;
    padding: 20px 20px 30px;
  }
  .hero, .dates { width: 100%; max-width: 420px; }
  .rig { grid-row: 1 / span 2; width: calc(100% - var(--depth)); margin-right: var(--depth); }
  .rig::before, .rig::after { display: block; }
  .panel { padding: 22px 22px 22px; }
  .panel__kicker { margin-bottom: 8px; }
  .panel__title { font-size: 2.2rem; margin-bottom: 12px; }
  .panel__rule { margin-bottom: 14px; }
  .panel__lede { font-size: 15px; }
  .panel__lede--last { margin-bottom: 16px; }
  .form__input, .picker__trigger { padding: 12px 14px; }
  .form__row--check { margin: 12px 0 16px; }
}
