/* Shared stylesheet for every page in website/. Colour values are copied from
   core/theme/Colors.ts. These pages are static HTML, not a React Native
   surface, so the tokens are CSS variables. No inline styles anywhere: the
   Content-Security-Policy in _headers allows only this file. */
:root {
  --primary: #2563EB;
  --text: #1F2937;
  --text-secondary: #6B7280;
  --background: #F9FAFB;
  --border: #E5E7EB;
  --white: #FFFFFF;
  --primary-light: #2563EB20;
  --primary-ultra-light: #2563EB10;
  --primary-hover: #1D4ED8;
  --success: #16A34A;
  --success-light: #16A34A20;
  --error: #EF4444;
  --error-light: #EF444420;
  --error-ultra-light: #EF444410;
  --text-slightly-faded: #374151;
  --text-tertiary: #9CA3AF;
  --parking: #10B981;
  --parking-surface: #ECF9F5;
  --ride: #8B5CF6;
  --ride-surface: #F6F2FE;
  --services: #F59E0B;
  --services-surface: #FEF7EB;
  --radius-sm: 8px;
  --radius-md: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  overflow-wrap: break-word;
}
main { max-width: 42rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
h1 { font-size: 1.5rem; margin-top: 0; }
h2 { font-size: 1.1rem; margin-top: 1.5rem; }
a { color: var(--primary); }
.muted { color: var(--text-secondary); font-size: 0.9rem; }

.site-header,
.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem;
}
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-bottom: 0;
}
.brand { display: inline-block; line-height: 0; }
.brand img { display: block; height: 32px; width: auto; }
.site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-header nav a[aria-current="page"] { color: var(--text); font-weight: 700; }
.site-footer { padding-bottom: 2rem; }
.site-footer p { margin: 0; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }

ol, ul { padding-left: 1.5rem; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
th, td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.625rem;
  text-align: left;
  vertical-align: top;
  min-width: 8rem;
}
th { background: var(--background); }

/* ---- Landing page ---- */
/* Scoped to body.landing so the legal pages keep their own typography.
   Design: docs/design/early-access-landing-page. */
.landing { font-size: 16px; line-height: 1.5; text-wrap: pretty; -webkit-text-size-adjust: 100%; }
:where(.landing) a { text-decoration: none; }
.landing a:hover { text-decoration: underline; }
.landing :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
:where(.landing) h1, :where(.landing) h2, :where(.landing) h3, :where(.landing) p { margin: 0; }
:where(.landing) main { max-width: none; margin: 0; padding: 0; }
:where(.landing) section { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
:where(.landing) ol, :where(.landing) ul { padding-left: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }
@media (min-width: 1024px) { .wrap { padding: 0 32px; } }
.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; }

.site-header--wide,
.site-footer--wide { max-width: 1200px; padding-left: 16px; padding-right: 16px; }
@media (min-width: 768px) { .site-header--wide, .site-footer--wide { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1024px) { .site-header--wide, .site-footer--wide { padding-left: 32px; padding-right: 32px; } }
/* Full-width bars as designed: white header with a bottom rule, footer with a top rule. */
.landing .site-bar { background: var(--white); border-bottom: 1px solid var(--border); }
.landing .site-bar--top { background: none; border-bottom: 0; border-top: 1px solid var(--border); }
.landing .site-header { padding-top: 12px; padding-bottom: 12px; min-height: 60px; }
.landing .site-header nav a,
.landing .site-footer nav a { font-size: 14px; font-weight: 500; color: var(--text-secondary); padding: 8px 0; display: inline-block; }
.landing .site-header nav a:hover,
.landing .site-footer nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 479px) { .landing .site-header nav a, .landing .site-footer nav a { font-size: 13px; } }

/* ---- Hero ---- */
.hero { padding: 40px 0 48px; }
.hero .wrap { display: grid; gap: 32px; }
@media (min-width: 1024px) {
  .hero { padding: 80px 0; }
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 460px); gap: 64px; align-items: start; }
}
.hero h1 { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; max-width: 18ch; }
@media (min-width: 768px) { .hero h1 { font-size: 40px; } }
@media (min-width: 1280px) { .hero h1 { font-size: 48px; } }
.hero .lead { font-size: 18px; color: var(--text-secondary); max-width: 52ch; }
.hero .beta { display: flex; align-items: center; gap: 8px; margin-top: 24px; font-size: 14px; font-weight: 500; color: var(--text-slightly-faded); }
.hero .beta .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--primary); flex: none; }

/* ---- Form card (mirrors app/(auth)/signup-early-access.tsx) ---- */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
@media (min-width: 768px) { .form-card { padding: 24px; } }
.form-card h2 { font-size: 24px; font-weight: 700; line-height: 1.2; margin-bottom: 8px; }
.form-card .sub { font-size: 16px; color: var(--text-secondary); margin-bottom: 24px; }
.field { margin-bottom: 24px; }
.label { display: block; font-size: 14px; font-weight: 500; color: var(--text-slightly-faded); margin-bottom: 8px; }
.label .opt { font-weight: 400; color: var(--text-secondary); }
.label .req { color: var(--error); }
.input {
  display: block; width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--white); border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 16px; min-height: 48px;
}
.input::placeholder { color: var(--text-tertiary); }
.input:focus { outline: none; border-color: var(--primary); }
.input:focus-visible { outline: none; }
textarea.input { resize: vertical; min-height: 88px; line-height: 1.5; }
.field[data-invalid="true"] .input { border-color: var(--error); }
.field-error { display: none; align-items: flex-start; gap: 4px; margin-top: 4px; font-size: 12px; line-height: 18px; color: var(--error); }
.field[data-invalid="true"] .field-error { display: flex; }
.field-error svg { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.msg-foot { display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; }
.msg-foot .field-error { flex: 1; min-width: 0; margin-top: 0; }
.counter { margin-left: auto; font-size: 12px; line-height: 18px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.field[data-invalid="true"] .counter { color: var(--error); }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--white); background: var(--primary);
  border: 0; border-radius: var(--radius-sm); padding: 12px 24px; min-height: 48px; cursor: pointer;
  transition: transform 100ms ease;
}
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.5; cursor: default; transform: none; }
.btn[disabled]:hover { background: var(--primary); }
.spinner { display: none; width: 18px; height: 18px; border: 2px solid var(--white); border-right-color: transparent; border-radius: 999px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.privacy { margin-top: 12px; font-size: 12px; line-height: 18px; color: var(--text-secondary); text-align: center; }
.noscript-note { display: flex; gap: 8px; align-items: flex-start; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--primary-light); background: var(--primary-ultra-light); border-radius: var(--radius-sm); font-size: 14px; line-height: 20px; }
.noscript-note svg { flex: none; width: 20px; height: 20px; color: var(--primary); }

/* Banner (mirrors core/components/ErrorBanner.tsx) */
.banner { display: none; gap: 8px; align-items: flex-start; padding: 16px; margin-bottom: 16px; background: var(--error-ultra-light); border: 1px solid var(--error-light); border-radius: var(--radius-sm); font-size: 14px; line-height: 20px; color: var(--text); }
.banner svg { flex: none; width: 20px; height: 20px; color: var(--error); }

/* Form state machine: data-state on .form-card = idle | sending | success | error | ratelimited */
.form-card[data-state="sending"] .field { opacity: 0.5; }
.form-card[data-state="sending"] .spinner { display: inline-block; }
.form-card[data-state="error"] .banner-generic,
.form-card[data-state="ratelimited"] .banner-ratelimited { display: flex; }
.form-card[data-state="success"] form,
.form-card[data-state="success"] .form-head { display: none; }
.sent { display: none; text-align: center; padding: 16px 0 8px; }
.form-card[data-state="success"] .sent { display: block; }
.sent .well { width: 44px; height: 44px; border-radius: 999px; background: var(--success-light); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.sent .well svg { width: 24px; height: 24px; color: var(--success); }
.sent h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.sent p { font-size: 16px; line-height: 24px; color: var(--text-secondary); }
.sent strong { font-weight: 500; color: var(--text); }

/* ---- Domain cards ---- */
.domains { padding: 0 0 48px; }
.domains .wrap { display: grid; gap: 16px; }
@media (min-width: 768px) { .domains .wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.domain .icon { width: 40px; height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.domain .icon svg { width: 20px; height: 20px; }
.domain h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.domain p { font-size: 15px; line-height: 22px; color: var(--text-secondary); }
.domain--parking .icon { background: var(--parking-surface); color: var(--parking); }
.domain--ride .icon { background: var(--ride-surface); color: var(--ride); }
.domain--services .icon { background: var(--services-surface); color: var(--services); }

/* ---- How it works ---- */
.how { padding: 48px 0; border-top: 1px solid var(--border); background: var(--white); }
@media (min-width: 1024px) { .how { padding: 64px 0; } }
.how h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 32px; }
@media (min-width: 768px) { .how h2 { font-size: 32px; } }
.steps { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }
.step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.step .num { counter-increment: step; width: 28px; height: 28px; border-radius: 999px; background: var(--primary-ultra-light); color: var(--primary); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.step .num::before { content: counter(step); }
.step h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.step p { font-size: 15px; line-height: 22px; color: var(--text-secondary); }

/* ---- Landing footer ---- */
.landing .site-footer { display: grid; gap: 16px; padding-top: 32px; padding-bottom: 40px; font-size: 14px; line-height: 20px; color: var(--text-secondary); }
@media (min-width: 768px) { .landing .site-footer { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.landing .site-footer ul { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer address { font-style: normal; }
.site-footer .support { margin-top: 4px; }
