/* ==========================================================================
   Passenger website. Implements the Passenger design system (Claude Design,
   "Evolve" direction, Night and Dawn phases).

   Sections: 1–2 Fonts and tokens (tokens.css) · 3 Base · 4 Type · 5 Components · 6 Layout
             7 Home · 8 Beta form · 9 Prose pages · 10 Motion preferences

   Rules from the system worth keeping in mind when editing:
   - Surfaces are soft: tonal lift and a diffuse shadow, never outlines.
   - The main button is flat: one solid fill, no gradient, no shadow.
   - Gold/amber text is for labels and accents only, and never behind body text
     on the sunrise glow.
   - Headlines are Petrona, data (times, codes) is Fira Mono, everything else
     Albert Sans. Labels are 11px, sentence case.
   ========================================================================== */

/* 1–2 · Fonts and tokens: generated into tokens.css from design/tokens.json (npm run build). Nothing to edit here. */

/* 3 · Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow-x: hidden; overflow-x: clip;
  font: 400 var(--fs-body)/1.5 var(--font-body); color: var(--tx); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--acf); color: var(--onac); }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.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; }
.skip { position: fixed; left: var(--sp4); top: -80px; z-index: 100; padding: var(--sp3) var(--sp6); border-radius: 999px; background: var(--acf); color: var(--onac); font-weight: 500; text-decoration: none; transition: top var(--t); }
.skip:focus { top: var(--sp4); }

/* 4 · Type ----------------------------------------------------------------- */
.hd { font-family: var(--font-head); font-weight: 400; letter-spacing: 0; line-height: 1.1; text-wrap: balance; }
.lb { font-size: var(--fs-label); line-height: 1.4; font-weight: 500; letter-spacing: .01em; color: var(--mu); }
.dt { font-family: var(--font-data); }
.mu { color: var(--mu); }
.act { color: var(--act); }
.h1 { font-size: clamp(37.2px, 5vw, var(--fs-h1)); }
.h2 { font-size: clamp(28.1px, 3.6vw, var(--fs-h2)); }
.h3 { font-size: var(--fs-h4); }
.lede { font-size: var(--fs-h5); line-height: 1.5; max-width: 520px; color: var(--mu); }

/* 5 · Components ----------------------------------------------------------- */
.ic { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: var(--stroke-icon); stroke-linecap: round; stroke-linejoin: round; }
.mark { fill: currentColor; stroke: none; }

.cd { background: color-mix(in srgb, var(--ph) 6%, var(--sf1)); border-radius: var(--r); box-shadow: var(--sh); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp2);
  min-height: 48px; padding: 0 var(--sp8); border: 0; border-radius: 999px;
  font: 500 16px/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform var(--t) var(--ease), background var(--t), filter var(--t);
}
.btn:active { transform: scale(.97); }
.btn-p { background: var(--acf); color: var(--onac); }
.btn-p:hover { filter: brightness(1.06); }
.btn-s { background: var(--sf2); color: var(--tx); }
.btn-s:hover { filter: brightness(1.08); }
.btn-sm { min-height: 44px; padding: 0 var(--sp6); }
.btn[disabled] { opacity: .6; cursor: progress; }

.inp {
  height: 52px; width: 100%; padding: 0 var(--sp6); border: 0; border-radius: 999px;
  background: var(--sf2); color: var(--tx); font: 16px var(--font-body);
}
.inp::placeholder { color: var(--mu); }
.inp[aria-invalid='true'] { box-shadow: 0 0 0 2px var(--er); }

/* Chips: real radio inputs, so they work with keyboards and screen readers. */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp2); }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.chip span, .chip-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp6); border: 0; border-radius: 999px;
  background: var(--sf2); color: var(--tx); font: 500 15px/1 var(--font-body); cursor: pointer;
  transition: transform var(--t) var(--ease), background var(--t);
}
.chip:active span, .chip-btn:active { transform: scale(.97); }
.chip input:checked + span, .chip-btn[aria-pressed='true'] { background: var(--acf); color: var(--onac); }
.chip input:focus-visible + span, .chip-btn:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

.glow {
  position: absolute; pointer-events: none; border-radius: 50%; filter: blur(60px); opacity: .55;
  background: radial-gradient(circle at 50% 60%, var(--glow-1) 0%, var(--glow-2) 38%, var(--glow-3) 72%, transparent 100%);
}

details.qa { background: color-mix(in srgb, var(--ph) 6%, var(--sf1)); border-radius: var(--r); box-shadow: var(--sh); padding: 0 var(--sp6); }
details.qa summary { display: flex; align-items: center; gap: var(--sp3); min-height: 64px; cursor: pointer; font-weight: 500; font-size: 18px; list-style: none; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: '+'; margin-left: auto; font-family: var(--font-data); font-size: 24px; color: var(--act); }
details.qa[open] summary::after { content: '–'; }
details.qa p { padding: 0 0 var(--sp6); max-width: 640px; color: var(--mu); }
details.qa a { color: var(--act); }

/* 6 · Layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--sp8); }
main { flex: 1 0 auto; position: relative; }
.section { padding-top: var(--sp24); padding-bottom: var(--sp24); display: flex; flex-direction: column; gap: var(--sp12); }
.head { display: flex; flex-direction: column; gap: var(--sp3); max-width: 640px; }

.nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp4); padding-top: var(--sp6); padding-bottom: var(--sp6); position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: var(--sp3); min-height: 44px; color: var(--tx); text-decoration: none; }
.brand .mark { width: 32px; height: 32px; color: var(--act); }
.brand span { font-family: var(--font-head); font-size: var(--fs-h5); line-height: 1.1; }
.nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp2); }
.nl { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--sp3); border-radius: 999px; color: var(--tx); text-decoration: none; transition: background var(--t); }
.nl:hover { background: var(--sf2); }

.foot { padding-top: var(--sp8); padding-bottom: var(--sp12); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp4); }
.foot .brand .mark { width: 28px; height: 28px; }
.foot nav ul { display: flex; flex-wrap: wrap; gap: var(--sp2); }
.foot .lb a, .foot .lb button { display: inline-flex; align-items: center; gap: var(--sp2); min-height: 44px; padding: 0 var(--sp3); border: 0; background: none; border-radius: 999px; color: var(--mu); font-size: var(--fs-label); font-weight: 500; text-decoration: none; cursor: pointer; }
.foot .lb a:hover, .foot .lb button:hover { background: var(--sf2); }
.foot .ic { width: 18px; height: 18px; }
.phase-toggle .sun { display: none; }
[data-phase='dawn'] .phase-toggle .sun { display: block; }
[data-phase='dawn'] .phase-toggle .moon { display: none; }

/* 7 · Home ----------------------------------------------------------------- */
.hero { overflow-x: clip; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp12); padding-top: var(--sp12); padding-bottom: var(--sp24); position: relative; }
.hero__copy { flex: 1 1 480px; display: flex; flex-direction: column; gap: var(--sp6); position: relative; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp4); }
.hero__stage { flex: 1 1 340px; min-height: 600px; position: relative; display: flex; justify-content: center; align-items: center; }
.hero__stage .glow { width: 520px; height: 520px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.page-glow { width: 760px; height: 420px; right: -140px; top: -180px; }

.steps { display: flex; flex-wrap: wrap; gap: var(--sp6); }
.step { flex: 1 1 300px; display: flex; flex-direction: column; gap: var(--sp3); padding: var(--sp8); }
.step__n { font-size: var(--fs-h4); line-height: 1.1; }

.features { display: flex; flex-wrap: wrap; gap: var(--sp6); }
.feature { flex: 1 1 340px; display: flex; gap: var(--sp4); padding: var(--sp6) 0; }
.feature h3 { font-size: 18px; font-weight: 500; line-height: 1.4; }

.access { position: relative; overflow-x: clip; }
.access .glow { width: 640px; height: 320px; right: -60px; top: -40px; }
.access__card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--sp6); padding: var(--sp16) var(--sp8); }
.access__form { display: flex; flex-wrap: wrap; gap: var(--sp3); width: 100%; max-width: 560px; }
.access__form .inp { flex: 1 1 240px; width: auto; min-width: 0; }

.faq { display: flex; flex-direction: column; gap: var(--sp3); max-width: 800px; }

/* 8 · Beta form ------------------------------------------------------------ */
.beta { display: flex; flex-wrap: wrap; gap: var(--sp16); padding-top: var(--sp12); padding-bottom: var(--sp24); position: relative; }
.beta__copy { flex: 1 1 420px; display: flex; flex-direction: column; gap: var(--sp6); align-self: flex-start; }
.beta__list { display: flex; flex-direction: column; gap: var(--sp4); margin-top: var(--sp4); }
.beta__list li { display: flex; align-items: center; gap: var(--sp3); }
.beta__form { position: relative; flex: 1 1 420px; max-width: 560px; display: flex; flex-direction: column; gap: var(--sp6); padding: var(--sp12) var(--sp8); }
.field { display: flex; flex-direction: column; gap: var(--sp2); }
.fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--sp3); }
.fieldset legend { padding: 0; margin-bottom: var(--sp2); }
.check { display: flex; align-items: center; gap: var(--sp3); min-height: 44px; cursor: pointer; color: var(--tx); }
.check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--acf); cursor: pointer; }
.beta__form .btn { min-height: 52px; }
.form-msg { min-height: 1.5em; }
.form-msg.is-err { color: var(--er); font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.beta__done { display: flex; flex-direction: column; gap: var(--sp4); }
.beta__done[hidden], .beta__form[hidden] { display: none; }

/* 9 · Prose pages (privacy, terms, support, 404) -------------------------- */
.prose-wrap { max-width: 760px; margin: 0 auto; width: 100%; padding: var(--sp12) var(--sp8) var(--sp24); display: flex; flex-direction: column; gap: var(--sp6); position: relative; }
.prose { display: flex; flex-direction: column; gap: var(--sp3); color: var(--mu); }
.prose h2 { margin-top: var(--sp8); font-family: var(--font-head); font-weight: 400; font-size: var(--fs-h4); line-height: 1.1; color: var(--tx); }
.prose h3 { margin-top: var(--sp4); font-size: 18px; font-weight: 500; color: var(--tx); }
.prose ul { padding-left: 1.25em; list-style: disc; display: flex; flex-direction: column; gap: var(--sp2); }
.prose li::marker { color: var(--act); }
.prose a, .prose-wrap a:not(.btn) { color: var(--act); text-underline-offset: 2px; overflow-wrap: anywhere; }
.prose strong { color: var(--tx); font-weight: 500; }
.updated { color: var(--mu); }
.contact { display: flex; flex-direction: column; gap: var(--sp3); padding: var(--sp8); }
.notfound { align-items: flex-start; min-height: 50vh; justify-content: center; }

/* Small screens ------------------------------------------------------------ */
@media (max-width: 640px) {
  .wrap, .prose-wrap { padding-left: var(--sp6); padding-right: var(--sp6); }
  .nav ul li:not(:last-child) { display: none; } /* brand and button share the row; the page is short enough to scroll */
  .section, .hero { padding-top: var(--sp16); padding-bottom: var(--sp16); }
  .hero__stage { min-height: 520px; }
  .access__card { padding: var(--sp12) var(--sp6); }
  .beta { gap: var(--sp12); }
  .beta__form { padding: var(--sp8) var(--sp6); }
  .page-glow { width: 420px; height: 300px; right: -120px; }
}

/* 10 · Motion preferences -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .chip span, .chip-btn, .nl, .skip { transition: none; }
  .btn:active, .chip:active span, .chip-btn:active { transform: none; }
}

/* 11 · App showcase -------------------------------------------------------- */
.stage-note { text-align: center; margin-top: var(--sp4); }
.hero__stage { flex-direction: column; }
.hero__stage .device { z-index: 1; }
.stage-glow { width: 460px; height: 460px; left: 50%; top: 50%; transform: translate(-50%, -50%); }

.show { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp16); }
.show--flip { flex-direction: row-reverse; }
.show__stage { flex: 1 1 380px; position: relative; display: flex; justify-content: center; }
.show__stage .device, .phase .device { position: relative; z-index: 1; }
.show__copy { flex: 1 1 380px; max-width: 520px; display: flex; flex-direction: column; gap: var(--sp4); }

.phases { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp12) var(--sp16); }
.phase { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--sp4); }
.phase figcaption { z-index: 1; }

@media (max-width: 960px) {
  .show, .show--flip { flex-direction: column; align-items: stretch; gap: var(--sp12); }
  .show__copy { max-width: none; }
  .show__stage .device { margin: 0 auto; }
}
@media (max-width: 640px) {
  .show { gap: var(--sp8); }
  .stage-glow { width: 320px; height: 320px; }
}

/* 12 · Pricing, story, coming soon ---------------------------------------- */
.plan { padding: 0; overflow: hidden; max-width: 900px; }
.plan table { width: 100%; border-collapse: collapse; }
.plan th, .plan td { padding: var(--sp4) clamp(14px, 2.4vw, var(--sp8)); text-align: left; vertical-align: top; }
.plan tbody tr { box-shadow: inset 0 1px 0 var(--sf2); }
.plan thead th { padding-top: var(--sp8); padding-bottom: var(--sp6); }
.plan thead th:first-child { width: 30%; }
.plan .tier { display: block; font: 500 var(--fs-label)/1.4 var(--font-body); color: var(--mu); }
.plan .amt { display: block; margin: var(--sp1) 0; font: 400 clamp(32px, 4vw, 49.3px)/1.1 var(--font-head); }
.plan .amt small { margin-left: var(--sp1); font: 500 14px var(--font-body); color: var(--mu); }
.plan .per { display: block; font: 400 13px/1.4 var(--font-body); color: var(--mu); }
.plan thead th.pro { background: color-mix(in srgb, var(--acf) 12%, transparent); }
.plan thead th.pro .tier, .plan thead th.pro .amt { color: var(--act); }
.plan tbody th { font-weight: 500; color: var(--mu); }
.plan tbody td:last-child { font-weight: 500; background: color-mix(in srgb, var(--acf) 6%, transparent); }

.story { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp12) var(--sp16); }
.story__big { flex: 1 1 460px; display: flex; flex-direction: column; gap: var(--sp4); }
.story__big footer { max-width: 32em; }
.story__card { flex: 1 1 300px; max-width: 420px; padding: var(--sp8); display: flex; flex-direction: column; gap: var(--sp4); }

.soon { display: flex; flex-wrap: wrap; gap: var(--sp6); }
.soon__item { flex: 1 1 320px; display: flex; gap: var(--sp4); padding: var(--sp6); }
.soon__item h3 { font-size: 18px; font-weight: 500; line-height: 1.4; }
