@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f3f0e8;
  --paper-2: #e9e4d8;
  --ink: #0e1a2b;
  --ink-2: #3a4658;
  --muted: #5d6676;
  --line: rgba(14, 26, 43, 0.14);
  --line-strong: rgba(14, 26, 43, 0.32);
  --orange: #ff5a1f;
  --orange-ink: #b8400f;
  --navy: #0e1a2b;
  --navy-2: #16253b;
  --on-navy: #e7ebf1;
  --on-navy-muted: #9aa6b8;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #fb7185;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.accent { color: var(--orange-ink); }
.dark .accent { color: var(--orange); }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 5;
  background: rgba(243, 240, 232, 0.86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 18px; letter-spacing: -0.01em; }
.brand b { font-weight: 600; }
.mark { width: 28px; height: 28px; }
.mark-dot { fill: var(--orange); }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 26px; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--ink-2); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; white-space: nowrap;
  background: var(--ink); color: var(--paper);
  font-weight: 500; font-size: 16px; text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.btn:hover { transform: translateY(-1px); background: #1d2d45; }
.btn-small { padding: 10px 16px; font-size: 14.5px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-ghost:hover { background: rgba(14, 26, 43, 0.05); }

/* hero */
.hero {
  position: relative;
  padding: 72px 0 64px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 25% 40%, var(--paper) 30%, rgba(243, 240, 232, 0.6) 60%, rgba(243, 240, 232, 0) 100%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: #fff; box-shadow: 0 0 0 1px var(--line);
  font-size: 14px; text-decoration: none; color: var(--ink-2);
}
.pill-tag { background: var(--orange); color: var(--ink); font-weight: 600; font-size: 12px; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.06em; }
.hero h1 { font-size: clamp(58px, 8.4vw, 112px); margin: 26px 0 24px; letter-spacing: -0.045em; line-height: 0.95; }
.lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); max-width: 36em; }
.dark .lede { color: var(--on-navy-muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 0; margin: 44px 0 0; border-top: 1px solid var(--line); }
.hero-facts div { padding: 16px 28px 0 0; margin-right: 28px; }
.hero-facts dt { font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.hero-facts dd { margin: 4px 0 0; font-size: 18px; font-weight: 500; }

/* drawing */
.drawing { margin: 0; background: rgba(255, 255, 255, 0.55); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 30px 60px -30px rgba(14, 26, 43, 0.25); }
.drawing svg { width: 100%; height: auto; }
.grid-lines path { stroke: rgba(14, 26, 43, 0.06); stroke-width: 1; fill: none; }
.centre { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 14 4 3 4; fill: none; }
.ink { stroke: var(--ink); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.fill-paper { fill: #fbfaf6; }
.fill-hatch { fill: url(#hatch); }
.hatch { stroke: rgba(14, 26, 43, 0.28); stroke-width: 1.2; }
.spring { stroke: var(--ink); stroke-width: 2.4; fill: none; stroke-linejoin: round; }
.seat { fill: var(--orange); }
.chip { fill: var(--orange); stroke: var(--ink); stroke-width: 1.5; }
.chip-pins { stroke: var(--ink); stroke-width: 1.5; }
.steam path { stroke: var(--muted); stroke-width: 2; fill: none; stroke-linecap: round; opacity: 0; animation: steam 3.2s var(--ease) infinite; }
.steam path:nth-child(2) { animation-delay: 0.5s; }
.steam path:nth-child(3) { animation-delay: 1s; }
@keyframes steam {
  0% { opacity: 0; transform: translateX(-6px); }
  30% { opacity: 0.9; }
  100% { opacity: 0; transform: translateX(18px); }
}
.dim { stroke: var(--orange-ink); stroke-width: 1.2; fill: none; }
.dim-ext { stroke: var(--orange-ink); stroke-width: 0.8; fill: none; stroke-dasharray: 3 3; }
.label { font-family: var(--mono); font-size: 12px; fill: var(--orange-ink); letter-spacing: 0.04em; }
.callout path { stroke: var(--ink); stroke-width: 1; fill: none; }
.callout circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.callout text { font-family: var(--mono); font-size: 12px; font-weight: 700; fill: var(--ink); }
.callout-hot circle { fill: var(--orange); }
.title-block rect, .title-block path { stroke: var(--ink); stroke-width: 1; fill: none; }
.title-block rect { fill: rgba(255, 255, 255, 0.7); }
.title-block text { font-family: var(--mono); font-size: 10px; fill: var(--ink); letter-spacing: 0.08em; }
figcaption { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); font-size: 14px; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.fig { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--orange-ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; width: 100%; counter-reset: legend; font-size: 13.5px; color: var(--muted); }
.legend li { counter-increment: legend; }
.legend li::before { content: counter(legend); display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; border: 1.2px solid var(--ink); font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--ink); }
.legend .hot::before { background: var(--orange); }

/* strip */
.strip { border-bottom: 1px solid var(--line); background: var(--paper); }
.strip-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 40px; padding: 26px 0; }
.strip-lead { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.strip-list { display: flex; flex-wrap: wrap; gap: 10px 34px; font-size: 19px; font-weight: 500; color: var(--ink-2); letter-spacing: -0.01em; }
.strip-list li:last-child { color: var(--orange-ink); }

/* metrics */
.metrics { border-bottom: 1px solid var(--line); }
.metrics-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 44px 28px 44px 0; }
.metric + .metric { padding-left: 28px; border-left: 1px solid var(--line); }
.metric-n { font-size: clamp(40px, 4.6vw, 60px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.metric-n span { font-size: 0.45em; margin-left: 4px; color: var(--orange-ink); letter-spacing: 0; }
.metric-l { margin-top: 12px; color: var(--muted); font-size: 15px; max-width: 18em; }

/* sections */
.section { padding: 110px 0; }
.section-alt { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2, .os-grid h2, .contact h2 { font-size: clamp(38px, 5vw, 64px); letter-spacing: -0.04em; margin: 14px 0 20px; }
.section-head > p:not(.eyebrow) { color: var(--ink-2); font-size: 18px; }
.eyebrow { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--orange-ink); font-weight: 600; }
.dark .eyebrow { color: var(--orange); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card { background: var(--paper); padding: 32px 30px 36px; position: relative; transition: background 0.3s; }
.card:hover { background: #fbfaf6; }
.card-n { position: absolute; top: 26px; right: 28px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.card-icon { width: 40px; height: 40px; margin-bottom: 30px; }
.card-icon * { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card-icon * { stroke: var(--orange-ink); }
.card h3 { font-size: 23px; margin-bottom: 10px; }
.card p:not(.card-n) { color: var(--ink-2); font-size: 16px; }
.card-accent { border-top: 3px solid var(--orange); }

/* dark */
.dark { background: var(--navy); color: var(--on-navy); }
.os-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; margin: 40px 0 32px; }
.features h3 { font-size: 18px; margin-bottom: 6px; letter-spacing: -0.01em; }
.features h3::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--orange); margin-right: 10px; vertical-align: 2px; }
.features p { color: var(--on-navy-muted); font-size: 15.5px; }
.footnote { font-size: 13.5px; color: var(--muted); margin-top: 16px; }
.dark .footnote { color: var(--on-navy-muted); opacity: 0.85; }

.console { background: #08111e; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 90, 31, 0.06); }
.console-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.02); }
.console-bar span { width: 11px; height: 11px; border-radius: 50%; background: #2a3850; }
.console-bar p { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--on-navy-muted); }
.console pre { margin: 0; padding: 22px 22px 26px; overflow-x: auto; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: var(--on-navy); }
.c-prompt { color: var(--orange); }
.c-dim { color: #6f7d92; }
.c-ok { color: var(--green); }
.c-warn { color: var(--amber); }
.c-bad { color: var(--red); }
.cursor { display: inline-block; width: 8px; height: 1.1em; margin-left: 4px; vertical-align: -3px; background: var(--orange); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.steps li { position: relative; padding-top: 30px; border-top: 2px solid var(--ink); }
.steps li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.steps li:last-child::before { background: var(--orange); }
.step-n { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.steps h3 { font-size: 28px; margin: 10px 0 12px; }
.steps p:not(.step-n) { color: var(--ink-2); font-size: 16px; }

/* specs */
.specs-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: start; }
.specs-grid .section-head { margin-bottom: 0; }
.section-head .doc-ref { margin-top: 26px; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 28px 22px; }
.specs { width: 100%; border-collapse: collapse; font-size: 16px; }
.specs th, .specs td { text-align: left; padding: 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { font-weight: 400; color: var(--muted); font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; padding-right: 20px; width: 48%; }
.specs td { font-weight: 500; }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }
.star { color: var(--orange-ink); }

/* note */
.note { padding: 120px 0; }
.note blockquote { margin: 0 auto; max-width: 900px; text-align: center; }
.note blockquote p { font-size: clamp(26px, 3.3vw, 42px); line-height: 1.22; letter-spacing: -0.025em; font-weight: 500; }
.note footer { margin-top: 26px; font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center; }
.routes { display: grid; gap: 0; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.routes div { display: grid; grid-template-columns: 11rem 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.16); }
.routes dt { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--orange); padding-top: 3px; }
.routes dd { margin: 0; font-size: 17px; line-height: 1.45; color: rgba(255, 255, 255, 0.86); }

/* footer */
.foot { background: var(--navy); color: var(--on-navy); border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 56px 0 48px; }
.foot-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px 48px; }
.foot .brand { color: var(--on-navy); }
.foot-tag { margin-top: 12px; color: var(--on-navy-muted); font-size: 15px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 15px; }
.foot-links a { text-decoration: none; color: var(--on-navy-muted); }
.foot-links a:hover { color: var(--on-navy); }
.fine { grid-column: 1 / -1; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; color: #7c889b; }

/* 404 */
.lost { min-height: calc(100vh - 66px); display: grid; place-items: center; text-align: center; padding: 80px 0; }
.lost h1 { font-size: clamp(64px, 12vw, 150px); letter-spacing: -0.05em; }
.lost p { color: var(--ink-2); font-size: 19px; margin: 18px auto 32px; max-width: 30em; }

/* responsive */
@media (max-width: 1024px) {
  .hero-grid, .os-grid, .specs-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3) { padding-left: 0; border-left: 0; }
  .metric:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav nav { margin-left: auto; }
  .section { padding: 80px 0; }
  .features { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { width: min(1180px, 100% - 32px); }
  .hero { padding: 44px 0 48px; }
  .hero h1 { font-size: 16.5vw; }
  .nav-inner { gap: 12px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metric, .metric + .metric { padding: 28px 0; border-left: 0; }
  .metric + .metric { border-top: 1px solid var(--line); }
  .hero-facts div { padding-right: 0; margin-right: 24px; }
  .brand span { font-size: 16px; }
  .btn-small { padding: 9px 13px; font-size: 13.5px; }
  .table-wrap { padding: 4px 18px 16px; }
  .specs th { width: 50%; font-size: 11.5px; }
  .console pre { font-size: 11.5px; padding: 18px 16px 22px; }
  .drawing { padding: 10px; }
  .routes div { grid-template-columns: 1fr; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .steam path { opacity: 0.7; }
}
