:root {
  --paper: #fff9f2;
  --paper-2: #f3eee8;
  --ink: #1c1921;
  --ink-soft: #635f6c;
  --ink-mute: #a39eae;
  --line: #efe8e0;
  --white: #ffffff;
  --pick: #7c4dff;
  --due: #ff5252;
  --due-soft: #ffebee;
  --soon: #ff9100;
  --soon-soft: #fff3e0;
  --later-soft: #f3e5f5;
  --ready: #00bfa5;
  --ready-soft: #e0f2f1;
  --night: #141018;
  --grad: linear-gradient(9deg, #ff6b6b 25%, #e040fb 50%, #7c4dff 75%);
  --shadow: 0 8px 10px rgba(224, 64, 251, 0.07);
  --shadow-lg: 0 40px 80px rgba(28, 25, 33, 0.18);
  --radius: 16px;
  --font-display: "Outfit", "Helvetica Neue", sans-serif;
  --font-sans: "DM Sans", "Helvetica Neue", sans-serif;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--pick); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
}

p { margin: 0; }

.wrap { width: min(1180px, calc(100% - 2.4rem)); margin: 0 auto; }
.wrap-narrow { width: min(42rem, calc(100% - 2.4rem)); margin: 0 auto; }

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal="late"].in { transition-delay: 0.12s; }
[data-reveal="last"].in { transition-delay: 0.24s; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.mark {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.55rem;
  background: var(--grad);
  display: block;
  flex: none;
}

.links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.95rem;
  font-weight: 650;
}
.links a { color: var(--ink-soft); }
.links a:hover { color: var(--ink); text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  min-height: 52px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-pick { background: var(--grad); color: #fff; box-shadow: 0 12px 28px rgba(124, 77, 255, 0.28); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--white); color: var(--ink); border: 1.5px solid var(--line); }
.btn-sm { min-height: 42px; padding: 8px 16px; font-size: 14px; }
.nav-cta { color: #fff !important; }

.live-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--pick);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--ready);
  box-shadow: 0 0 0 0 rgba(0, 191, 165, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(0, 191, 165, 0); }
}

.dispatch {
  padding: 0.4rem 0 3.2rem;
}

.dispatch-head h1 {
  font-size: clamp(2.5rem, 6vw, 4.4rem);
  line-height: 0.94;
  max-width: 16ch;
  margin-bottom: 1.1rem;
}

.lede { color: var(--ink-soft); font-size: 1.18rem; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-note { margin-top: 0.9rem; color: var(--ink-mute); font-size: 0.92rem; }

.dispatch-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.4rem;
  margin-top: 1.6rem;
}

.avail {
  max-width: 36rem;
  background: var(--white);
  border-radius: 22px;
  padding: 1.4rem 1.35rem;
  box-shadow: var(--shadow);
}
.avail label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pick);
  margin-bottom: 0.65rem;
}
.avail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.avail-row input {
  flex: 1 1 12rem;
  min-height: 52px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 1.1rem;
  font: inherit;
  background: var(--paper);
}
.avail-row input:focus {
  outline: 2px solid var(--pick);
  outline-offset: 2px;
}
.avail-result {
  margin-top: 1rem;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-weight: 650;
}
.avail-result.yes {
  background: var(--ready-soft);
  color: #00796b;
}
.avail-result.no {
  background: var(--soon-soft);
  color: #9a5b00;
}

.board {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 1rem;
  background: #0d0b10;
  border-radius: 32px;
  padding: 0.85rem;
  box-shadow: var(--shadow-lg);
  min-height: 540px;
}

.board-map {
  position: relative;
  min-height: 420px;
}

.run-svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 24px;
}

.run-line {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 8 12;
  animation: crawl 18s linear infinite;
}

@keyframes crawl {
  to { stroke-dashoffset: -400; }
}

.run-pin circle.dot {
  fill: #fff;
}
.run-pin.on circle.ring {
  fill: #e040fb;
}
.run-pin text {
  font-family: var(--font-display);
  font-size: 11px;
  fill: #cfc8d8;
}

.hud {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  pointer-events: none;
}
.hud div {
  background: rgba(13, 11, 16, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 0.65rem 0.75rem;
  color: #fff;
}
.hud span {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.15rem;
}
.hud strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.sheet {
  background: var(--paper);
  border-radius: 24px;
  padding: 1.35rem 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.sheet-kicker {
  color: var(--pick);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.sheet h2 {
  font-size: 1.55rem;
  line-height: 1.1;
  margin-bottom: 0.55rem;
}

.sheet-why {
  color: var(--ink-soft);
  font-size: 0.95rem;
  flex: none;
}

.vars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 1.1rem 0 0.8rem;
}
.vars div {
  background: var(--white);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
}
.vars dt {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
}
.vars dd {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
}

.swap {
  background: var(--soon-soft);
  color: #9a5b00;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: 0.85rem;
}

.board-go { width: 100%; margin-top: auto; }
.board-go[data-state="running"] { background: var(--ink); box-shadow: none; }

.stop-rail {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}

.stop-card {
  background: var(--white);
  border-radius: 16px;
  padding: 0.9rem 0.95rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: 1.5px solid transparent;
  text-align: left;
  font: inherit;
  color: inherit;
}
.stop-card.on {
  border-color: var(--pick);
  box-shadow: 0 0 0 4px rgba(124, 77, 255, 0.12);
}
.stop-card.done { opacity: 0.62; }
.stop-card .n {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pick);
}
.stop-card h3 { font-size: 1rem; margin: 0.2rem 0 0.25rem; }
.stop-card p { color: var(--ink-soft); font-size: 0.82rem; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--pick);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section { padding: 5.2rem 0; }
.section h2 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.05;
  margin-bottom: 0.75rem;
}
.section .lede { margin-bottom: 2.3rem; }

.acts {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 1rem;
}
.act {
  background: var(--white);
  border-radius: 22px;
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow);
}
.act span {
  display: block;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pick);
  margin-bottom: 0.7rem;
}
.act h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.act p { color: var(--ink-soft); }
.act blockquote {
  margin: 1rem 0 0;
  padding: 0.85rem 0.9rem;
  background: var(--paper);
  border-radius: 12px;
  font-size: 0.9rem;
  color: var(--ink);
}

.features { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.feature {
  background: var(--white);
  border-radius: 20px;
  padding: 1.45rem 1.35rem;
  box-shadow: var(--shadow);
}
.feature h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.feature p { color: var(--ink-soft); }

.cta-shell {
  background: var(--grad);
  border-radius: 32px;
  padding: 3.4rem 2rem;
  text-align: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-shell h2 { color: #fff; font-size: clamp(2rem, 4vw, 3.1rem); margin-bottom: 0.7rem; }
.cta-shell .lede { color: rgba(255,255,255,0.88); margin: 0 auto 1.6rem; }
.cta-shell .btn-ghost { border-color: transparent; }

.store-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(28, 25, 33, 0.45);
  display: grid;
  place-items: center;
  padding: 1.2rem;
}
.store-sheet[hidden] { display: none !important; }
.store-card {
  width: min(22rem, 100%);
  background: var(--paper);
  border-radius: 22px;
  padding: 1.4rem 1.3rem;
  box-shadow: var(--shadow-lg);
}
.store-card p {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}
.store-card .btn { width: 100%; margin-top: 0.55rem; }

.faq { display: grid; gap: 0.75rem; }
details {
  background: var(--white);
  border-radius: 16px;
  padding: 1.05rem 1.2rem;
  box-shadow: var(--shadow);
}
summary { font-family: var(--font-display); font-weight: 800; cursor: pointer; }
details p { color: var(--ink-soft); margin-top: 0.55rem; }

.site-footer {
  margin-top: auto;
  background: #0d0b10;
  color: rgba(255,255,255,0.68);
  padding: 3.4rem 0 1.5rem;
  font-size: 0.92rem;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.4rem;
}
.site-footer .brand { color: #fff; margin-bottom: 0.7rem; }
.site-footer h3 {
  color: #fff;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.site-footer a { color: rgba(255,255,255,0.68); display: block; margin: 0.4rem 0; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.legal {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.1rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.legal-page { padding: 3rem 0 5rem; }
.legal-page h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 0.6rem; }
.legal-page .meta { color: var(--ink-soft); margin-bottom: 1.6rem; }
.legal-page h2 { font-size: 1.2rem; margin: 2rem 0 0.55rem; }
.legal-page p + p, .legal-page ul { margin-top: 0.75rem; }
.legal-page ul { padding-left: 1.2rem; color: var(--ink-soft); }
.legal-page li { margin: 0.35rem 0; }

.hide-mobile { display: flex; }

@media (max-width: 980px) {
  .board, .acts, .features, .foot-grid, .stop-rail, .hud { grid-template-columns: 1fr 1fr; }
  .hud { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .board, .acts, .features, .foot-grid, .stop-rail, .hud { grid-template-columns: 1fr; }
  .hide-mobile { display: none; }
  .hero-actions .btn { width: 100%; }
  .dispatch-head h1 { max-width: none; }
  .board { min-height: 0; }
  .hud { position: static; margin-top: 0.75rem; }
  .board-map { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse, .run-line, [data-reveal] {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
