/* Routewise public site (vakkerman.com). No JavaScript, no web fonts, no
   cookies. The CSP in deploy/gce/Caddyfile allows only this site's own
   files, so: no <script>, no <style> blocks, no style="" attributes.
   Colours follow the app's tokens (cmd/server/static/css/tokens.css). */

:root {
  color-scheme: light dark;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --border: #dde4ee;
  --text: #14233a;
  --text-2: #52627a;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-soft: #e8efff;
  --on-accent: #ffffff;
  --good: #0a6b4b;
  --good-soft: #e6f5ee;
  --route-assigned: #2563eb;
  --route-new: #c026d3;
  --route-new-soft: #fae8fd;
  --idle: #e6ebf2;
  --idle-line: #d5dde8;
  --map-bg: #eaeff5;
  --map-street: #ffffff;
  --map-avenue: #fbfcfe;
  --map-water: #cddff3;
  --map-park: #d5ead8;
  --marker: #14233a;
  --band-bg: #0f1b2e;
  --band-surface: #16253d;
  --band-text: #e6ebf2;
  --band-text-2: #a9b6c8;
  --band-border: #26354d;
  --shadow: 0 1px 2px rgb(20 35 58 / 6%), 0 10px 30px rgb(20 35 58 / 9%);
  --shadow-lg: 0 2px 6px rgb(20 35 58 / 8%), 0 28px 64px rgb(20 35 58 / 16%);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 16px;
  --radius-s: 10px;
  --wrap: 1140px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1017;
    --surface: #131a24;
    --surface-2: #19222f;
    --border: #273344;
    --text: #e6ebf2;
    --text-2: #9aa8ba;
    --accent: #7aa7ff;
    --accent-hover: #a3c1ff;
    --accent-soft: #1b2a47;
    --on-accent: #0b1017;
    --good: #4cc79a;
    --good-soft: #12352b;
    --route-assigned: #5b8dff;
    --route-new: #e668f2;
    --route-new-soft: #3a1a40;
    --idle: #1d2633;
    --idle-line: #2a3646;
    --map-bg: #141c27;
    --map-street: #222d3c;
    --map-avenue: #2b3849;
    --map-water: #13304d;
    --map-park: #16302a;
    --marker: #e6ebf2;
    --band-bg: #111926;
    --band-surface: #172233;
    --band-border: #273344;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 10px 30px rgb(0 0 0 / 30%);
    --shadow-lg: 0 2px 6px rgb(0 0 0 / 35%), 0 28px 64px rgb(0 0 0 / 45%);
  }
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); font-weight: 750; letter-spacing: -0.03em; line-height: 1.06; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 720; }
h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
svg { display: block; }

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

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 640px) { :root { --gutter: 16px; } body { font-size: 16px; } }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  padding: 8px 14px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--on-accent); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.flush-top { padding-top: 0; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .eyebrow { margin-bottom: 14px; }
.section-head p { margin-top: 16px; color: var(--text-2); font-size: 1.08rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px;
  border: 1px solid transparent;
  font: inherit; font-size: 1rem; font-weight: 650; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px rgb(29 78 216 / 22%); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-2); }
.btn-s { min-height: 38px; padding: 0 14px; border-radius: 10px; font-size: 0.92rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */

.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.top-in { display: flex; align-items: center; gap: 28px; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.mark { width: 32px; height: 32px; flex: none; }

.nav { display: flex; gap: 26px; margin-right: auto; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 0.95rem; font-weight: 550; }
.nav a:hover { color: var(--text); }

.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 10px; border-radius: 10px;
  color: var(--text-2); font-size: 0.88rem; font-weight: 650; text-decoration: none; letter-spacing: 0.04em;
}
.lang:hover { color: var(--text); background: var(--surface-2); }

@media (max-width: 920px) { .nav { display: none; } }
@media (max-width: 520px) { .hide-s { display: none; } .top-in { gap: 12px; } }

/* ---------- Hero ---------- */

.hero { position: relative; padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 120%; z-index: -1;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(closest-side at 30% 70%, color-mix(in srgb, var(--route-new) 10%, transparent), transparent 70%);
  filter: blur(10px);
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: clamp(32px, 5vw, 72px); }
.hero-copy h1 { margin: 18px 0 22px; }
.lede { color: var(--text-2); font-size: clamp(1.08rem, 1.6vw, 1.22rem); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fine { display: flex; align-items: flex-start; gap: 8px; margin-top: 22px; color: var(--text-2); font-size: 0.92rem; }
.fine svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--good); }

@media (max-width: 900px) { .hero-in { grid-template-columns: minmax(0, 1fr); } }

/* Product illustration: a map card with a suggestion card over it. */
.demo { position: relative; margin: 0; }
.demo-map {
  border-radius: var(--radius); overflow: hidden;
  background: var(--map-bg); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
}
.demo-map svg { width: 100%; height: auto; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: 0.8rem; color: var(--text-2); }
.demo-bar b { color: var(--text); font-weight: 650; }
.demo-dots { display: flex; gap: 6px; }
.demo-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--idle-line); }
.live { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--good); }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--good-soft); }

.m-street { stroke: var(--map-street); stroke-width: 7; fill: none; }
.m-avenue { stroke: var(--map-avenue); stroke-width: 13; fill: none; }
.m-water { fill: var(--map-water); }
.m-park { fill: var(--map-park); }
.m-route { stroke: var(--route-assigned); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.m-route-old { stroke: var(--route-assigned); stroke-width: 5; fill: none; stroke-linecap: round; stroke-dasharray: 2 9; opacity: 0.55; }
.m-new { stroke: var(--route-new); stroke-width: 6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.m-stop { fill: var(--surface); stroke: var(--route-assigned); stroke-width: 4; }
.m-new-stop { fill: var(--route-new); stroke: var(--surface); stroke-width: 3; }
.m-driver { fill: var(--marker); stroke: var(--surface); stroke-width: 3; }
.m-halo { fill: var(--route-new); opacity: 0.16; }

/* The card overlaps only the map's bottom strip, where the water is. */
.demo-card {
  position: relative; width: min(430px, calc(100% - 24px)); margin: -64px 12px 0 auto;
  padding: 18px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
}
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 650; }
.tag-good { background: var(--good-soft); color: var(--good); }
.tag-new { background: var(--route-new-soft); color: var(--route-new); }
.demo-who { color: var(--text-2); font-size: 0.82rem; }
.demo-trip { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 2px; font-size: 1.05rem; font-weight: 650; }
.demo-trip span { color: var(--text-2); font-weight: 500; }
.demo-meta { color: var(--text-2); font-size: 0.84rem; }
.demo-facts { display: grid; gap: 6px; margin-top: 12px; }
.demo-facts li { display: flex; gap: 8px; align-items: flex-start; }
.demo-facts svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--good); }
.demo-alt { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); color: var(--text-2); font-size: 0.82rem; }

.m-bubble { fill: var(--surface); stroke: var(--route-new); stroke-width: 1.5; }
.m-bubble-text { fill: var(--route-new); font: 700 13px var(--font); }

@media (max-width: 900px) { .demo { max-width: 620px; } }
@media (max-width: 560px) { .demo-card { margin: -28px 8px 0; width: auto; padding: 16px; } }

/* ---------- Facts strip ---------- */

.facts { border-block: 1px solid var(--border); background: var(--surface); }
.facts-in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts li { display: grid; gap: 4px; padding: 26px 24px; border-left: 1px solid var(--border); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts b { font-size: 1.3rem; font-weight: 720; letter-spacing: -0.02em; }
.facts span { color: var(--text-2); font-size: 0.92rem; line-height: 1.45; }
@media (max-width: 900px) {
  .facts-in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 480px) {
  .facts-in { grid-template-columns: minmax(0, 1fr); }
  .facts li { border-left: 0; padding: 18px 0; }
  .facts li + li { border-top: 1px solid var(--border); }
}

/* ---------- Gaps: driver day timeline ---------- */

.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.split .section-head { margin-bottom: 0; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.tl {
  --tl-label: 96px;
  display: grid; gap: 14px; padding: 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.tl-row, .tl-axis {
  display: grid; align-items: center; column-gap: 0;
  grid-template-columns: var(--tl-label) repeat(16, minmax(0, 1fr));
}
.tl-row { height: 34px; }
.tl-row::before {
  content: ""; grid-column: 2 / -1; grid-row: 1; height: 100%; border-radius: 8px;
  background: repeating-linear-gradient(135deg, var(--idle) 0 6px, transparent 6px 11px), var(--surface-2);
  border: 1px solid var(--idle-line);
}
.tl-name { grid-column: 1; grid-row: 1; font-size: 0.82rem; font-weight: 600; color: var(--text-2); }
.blk { grid-row: 1; height: 100%; margin: 0 2px; border-radius: 7px; }
.blk.own { background: var(--route-assigned); }
.blk.new { background: var(--route-new); box-shadow: 0 0 0 3px var(--route-new-soft); }
.tl-axis { color: var(--text-2); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.tl-axis span { grid-row: 1; }
.tl-axis .end { justify-self: end; }

.s1 { grid-column-start: 2; } .s2 { grid-column-start: 3; } .s3 { grid-column-start: 4; } .s4 { grid-column-start: 5; }
.s5 { grid-column-start: 6; } .s6 { grid-column-start: 7; } .s7 { grid-column-start: 8; } .s8 { grid-column-start: 9; }
.s9 { grid-column-start: 10; } .s10 { grid-column-start: 11; } .s11 { grid-column-start: 12; } .s12 { grid-column-start: 13; }
.s13 { grid-column-start: 14; } .s14 { grid-column-start: 15; } .s15 { grid-column-start: 16; } .s16 { grid-column-start: 17; }
.w1 { grid-column-end: span 1; } .w2 { grid-column-end: span 2; } .w3 { grid-column-end: span 3; } .w4 { grid-column-end: span 4; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 6px; color: var(--text-2); font-size: 0.82rem; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 10px; border-radius: 3px; }
.legend .own { background: var(--route-assigned); }
.legend .new { background: var(--route-new); }
.legend .idle { background: repeating-linear-gradient(135deg, var(--idle-line) 0 3px, var(--surface-2) 3px 6px); border: 1px solid var(--idle-line); }

/* Phones: the name moves above its bar (the label column collapses to 0,
   so the s1–s16 classes still line up) and the axis keeps three labels. */
@media (max-width: 480px) {
  .tl { --tl-label: 0px; padding: 16px; gap: 12px; }
  .tl-row { height: auto; grid-template-rows: auto 26px; row-gap: 4px; }
  .tl-row::before, .blk { grid-row: 2; }
  .tl-name { grid-column: 1 / -1; font-size: 0.76rem; }
  .tl-axis .opt { display: none; }
}

/* ---------- How it works ---------- */

.alt { background: var(--surface); border-block: 1px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step {
  position: relative; padding: 28px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border);
}
.step-n {
  display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 18px;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent);
  font-weight: 750; font-variant-numeric: tabular-nums;
}
.step h3 { margin-bottom: 10px; }
.step p { color: var(--text-2); font-size: 0.98rem; }
@media (max-width: 900px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Features ---------- */

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature {
  padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.feature:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow); }
.icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
  border-radius: 12px; background: var(--accent-soft); color: var(--accent);
}
.icon svg { width: 22px; height: 22px; }
.icon-new { background: var(--route-new-soft); color: var(--route-new); }
.icon-good { background: var(--good-soft); color: var(--good); }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: 0.97rem; }
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .features { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Control band ---------- */

.band { background: var(--band-bg); color: var(--band-text); }
.band .eyebrow { color: #8fb3ff; }
.band .section-head p { color: var(--band-text-2); }
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pillar {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start;
  padding: 26px; border-radius: var(--radius);
  background: var(--band-surface); border: 1px solid var(--band-border);
}
.pillar .icon { margin: 0; background: rgb(122 167 255 / 14%); color: #9dbcff; }
.pillar h3 { margin-bottom: 6px; color: var(--band-text); }
.pillar p { color: var(--band-text-2); font-size: 0.97rem; }
@media (max-width: 760px) { .pillars { grid-template-columns: minmax(0, 1fr); } .pillar { padding: 22px; } }

/* ---------- FAQ ---------- */

.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }
.faq { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font-weight: 650; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 4px;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg) translateY(-3px); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq summary:hover { color: var(--accent); }
.faq details p { padding: 0 32px 22px 0; color: var(--text-2); }

/* ---------- Closing call to action ---------- */

.cta {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  padding: clamp(32px, 5vw, 56px); border-radius: 24px;
  background: linear-gradient(135deg, #1d4ed8 0%, #2a3fc4 55%, #7c3aed 100%);
  color: #fff; box-shadow: var(--shadow-lg);
}
.cta::after {
  content: ""; position: absolute; right: -80px; top: -120px; width: 380px; height: 380px; border-radius: 50%;
  border: 2px dashed rgb(255 255 255 / 22%); pointer-events: none;
}
.cta h2 { color: #fff; }
.cta p { margin-top: 12px; color: rgb(255 255 255 / 82%); font-size: 1.08rem; }
.cta .cta-row { margin-top: 0; position: relative; z-index: 1; }
.cta .btn-primary { background: #fff; color: #1d3fb8; box-shadow: 0 8px 22px rgb(0 0 0 / 18%); }
.cta .btn-primary:hover { background: #eef3ff; color: #1d3fb8; }
.cta .btn-ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 45%); }
.cta .btn-ghost:hover { color: #fff; border-color: #fff; }
.cta :focus-visible { outline-color: #fff; }
@media (max-width: 760px) { .cta { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */

.foot { padding: 48px 0 40px; color: var(--text-2); font-size: 0.92rem; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 40px; align-items: flex-start; }
.foot .brand { font-size: 1.05rem; }
.foot-tag { margin-top: 10px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.foot-links a { color: var(--text-2); text-decoration: none; font-weight: 550; }
.foot-links a:hover { color: var(--text); }
.foot-legal { flex-basis: 100%; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.84rem; }

/* ---------- 404 ---------- */

.notfound { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; text-align: center; }
.notfound .brand { margin-bottom: 40px; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); }
.notfound p { margin: 16px auto 32px; max-width: 30em; color: var(--text-2); }
.notfound .cta-row { justify-content: center; }
