/* Self-hosted variable fonts (latin subset, SIL OFL). Swap keeps text visible while loading. */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/fonts/instrument-sans.woff2") format("woff2");
}

:root {
  --paper: #eef3fa;
  --ink: #0f1b2d;
  --muted: #53637a;
  --rule: #cfdae8;
  --accent: #2f5bea;
  --accent-ink: #ffffff;
  --live: #22b8f0;
  --grid: rgba(47, 91, 234, 0.09);
  --live-glow: rgba(34, 184, 240, 0.55);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --text-hero: clamp(2.75rem, 1rem + 5.5vw, 5.75rem);
  --gutter: clamp(1rem, 0.5rem + 3vw, 3rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a1120;
    --ink: #e4ecf7;
    --muted: #8b9cb5;
    --rule: #1c2a40;
    --accent: #6c9cff;
    --accent-ink: #0a1120;
    --grid: rgba(108, 156, 255, 0.08);
    color-scheme: dark;
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-body);
}

/* Blueprint grid, faded toward the edges */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 2rem 2rem;
  mask-image: radial-gradient(ellipse at 30% 45%, #000 0%, transparent 75%);
}

.page {
  position: relative; z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-rows: auto 1fr auto;
}
/* Grid items default to min-width: auto; the ticker's max-content track would stretch the page */
.page > * { min-width: 0; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.site-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.wordmark { font: 700 1.6rem/1 var(--font-display); text-decoration: none; letter-spacing: -0.02em; }
.wordmark span { color: var(--accent); }

/* Brand: wordmark with a motto typed out beneath it */
.brand { display: inline-flex; flex-direction: column; gap: 0.35rem; text-decoration: none; }
.motto {
  font: italic 400 0.95rem/1.1 var(--font-display); color: var(--muted);
  animation: type 1.4s steps(28) 0.4s both;
}
.motto::after {
  content: ""; display: inline-block; width: 1.5px; height: 0.95em; margin-left: 3px;
  vertical-align: -0.12em; background: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes blink { 50% { opacity: 0; } }

.status { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--live); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.hero {
  align-self: center;
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  min-height: min(78vh, 48rem);
  animation: rise 900ms var(--ease) both;
}
/* Transform only: fading from opacity 0 would delay Largest Contentful Paint */
@keyframes rise { from { transform: translateY(16px); } }

.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin: 0 0 1.5rem; }
h1 {
  font: 400 var(--text-hero)/0.95 var(--font-display);
  letter-spacing: -0.035em; margin: 0;
  font-variation-settings: "opsz" 144;
}
h1 em { font-style: italic; color: var(--accent); }

/* Headline words rise out of their own baselines, one after another */
h1 .w {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding: 0.04em 0.1em 0.14em 0; margin: -0.04em -0.1em -0.14em 0;
}
h1 .w > span { display: inline-block; animation: word 1.1s var(--ease) both; }
h1 .w1 > span { animation-delay: 0.15s; }
h1 .w2 > span { animation-delay: 0.27s; }
h1 .w3 > span { animation-delay: 0.5s; }
h1 .w4 > span { animation-delay: 0.62s; }
@keyframes word { from { transform: translateY(110%); } }

.lede { max-width: 34rem; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); color: var(--muted); margin: 2rem 0 2.5rem; }

/* Hero layout: copy left, self-drawing blueprint right */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 4vw, 4rem); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .blueprint { max-width: 17rem; justify-self: center; }
}
.blueprint { width: 100%; height: auto; max-height: min(72vh, 36rem); overflow: visible; }

.blueprint .draw {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: draw 1.6s var(--ease) forwards;
}
.blueprint .thin { stroke-width: 1; }
.blueprint .dim .draw { stroke: var(--muted); stroke-width: 1; }
.blueprint .d1 { animation-delay: 0.5s; animation-duration: 2s; }
.blueprint .d2 { animation-delay: 1.9s; }
.blueprint .d3 { animation-delay: 2.3s; }
.blueprint .d4 { animation-delay: 2.7s; }
.blueprint .d5 { animation-delay: 3.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.blueprint .guide { fill: none; stroke: var(--muted); stroke-width: 0.75; stroke-dasharray: 6 4 1 4; }
.blueprint .label text, .blueprint .titleblock text {
  fill: var(--muted); font: 600 10px var(--font-body); letter-spacing: 0.12em;
}
.blueprint .titleblock rect, .blueprint .titleblock path { fill: none; stroke: var(--muted); stroke-width: 1; }
.blueprint .titleblock .strong { fill: var(--accent); font-size: 11px; }

.blueprint .fade { opacity: 0; animation: fade 0.8s ease forwards; }
.blueprint .f0 { animation-delay: 0.1s; }
.blueprint .f6 { animation-delay: 4s; }
.blueprint .f7 { animation-delay: 4.3s; }
@keyframes fade { to { opacity: 1; } }

/* Ignition, then a gentle idle hover */
.blueprint .flame {
  fill: var(--live); opacity: 0;
  transform-box: fill-box; transform-origin: 50% 0;
  animation: ignite 0.5s var(--ease) 4.6s forwards, flicker 0.18s ease-in-out 5.1s infinite alternate;
}
@keyframes ignite { from { opacity: 0; transform: scaleY(0); } to { opacity: 0.9; transform: scaleY(1); } }
@keyframes flicker { from { opacity: 0.9; transform: scaleY(1); } to { opacity: 0.65; transform: scaleY(0.82); } }
.blueprint .rocket { animation: hover 3.2s ease-in-out 5s infinite; }
@keyframes hover { 50% { transform: translateY(-8px); } }

/* Build progress meter */
.build { max-width: 26rem; margin: 0 0 2.5rem; }
.build-meta {
  display: flex; justify-content: space-between;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.6rem;
}
.build-pct { color: var(--accent); font-variant-numeric: tabular-nums; }
.build-track { height: 0.375rem; border-radius: 999px; background: var(--rule); overflow: hidden; }
.build-fill {
  height: 100%; width: 87%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--live));
  transform-origin: left;
  animation: fill 1.8s var(--ease) 0.4s both;
}
@keyframes fill { from { transform: scaleX(0); } }

.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 0.9rem 1.5rem; border-radius: 999px;
  transition: transform 300ms var(--ease), box-shadow 300ms var(--ease);
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 var(--ink); }
.btn-primary:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 0 var(--ink); }
.btn-primary:active { transform: translate(0, 0); box-shadow: 0 0 0 0 var(--ink); }

/* Ticker band */
.ticker {
  overflow: hidden; border-block: 1px solid var(--rule); padding-block: 1.1rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.ticker-track span {
  font: 400 clamp(1.5rem, 1rem + 2vw, 2.5rem)/1 var(--font-display);
  letter-spacing: -0.02em; white-space: nowrap; padding-right: 0.6em;
}
.ticker-track i { font-style: normal; color: var(--accent); font-size: 0.6em; vertical-align: 0.2em; margin-inline: 0.5em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Shared section type */
h2 {
  font: 400 clamp(2.25rem, 1.4rem + 3.2vw, 4.25rem)/1 var(--font-display);
  letter-spacing: -0.03em; margin: 0 0 1.5rem;
  font-variation-settings: "opsz" 144;
}
h2 em { color: var(--accent); }
.section-lede { max-width: 38rem; color: var(--muted); font-size: 1.15rem; margin: 0; }

/* Flight plan timeline */
.plan { padding-block: clamp(4rem, 3rem + 5vw, 8rem) clamp(3rem, 2rem + 4vw, 6rem); }
.stages {
  position: relative; list-style: none; padding: 0; margin: 3.5rem 0 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem;
  view-timeline: --stages;
}
.stages::before {
  content: ""; position: absolute; top: 0.5rem; left: 0; right: 0; height: 2px; z-index: 0;
  background: var(--rule);
}
/* Each completed stage draws its own connector to the next dot, so the rail always lands exactly */
.stage.is-done::after {
  content: ""; position: absolute; top: 0.5rem; left: 0.55rem; z-index: 0;
  width: calc(100% + 2rem); height: 2px; transform-origin: left;
  background: linear-gradient(90deg, var(--accent), var(--live));
}
.stage { position: relative; padding-top: 2.25rem; }
.stage::before {
  content: ""; position: absolute; top: 0; left: 0; z-index: 1;
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 2px solid var(--rule); background: var(--paper);
}
.stage.is-done::before { background: var(--accent); border-color: var(--accent); }
.stage.is-active::before { border-color: var(--live); animation: ping 2s ease-out infinite; }
@keyframes ping {
  from { box-shadow: 0 0 0 0 var(--live-glow); }
  to { box-shadow: 0 0 0 14px transparent; }
}
.stage-status {
  display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1rem;
}
.is-done .stage-status { color: var(--accent); }
.is-active .stage-status { color: var(--live); }
.stage-num { display: block; font: 400 0.95rem/1 var(--font-display); color: var(--muted); margin-bottom: 0.4rem; }
.stage h3 { font: 400 1.75rem/1.1 var(--font-display); letter-spacing: -0.02em; margin: 0 0 0.6rem; }
.stage p { margin: 0; color: var(--muted); }

@media (max-width: 760px) {
  .stages { grid-template-columns: 1fr; padding-left: 2.25rem; gap: 2.25rem; }
  .stages::before { top: 0.3rem; bottom: 0; left: 0.5rem; right: auto; width: 2px; height: auto; }
  .stage { padding-top: 0; }
  .stage::before { left: -2.25rem; top: 0.3rem; }
  .stage.is-done::after {
    top: 0.85rem; left: -1.75rem; width: 2px; height: calc(100% + 2.25rem);
    transform-origin: top; background: linear-gradient(180deg, var(--accent), var(--live));
  }
}

/* Closing call to action */
.cta {
  text-align: center; padding: clamp(3rem, 2rem + 5vw, 6rem) 0 clamp(4rem, 3rem + 5vw, 7rem);
  border-top: 1px solid var(--rule);
}
.cta h2 em { display: block; }
.cta p { max-width: 34rem; margin: 0 auto 2.25rem; color: var(--muted); font-size: 1.15rem; }

/* Scroll-driven reveals: progressive enhancement, content stays visible without support */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  .stage { animation: reveal linear both; animation-timeline: --stages; }
  .stage:nth-child(1) { animation-range: entry 10% entry 50%; }
  .stage:nth-child(2) { animation-range: entry 20% entry 60%; }
  .stage:nth-child(3) { animation-range: entry 30% entry 70%; }
  .stage:nth-child(4) { animation-range: entry 40% entry 80%; }
  .stage.is-done::after { animation: rail-x linear both; animation-timeline: --stages; }
  .stage.is-done:nth-child(1)::after { animation-range: entry 35% entry 75%; }
  .stage.is-done:nth-child(2)::after { animation-range: entry 55% cover 45%; }
  @media (max-width: 760px) { .stage.is-done::after { animation-name: rail-y; } }
}
@keyframes reveal { from { opacity: 0; transform: translateY(48px); } }
@keyframes rail-x { from { transform: scaleX(0); } }
@keyframes rail-y { from { transform: scaleY(0); } }

.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem;
  padding-block: 1.5rem; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: 0.875rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .blueprint .draw { stroke-dashoffset: 0; }
  .blueprint .fade { opacity: 1; }
  .blueprint .flame { opacity: 0.9; }
}
