/* Fly My Route: the app's own palette (ios/App/FlyMyRoute/Design/Theme.swift) and nothing else.
   Navy is the film's studio, volt the one accent; cyan, orange and purple are the film's time, pace and climb.
   System fonts only: the site loads nothing from anywhere else. */

:root {
  color-scheme: dark;
  --stage-top: #0A0F1F;
  --stage-bottom: #1A2138;
  --card: #151B30;
  --edge: rgba(255, 255, 255, 0.10);
  --ink: #F5F5FA;
  --ink-body: rgba(235, 235, 245, 0.76);
  --ink2: rgba(235, 235, 245, 0.64);
  --ink3: rgba(235, 235, 245, 0.40);
  --volt: #D6FF3D;
  --on-volt: #0A0F00;
  --time: #59C7FA;
  --pace: #FF9E0A;
  --climb: #BF59F2;
  --glow: rgba(70, 110, 255, 0.20);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gutter: max(20px, env(safe-area-inset-left));
}

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

html {
  background: var(--stage-top);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-body);
  background:
    radial-gradient(90% 520px at 50% -140px, var(--glow), transparent 70%),
    linear-gradient(180deg, var(--stage-top) 0%, var(--stage-bottom) 100%);
  background-color: var(--stage-top);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { flex: 1; width: 100%; }

a { color: var(--volt); text-decoration: underline; text-decoration-color: rgba(214, 255, 61, 0.35);
    text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--volt); }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 4px; }

/* ------------------------------------------------------------------ the bar */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) 18px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* The avatar's volt ring, seen from the chase camera. */
.ring {
  width: 22px;
  height: 9px;
  border: 2px solid var(--volt);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(214, 255, 61, 0.55), inset 0 0 6px rgba(214, 255, 61, 0.35);
}

.bar nav a {
  color: var(--ink2);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.bar nav a:hover { color: var(--ink); }

/* ------------------------------------------------------------------ the home page */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 56px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px var(--gutter) 72px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--ink2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(48px, 8.4vw, 104px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.pitch {
  max-width: 30ch;
  margin: 24px 0 0;
  color: var(--ink2);
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.store { margin: 36px 0 0; }

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}
.soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 10px var(--volt);
}

.contact { margin: 22px 0 0; color: var(--ink2); font-size: 16px; }

/* The film: a 9:16 frame with the city plane tilted 50 degrees, as the Follow camera sees it. */
.film {
  position: relative;
  justify-self: center;
  width: min(320px, 100%);
  aspect-ratio: 9 / 16;
  margin: 0;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(120% 50% at 50% 0%, rgba(70, 110, 255, 0.18), transparent 70%),
    linear-gradient(180deg, #0B1022 0%, #131A33 100%);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 0 10px rgba(255, 255, 255, 0.025);
  perspective: 560px;
  isolation: isolate;
}

.plane {
  position: absolute;
  left: -45%;
  top: 2%;
  width: 190%;
  aspect-ratio: 1;
  transform: rotateX(50deg);
  transform-origin: 50% 58%;
  z-index: -1;
}
.plane svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* The far city fades into the sky; the bottom darkens under the profile. */
.film::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #0B1022 0%, rgba(11, 16, 34, 0.75) 22%, rgba(11, 16, 34, 0) 42%,
                              rgba(11, 16, 34, 0) 76%, rgba(11, 16, 34, 0.9) 100%);
  pointer-events: none;
}

.done { stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 6px rgba(214, 255, 61, 0.6)); }
.runner { filter: drop-shadow(0 0 6px rgba(214, 255, 61, 0.9)); }
.pulse { transform-box: fill-box; transform-origin: center; opacity: 0; }

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 26px 20px 0;
  text-align: center;
}
.hud p { margin: 0; }
.hud .name {
  color: var(--ink);
  font-family: var(--rounded);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.figures {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 6px !important;
  font-family: var(--rounded);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.figures small { font-size: 0.72em; font-weight: 600; opacity: 0.8; }
.dist { color: var(--volt); }
.time { color: var(--time); }
.pace { color: var(--pace); }

.profile { position: absolute; left: 0; right: 0; bottom: 34px; width: 100%; height: 54px; }

.brand {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  margin: 0;
  color: rgba(235, 235, 245, 0.55);
  font-family: var(--rounded);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .done { animation: draw 2.2s cubic-bezier(0.3, 0, 0.2, 1) 0.2s both; }
  .pulse { animation: pulse 2.4s ease-out 2.2s infinite; }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes pulse {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0; transform: scale(2.4); }
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 28px;
    text-align: center;
  }
  .pitch { margin-left: auto; margin-right: auto; }
  .film { width: min(290px, 78vw); }
}

/* ------------------------------------------------------------------ the text pages */

.doc main {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px var(--gutter) 80px;
}

.doc h1 {
  margin: 24px 0 10px;
  color: var(--ink);
  font-size: clamp(36px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.doc h2 {
  margin: 56px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--edge);
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  scroll-margin-top: 20px;
}

.doc h3 {
  margin: 36px 0 10px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 20px;
}

.doc p { margin: 0 0 16px; }
.doc h3.q { margin: 30px 0 6px; font-size: 18px; }
.doc h2 + h3.q { margin-top: 18px; }
.doc strong { color: var(--ink); font-weight: 600; }

.doc .meta { color: var(--ink2); font-size: 15px; }
.doc .lede { color: var(--ink2); font-size: 19px; line-height: 1.55; }

.doc ul, .doc ol { margin: 0 0 18px; padding-left: 1.3em; }
.doc li { margin: 0 0 8px; padding-left: 0.2em; }
.doc li > ul, .doc li > ol { margin: 8px 0 0; }
.doc ul > li::marker { color: var(--volt); }
.doc ol > li::marker { color: var(--volt); font-family: var(--rounded); font-weight: 700; }

.toc {
  margin: 28px 0 8px;
  padding: 18px 22px 12px;
  border: 1px solid var(--edge);
  border-radius: 18px;
  background: rgba(21, 27, 48, 0.7);
}
.toc p {
  margin: 0 0 8px;
  color: var(--ink3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.toc ol { margin: 0; padding-left: 1.3em; columns: 2; column-gap: 32px; }
.toc li { margin: 0 0 6px; break-inside: avoid; font-size: 15px; }
.toc a { color: var(--ink2); text-decoration: none; }
.toc a:hover { color: var(--volt); }

.table {
  margin: 0 0 20px;
  overflow-x: auto;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--card);
}
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.doc th, .doc td { padding: 12px 16px; text-align: left; vertical-align: top; }
.doc th { color: var(--ink); font-weight: 600; background: rgba(255, 255, 255, 0.03); }
.doc tbody tr + tr td, .doc tbody tr:first-child td { border-top: 1px solid var(--edge); }
.doc td:first-child { color: var(--ink); width: 42%; }

/* A blank still to fill: never published (build.py --strict refuses). */
mark.blank {
  padding: 1px 7px;
  border: 1px dashed var(--pace);
  border-radius: 6px;
  background: rgba(255, 158, 10, 0.14);
  color: #FFB84D;
  font-size: 0.86em;
  font-weight: 700;
  letter-spacing: 0.02em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
mark.blank .hint { font-weight: 500; letter-spacing: 0; opacity: 0.85; }

.draft {
  margin: 8px 0 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 158, 10, 0.5);
  border-radius: 12px;
  background: rgba(255, 158, 10, 0.10);
  color: #FFD08A;
  font-size: 15px;
}
.home .draft { max-width: 1120px; margin: 8px auto 0; }
.draft strong { color: #FFB84D; }

.missing main { padding-top: 12vh; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .toc ol { columns: 1; }
  .doc h2 { margin-top: 44px; padding-top: 22px; font-size: 23px; }
  .doc td:first-child { width: auto; }
  .doc th, .doc td { padding: 10px 12px; }
}

/* ------------------------------------------------------------------ the foot */

.foot {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--edge);
  color: var(--ink3);
  font-size: 14px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }
.foot nav a { color: var(--ink2); text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot p { margin: 0; }
