/*
 * Ride263 product page. House of Stone: granite surfaces, one gold accent.
 * Plain CSS, no framework: a phone on a small bundle should get the whole
 * page in one round trip. Motion is CSS scroll-driven where the browser has
 * it, with site.js adding a class on older browsers. Everything moving stops
 * under prefers-reduced-motion.
 *
 * Shapes: buttons 10px, cards 16px, the phone 36px. Nothing else is rounded.
 */

@font-face { font-family: 'Plex'; src: url('/fonts/plex-sans-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/plex-sans-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex'; src: url('/fonts/plex-sans-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }

:root {
  --bg: #0b0f14;
  --sunken: #080b0f;
  --raised: #131a22;
  --overlay: #1b242e;
  --line: #26313d;
  --ink: #f4f7fa;
  --ink-2: #a3b0bd;
  --ink-3: #7a8896;
  --gold: #f2b01e;
  --gold-ink: #0b0f14;
  --gold-2: #b0801b;
  --gold-3: #6a4f18;
  --surge: #ff8a3d;
  --map-road: #1c2530;
  --map-major: #2c3946;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1200px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fa;
    --sunken: #eef1f5;
    --raised: #ffffff;
    --overlay: #eef1f5;
    --line: #dce1e8;
    --ink: #0b0f14;
    --ink-2: #4a5765;
    --ink-3: #626d78;
    --gold: #8a6006;
    --gold-ink: #ffffff;
    --gold-2: #c9961f;
    --gold-3: #ecd7a2;
    --surge: #a3480f;
    --map-road: #dfe4ea;
    --map-major: #c6ced8;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 'Plex', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.05; }
h3 { font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; }
section { scroll-margin-top: 72px; }
::selection { background: color-mix(in srgb, var(--gold) 35%, transparent); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--raised); border-radius: 8px; z-index: 30; }
.skip:focus { left: 8px; }

.num { font-family: 'Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.eyebrow { color: var(--gold); font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.aside { color: var(--ink-3); font-size: 15px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 22px; border-radius: 10px;
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: background-color 160ms var(--ease), transform 160ms var(--ease), border-color 160ms;
}
.btn:active { transform: scale(0.98); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 15px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 17px; }
.btn-primary { background: var(--gold); color: var(--gold-ink); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25); }
.btn-primary:hover { background: color-mix(in srgb, var(--gold) 88%, white); }
.btn-quiet { color: var(--ink); border: 1px solid var(--line); }
.btn-quiet:hover { background: var(--raised); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 32px;
  height: 64px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.nav nav { display: flex; gap: 28px; margin-left: auto; }
.nav nav a { color: var(--ink-2); text-decoration: none; font-size: 15px; transition: color 160ms; }
.nav nav a:hover { color: var(--ink); }
@media (max-width: 760px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
}

/* Hero: the city canvas fills it; the copy sits over open ground on the left. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100dvh - 64px);
  display: grid; align-items: center;
  padding: 48px var(--gutter) 72px;
}
.city { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; opacity: 0; transition: opacity 1.4s ease-out; }
.city.ready { opacity: 1; }
.credit { position: absolute; right: var(--gutter); bottom: 14px; font-size: 11px; color: var(--ink-3); }
.credit a { color: inherit; }
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 92%, transparent) 34%, color-mix(in srgb, var(--bg) 55%, transparent) 52%, transparent 72%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
.hero-copy { max-width: var(--max); width: 100%; margin: 0 auto; }
.hero h1 { font-size: clamp(38px, 7vw, 104px); line-height: 0.96; letter-spacing: -0.04em; }
.hero h1 .ln > span { white-space: nowrap; }
.hero h1 .ln { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero h1 .ln > span { display: block; }
.lede { margin-top: 28px; max-width: 30ch; font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.c1 { fill: var(--gold-3); }
.c2 { fill: var(--gold-2); }
.c3 { fill: var(--gold); }
@media (max-width: 860px) {
  .hero { align-items: end; min-height: min(calc(100dvh - 64px), 760px); padding-top: 0; padding-bottom: 48px; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 85%, transparent) 42%, transparent 75%); }
}

/* Fares */
.fares {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px);
  max-width: var(--max); margin: 0 auto; padding: clamp(80px, 12vw, 160px) var(--gutter);
}
.fares-head { align-self: start; position: sticky; top: 120px; }
.fares-head p { margin-top: 20px; color: var(--ink-2); max-width: 38ch; }
.receipt { margin: 0; padding: 12px 28px 24px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); box-shadow: 0 30px 80px -40px rgb(0 0 0 / 0.6); }
.receipt ol { list-style: none; margin: 0; padding: 0; }
.line { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
.line small { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-3); max-width: 34ch; }
.line.surge .num, .line.surge > span:first-child { color: var(--surge); }
.line.total { border-bottom: 0; padding-top: 24px; font-weight: 600; font-size: 22px; }
.line.total .num { font-size: 32px; letter-spacing: -0.02em; }
.receipt figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-3); }
@media (max-width: 860px) {
  .fares { grid-template-columns: 1fr; }
  .fares-head { position: static; }
  .receipt { padding: 4px 20px 20px; }
}

/* Paying */
.pay { padding: clamp(64px, 10vw, 120px) 0; text-align: center; }
.pay h2, .pay > p { max-width: 20ch; margin: 0 auto; padding: 0 var(--gutter); }
.pay > p { max-width: 52ch; margin-top: 20px; color: var(--ink-2); }
.marquee {
  margin-top: 56px; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; gap: 12px; animation: marquee 38s linear infinite; }
.marquee-track span {
  padding: 14px 24px; border-radius: 10px; border: 1px solid var(--line); background: var(--raised);
  font-size: clamp(18px, 2vw, 24px); font-weight: 500; white-space: nowrap;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - 6px)); } }

/* A bad day: bento */
.badday { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 10vw, 120px) var(--gutter); }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
.cell { border-radius: 16px; padding: 28px; border: 1px solid var(--line); background: var(--raised); display: flex; flex-direction: column; gap: 10px; min-height: 240px; }
.cell p { color: var(--ink-2); max-width: 44ch; }
.cell-sms { grid-column: span 4; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 28px; background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.cell-sms h3 { font-size: clamp(26px, 3vw, 40px); }
.cell-sms p { color: color-mix(in srgb, var(--gold-ink) 78%, transparent); font-size: 18px; }
.cell-sms > div:last-child { max-width: 30ch; }
.ussd {
  order: 2; flex: none; width: 220px; min-height: 172px; padding: 16px 18px; border-radius: 12px;
  background: #10161d; color: #e9eef3; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06), 0 18px 40px -18px rgb(0 0 0 / 0.6);
}
.ussd-screen { margin: 0; font: 400 14px/1.6 'Plex Mono', ui-monospace, monospace; white-space: pre-wrap; }
.ussd-screen.swap { animation: ussd-in 360ms var(--ease) both; }
@keyframes ussd-in { from { opacity: 0; transform: translateY(6px); } }
.cell { position: relative; }
.cell::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--gold) 16%, transparent), transparent 60%);
  transition: opacity 240ms;
}
.cell:hover::after { opacity: 1; }
.cell-sms::after { display: none; }
.cell-lang { grid-column: span 2; grid-row: span 2; background: var(--sunken); }
.greet { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink) !important; }
.greet + .greet { color: var(--ink-3) !important; }
.greet:nth-child(3) { color: var(--ink-3) !important; margin-bottom: auto; }
.cell-lang h3 { margin-top: 32px; }
.cell-cities { grid-column: span 2; justify-content: space-between; }
.cell-cities h3 { font-size: 24px; }
.cities { font-family: 'Plex Mono', ui-monospace, monospace; font-size: 15px; }
.cell-biz { grid-column: span 2; justify-content: flex-end; background: linear-gradient(160deg, var(--overlay), var(--raised) 60%); }
@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; }
  .cell-sms { flex-direction: column; align-items: stretch; }
  .ussd { order: 0; width: 100%; }
  .cell, .cell-sms, .cell-lang, .cell-cities, .cell-biz { grid-column: auto; grid-row: auto; min-height: 0; }
}

/* Drivers */
.drive {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  max-width: var(--max); margin: 0 auto; padding: clamp(64px, 10vw, 140px) var(--gutter);
}
.drive-copy > p:not(.eyebrow):not(.aside) { margin-top: 20px; color: var(--ink-2); max-width: 40ch; font-size: 19px; }
.ticks { list-style: none; padding: 0; margin: 36px 0 28px; display: grid; gap: 18px; max-width: 48ch; }
.ticks li { padding-left: 28px; position: relative; color: var(--ink-2); }
.ticks li::before { content: ''; position: absolute; left: 0; top: 0.45em; width: 10px; height: 10px; border-right: 2.5px solid var(--gold); border-top: 2.5px solid var(--gold); transform: rotate(45deg); }
.ticks strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .drive { grid-template-columns: 1fr; } }

/* Shared rides: map */
.shared {
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: center;
  max-width: var(--max); margin: 0 auto; padding: clamp(64px, 10vw, 140px) var(--gutter);
}
.shared-copy > p { margin-top: 20px; color: var(--ink-2); max-width: 40ch; }
.shared-copy .aside { color: var(--ink-3); }
.map { margin: 0; }
.route { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.stops circle { fill: var(--bg); stroke: var(--gold); stroke-width: 4; }
.stops .hub { fill: var(--gold); }
.stops .end { fill: var(--gold); }
.labels text { fill: var(--ink-2); font: 500 19px 'Plex', sans-serif; }
.labels .strong { fill: var(--ink); font-weight: 600; font-size: 21px; }
@media (max-width: 860px) {
  .shared { grid-template-columns: 1fr; }
  .labels text { font-size: 28px; }
  .labels .strong { font-size: 30px; }
  .labels .minor { display: none; }
}

/* Safety: sticky stack */
.safety { max-width: 880px; margin: 0 auto; padding: clamp(64px, 10vw, 140px) var(--gutter); }
.safety-head { margin-bottom: 48px; }
.stack { display: grid; gap: 24px; }
.card {
  position: sticky; top: calc(96px + var(--i, 0) * 18px);
  border-radius: 16px; padding: 32px; min-height: 200px;
  background: var(--raised); border: 1px solid var(--line);
  box-shadow: 0 -12px 40px -20px rgb(0 0 0 / 0.55);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
}
.card:nth-child(1) { --i: 0; }
.card:nth-child(2) { --i: 1; background: var(--overlay); }
.card:nth-child(3) { --i: 2; }
.card:nth-child(4) { --i: 3; background: var(--overlay); }
.card h3 { font-size: clamp(24px, 2.6vw, 32px); }
.card p { color: var(--ink-2); max-width: 46ch; }

/* Get the app */
.get { text-align: center; padding: clamp(80px, 12vw, 160px) var(--gutter); display: grid; justify-items: center; gap: 20px; }
.get p { color: var(--ink-2); }
.get .btn { margin-top: 12px; }
.get { overflow: hidden; }
.get-chevrons { width: min(360px, 70vw); height: auto; margin-bottom: 24px; overflow: visible; }
.get h2 { font-size: clamp(40px, 6vw, 80px); }

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px;
  max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 48px;
  border-top: 1px solid var(--line); color: var(--ink-3); font-size: 15px;
}
.foot nav { display: flex; gap: 24px; margin-left: auto; }
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot p { width: 100%; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Hero: the headline rises out of its lines, then the rest follows. */
  .hero h1 .ln > span { animation: line-up 900ms var(--ease) both; }
  .hero h1 .ln:nth-child(2) > span { animation-delay: 90ms; }
  .lede, .actions { animation: rise 800ms var(--ease) both; animation-delay: 260ms; }
  .actions { animation-delay: 360ms; }
  @keyframes line-up { from { transform: translateY(105%); } }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
  @keyframes fade { from { opacity: 0; } }

  /* Reveals: scroll-driven where supported, else site.js toggles .in. */
  .reveal, .line, .route { will-change: transform, opacity; }
  @supports (animation-timeline: view()) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 60%; }
    .line { animation: line-in linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; }
    .route { animation: draw linear both; animation-timeline: view(); animation-range: entry 20% cover 50%; }
    .hero-copy { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
    .get-chevrons path { animation: chev linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    .get-chevrons .c1 { --from: -46%; }
    .get-chevrons .c2 { --from: -28%; }
    .get-chevrons .c3 { --from: -10%; }
  }
  @keyframes line-in { from { opacity: 0; transform: translateX(24px); } }
  @keyframes draw { from { stroke-dashoffset: 1; } }
  @keyframes drift { to { transform: translateY(-12%); opacity: 0; } }
  @keyframes chev { from { transform: translateX(var(--from)); opacity: 0; } }

  .no-sda .reveal, .no-sda .line { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
  .no-sda .route { stroke-dashoffset: 1; transition: stroke-dashoffset 1600ms var(--ease); }
  .no-sda .in, .no-sda .in .line, .no-sda .in .route { opacity: 1; transform: none; stroke-dashoffset: 0; }
  .no-sda .in .line:nth-child(2) { transition-delay: 120ms; }
  .no-sda .in .line:nth-child(3) { transition-delay: 240ms; }
  .no-sda .in .line:nth-child(4) { transition-delay: 360ms; }
  .no-sda .in .line:nth-child(5) { transition-delay: 480ms; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; padding: 0 var(--gutter); }
  .marquee-track span:nth-child(n + 10) { display: none; }
  .marquee { mask-image: none; -webkit-mask-image: none; }
  .btn:active { transform: none; }
}

/* Drivers: what a week costs, commission against the pass. Bars have no track. */
.keep { margin: 0; padding: 32px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); display: grid; gap: 28px; }
.keep-head { color: var(--ink-2); font-size: 15px; }
.keep-row { display: grid; gap: 10px; }
.keep-label { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 15px; }
.keep-label .num { color: var(--ink); }
.bar { height: 14px; width: var(--w); border-radius: 4px; transform-origin: left; }
.bar-loss { background: color-mix(in srgb, var(--ink-3) 55%, transparent); }
.bar-pass { background: var(--gold); min-width: 14px; }
.keep-foot { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.keep-foot .num { color: var(--gold); font-size: 32px; font-weight: 500; margin-right: 4px; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .bar { animation: grow linear both; animation-timeline: view(); animation-range: entry 30% cover 45%; }
  }
  @keyframes grow { from { transform: scaleX(0); } }
}
.soon {
  display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: 6px;
  background: var(--gold-ink); color: var(--gold); font-size: 13px; font-weight: 600;
}
