/* &ME + Rampa - Finsbury Park, London, 1 August 2027 (Krankbrother).
   andmerampa.london, built 1 Dec 2026.

   The page IS the poster. Palette is read from literal pixels of the client's
   artwork (4-5.png / 9-16.png):
     --red    #FF0000  the sheet's fill, exact (R is 255 on every non-ink pixel)
     --ink    #000000  the type
     --flash  #FFF68C  the photograph's highlight (peaks at 255,255,126)
   Black on that red is 5.25:1, so the two colours carry everything; the yellow
   is kept for the one thing to press.

   Left: the layered artwork rebuilt live on the red, no frame. Right: the
   sign-up as a slab of the poster's ink, its fields cut back out in red.
   Type: Unbounded (OFL, self-hosted) for display, system sans for reading. */

@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/Unbounded-var.woff2?v=20261201-1") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #FF0000;
  --ink: #000000;
  --flash: #FFF68C;
  --paper: #FFFFFF;
  --soft: #D9D9D9;                     /* reading text on the slab, 14.9:1 */
  --display: "Unbounded", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --foot: 56px;
  --pad: clamp(16px, 4vw, 28px);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--red);              /* html carries the colour, body stays clear (gotcha 16) */
  -webkit-text-size-adjust: 100%;
          text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
.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;
}

/* ============================================================
   STAGE. Stacked by default: the poster, then the slab.
   ============================================================ */
.stage { flex: 1 0 auto; display: flex; flex-direction: column; }

/* ---------- the red field + the poster on it ---------- */
.field {
  position: relative;
  overflow: hidden;                    /* clips the ghost only; the poster never reaches the edge */
  display: flex;
  justify-content: center;
  padding: clamp(14px, 3.5vw, 26px) var(--pad) clamp(18px, 4.5vw, 30px);
  background: var(--red);
}
/* The artwork lays an enlarged copy of the photograph over the whole sheet as
   texture (its "Layer 2 copy"). Same idea here: the photo, huge and out of
   focus, barely there. */
.field::before {
  content: "";
  position: absolute;
  inset: -8%;
  background: url("/assets/images/photo-640.webp?v=20261201-1") center / cover no-repeat;
  filter: blur(28px);
  opacity: .16;
  pointer-events: none;
}

.bill {
  position: relative;
  width: min(100%, calc(62svh * .8), 620px);   /* form title stays on the first screen */
  aspect-ratio: 4 / 5;
  margin: 0;
}
/* Positions are the artwork's own, as fractions of its 1080 x 1350 sheet. */
.bill > * { position: absolute; margin: 0; }
.bill__name img, .bill__place img { width: 100%; }   /* NOT ".bill img": that out-ranks the single-class widths below */
.bill__kb    { left: 40.09%; top: 1.63%;  width: 19.91%; }
.bill__name  { left: 4.26%;  top: 3.78%;  width: 90.74%; z-index: 2; }
.bill__photo { left: 10.2%;  top: 28.5%;  width: 77.9%;  z-index: 1; }
.bill__km    { left: 4.91%;  top: 87.7%;  width: 21.39%; z-index: 2; }
.bill__place { left: 32.69%; top: 82.96%; width: 62.69%; z-index: 2; }

/* The one piece of motion: the photograph comes up out of the red like a print
   in the tray. Opacity only holds the end state reliably (gotcha 40). */
@media (prefers-reduced-motion: no-preference) {
  .bill__photo { animation: develop 2.2s cubic-bezier(.2, .6, .2, 1) .12s both; }
}
@keyframes develop {
  0%   { opacity: 0;   filter: blur(14px) contrast(2.4); }
  45%  { opacity: .75; filter: blur(5px)  contrast(1.5); }
  100% { opacity: 1;   filter: blur(0)    contrast(1); }
}

/* ---------- the slab ---------- */
.sheet {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  justify-content: center;
  padding: clamp(26px, 6vw, 40px) var(--pad) clamp(28px, 6vw, 40px);
  background: var(--ink);
}
.panel {
  width: 100%;
  max-width: 440px;
  isolation: isolate;                  /* country dropdown stacks inside the panel (gotcha 5) */
}

.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__title {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.1rem, 9.6vw, 3rem);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--paper);
  text-wrap: balance;
}
.panel__title em { font-style: normal; color: var(--red); }
.panel__lede { margin: 0 0 18px; font-size: 16px; line-height: 1.5; color: var(--soft); max-width: 34em; }
.panel__lede--strong { color: var(--paper); font-weight: 700; }
.panel__success .panel__lede { margin-bottom: 12px; }
.panel__hint { margin: 14px 0 0; font-size: 14.5px; color: var(--soft); }
.panel__success-note {
  margin: 0 0 14px; padding: 10px 12px;
  font-size: 14.5px; color: var(--ink); font-weight: 600;
  background: var(--flash);
}

/* ---------- presale line + countdown (Adam, 1 Dec 2026) ---------- */
.sale { margin: 0 0 22px; }
.sale__label { margin: 0 0 10px; font-size: 15px; line-height: 1.4; font-weight: 700; color: var(--paper); }
.sale__clock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
}
.sale__cell { display: flex; flex-direction: column; align-items: center; padding: 10px 2px 9px; }
.sale__cell + .sale__cell { border-left: 1px solid #333; }
.sale__cell b {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 7vw, 1.9rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}
.sale__cell span { margin-top: 5px; font-size: 12.5px; line-height: 1; color: var(--soft); }
.sale.is-live .sale__clock { display: none; }
.sale.is-live .sale__label { margin: 0; padding: 12px 14px; color: var(--ink); background: var(--flash); }

/* ---------- fields: strips of the poster, set into the slab ---------- */
.form__row { margin: 0 0 14px; }
.form__label {
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--paper);
}
.form__opt { font-weight: 400; color: var(--soft); }
.form__input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 14px;
  font-family: var(--font);
  font-size: 17px;                      /* >= 16px: no iOS zoom on focus */
  font-weight: 700;
  color: var(--ink);
  background: var(--red);
  border: 0;
  border-radius: 0;
  -webkit-appearance: none;
          appearance: none;
}
.form__input::placeholder { color: rgba(0, 0, 0, .58); font-weight: 400; opacity: 1; }
.form__input:focus { outline: 3px solid var(--flash); outline-offset: 2px; }
/* Chrome autofill: the field is opaque #FF0000 on an opaque slab, so the
   flattened colour IS #FF0000 (build-contract). */
.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 #FF0000 inset !important;
          box-shadow: 0 0 0 1000px #FF0000 inset !important;
  -webkit-text-fill-color: #000000 !important;
  caret-color: #000000;
  transition: background-color 9999s ease-in-out 0s;
}
.form__input--otp { letter-spacing: .3em; font-size: 22px; text-align: center; }
.form__error { margin: 7px 0 0; font-size: 14px; line-height: 1.4; font-weight: 700; color: var(--flash); }
.form__error--global { margin-top: 14px; }
.hp-row { display: none !important; }   /* honeypot: display:none, never off-screen (gotcha 2) */

.form__row--check { margin: 18px 0 20px; }
.form__check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--soft);
  cursor: pointer;
}
.form__check input {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  margin: 0;
  accent-color: var(--flash);
  cursor: pointer;
}
.form__check input:focus-visible { outline: 3px solid var(--flash); outline-offset: 2px; }
.form__check a { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }
.form__check a:hover, .form__check a:focus-visible { color: var(--flash); text-decoration-thickness: 2px; }

.form__resend { margin: 14px 0 0; font-size: 14.5px; color: var(--soft); }
.form__resend-btn {
  font: inherit; color: var(--paper); background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.form__resend-btn:disabled { color: #8C8C8C; cursor: default; text-decoration: none; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 12px 18px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.01em;
  white-space: nowrap;
  color: var(--ink);
  background: var(--flash);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background-color .15s ease, transform .1s ease;
}
.btn:hover:not(:disabled), .btn:focus-visible { background: var(--paper); color: var(--ink); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.btn:disabled { opacity: .75; cursor: default; }

/* ============================================================
   intl-tel-input v25: red field, ink list
   ============================================================ */
.iti { width: 100%; display: block; }
.iti input.form__input { padding-left: calc(52px + 0.7rem); }  /* app.js re-measures */
.iti__country-container { z-index: 3; }
.iti--inline-dropdown .iti__dropdown-content { z-index: 50; }
.iti__dropdown-content.iti__hide { display: none !important; }   /* gotcha 19 */
.iti__dropdown-content {
  background: var(--ink);
  border: 2px solid var(--red);
  border-radius: 0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .7);
  overflow: hidden;
}
.iti__search-input {
  padding: 11px 30px 11px 32px;        /* keep the vendor's icon reservations (gotcha 33) */
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  color: var(--paper);
  background: #1F1F1F;
  border: 0;
  border-bottom: 2px solid var(--red);
  border-radius: 0;
}
.iti__search-input::placeholder { color: #B0B0B0; }
.iti__search-input:focus { outline: none; box-shadow: inset 0 -3px 0 var(--flash); }
.iti__search-icon-svg { stroke: var(--paper); }
.iti__country-list { background: var(--ink); max-height: 240px; }
.iti__country { padding: 10px 12px; font-family: var(--font); font-size: 15px; color: var(--paper); }
.iti__country:hover,
.iti__country.iti__highlight { background: var(--red); color: var(--ink); }
.iti__country:hover .iti__dial-code, .iti__country.iti__highlight .iti__dial-code,
.iti__country:hover .iti__country-name, .iti__country.iti__highlight .iti__country-name { color: var(--ink); }
.iti__dial-code { color: var(--soft); }
.iti__country-name { color: var(--paper); }
.iti__selected-country { border-radius: 0; }
.iti__selected-country:hover,
.iti__selected-country-primary:hover { background: rgba(0, 0, 0, .14); }
.iti__selected-dial-code { color: var(--ink); font-family: var(--font); font-weight: 700; font-size: 17px; }
.iti__arrow { border-top-color: var(--ink); }
.iti__arrow--up { border-bottom-color: var(--ink); }

/* ============================================================
   FOOTER: house pattern, credit in a pill
   ============================================================ */
.foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  min-height: var(--foot);
  padding: 12px clamp(16px, 3vw, 36px);
  background: var(--ink);
  border-top: 1px solid #2E2E2E;
}
.foot__left { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.foot__legal { margin: 0; font-size: 13px; color: #B3B3B3; }
.foot__legal a { color: var(--paper); text-decoration: none; }
.foot__legal a:hover, .foot__legal a:focus-visible { color: var(--flash); 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;
  color: var(--paper);
  text-decoration: none;
  border: 1px solid #5A5A5A;
  border-radius: 999px;
  transition: border-color .15s ease;
}
.site-built a:hover, .site-built a:focus-visible { border-color: var(--red); color: var(--paper); }
.site-built img { display: block; width: 64px; opacity: .9; }   /* dark band: credit as drawn */

@media (max-width: 480px) {          /* stack + centre on every phone width */
  .foot { flex-direction: column; justify-content: center; text-align: center; }
  .foot__left { flex-direction: column; justify-content: center; }
}

/* ============================================================
   TWO-UP: genuinely landscape screens. The red field takes everything left of
   the slab; the poster group is sized from the screen HEIGHT (and capped by the
   field's width) and centred in it. The slab is a full-height column of ink on
   the right edge.
   ============================================================ */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) and (min-height: 521px) {
  :root { --slab: clamp(400px, 34vw, 600px); --vh: calc(100svh - var(--foot)); }
  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--slab);   /* slab track definite (gotcha 35) */
    min-height: var(--vh);
  }
  .field { align-items: center; padding: 24px clamp(20px, 3vw, 48px); }
  .bill {
    width: min(100%, calc((var(--vh) - 48px) * .8), 860px);
  }
  .sheet { align-items: center; padding: 32px clamp(28px, 3.4vw, 64px); }
  .panel { max-width: 440px; }
  .panel__title { font-size: clamp(2.3rem, 3.3vw, 3.4rem); }
}
/* Short desktop windows: tighten the slab so nothing scrolls. */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) and (min-height: 521px) and (max-height: 800px) {
  .panel__title { font-size: 2.2rem; margin-bottom: 10px; }
  .panel__lede { font-size: 15px; margin-bottom: 10px; }
  .sale { margin-bottom: 12px; }
  .sale__label { font-size: 14px; margin-bottom: 7px; }
  .sale__cell { padding: 7px 2px 6px; }
  .sale__cell b { font-size: 1.35rem; }
  .form__label { margin-bottom: 4px; }
  .form__row { margin-bottom: 8px; }
  .form__input { height: 46px; }
  .form__row--check { margin: 12px 0 14px; }
  .form__check { font-size: 13.5px; }
  .btn { min-height: 50px; }
  .sheet { padding-top: 18px; padding-bottom: 18px; }
}

/* ============================================================
   LANDSCAPE PHONES (gotcha 27): two-up on a short screen. The poster is capped
   to the screen height and stays put while the slab scrolls beside it.
   After the desktop block so it wins at equal specificity.
   ============================================================ */
@media (min-width: 640px) and (min-aspect-ratio: 5/4) and (max-height: 520px) {
  .stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(300px, 46vw, 380px);
    min-height: 100svh;
  }
  .field { align-items: flex-start; padding: 10px 14px; }
  .bill {
    position: sticky;
    top: 10px;
    width: min(100%, calc((100svh - 20px) * .8));
  }
  .sheet { padding: 16px 18px 18px; }
  .panel__title { font-size: 1.75rem; margin-bottom: 8px; }
  .panel__lede { font-size: 14.5px; margin-bottom: 12px; }
  .sale { margin-bottom: 14px; }
  .sale__cell { padding: 8px 2px 7px; }
  .sale__cell b { font-size: 1.4rem; }
  .form__row { margin-bottom: 10px; }
  .form__input { height: 46px; }
  .form__row--check { margin: 12px 0 14px; }
  .btn { min-height: 50px; }
}
