/* Stopwise — coming-soon page. CSP forbids inline styles: everything lives here. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/BricolageGrotesque-Variable.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/InstrumentSans-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/JetBrainsMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #EEF1F4;
  --paper-2: #F7F9FB;
  --ink: #0F1B2D;
  --ink-2: #46546A;
  --ink-3: #8593A6;
  --line: #D5DBE3;
  --line-2: #E4E8ED;
  --signal: #FF5A1F;
  --signal-ink: #C53F0E;
  --route-a: #1F5EFF;
  --route-b: #12A38A;
  --grid: #DCE2E9;
  --radius: 10px;
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 5vw, 72px);
  --t-fast: 160ms;
  --t-base: 260ms;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
::selection { background: #FFD9CB; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

.page { min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px var(--gutter);
  border-bottom: 1px solid var(--line-2);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; display: block; }
.nav-right { display: flex; align-items: center; gap: 18px; font-size: 14px; color: var(--ink-2); }
.nav-right a { text-decoration: none; }
.nav-right a:hover { color: var(--ink); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink); background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); animation: ping 2.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,90,31,.45);} 70% { box-shadow: 0 0 0 8px rgba(255,90,31,0);} 100% { box-shadow: 0 0 0 0 rgba(255,90,31,0);} }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(40px, 7vh, 88px) var(--gutter) clamp(48px, 8vh, 96px);
}
.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--signal); }
h1 {
  font-family: var(--font-display); font-weight: 700; font-variation-settings: "opsz" 96;
  font-size: clamp(2.6rem, 6.2vw, 5rem); line-height: 0.98; letter-spacing: -0.035em; margin: 0 0 22px;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--signal-ink); }
.lead { font-size: clamp(17px, 1.35vw, 19.5px); color: var(--ink-2); max-width: 52ch; margin: 0 0 34px; text-wrap: pretty; }

.form { max-width: 520px; }
.form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.field {
  display: flex; gap: 8px; padding: 6px; background: var(--paper-2); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field:focus-within { border-color: var(--ink-3); box-shadow: 0 0 0 4px rgba(15,27,45,.06); }
.field input {
  flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; padding: 10px 12px; color: var(--ink); outline: none;
}
.field input::placeholder { color: var(--ink-3); }
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px; text-decoration: none; display: inline-block;
  background: var(--signal); color: #fff; border-radius: 8px; padding: 12px 18px; white-space: nowrap;
  transition: background var(--t-fast), transform var(--t-fast) var(--ease);
}
.btn:hover { background: #F04E14; }
.btn:active { transform: translateY(1px); }
.form-note { font-size: 13.5px; color: var(--ink-3); margin: 12px 4px 0; }
.form-note strong { color: var(--ink-2); font-weight: 500; }
.form-ok { display: none; margin-top: 10px; padding: 14px 16px; border: 1px solid #BFE9DC; background: #ECFBF6; border-radius: 10px; font-size: 15px; }
.form.done .field, .form.done .form-note { display: none; }
.form.done .form-ok { display: block; }

/* ---------- Map sheet (signature) ---------- */
.sheet {
  position: relative; aspect-ratio: 1 / 1; max-height: 78vh; margin: 0 auto; width: 100%;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(15,27,45,.03), 0 30px 60px -40px rgba(15,27,45,.35);
}
.sheet svg { width: 100%; height: 100%; display: block; }
.sheet .corner {
  position: absolute; font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em;
  padding: 12px 14px; user-select: none;
}
.sheet .corner.tl { top: 0; left: 0; }
.sheet .corner.tr { top: 0; right: 0; }
.readout {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.6; color: var(--ink-2);
  display: grid; grid-template-columns: auto auto; column-gap: 18px; row-gap: 2px;
  opacity: 0; transform: translateY(6px); animation: rise .6s var(--ease) 3.4s forwards;
}
.readout b { color: var(--ink); font-weight: 500; }
.readout .ok { color: #0E8A70; }
.legend { position: absolute; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }
.legend .sw-a { background: var(--route-a); }
.legend .sw-b { background: var(--route-b); }
@keyframes rise { to { opacity: 1; transform: none; } }

.grid-line { stroke: var(--grid); stroke-width: 1; }
.grid-line.major { stroke: #CDD5DE; stroke-width: 1.6; }
.park { fill: #E3ECE4; }
.water { fill: #DCE7F1; }
.messy { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 4 5; opacity: .75; animation: dissolve 1.2s ease .5s forwards; }
@keyframes dissolve { to { opacity: 0; } }
.route { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s cubic-bezier(.4,0,.2,1) forwards; }
.route.a { stroke: var(--route-a); animation-delay: .9s; }
.route.b { stroke: var(--route-b); animation-delay: 1.15s; }
.route-halo { fill: none; stroke: #fff; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.6s cubic-bezier(.4,0,.2,1) forwards; opacity: .9; }
.route-halo.a { animation-delay: .9s; } .route-halo.b { animation-delay: 1.15s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.stop { opacity: 0; animation: pop .35s var(--ease) forwards; transform-box: fill-box; transform-origin: center; }
.stop circle { fill: #fff; stroke-width: 2.5; }
.stop.a circle { stroke: var(--route-a); } .stop.b circle { stroke: var(--route-b); }
.stop text { font-family: var(--font-mono); font-size: 9px; font-weight: 500; fill: var(--ink); text-anchor: middle; dominant-baseline: central; }
/* stop reveal timing follows the route draw; order = document order inside .stops */
.stops .stop:nth-child(1)  { animation-delay: 1.15s; }
.stops .stop:nth-child(2)  { animation-delay: 1.45s; }
.stops .stop:nth-child(3)  { animation-delay: 1.65s; }
.stops .stop:nth-child(4)  { animation-delay: 1.85s; }
.stops .stop:nth-child(5)  { animation-delay: 2.05s; }
.stops .stop:nth-child(6)  { animation-delay: 2.35s; }
.stops .stop:nth-child(7)  { animation-delay: 2.6s; }
.stops .stop:nth-child(8)  { animation-delay: 2.85s; }
.stops .stop:nth-child(9)  { animation-delay: 3.1s; }
.stops .stop:nth-child(10) { animation-delay: 3.3s; }
.stops .stop:nth-child(11) { animation-delay: 1.35s; }
.stops .stop:nth-child(12) { animation-delay: 1.6s; }
.stops .stop:nth-child(13) { animation-delay: 1.85s; }
.stops .stop:nth-child(14) { animation-delay: 2.05s; }
.stops .stop:nth-child(15) { animation-delay: 2.3s; }
.stops .stop:nth-child(16) { animation-delay: 2.5s; }
.stops .stop:nth-child(17) { animation-delay: 2.75s; }
.stops .stop:nth-child(18) { animation-delay: 3s; }
.stops .stop:nth-child(19) { animation-delay: 3.25s; }
.stops .stop:nth-child(20) { animation-delay: 3.45s; }
@keyframes pop { 0% { opacity: 0; transform: scale(.4);} 60% { opacity: 1; transform: scale(1.12);} 100% { opacity: 1; transform: scale(1);} }
.depot rect { fill: var(--signal); }
.depot text { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; fill: var(--ink-2); }
.van { opacity: 0; }
.van.a { offset-path: path("M300,480 V300 H360 V120 H480 V240 H420 V360 H540 V540 H360 V480 H300"); animation: appear .3s ease 3.6s forwards, ride 26s linear 3.6s infinite; }
.van.b { offset-path: path("M300,480 H180 V300 H60 V120 H180 V60 H240 V240 H120 V420 H240 V540 H300 V480"); animation: appear .3s ease 3.8s forwards, ride 24s linear 3.8s infinite; }
.van circle.core { fill: var(--ink); }
.van circle.ring { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: .35; animation: pulse 2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes appear { to { opacity: 1; } }
@keyframes ride { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes pulse { 0% { transform: scale(.6); opacity: .5;} 100% { transform: scale(2.2); opacity: 0;} }

/* ---------- Sections ---------- */
.section { padding: clamp(48px, 8vh, 96px) var(--gutter); border-top: 1px solid var(--line-2); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px; align-items: end; margin-bottom: clamp(28px, 4vh, 48px); }
h2 { font-family: var(--font-display); font-weight: 700; font-variation-settings: "opsz" 48; font-size: clamp(1.7rem, 3.2vw, 2.6rem); letter-spacing: -0.025em; line-height: 1.05; margin: 0; text-wrap: balance; }
.section-head p { margin: 0; color: var(--ink-2); max-width: 60ch; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 28px; display: flex; flex-direction: column; gap: 12px; transition: border-color var(--t-fast), transform var(--t-base) var(--ease); }
.card:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.card .eyebrow { margin: 0; }
.card h3 { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -0.02em; margin: 6px 0 0; line-height: 1.15; }
.card p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.card svg { width: 40px; height: 40px; }

.ent { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper-2); }
.ent > div { padding: 22px 22px 24px; border-right: 1px solid var(--line-2); }
.ent > div:last-child { border-right: 0; }
.ent .k { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.ent .v { font-weight: 600; font-size: 15.5px; line-height: 1.3; }

/* ---------- 404 ---------- */
.notfound { padding: clamp(48px, 12vh, 140px) var(--gutter); max-width: 720px; }
.notfound h1 { margin-bottom: 16px; }

/* ---------- Footer ---------- */
.footer { margin-top: auto; padding: 28px var(--gutter) 36px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 13.5px; color: var(--ink-3); }
.footer a { text-decoration: none; color: var(--ink-2); }
.footer a:hover { color: var(--ink); }

/* ---------- Reveal on load ---------- */
.reveal { opacity: 0; transform: translateY(10px); animation: rise .7s var(--ease) forwards; }
.reveal.d1 { animation-delay: .05s; } .reveal.d2 { animation-delay: .15s; } .reveal.d3 { animation-delay: .25s; } .reveal.d4 { animation-delay: .35s; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .sheet { max-height: none; }
  .cards { grid-template-columns: 1fr; }
  .ent { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ent > div { border-bottom: 1px solid var(--line-2); }
  .ent > div:nth-child(2n) { border-right: 0; }
  .ent > div:last-child { grid-column: span 2; }
  .section-head { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-right .mail { display: none; }
  .field { flex-direction: column; }
  .btn { width: 100%; text-align: center; }
  .ent { grid-template-columns: 1fr; }
  .ent > div, .ent > div:nth-child(2n) { border-right: 0; }
  .ent > div:last-child { grid-column: auto; }
  .legend { display: none; }
  .readout { left: 8px; bottom: 8px; padding: 8px 10px; font-size: 10.5px; column-gap: 10px; }
  .sheet .corner { font-size: 10px; padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .messy { opacity: 0; }
  .van { offset-distance: 12%; }
  html { scroll-behavior: auto; }
}
