/* ===== Design tokens ===== */
:root {
  --ink:     #14181A;
  --pine:    #1F3A34;
  --paper:   #F6F1E7;
  --panel:   #FFFFFF;
  --blaze:   #C1440E;  /* the one accent color: CTAs, links, live signal */
  --good:    #2F7D5B;  /* route green — "this is the right path" */
  --fastblue: #2C5AA0;
  --lamp:    #E8A33D;
  --report:  #D97B29;
  --muted:   #5C5346;
  --line:    #E4DCC9;
  --serif: "Fraunces", ui-serif, Georgia, serif;
  --sans:  "Public Sans", system-ui, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
  /* Content width scales gently past typical laptop widths instead of
     freezing at 1120px, so the page doesn't look tiny/zoomed-out on a
     big external monitor. */
  --content-max: clamp(1120px, 82vw, 1440px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink); background: var(--paper);
  line-height: 1.55; font-size: 17px;
  padding-top: 92px;
}
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.05; font-weight: 600; }
em { font-style: italic; }
a { color: inherit; }
.wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2.5px solid var(--blaze); outline-offset: 3px; }

/* A very quiet field of routes behind the whole page — restrained, not decorative noise */
.bg-field { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg-field svg { width: 100%; height: 100%; display: block; }
.bg-field .grid-path { stroke: var(--ink); stroke-width: 2; fill: none; opacity: .02; }
.bg-field .grid-dot { fill: var(--ink); opacity: .035; }
.bg-field .live-route { fill: none; stroke: var(--blaze); stroke-width: 2; stroke-linecap: round; opacity: .06; stroke-dasharray: 2 18; animation: travel 30s linear infinite; }
@keyframes travel { to { stroke-dashoffset: -800; } }

/* Glass — the one translucent surface treatment, used sparingly */
.glass { background: rgba(255,255,255,.6); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(20,24,26,.08); }

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: var(--blaze); z-index: 60; }

.eyebrow {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink);
}
.eyebrow::before { content: ""; width: 22px; height: 1.5px; background: var(--ink); flex: none; }

/* Buttons — full pill, one accent color only */
.btn {
  display: inline-flex; align-items: center; gap: 9px; border: 0; cursor: pointer;
  font: 600 15px var(--sans); padding: 14px 24px; border-radius: 999px; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--blaze); color: var(--paper); }
.btn-primary:hover { background: #A8390A; transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgba(193,68,14,.55); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* Nav — a floating instrument, not a bar */
nav { position: fixed; top: 16px; left: 0; right: 0; z-index: 40; display: flex; justify-content: center; padding: 0 16px; pointer-events: none; }
.nav-pill {
  pointer-events: auto; width: min(var(--content-max), 100%); position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: rgba(246,241,231,.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 8px 8px 22px;
  box-shadow: 0 16px 34px -20px rgba(20,24,26,.35);
  transition: box-shadow .2s ease;
}
body.scrolled .nav-pill { box-shadow: 0 18px 36px -16px rgba(20,24,26,.4); }
.logo { display: flex; align-items: center; gap: 10px; font: 700 20px var(--serif); color: var(--ink); text-decoration: none; }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; position: relative; }
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1.5px; background: var(--blaze);
  transition: right .2s ease;
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links a:not(.btn):hover::after { right: 0; }
.nav-links .btn { padding: 10px 18px; font-size: 14px; }
.nav-toggle {
  display: none; background: none; border: 1.5px solid var(--line); border-radius: 50%;
  width: 40px; height: 40px; cursor: pointer; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span { left: 11px; right: 11px; top: 19px; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { padding: 28px 0 88px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: start; }
.hero h1 { font-size: clamp(40px, 5.6vw, 76px); letter-spacing: -0.01em; margin-bottom: 22px; }
.hero h1 .accent-dot { color: var(--ink); }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 30em; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

/* The instrument — the page's one big product visual */
.demo-col { position: relative; }
.device-frame { position: relative; z-index: 1; background: var(--panel); border-radius: 18px; overflow: hidden; box-shadow: 0 34px 74px -30px rgba(20,24,26,.4), 0 0 0 1px rgba(20,24,26,.05); }
.device-bar { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: #EFE9DC; border-bottom: 1px solid var(--line); }
.device-dots { display: flex; gap: 6px; flex: none; }
.device-dots span { width: 9px; height: 9px; border-radius: 50%; display: block; }
.device-dots span:nth-child(1) { background: #D8A0A0; }
.device-dots span:nth-child(2) { background: #E3C48C; }
.device-dots span:nth-child(3) { background: #A9C29A; }
.device-url { flex: 1; text-align: center; font: 500 11px var(--mono); color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; letter-spacing: .02em; }
.demo { padding: 18px; }
.demo-route { font: 600 13px var(--mono); color: var(--ink); letter-spacing: .02em; margin-bottom: 4px; }
.demo-ask { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.scenarios { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.scenario {
  border: 1.5px solid var(--line); background: var(--paper); border-radius: 999px;
  padding: 9px 15px; font: 500 14px var(--sans); cursor: pointer; color: var(--ink);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.scenario:hover { border-color: var(--ink); }
.scenario[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ===== Real map (MapLibre GL + free Esri Light Gray Canvas tiles, no API key) ===== */
.map-frame { position: relative; border-radius: 10px; overflow: hidden; background: #E9E7E0; aspect-ratio: 4 / 3; }
.map-frame .maplibregl-map { position: absolute; inset: 0; font: inherit; }
.map-frame .maplibregl-ctrl-top-right { top: 8px; right: 8px; }
.map-frame .maplibregl-ctrl-group {
  background: rgba(255,255,255,.9); backdrop-filter: blur(6px); border-radius: 10px !important;
  box-shadow: 0 6px 16px -6px rgba(20,24,26,.35) !important; overflow: hidden; border: none !important;
}
.map-frame .maplibregl-ctrl-group button { width: 28px !important; height: 28px !important; }
.map-frame .maplibregl-ctrl-attrib { font-size: 10px; background: rgba(255,255,255,.7) !important; border-radius: 6px 0 0 0; }
.map-frame .maplibregl-ctrl-attrib a { color: var(--muted); }
.map-frame .maplibregl-ctrl-bottom-right { bottom: 0; right: 0; }

.map-origin { width: 14px; height: 14px; position: relative; }
.map-origin .ring { position: absolute; inset: -5px; border-radius: 50%; background: var(--ink); opacity: .25; animation: pulse 2.2s ease-out infinite; }
.map-origin .dot { position: absolute; inset: 0; border-radius: 50%; background: var(--panel); border: 2.5px solid var(--ink); }
.map-origin .dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--ink); }
@keyframes pulse { 0% { transform: scale(.5); opacity: .5; } 70% { transform: scale(2.3); opacity: 0; } 100% { opacity: 0; } }
.map-pin { width: 26px; height: 34px; filter: drop-shadow(0 2px 2px rgba(20,24,26,.3)); }

.map-icon { border-radius: 50%; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(20,24,26,.35); display: flex; align-items: center; justify-content: center; color: #fff; }
.map-icon.lamp { width: 9px; height: 9px; background: var(--lamp); }
.map-icon.callbox { width: 9px; height: 9px; background: var(--fastblue); }
.map-icon.ada { width: 15px; height: 15px; background: var(--fastblue); font-size: 9px; line-height: 1; }
.map-icon.report { width: 13px; height: 13px; background: var(--report); font: 700 8px var(--mono); }

.route-label {
  font: 700 11px var(--mono); padding: 3px 8px; border-radius: 999px; color: #fff; white-space: nowrap;
  box-shadow: 0 3px 8px -2px rgba(20,24,26,.4); transition: opacity .3s ease;
}
.route-label.recommended { background: var(--good); }
.route-label.fastest { background: var(--fastblue); }

.compare { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.compare-row { display: grid; grid-template-columns: 90px 1fr 78px; align-items: center; gap: 12px; }
.compare-row .clabel { font: 600 12px var(--sans); color: var(--ink); }
.compare-row .track { height: 6px; border-radius: 999px; background: rgba(20,24,26,.08); overflow: hidden; }
.compare-row .fill { display: block; height: 100%; border-radius: 999px; transition: width .6s cubic-bezier(.65,0,.35,1); width: 0%; }
.compare-row.fastest .fill { background: var(--fastblue); opacity: .8; }
.compare-row.yours .fill { background: var(--good); }
.compare-row .ctime { font: 600 12px var(--mono); text-align: right; }
.compare-row .ctime .cdist { display: block; color: var(--muted); font-weight: 500; font-size: 11px; margin-top: 1px; }
.why { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* Sections */
section.block { padding: 88px 0; }
section.block h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.01em; }

/* Why it's better — 3 tight cards, icon + headline + one line, nothing else */
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.benefit-card { padding: 28px 26px; border-radius: 16px; }
.benefit-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; color: #fff; font: 700 14px var(--mono); }
.benefit-icon.safety { background: var(--lamp); }
.benefit-icon.access { background: var(--fastblue); }
.benefit-icon.reports { background: var(--report); }
.benefit-card h3 { font-size: 19px; margin-bottom: 8px; font-weight: 600; }
.benefit-card p { color: var(--muted); font-size: 15px; }

/* How it works — a connected sequence, not 3 repeated blocks */
.steps-track { margin-top: 36px; height: 34px; }
.steps-track svg { width: 100%; height: 100%; display: block; }
.track-line { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.steps-track.in-view .track-line { animation: draw-track 1.1s cubic-bezier(.65,0,.35,1) forwards; }
.track-dot { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
@keyframes draw-track { to { stroke-dashoffset: 0; } }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 4px; }
.step { position: relative; }
.step-visual { width: 56px; height: 56px; margin-bottom: 16px; }
.step-visual svg { width: 100%; height: 100%; display: block; }
.step-num { display: block; width: 32px; padding-bottom: 10px; margin-bottom: 10px; font: 600 13px var(--mono); color: var(--muted); border-bottom: 2px solid var(--ink); }
.step h3 { font-size: 19px; margin-bottom: 6px; font-weight: 600; }
.step p { color: var(--muted); }
.steps .step:nth-child(1) { transition-delay: 0s; }
.steps .step:nth-child(2) { transition-delay: .12s; }
.steps .step:nth-child(3) { transition-delay: .24s; }
@media (max-width: 860px) { .steps-track { display: none; } }

/* Final CTA — centered, short, memorable */
.center-block { text-align: center; }
.center-block .wrap { max-width: 720px; }
.center-block h2 { text-wrap: balance; }
.center-block p { color: var(--muted); font-size: 18px; margin: 16px 0 28px; }

/* Scroll route — a quiet campus-shuttle line connecting hero to the final CTA */
.route-scene { position: relative; isolation: isolate; }
.route-layer { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: visible; }
#route-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.route-path { fill: none; stroke: #D8D1C2; stroke-width: 2.5; stroke-linecap: round; opacity: .6; }
.route-stop { fill: var(--paper); stroke: #D8D1C2; stroke-width: 2; r: 6; transition: fill .3s ease, stroke .3s ease; }
.route-stop.reached { fill: var(--blaze); stroke: var(--blaze); }
.route-bus {
  position: absolute; top: 0; left: 0; width: clamp(72px, 8vw, 112px);
  opacity: 0; transition: opacity .4s ease; will-change: transform;
}
.route-bus.ready { opacity: 1; }
.route-bus svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 4px 8px rgba(20,24,26,.28)); }
@media (max-width: 860px) { .route-layer { display: none; } }
@media (prefers-reduced-motion: reduce) { .route-bus { display: none; } .route-stop { transition: none; } }

footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--muted); font-size: 14px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.footer-brand { font: 700 18px var(--serif); color: var(--ink); }
.footer-tagline { margin-top: 2px; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; }
.footer-links a:hover { color: var(--ink); }
footer .footer-bottom { border-top: 1px solid var(--line); padding-top: 18px; font: 500 12px var(--mono); letter-spacing: .02em; }


.pre-reveal { opacity: 0; transform: translateY(16px); }
.pre-reveal.in-view { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
.wipe { clip-path: inset(0 100% 0 0); }
.wipe.in-view { clip-path: inset(0 0 0 0); transition: clip-path .9s cubic-bezier(.65,0,.35,1); }

/* Mobile */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .benefits, .steps { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav-pill { padding: 8px 8px 8px 18px; }
  .nav-links {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 10px 18px 18px; box-shadow: 0 20px 40px -20px rgba(20,24,26,.35);
    gap: 4px; transform: translateY(-8px); opacity: 0; pointer-events: none; transition: opacity .18s ease, transform .18s ease;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 12px; justify-content: center; }
}
@media (max-width: 560px) {
  body { padding-top: 82px; }
  .benefits, .steps { grid-template-columns: 1fr; }
  .compare-row { grid-template-columns: 70px 1fr 58px; gap: 6px; }
  .logo { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .track-line { stroke-dashoffset: 0 !important; }
}
