/* WayCrew — Auckland waitlist site. Minimal white, one accent (logo teal). Type: Geist + Geist Mono.
   Signature: the Harbour Bridge line drawing with the route crossing it. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --ink: #14181b;
  --mist: #6b7378;     /* 4.8:1 on white */
  --line: #e7eaec;
  --soft: #f6f8f8;
  --teal: #036a77;     /* logo teal — the only colour */
  --error: #b42318;
  --display: "Geist", "Helvetica Neue", system-ui, sans-serif;
  --body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}
a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.narrow { max-width: 720px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }

/* ── Navigation ─────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 50%; }
.wordmark { font: 600 19px/1 var(--display); letter-spacing: -0.03em; }
.nav nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav nav a { text-decoration: none; color: var(--mist); }
.nav nav a:hover { color: var(--ink); }
.nav nav a.nav-cta {
  color: #fff; background: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.nav nav a.nav-cta:hover { background: var(--teal); color: #fff; }
.nav a:focus-visible, .text-link:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* ── Hero ───────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
  padding-top: 96px; padding-bottom: 96px;
}
.kicker { margin: 0 0 18px; font: 500 13px/1 var(--mono); color: var(--teal); letter-spacing: 0.02em; }
.hero h1 {
  margin: 0 0 20px;
  font: 600 clamp(40px, 6vw, 70px)/1.02 var(--display);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.lede { margin: 0; color: var(--mist); font-size: 18px; max-width: 30em; }
.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 32px; flex-wrap: wrap; }
.text-link { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); font-weight: 500; }
.text-link:hover { border-color: var(--teal); }
.hero .waiting {
  margin: 20px 0 0; display: inline-flex; align-items: center; gap: 8px; font-size: 14px;
}
.hero .waiting[hidden] { display: none; }
.waiting::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }

.hero-art { margin: 0; }
.bridge { width: 100%; height: auto; display: block; overflow: visible; }
.bridge .route { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.bridge .steel { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bridge .water { fill: none; stroke: #cfdde0; stroke-width: 2; stroke-linecap: round; }
.bridge .city { fill: none; stroke: var(--mist); stroke-width: 1.4; stroke-linejoin: round; }
.bridge .city ellipse { fill: var(--bg); }
.bridge .stop circle { fill: var(--bg); stroke: var(--teal); stroke-width: 2.5; }
.bridge .end rect { fill: var(--ink); }
.bridge text { font: 400 12px var(--body); fill: var(--mist); }
.bridge .end text { fill: var(--ink); font-weight: 600; }
.bridge .place { font: 400 11px var(--mono); fill: #9aa1a6; }
@media (prefers-reduced-motion: no-preference) {
  .bridge .route { stroke-dasharray: 900; stroke-dashoffset: 900; animation: draw 1.6s 0.2s ease-out forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
}

/* ── Join section ───────────────────────────────────── */
.join {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: start;
  padding-top: 88px; padding-bottom: 96px; border-top: 1px solid var(--line);
}
.join-intro { padding-top: 4px; }
h2 { margin: 0 0 16px; font: 600 clamp(26px, 3.4vw, 36px)/1.1 var(--display); letter-spacing: -0.035em; }
.join-intro p { margin: 0; color: var(--mist); font-size: 17px; max-width: 26em; }

/* ── Form (unchanged behaviour) ─────────────────────── */
.signup { display: grid; gap: 36px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .label { font: 600 14px/1.3 var(--body); padding: 0; margin-bottom: 4px; }
.hint { margin: 0 0 20px; font-size: 14px; color: var(--mist); }

.stops { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
.stops li { position: relative; display: flex; justify-content: center; }
.stops label, .stops li.terminus {
  width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 12px;
}
.stops label { cursor: pointer; }
.stops li:not(:last-child)::after {
  content: ""; position: absolute; top: 7px; left: 50%; width: 100%; height: 2px; background: var(--line);
  transition: background-color 200ms ease;
}
.stops input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dot {
  position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line);
  transition: border-color 200ms ease, background-color 200ms ease, transform 200ms ease;
}
.terminus .dot { background: var(--ink); border-color: var(--ink); border-radius: 4px; }
.name { font: 400 12.5px/1.2 var(--body); color: var(--mist); white-space: nowrap; }
.terminus .name { color: var(--ink); font-weight: 500; }
.stops input:checked + .dot { background: var(--teal); border-color: var(--teal); transform: scale(1.25); }
.stops input:checked ~ .name { color: var(--ink); font-weight: 600; }
.stops li:has(input:checked)::after, .stops li:has(input:checked) ~ li::after { background: var(--teal); }
.stops li:has(input:checked) ~ li:not(.terminus) .dot { border-color: var(--teal); }
.stops label:hover .dot { border-color: var(--teal); }
.stops input:focus-visible + .dot { outline: 2px solid var(--ink); outline-offset: 3px; }

.trip { margin: 20px 0 0; font-size: 15px; min-height: 1.5em; }
.trip b { font-weight: 600; }
.trip .demand { display: block; margin-top: 2px; color: var(--mist); font-size: 14px; }

.segmented { display: grid; gap: 8px; margin-top: 8px; }
.segmented label, .pills label { position: relative; cursor: pointer; }
.segmented input, .pills input { position: absolute; opacity: 0; }
.segmented span {
  display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.segmented label:hover span, .pills label:hover span { background: var(--soft); }
.segmented input:checked + span, .pills input:checked + span { border-color: var(--teal); background: var(--soft); box-shadow: inset 0 0 0 1px var(--teal); }
.segmented input:focus-visible + span, .pills input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.seats[hidden] { display: none; }
.pills { display: flex; gap: 8px; margin-top: 8px; }
.pills span { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 10px; font: 400 15px/1 var(--mono); }

.row { display: grid; grid-template-columns: 132px 1fr; gap: 12px; }
.field { display: grid; gap: 6px; }
select, input[type="email"] {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: inherit;
}
select { font-family: var(--mono); font-size: 15px; }
select:focus-visible, input[type="email"]:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
input::placeholder { color: #9aa1a6; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--mist); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--teal); flex: none; }

.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 10px;
  background: var(--ink); color: #fff; text-decoration: none;
  font: 600 16px/1 var(--body); cursor: pointer; transition: background-color 150ms ease;
}
.cta:hover { background: var(--teal); }
.cta:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.cta[disabled] { opacity: 0.55; cursor: progress; }

.status { margin: -20px 0 0; min-height: 1.5em; font-size: 15px; }
.status:focus { outline: none; }
.status.error { color: var(--error); }
.signup.done > :not(.status):not(.share) { display: none; }
.signup.done .status { margin: 0; font: 600 clamp(24px, 3vw, 30px)/1.15 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.signup.done .status small { display: block; margin-top: 10px; font: 400 16px/1.55 var(--body); color: var(--mist); }
.share[hidden] { display: none; }
.signup.done .share { display: grid; gap: 14px; padding-top: 24px; border-top: 1px solid var(--line); }
.share p { margin: 0; font-size: 15px; color: var(--mist); }
.ghost {
  justify-self: start; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--ink); font: 600 15px/1 var(--body); cursor: pointer;
}
.ghost:hover { border-color: var(--teal); color: var(--teal); }
.ghost:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* ── Headline A/B (variant set by variant.js before paint) ── */
.h-b { display: none; }
[data-variant="b"] .h-a { display: none; }
[data-variant="b"] .h-b { display: inline; }

/* ── Step 2: optional details after joining ────────── */
.details[hidden] { display: none; }
.details {
  display: grid; gap: 20px; margin-top: 32px; padding: 24px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--soft);
}
.details h3 { margin: 0; font: 600 17px/1.3 var(--display); letter-spacing: -0.02em; }
.details h3 span { font-weight: 400; color: var(--mist); }
.details .field { max-width: 200px; }
.details .status { margin: 0; }
.status.ok { color: var(--teal); }

/* ── Founder (hidden until real content is added) ──── */
.founder[hidden] { display: none; }
.founder { display: flex; gap: 16px; align-items: center; padding-bottom: 48px; }
.founder img { border-radius: 50%; }
.founder p { margin: 0; color: var(--mist); }
.founder b { color: var(--ink); }

/* ── Drivers / riders ──────────────────────────────── */
.audiences {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  padding-top: 24px; padding-bottom: 96px;
}
.audience { border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.audience h2 { font-size: 24px; margin-bottom: 18px; }
.audience ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.audience li { position: relative; padding-left: 22px; color: var(--mist); }
.audience li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--teal); }

/* ── How it works & questions ─────────────────────── */
.how, .faq { padding-top: 32px; padding-bottom: 72px; }
.how h2, .faq h2 { font-size: 28px; margin-bottom: 24px; }
.how ol { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 22px; }
.how li { counter-increment: step; position: relative; padding-left: 40px; color: var(--mist); }
.how li::before { content: counter(step); position: absolute; left: 0; top: 0; font: 500 13px/1.9 var(--mono); color: var(--teal); }
.how li b { display: block; color: var(--ink); font-weight: 600; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--mist); border-bottom: 2px solid var(--mist);
  transform: translateY(-70%) rotate(45deg); transition: transform 150ms ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.faq details p { margin: 0 0 20px; color: var(--mist); max-width: 36em; }
.faq a { color: var(--ink); }

/* ── Footer ─────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); margin-top: 24px; }
.foot-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding-top: 28px; padding-bottom: 40px; font-size: 13px; color: var(--mist); }
.foot p { margin: 0; }
.brand.small { font: 600 15px/1 var(--display); color: var(--ink); gap: 8px; }
.foot a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.foot a:hover { border-color: var(--teal); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Tablet ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; padding-bottom: 64px; }
  .hero-art { max-width: 560px; }
  .join { grid-template-columns: 1fr; gap: 32px; padding-top: 64px; }
  .join-intro { position: static; }
  .foot-inner { grid-template-columns: 1fr; gap: 10px; }
}

/* ── Phone ──────────────────────────────────────────── */
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .nav nav a:not(.nav-cta) { display: none; }
  .nav nav a.nav-cta { padding: 9px 14px; font-size: 14px; }
  .hero { padding-top: 40px; }
  .lede { font-size: 17px; }
  .audiences { grid-template-columns: 1fr; padding-bottom: 64px; }
  .audience { padding: 24px; }
  .stops { grid-template-columns: 1fr; }
  .stops li { justify-content: flex-start; }
  .stops label, .stops li.terminus { flex-direction: row; gap: 14px; padding: 8px 0; }
  .stops li:not(:last-child)::after { top: 50%; left: 7px; width: 2px; height: 100%; }
  .name { font-size: 15px; }
  .row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Legal pages ─────────────────────────────────────── */
.legal { padding-top: 64px; padding-bottom: 80px; }
.legal h1 { margin: 0 0 8px; font: 600 clamp(32px, 5vw, 44px)/1.1 var(--display); letter-spacing: -0.04em; }
.legal .updated { margin: 0 0 32px; font: 400 13px/1.4 var(--mono); color: var(--mist); }
.legal h2 { font-size: 20px; margin: 36px 0 10px; letter-spacing: -0.02em; }
.legal p, .legal li { color: #3d4448; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal a { color: var(--teal); }

/* ── Hero car (SMIL animateMotion along #drive-path) ──── */
.bridge .car-body, .mini-car .car-body { fill: var(--teal); }
.bridge .car-glass, .mini-car .car-glass { fill: #d7eef1; }
.bridge .car-wheel, .mini-car .car-wheel { fill: var(--ink); }
.bridge .car { filter: drop-shadow(0 2px 2px rgba(3, 106, 119, 0.25)); }

/* ── CTA band where the inline form used to be ───────── */
.join-band {
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding-top: 64px; padding-bottom: 64px; border-top: 1px solid var(--line);
}
.join-band p { margin: 0; color: var(--mist); max-width: 36em; }
.join-band .cta { flex: none; }

/* ── Waitlist popup ─────────────────────────────────── */
.sheet {
  width: min(560px, calc(100vw - 32px)); max-height: min(88vh, 860px);
  padding: 0; border: 0; border-radius: 20px; background: var(--bg); color: var(--ink);
  box-shadow: 0 24px 80px rgba(20, 24, 27, 0.22), 0 2px 8px rgba(20, 24, 27, 0.08);
  overflow: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(20, 24, 27, 0.42); backdrop-filter: blur(3px); }
.sheet-inner { position: relative; padding: 36px 32px 32px; }
.sheet h2 { margin: 0 0 28px; font-size: clamp(26px, 4vw, 32px); }
.sheet .kicker { margin-bottom: 12px; }
.sheet-close {
  position: absolute; top: 16px; right: 16px; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--bg);
  font: 400 24px/1 var(--body); color: var(--mist); cursor: pointer;
}
.sheet-close:hover { color: var(--ink); border-color: var(--ink); }
.sheet-close:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
body.sheet-open { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheet-in 420ms cubic-bezier(0.2, 0.8, 0.2, 1); }
  .sheet[open]::backdrop { animation: fade-in 300ms ease-out; }
  .sheet.closing { animation: sheet-out 220ms ease-in forwards; }
  .sheet.closing::backdrop { animation: fade-out 220ms ease-in forwards; }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(16px) scale(0.98); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* ── Joined: the car drives from your stop into the city ─ */
.drive-anim[hidden] { display: none; }
.drive-anim { position: relative; height: 70px; margin: 0 0 28px; }
.drive-anim .road {
  position: absolute; left: 0; right: 0; top: 30px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--teal) 0 0) no-repeat 0 0 / 0% 100%, var(--line);
}
.drive-anim .road-from, .drive-anim .road-to { position: absolute; top: 14px; font: 400 12px/1 var(--mono); color: var(--mist); white-space: nowrap; }
.drive-anim .road-from { left: 0; }
.drive-anim .road-to { right: 0; color: var(--ink); }
.drive-anim .road::after { content: ""; position: absolute; right: -2px; top: -5px; width: 12px; height: 12px; border-radius: 3px; background: var(--ink); }
.mini-car { position: absolute; left: 0; top: 6px; }
.drive-anim .road-from, .drive-anim .road-to { top: 46px; }
.drive-anim.go .road { animation: fill-road 1.7s cubic-bezier(0.45, 0, 0.35, 1) forwards; }
.drive-anim.go .mini-car { animation: drive-in 1.7s cubic-bezier(0.45, 0, 0.35, 1) forwards; }
@keyframes fill-road { to { background-size: 100% 100%, auto; } }
@keyframes drive-in { to { left: calc(100% - 60px); } }
.sheet .signup.done .status { animation: rise 420ms 1.2s both cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 560px) {
  .join-band { flex-direction: column; align-items: flex-start; gap: 20px; }
  /* bottom sheet on phones */
  .sheet { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .sheet-inner { padding: 28px 20px 28px; }
  @media (prefers-reduced-motion: no-preference) {
    .sheet[open] { animation: sheet-up 380ms cubic-bezier(0.2, 0.8, 0.2, 1); }
    .sheet.closing { animation: sheet-down 220ms ease-in forwards; }
  }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .bridge .car { display: none; } }
