/* ============================================================
   ChiRide landing — Evn design system, ChiRide accent layer
   Calm is the brand: one canvas color, one action color,
   the fare plate is the only flourish.
   ============================================================ */

:root {
  --canvas: #F2F1EE;
  --panel: #FFFFFF;
  --ink: #1C1C1A;
  --ink-soft: #5A5955;
  --accent: #EA080D;          /* ChiRide brand red — fills, large accents */
  --accent-deep: #C1060B;     /* button hover/pressed */
  --accent-ink: #B80710;      /* darker red for small text/links (AA on canvas) */
  --plate-frame: #141414;     /* license-plate black */
  --line: #E3E1DC;

  --wrap: 1080px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --pad-section: clamp(4rem, 8vw, 6rem);   /* 64 → 96px */

  --fs-eyebrow: 0.8125rem;                            /* 13 */
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem); /* 16 → 17 */
  --fs-h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);/* 18 → 20 */
  --fs-h2: clamp(1.625rem, 1.3rem + 1.5vw, 2rem);     /* 26 → 32 */
  --fs-h1: clamp(2.25rem, 1.35rem + 3.6vw, 3.5rem);   /* 36 → 56 */
  --fs-plate: clamp(3.5rem, 1.6rem + 7.4vw, 5.5rem);  /* 56 → 88 */

  --radius: 14px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }

h1, h2, h3, p, ol, ul, figure, blockquote { margin: 0; }

a { color: var(--accent-ink); text-decoration: none; }

/* Accessibility ------------------------------------------------ */
.vh {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  z-index: 100; background: var(--ink); color: #fff;
  padding: 0.6rem 1rem; border-radius: 0 0 10px 10px;
  transition: top 0.15s var(--ease);
}
.skip:focus { top: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Layout ------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--pad-section); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* Typography roles -------------------------------------------- */
.h1 {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 800;
  font-size: var(--fs-h1);
  line-height: 1.03;
  letter-spacing: -0.02em;
  max-width: 15ch;
}
.h2 {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 700;
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.h3 {
  font-weight: 700;
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.1875rem);
  color: var(--ink-soft);
  max-width: 46ch;
  line-height: 1.55;
}
.lede--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap; max-width: 100%;
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink-soft);
}
.eyebrow__tick {
  width: 22px; height: 2px; background: var(--accent); border-radius: 2px;
}

.link {
  color: var(--accent-ink);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.12s var(--ease);
}
.link:hover { border-bottom-color: var(--accent-ink); }

/* Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 600; font-size: 1rem;
  line-height: 1; text-align: center; cursor: pointer;
  padding: 0.95rem 1.4rem;
  min-height: 48px;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: background-color 0.12s var(--ease), color 0.12s var(--ease), border-color 0.12s var(--ease);
  white-space: nowrap;
}
.btn--fill {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn--fill:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.btn--outline {
  background: transparent; color: var(--accent-ink); border-color: var(--accent-ink);
}
.btn--outline:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Nav ---------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
  max-width: var(--wrap); margin-inline: auto;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  border-bottom: 1px solid var(--line);
  /* solid feel, no glass: fall back to opaque where mix unsupported */
  backdrop-filter: none;
}
@supports not (background: color-mix(in srgb, white, black)) {
  .nav { background: var(--canvas); }
}
.brand { display: inline-flex; align-items: center; }
.brand__logo { height: clamp(26px, 3.5vw, 32px); width: auto; display: block; }
.nav__cta { padding: 0.7rem 1.15rem; min-height: 44px; }
.nav__actions { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.25rem); }
.nav__link {
  color: var(--ink-soft); font-weight: 600; font-size: 0.9375rem;
  padding: 0.5rem 0.25rem; min-height: 44px; display: inline-flex; align-items: center;
  transition: color 0.12s var(--ease);
}
.nav__link:hover { color: var(--accent-ink); }

/* Hero --------------------------------------------------------- */
.hero { padding-top: clamp(2.5rem, 5vw, 4rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__copy > * + * { margin-top: 1.35rem; }
.hero .h1 { margin-top: 1rem; }

/* Signup form -------------------------------------------------- */
.signup__row {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
  max-width: 34rem;
}
.signup--center .signup__row { margin-inline: auto; }
.signup__input {
  flex: 1 1 15rem;
  min-height: 48px;
  padding: 0.85rem 1rem;
  font: inherit; color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.signup__input::placeholder { color: #8f8d87; }
.signup__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.signup__note {
  margin-top: 0.75rem;
  font-size: 0.875rem; color: var(--ink-soft);
  max-width: 34rem;
}
.signup--center .signup__note { text-align: center; margin-inline: auto; }
.signup__note--ok { color: var(--accent-ink); font-weight: 600; }
.signup__note--err { color: var(--accent-ink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ==== SIGNATURE: THE FARE PLATE ==== */
.hero__plate { display: flex; justify-content: center; }
.plate {
  position: relative;
  width: 100%; max-width: 380px;
  background: var(--panel);
  border: 2px solid var(--plate-frame);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px var(--line), 0 1px 0 rgba(0,0,0,0.02);
  padding: clamp(1.6rem, 3vw, 2.2rem) clamp(1.4rem, 3vw, 2rem);
  text-align: center;
}
.plate__bolt {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line);
}
.plate__bolt--tl { top: 12px; left: 12px; }
.plate__bolt--tr { top: 12px; right: 12px; }
.plate__bolt--bl { bottom: 12px; left: 12px; }
.plate__bolt--br { bottom: 12px; right: 12px; }

.plate__rail {
  font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.32em; text-indent: 0.32em;
  color: var(--ink);
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.plate__star { color: var(--ink); letter-spacing: 0; }
.plate__r { color: var(--accent); }

.plate__fare {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 800;
  font-size: var(--fs-plate);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent);
  margin-top: 1.4rem;
}
.plate__caption {
  margin-top: 1.2rem; padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem; color: var(--ink-soft);
}

/* Comparison strip -------------------------------------------- */
.compare__panel { padding: clamp(1.75rem, 4vw, 2.75rem); text-align: center; }
.compare__fares {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 5vw, 3.5rem);
  margin-block: 1.75rem 1.25rem;
  flex-wrap: wrap;
}
.compare__amt {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.compare__amt--us { font-size: clamp(2.75rem, 6vw, 3.75rem); color: var(--accent); }
.compare__amt--them { font-size: clamp(3.5rem, 8vw, 5rem); color: #B4B2AC; }
.compare__lab { margin-top: 0.5rem; font-size: 0.9375rem; color: var(--ink-soft); }
.compare__vs {
  font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-soft); font-weight: 600;
}
.compare__foot {
  max-width: 52ch; margin-inline: auto;
  font-size: 0.8125rem; color: var(--ink-soft); line-height: 1.5;
}

/* How it works ------------------------------------------------- */
.steps__title { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 20ch; }
.steps__list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 4vw, 3rem);
}
.step { display: flex; flex-direction: column; gap: 1rem; }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem;
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 700; font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 50%;
}
.step__body > * + * { margin-top: 0.5rem; }
.step__body p { color: var(--ink-soft); }

/* About / movement -------------------------------------------- */
.about__inner {
  max-width: 720px; margin-inline: auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.4rem;
}
.about .eyebrow { justify-content: center; }
.about__body {
  font-size: clamp(1.15rem, 1.02rem + 0.6vw, 1.4rem);
  line-height: 1.6; color: var(--ink);
  text-wrap: balance;
}
.about__site { font-weight: 600; color: var(--ink); }
.about__tagline { color: var(--accent-ink); font-weight: 700; }

/* Drivers ------------------------------------------------------ */
.drivers__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(1rem, 2vw, 1.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.drivers__copy { max-width: 52ch; }
.drivers__copy p { color: var(--ink-soft); margin-top: 0.75rem; }

/* FAQ ---------------------------------------------------------- */
.faq__wrap { max-width: 760px; }
.faq__title { margin-bottom: 1.5rem; }
.faq__list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa__q {
  list-style: none; cursor: pointer;
  padding: 1.15rem 2.5rem 1.15rem 0;
  position: relative;
  font-weight: 600; font-size: var(--fs-h3);
  color: var(--ink);
}
.qa__q::-webkit-details-marker { display: none; }
.qa__q::after {
  content: ""; position: absolute; right: 4px; top: 50%;
  width: 12px; height: 12px; margin-top: -6px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transform-origin: center;
  transition: transform 0.15s var(--ease);
}
.qa[open] .qa__q::after { transform: rotate(-135deg); }
.qa__a { padding: 0 2.5rem 1.3rem 0; }
.qa__a p { color: var(--ink-soft); max-width: 62ch; }

/* Final CTA ---------------------------------------------------- */
.final__panel,
.suggest__panel {
  padding: clamp(2.25rem, 5vw, 3.5rem);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem;
}
.suggest__panel .eyebrow { justify-content: center; }

/* Full contact form ------------------------------------------- */
.form-full {
  width: 100%; max-width: 460px; margin-inline: auto;
  text-align: left; margin-top: 0.25rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.field__label { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.field__opt { color: var(--ink-soft); font-weight: 400; }
.input {
  width: 100%; min-height: 48px;
  padding: 0.7rem 0.95rem;
  font: inherit; color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px;
}
.input::placeholder { color: #8f8d87; }
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.textarea { min-height: 108px; resize: vertical; line-height: 1.55; padding-top: 0.65rem; }

/* Rider / driver segmented toggle */
.segment { display: flex; gap: 0.5rem; }
.segment__opt { position: relative; flex: 1 1 0; }
.segment__opt input {
  position: absolute; opacity: 0; width: 1px; height: 1px;
  top: 50%; left: 50%; margin: 0;
}
.segment__opt span {
  display: flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-weight: 600; color: var(--ink-soft); cursor: pointer;
  transition: border-color 0.12s var(--ease), color 0.12s var(--ease), background-color 0.12s var(--ease);
}
.segment__opt:hover span { border-color: #cfccc4; }
.segment__opt input:checked + span {
  border-color: var(--accent); color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.segment__opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-full__submit { width: 100%; margin-top: 0.25rem; }

/* Support / donate (secondary) -------------------------------- */
.support { padding-top: clamp(2rem, 4vw, 3rem); }
.support__inner {
  max-width: 880px; margin-inline: auto; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.support .eyebrow { justify-content: center; }
.support .lede { max-width: 52ch; }
.support__widget { margin-top: 0.75rem; min-height: 44px; width: 100%; }
.support__widget stripe-buy-button { display: block; width: 100%; }
.support__note { font-size: 0.8125rem; color: var(--ink-soft); max-width: 44ch; }

/* Live donation tracker (hidden until /api/donations returns) --- */
.tracker {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 5vw, 3rem);
  margin-top: 0.5rem;
}
.tracker[hidden] { display: none; }
.tracker__stat { display: flex; flex-direction: column; align-items: center; }
.tracker__num {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 800; line-height: 1;
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.tracker__lab {
  margin-top: 0.5rem;
  font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-soft); font-weight: 600;
}
.tracker__div { width: 1px; align-self: stretch; background: var(--line); }

/* Legal document (privacy / terms) ---------------------------- */
.legal { padding-block: clamp(2.5rem, 5vw, 4rem); }
.legal__wrap { max-width: 760px; margin-inline: auto; }
.legal__eyebrow { font-size: 0.9375rem; margin-bottom: 1.5rem; }
.legal__eyebrow a { color: var(--ink-soft); font-weight: 600; }
.legal__eyebrow a:hover { color: var(--accent-ink); }
.legal__title {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.05;
  font-size: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
}
.legal__meta {
  margin-top: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem;
  color: var(--ink-soft); font-size: 0.875rem;
}
.legal__meta span { position: relative; }
.legal__meta span + span::before {
  content: "·"; position: absolute; left: -0.75rem; color: var(--line);
}
.legal__intro { margin-top: 1.75rem; }
.legal h2 {
  font-family: "Inter Tight", "Inter", sans-serif;
  font-weight: 700; letter-spacing: -0.01em; line-height: 1.2;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  color: var(--ink);
  margin-top: 2.75rem; margin-bottom: 0.9rem;
  padding-top: 1.75rem; border-top: 1px solid var(--line);
}
.legal p { color: var(--ink-soft); line-height: 1.7; margin-bottom: 1.05rem; max-width: 68ch; }
.legal p strong { color: var(--ink); font-weight: 700; }
.legal a { color: var(--accent-ink); font-weight: 500; border-bottom: 1px solid transparent; word-break: break-word; }
.legal a:hover { border-bottom-color: var(--accent-ink); }
.legal__address {
  font-style: normal; color: var(--ink); line-height: 1.8;
  padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); display: inline-block;
}
.legal__callout {
  margin: 1.5rem 0;
  padding: 1.15rem 1.35rem;
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; background: var(--panel);
}
.legal__callout p { color: var(--ink); font-size: 0.85rem; line-height: 1.65; margin-bottom: 0.85rem; }
.legal__callout p:last-child { margin-bottom: 0; }

/* Footer ------------------------------------------------------- */
.foot { padding-block: clamp(2.5rem, 5vw, 3.5rem); border-top: 1px solid var(--line); }
.foot__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1rem 2rem; justify-content: space-between;
}
.foot__brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink-soft); font-weight: 500; font-size: 0.9375rem; }
.foot__logo { height: 22px; width: auto; display: block; }
.foot__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.foot__links a { color: var(--ink-soft); font-size: 0.9375rem; }
.foot__links a:hover { color: var(--accent-ink); }
.foot__fine { flex-basis: 100%; font-size: 0.8125rem; color: var(--ink-soft); }

/* Responsive --------------------------------------------------- */
@media (max-width: 768px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__plate { order: 2; }
  .plate { max-width: 340px; }
  .steps__list { grid-template-columns: 1fr; gap: 1.75rem; }
  .step { flex-direction: row; align-items: flex-start; gap: 1rem; }
  .step__num { flex: 0 0 auto; }
  .drivers__inner { flex-direction: column; align-items: flex-start; }
  .compare__amt--them { font-size: clamp(3rem, 14vw, 4rem); }
  /* Footer: stack logo above the tagline so it doesn't wrap mid-line */
  .foot__inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .foot__brand { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}

@media (max-width: 480px) {
  .signup__row { flex-direction: column; }
  /* In a column, flex-basis governs HEIGHT — stop 15rem from becoming a tall box */
  .signup__input { flex: 0 0 auto; }
  .signup__input, .signup__row .btn { width: 100%; }
  .nav__cta { display: none; } /* hero form is one tap away */
}

/* Motion budget: kill the only entrance animation ------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}
