/*
  Locol landing, launch base. Structural only: layout, spacing, type scale,
  form, launch-state switch, review ribbon. Variants (launch-<name>.css) load
  after this file and restyle by overriding the tokens and selectors below.
  styles.css stays in place for the legal and organizer pages.
*/

:root {
  --paper: #faf7ef;
  --surface: #ffffff;
  --ink: #10131a;
  --text: #2a3140;        /* 12.4:1 on paper */
  --muted: #5b6478;       /* 5.5:1 on paper, 5.9:1 on white */
  --blue: #0b45e0;        /* 6.9:1 on paper */
  --blue-pressed: #0834a8;
  --border: #d9d6c9;
  --inset: #f0ede2;
  --danger: #a41f1f;
  --on-blue: #ffffff;
  --bezel: #1b1e26;

  --heading: "Plus Jakarta Sans", "Avenir Next", system-ui, sans-serif;
  --body: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --max: 1120px;
  --section-gap: 72px;
  --capture-w: min(300px, 76vw);
  --radius: 14px;

  --step-h1: clamp(2.6rem, 10vw, 6.5rem);
  --step-h2: clamp(1.5rem, 4.2vw, 2.25rem);
  --step-lead: clamp(1.125rem, 2.4vw, 1.375rem);
  --step-row: clamp(1.375rem, 3.4vw, 2rem);
  --step-small: 0.875rem;
}

/* ------------------------------------------------------------ launch state */
/* One attribute on <body> picks the CTA state; the other state stays in the
   markup and is removed from layout and the accessibility tree. */
body:not([data-launch-state="request"]) [data-when="request"],
body:not([data-launch-state="testflight"]) [data-when="testflight"],
body:not([data-launch-state="appstore"]) [data-when="appstore"] { display: none !important; }

/* ------------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 0; overflow-x: clip; background: var(--paper); color: var(--text); font-family: var(--body); font-size: 1rem; line-height: 1.55; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--blue-pressed); }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--heading); font-weight: 700; letter-spacing: -0.025em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 14px; border-radius: 8px; background: var(--ink); color: #fff; }
.skip-link:focus { transform: translateY(0); }

/* Links inside running text get a 44 px tall hit area without moving the line. */
.privacy-note a, .faq-item a, .organizers a, .form-note a, .confirmation-support a { display: inline-block; padding: 12px 2px; margin: -12px -2px; }

/* ----------------------------------------------------------- review ribbon */


/* ------------------------------------------------------------------ layout */

.site-header, .hero, .rows, .statement, .story, .coverage, .notify, .faq, .organizers, .site-footer {
  width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
}
main > section { margin-top: var(--section-gap); }
main > .hero { margin-top: 0; }

/* ------------------------------------------------------------------ header */

.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--heading); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.025em; text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 7px; }
.header-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.header-link { min-height: 44px; display: inline-flex; align-items: center; font-size: var(--step-small); font-weight: 600; }
.cta-compact { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 999px; background: var(--blue); color: var(--on-blue); font-size: var(--step-small); font-weight: 600; text-decoration: none; }
.cta-compact:hover { background: var(--blue-pressed); color: var(--on-blue); }

/* Apple's badge is used as supplied: never restyled, minimum 40 px tall, with
   clear space around it of at least a quarter of its height. */
.badge-link { display: inline-flex; align-items: center; min-height: 44px; padding: 10px; margin: -10px; }
.badge-link img { height: 50px; width: auto; }
.badge-link-compact img { height: 40px; }

/* Narrow phones: keep logo, link and CTA on one row. */
@media (max-width: 419px) {
  .site-header { flex-wrap: nowrap; gap: 8px; }
  .brand { gap: 8px; font-size: 1.125rem; }
  .brand img { width: 28px; height: 28px; }
  .header-nav { flex-wrap: nowrap; gap: 12px; }
  .header-link, .cta-compact { font-size: 0.8125rem; white-space: nowrap; }
  .cta-compact { padding: 0 12px; }
}

/* -------------------------------------------------------------------- hero */

.hero { display: flex; flex-direction: column; gap: 40px; padding-top: 24px; }
.hero h1 { font-size: var(--step-h1); line-height: 0.98; letter-spacing: -0.03em; }
.hero h1 .beat { display: block; }
.hero-sub { max-width: 34ch; margin-top: 20px; text-wrap: pretty; color: var(--text); font-size: var(--step-lead); line-height: 1.45; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 28px; }
.cta-note { color: var(--muted); font-size: var(--step-small); }
.cta-alt { min-height: 44px; display: inline-flex; align-items: center; font-size: var(--step-small); font-weight: 600; }
.status-line { margin-top: 14px; color: var(--muted); font-size: var(--step-small); font-weight: 500; letter-spacing: 0.01em; }

.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 24px; border: 1.5px solid transparent; border-radius: 12px; cursor: pointer; font-size: 1rem; font-weight: 600; text-align: center; text-decoration: none; }
.button:disabled { cursor: progress; opacity: .75; }
.button-primary { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.button-primary:hover { background: var(--blue-pressed); border-color: var(--blue-pressed); color: var(--on-blue); }
.button-secondary { background: var(--surface); border-color: var(--border); color: var(--ink); }
.button-secondary:hover { border-color: var(--ink); color: var(--ink); }

/* ---------------------------------------------------------------- captures */
/* A real device capture in a thin bezel with the screen's own corner radius.
   Width drives everything; the radius follows the iPhone's ~13 % corner. */

.capture { position: relative; width: var(--capture-w); flex: 0 0 auto; overflow: hidden; border: 1px solid var(--bezel); border-radius: calc(var(--capture-w) * 0.13); background: #0e0f14; aspect-ratio: 554 / 1200; }
.capture img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.capture-caption { color: var(--muted); font-size: 0.8125rem; }

.capture-pending { display: grid; place-items: center; aspect-ratio: 9 / 19.5; border: 1.5px dashed var(--muted); background: var(--inset); }
.capture-pending span { color: var(--muted); font-size: var(--step-small); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.hero-visual { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 24px; margin: 0; }
.hero-visual .capture-caption { flex: 1 0 100%; text-align: center; }

/* Mobile: one capture above the fold, the top ~55 % of the screen
   (status bar, location, first rail). */
@media (max-width: 767px) {
  .hero-visual { --capture-w: min(calc(100vw - 2 * var(--gutter)), 420px); }
  .hero-visual .capture-c1 { aspect-ratio: 923 / 1100; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .hero-visual .capture-c2 { display: none; }
}

/* -------------------------------------------------------------------- rows */

.rows { display: flex; flex-direction: column; gap: 64px; }
.row { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.row-line { max-width: 18ch; text-wrap: balance; color: var(--ink); font-family: var(--heading); font-size: var(--step-row); font-weight: 700; line-height: 1.15; letter-spacing: -0.025em; text-align: center; }

@media (min-width: 768px) {
  .row { flex-direction: row; justify-content: center; gap: 72px; }
  .row:nth-child(even) { flex-direction: row-reverse; }
  .row-line { flex: 0 1 22ch; text-align: left; }
  .rows { gap: 96px; }
}

/* ---------------------------------------------------------------- coverage */

.eyebrow { color: var(--muted); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.coverage-line { max-width: 24ch; margin-top: 10px; font-size: var(--step-h2); line-height: 1.15; letter-spacing: -0.025em; }
.town-list { display: flex; flex-wrap: wrap; gap: 2px 0; margin: 16px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9375rem; }
.town-list li:not(:last-child)::after { content: "·"; padding: 0 0.5em; }

/* ------------------------------------------------------------------- notify */

.notify h2 { font-size: var(--step-h2); line-height: 1.15; }
.notify-intro { max-width: 46ch; margin-top: 10px; color: var(--text); }
.signup-shell { margin-top: 20px; }
.signup-form { display: flex; flex-direction: column; gap: 14px; max-width: 480px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { color: var(--ink); font-size: var(--step-small); font-weight: 600; }
input[type="email"], input[type="text"] { width: 100%; min-height: 52px; padding: 0 16px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font-size: 1rem; }
input::placeholder { color: var(--muted); opacity: 1; }
input:hover { border-color: var(--muted); }
.signup-form .button { align-self: flex-start; }
.form-note, .privacy-note, .form-error { font-size: 0.8125rem; line-height: 1.5; }
.form-note { color: var(--muted); }
.privacy-note { color: var(--muted); }
.form-error { padding: 10px 12px; border-radius: 10px; background: #fbeaea; color: var(--danger); font-weight: 600; }

.turnstile-slot:empty:not([data-pending]) { display: none; }
.turnstile-slot[data-pending] { display: block; }
.turnstile-status { margin: 8px 0 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.5; }
.turnstile-status[data-tone="error"] { color: var(--danger); font-weight: 600; }
.turnstile-status[data-tone="dev"] { padding: 8px 10px; border: 1px dashed var(--muted); border-radius: 8px; }

/* ------------------------------------------------- hero request form (request) */
/* Stacked on phones; one row (email, town, button) from 640 px inside the hero
   column. The Turnstile area is reserved up front so the widget and its
   one-line status never push the status line or the capture down. */

.cta-request { margin-top: 28px; max-width: 620px; }
.cta-request .signup-shell { margin-top: 0; }
.form-lede { margin: 0 0 14px; color: var(--text); font-size: 1rem; line-height: 1.5; max-width: 46ch; }
.request-form { max-width: none; gap: 12px; }
.request-fields { display: flex; flex-direction: column; gap: 12px; }
.request-fields .field { gap: 6px; min-width: 0; }
.request-form .button { align-self: stretch; }
.request-form input[type="email"], .request-form input[type="text"] { min-height: 50px; }
.request-form .turnstile-status { margin-top: 6px; }
.request-form .privacy-note { max-width: 56ch; }

/* Sized by the hero column, not the viewport: one row where the column is wide
   enough (768 px tablets, 1280 px desktop), email + town side by side with the
   button under them where it is not (the 1100 px two-column hero). */
.cta-request { container-type: inline-size; }
@container (min-width: 400px) {
  .request-fields { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
  .request-fields .field-email { flex: 1.35 1 0; }
  .request-fields .field-town { flex: 1 1 0; }
  .request-form .button { flex: 1 0 100%; }
}
@container (min-width: 580px) {
  .request-fields { flex-wrap: nowrap; }
  .request-form .button { flex: 0 0 auto; align-self: flex-end; }
}

.cta-request .confirmation { gap: 12px; max-width: 560px; }
.cta-request .confirmation-heading h2 { font-size: clamp(1.375rem, 3.4vw, 1.75rem); }

/* ------------------------------------------------------------ confirmation */

.confirmation { display: flex; flex-direction: column; gap: 18px; max-width: 480px; }
.confirmation:focus { outline: none; }
.confirmation:focus-visible { outline: 3px solid var(--blue); outline-offset: 6px; }
.confirmation-heading h2 { font-size: var(--step-h2); line-height: 1.12; }
.confirmation-heading p { margin-top: 8px; }
.confirmation-support { color: var(--muted); font-size: var(--step-small); }
.referral-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.referral-link { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px 4px 14px; border-radius: 10px; background: var(--inset); }
.referral-link span { overflow: hidden; color: var(--text); font-size: var(--step-small); text-overflow: ellipsis; white-space: nowrap; }
.referral-link button { flex: 0 0 auto; min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: var(--step-small); font-weight: 600; }
.share-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.share-actions svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.share-status { color: var(--muted); font-size: 0.8125rem; }
.share-status:empty { display: none; }

/* --------------------------------------------------------------------- FAQ */

.faq h2 { font-size: 1.25rem; }
.faq-list { display: flex; flex-direction: column; margin-top: 12px; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); font-size: 0.9375rem; }
.faq-item summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; color: var(--ink); cursor: pointer; font-weight: 600; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex: 0 0 auto; color: var(--muted); font-size: 1.25rem; font-weight: 400; line-height: 1; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { max-width: 60ch; padding: 0 0 16px; color: var(--text); }

/* -------------------------------------------------------------- organizers */

.organizers h2 { font-size: 1.25rem; }
.organizers p { margin-top: 6px; color: var(--text); }

/* ------------------------------------------------------------------ footer */

.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; margin-top: var(--section-gap); padding-top: 24px; padding-bottom: 64px; border-top: 1px solid var(--border); color: var(--muted); font-size: var(--step-small); }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-brand img { border-radius: 5px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 18px; }
.site-footer nav a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }

/* ------------------------------------------------------------ larger screens */

@media (min-width: 768px) {
  :root { --gutter: 32px; --section-gap: 112px; }
  .hero { padding-top: 48px; }
}

@media (min-width: 1100px) {
  :root { --gutter: 40px; --section-gap: 136px; }
}

/* ----------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
