:root {
  color-scheme: dark;
  font-family: "Helvetica Neue", Arial, sans-serif;
  --brand-green: #00c800;
  --brand-vibrant: #4cee00;
  --brand-graphite: #454a4e;
  --brand-neutral: #f0f0e3;
  --background: #101512;
  --shadow: #080d0a;
  --vehicle-tail: #de7466;

  --ink: var(--brand-neutral);
  --muted: color-mix(in srgb, var(--brand-neutral) 76%, var(--brand-graphite));
  --surface: color-mix(in srgb, var(--background) 69%, var(--brand-graphite));
  --surface-hover: color-mix(in srgb, var(--surface) 89%, var(--brand-green));
  --surface-active: color-mix(in srgb, var(--surface) 80%, var(--brand-green));
  --control-stroke: color-mix(in srgb, var(--brand-graphite) 60%, var(--brand-neutral));
  --line: color-mix(in srgb, var(--brand-neutral) 22%, transparent);
  --raised-stroke: color-mix(in srgb, var(--control-stroke) 64%, transparent);
  --card-surface: color-mix(in srgb, var(--surface) 95%, transparent);
  --control-surface: color-mix(in srgb, var(--surface) 96%, transparent);
  --shadow-soft: color-mix(in srgb, var(--shadow) 72%, transparent);
  --shadow-deep: color-mix(in srgb, var(--shadow) 82%, transparent);
  --fade-dense: color-mix(in srgb, var(--background) 92%, transparent);
  --fade-medium: color-mix(in srgb, var(--background) 60%, transparent);
  --fade-soft: color-mix(in srgb, var(--background) 8%, transparent);
  --fade-top: color-mix(in srgb, var(--background) 69%, transparent);
  --fade-mobile: color-mix(in srgb, var(--background) 66%, transparent);
  --fade-mobile-right: color-mix(in srgb, var(--background) 58%, transparent);

  --map-land: color-mix(in srgb, var(--background) 83%, var(--brand-graphite));
  --map-block: color-mix(in srgb, var(--brand-graphite) 46%, var(--background));
  --map-highland: color-mix(in srgb, var(--brand-graphite) 56%, var(--background));
  --map-river: color-mix(in srgb, var(--background) 49%, var(--brand-graphite));
  --map-water: color-mix(in srgb, var(--background) 67%, var(--brand-graphite));
  --map-grid: color-mix(in srgb, var(--brand-graphite) 54%, var(--brand-neutral));
  --map-light: color-mix(in srgb, var(--brand-graphite) 82%, var(--brand-green));
  --map-track: color-mix(in srgb, var(--brand-neutral) 72%, var(--brand-graphite));
  --route-middle: color-mix(in srgb, var(--brand-green) 60%, var(--brand-vibrant));

  --vehicle-metal: color-mix(in srgb, var(--brand-neutral) 54%, var(--brand-graphite));
  --vehicle-glass: color-mix(in srgb, var(--brand-graphite) 78%, var(--background));
  --vehicle-reflection: color-mix(in srgb, var(--vehicle-metal) 88%, var(--brand-green));
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 0; color: var(--ink); background: var(--background); }
a { color: inherit; text-decoration: none; }
button, summary { color: inherit; font: inherit; cursor: pointer; }
a, button, summary { -webkit-tap-highlight-color: transparent; }
:where(a, button, summary):focus-visible { outline: 2px solid var(--brand-vibrant); outline-offset: 5px; }
.shell { width: min(calc(100% - 112px), 1504px); margin-inline: auto; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: 14px; left: 14px; z-index: 10; padding: 12px; color: var(--background); background: var(--brand-green); border-radius: 4px; }
.topbar { position: relative; z-index: 2; min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 4px; font-weight: 780; font-size: 1.42rem; letter-spacing: -.05em; white-space: nowrap; }
.brand img { display: block; width: 80px; height: 80px; margin-left: -14px; object-fit: contain; }
.navigation { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 39px); font-size: .93rem; font-weight: 650; }
.navigation a { padding-block: 14px; }
.nav-institutional { color: var(--muted); }
.nav-institutional:hover { color: var(--brand-green); }
.navigation .driver-link { border: 1px solid var(--control-stroke); border-radius: 6px; padding: 13px 17px; background: var(--surface); white-space: nowrap; }
.navigation .driver-link:hover { background: var(--surface-hover); border-color: var(--brand-green); }

main { position: relative; isolation: isolate; overflow: clip; }
.hero { position: relative; min-height: calc(100svh - 92px); display: grid; grid-template-columns: minmax(0, 53fr) minmax(0, 47fr); align-items: center; padding-block: clamp(72px, 12.5svh, 156px); }
.intro { z-index: 2; align-self: center; }
h1 { margin: 0; max-width: 14ch; font-size: clamp(3.65rem, 5.85vw, 6.55rem); font-weight: 770; letter-spacing: -.078em; line-height: .99; }
h1 span, h1 em { display: block; }
h1 em { color: var(--brand-green); font-style: normal; }
.lead { margin: 25px 0 30px; max-width: 24ch; color: var(--muted); font-size: clamp(1.06rem, 1.5vw, 1.36rem); line-height: 1.48; }
.download p { margin: 0 0 11px; font-size: .875rem; font-weight: 720; color: var(--ink); }
.stores { display: flex; gap: 9px; flex-wrap: wrap; }
.stores a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 49px; padding: 0 15px; border: 1px solid var(--control-stroke); border-radius: 6px; font-size: .92rem; font-weight: 740; background: var(--surface); }
.stores a:hover { background: var(--surface-hover); }
.stores .apple-store { background: var(--brand-green); border-color: var(--brand-green); color: var(--background); }
.stores .apple-store:hover { background: var(--brand-vibrant); border-color: var(--brand-vibrant); }
.stores a:not(.apple-store) svg { color: var(--brand-vibrant); }
.stores svg { width: 17px; height: 17px; }
.ecosystem { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 0; width: fit-content; margin: 35px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line); list-style: none; color: var(--muted); font-size: .815rem; }
.ecosystem li + li::before { display: inline-block; width: 3px; height: 3px; margin: 0 11px 3px; content: ""; border-radius: 50%; background: var(--brand-green); }

.scene { position: absolute; inset: 0 calc((100% - 100vw) / 2) 0 34%; z-index: 1; }
.map-crop { position: absolute; inset: 0; isolation: isolate; overflow: hidden; }
.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-crop::after { position: absolute; inset: 0; content: ""; pointer-events: none; background: linear-gradient(90deg, var(--background), var(--fade-dense) 7%, var(--fade-medium) 22%, var(--fade-soft) 51%), linear-gradient(0deg, var(--background) 1%, var(--fade-soft) 22%, transparent 75%, var(--fade-top)); }
#track { stroke: var(--map-track); stroke-width: 2.5px; stroke-opacity: .42; stroke-dasharray: 4 10; }
#route-aura { stroke: var(--brand-vibrant); stroke-width: 11; }
#route-draw { stroke: url(#route-ink); stroke-width: 5.5; }
#route-travel { stroke: var(--brand-vibrant); stroke-width: 3.2; }
.map-pin text { font: 650 15px/1 "Helvetica Neue", Arial, sans-serif; fill: var(--ink); stroke: var(--background); stroke-width: 5px; stroke-linejoin: round; paint-order: stroke; }
.scene-interface { position: absolute; z-index: 1; right: clamp(42px, 6vw, 125px); bottom: clamp(34px, 8.6svh, 106px); width: min(350px, 43vw); }
.ride-card { position: relative; display: grid; grid-template-columns: 43px 1fr; gap: 11px; min-height: 116px; align-items: start; padding: 16px 17px 17px; border: 1px solid var(--raised-stroke); border-radius: 13px; background: var(--card-surface); box-shadow: 0 18px 42px var(--shadow-soft); }
.ride-logo { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 8px; border: 1px solid var(--line); background: var(--background); }
.ride-logo img { display: block; width: 42px; height: 42px; object-fit: contain; }
.ride-kicker { margin: 0 0 4px; font: 670 .72rem/1.2 ui-monospace, monospace; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.ride-state { margin: 0; font-size: 1.25rem; font-weight: 750; letter-spacing: -.035em; line-height: 1.15; }
.ride-detail { margin: 4px 0 0; color: var(--muted); font-size: .875rem; line-height: 1.35; }
.ride-progress { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.ride-progress span { height: 2px; border-radius: 3px; background: var(--map-grid); }
.ride-progress [data-passed] { background: var(--brand-green); }
.ride-progress [data-current] { background: var(--brand-vibrant); }
.scene-tools { margin-top: 9px; display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.motion-control, summary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 11px; border: 1px solid var(--control-stroke); border-radius: 6px; background: var(--control-surface); font-size: .875rem; font-weight: 670; }
.motion-control:hover, summary:hover { background: var(--surface-hover); }
.control-icon { width: 9px; height: 10px; border-inline: 2px solid currentColor; }
.motion-control[data-action="play"] .control-icon { width: 0; height: 0; border: solid transparent; border-width: 5px 0 5px 8px; border-left-color: currentColor; }
.motion-control[data-action="replay"] .control-icon { width: auto; height: auto; border: 0; }
.motion-control[data-action="replay"] .control-icon::before { content: "↻"; font-size: 1.1rem; }
details { position: relative; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 6px; height: 6px; margin: -3px 1px 0 3px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
details[open] summary::after { transform: rotate(225deg); margin-top: 3px; }
.milestones { position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 1; display: flex; width: max-content; gap: 3px; padding: 5px; border: 1px solid var(--control-stroke); border-radius: 8px; background: var(--surface); box-shadow: 0 6px 24px var(--shadow-deep); }
.milestones button { min-height: 44px; padding: 0 9px; border-radius: 4px; border: 1px solid transparent; background: transparent; font-size: .875rem; font-weight: 670; }
.milestones button:hover, .milestones button[aria-pressed="true"] { background: var(--surface-active); border-color: var(--brand-green); }

dialog { position: fixed; max-width: min(460px, calc(100% - 32px)); padding: 0; border: 1px solid var(--control-stroke); border-radius: 13px; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: var(--shadow-deep); }
.driver-dialog { padding: 26px; }
.driver-dialog h2 { margin: 0; padding-right: 42px; font-size: 1.65rem; letter-spacing: -.04em; }
.driver-dialog p { color: var(--muted); line-height: 1.5; }
.close-driver { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 6px; background: var(--surface-active); font-size: 1.5rem; }
.driver-app:hover { background: var(--brand-vibrant); }
.driver-app { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 11px; border-radius: 6px; background: var(--brand-green); color: var(--background); font-size: .9375rem; font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  a, button, summary { transition: background-color .18s, color .18s, border-color .18s; }
}
@media (max-width: 1150px) {
  .shell { width: calc(100% - 72px); }
  .scene { left: 31%; }
  h1 { font-size: clamp(3.25rem, 6.4vw, 5.2rem); }
}
@media (max-width: 760px) {
  .shell { width: calc(100% - 40px); }
  .topbar { min-height: 69px; }
  .brand { font-size: 1.15rem; gap: 2px; }
  .brand img { width: 62px; height: 62px; margin-left: -11px; }
  .navigation .nav-institutional { display: none; }
  .navigation .driver-link { padding: 12px 11px; font-size: .87rem; }
  .hero { display: block; min-height: 0; padding: 0; }
  .intro { position: relative; padding-top: 29px; }
  h1 { font-size: clamp(2.56rem, 10.4vw, 4.4rem); max-width: none; }
  .lead { margin: 16px 0 19px; max-width: 30ch; font-size: 1.025rem; }
  .stores a { min-height: 46px; padding-inline: 12px; }
  .ecosystem { margin-top: 19px; padding-top: 10px; font-size: .78rem; }
  .ecosystem li + li::before { margin-inline: 8px; }
  .scene { position: relative; inset: auto; width: calc(100% + 40px); margin-left: -20px; min-height: 428px; margin-top: -23px; }
  .map-crop::after { background: linear-gradient(180deg, var(--background), var(--fade-mobile) 7%, transparent 24%, transparent 74%, var(--background)), linear-gradient(90deg, var(--fade-medium), transparent 19%, transparent 80%, var(--fade-mobile-right)); }
  .scene-interface { width: min(calc(100% - 40px), 385px); right: 50%; transform: translateX(50%); bottom: 20px; }
  .ride-card { min-height: 105px; padding: 13px; gap: 9px; }
  .ride-state { font-size: 1.17rem; }
}
@media (max-width: 355px) {
  .shell { width: calc(100% - 28px); }
  .scene { width: calc(100% + 28px); margin-left: -14px; }
  .scene-interface { width: calc(100% - 28px); }
  h1 { font-size: 11vw; }
  .brand img { width: 52px; height: 52px; }
}
