:root {
  --ink: #10130f;
  --ink-2: #171b14;
  --card: #141814;
  --bone: #f4efe6;
  --muted: #cfc8b8;
  --line: rgba(244, 239, 230, 0.14);
  --lime: #dff25a;
  --coral: #ff6a4a;
  --paper: #f3eee4;
  --paper-ink: #171910;
  --olive: #4e5a28;
  --nav: 68px;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  padding-top: var(--nav);
}

body.bare { padding-top: 0; }

img, svg { max-width: 100%; }

h1, h2, h3, p { margin: 0; }

a { color: inherit; }

::selection {
  background: var(--lime);
  color: #142000;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--lime);
  color: #142000;
  padding: 8px 12px;
  z-index: 80;
  text-decoration: none;
}

.skip:focus { left: 16px; }

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 70;
  pointer-events: none;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
}

.spine {
  display: none;
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  background: rgba(16, 19, 15, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.logo img {
  display: block;
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 22px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover { color: var(--bone); }

.lang {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
}

.lang a { text-decoration: none; color: var(--muted); }

.lang a[aria-current="page"] { color: var(--lime); }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}

h1, h2, .question, .figure strong, .close h2, .missing h1 {
  font-family: Fraunces, "Iowan Old Style", Palatino, serif;
  font-weight: 560;
  letter-spacing: -0.035em;
}

h1 {
  margin-top: 14px;
  font-family: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  font-weight: 500;
  letter-spacing: -0.048em;
  font-size: clamp(3.3rem, 7.2vw, 6.4rem);
  line-height: 0.92;
}

h1 em {
  font-style: normal;
  font-weight: 500;
  color: var(--lime);
}

.close h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--lime);
}

.paper h2 em { color: var(--olive); }

h2 {
  margin-top: 12px;
  font-size: clamp(2.2rem, 4.6vw, 3.7rem);
  line-height: 1.02;
}

.lede {
  margin-top: 18px;
  max-width: 38ch;
  color: var(--muted);
  font-size: 1.12rem;
}

.hero { padding: 42px 0 72px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.4vw, 4.15rem);
  max-width: 12ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-primary { background: var(--lime); color: #142000; }

.btn-primary:hover { background: #eaf78a; }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--bone);
}

.btn-ghost:hover { border-color: rgba(244, 239, 230, 0.4); }

.bay {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(230px, 0.82fr);
  gap: 48px;
  align-items: center;
  min-height: 440px;
}

.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.wire { fill: none; }

.wire-track {
  stroke: rgba(244, 239, 230, 0.16);
  stroke-width: 1.25;
}

.wire-track.live { stroke: rgba(223, 242, 90, 0.55); }

.wire-packet {
  stroke: transparent;
  stroke-width: 2;
  stroke-linecap: round;
}

.wire-packet.live {
  stroke: var(--lime);
  stroke-dasharray: 5 13;
  animation: packet 0.9s linear infinite;
}

.bay-sources, .bay-core { position: relative; z-index: 1; }

.bay-sources { display: grid; gap: 12px; }

.jack, .bay-core, .card {
  background: var(--card);
  border: 1px solid var(--line);
}

.jack {
  position: relative;
  padding: 13px 22px 13px 14px;
  transition: border-color 0.35s ease, background 0.35s ease;
}

.jack.live {
  border-color: rgba(223, 242, 90, 0.7);
  background: #1c2216;
}

.jk, .jm, .tag, .story-count, .how .n, .chips li {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.jk {
  color: var(--lime);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jack h3 {
  margin-top: 4px;
  font-family: Outfit, sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.jm {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.jack-port, .bay-in {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(244, 239, 230, 0.5);
  background: var(--ink);
}

.jack-port {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
}

.jack.live .jack-port,
.bay.ready .bay-in, .bay-in {
  background: var(--lime);
  border-color: var(--lime);
}

.jack.live .jack-port { box-shadow: 0 0 0 4px rgba(223, 242, 90, 0.16); }

.bay-core { padding: 20px 18px 18px 22px; }

.bay-in {
  position: absolute;
  left: 0;
  top: 28px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 4px rgba(223, 242, 90, 0.16);
}

.bay-status {
  margin-top: 10px;
  font-size: 1.2rem;
  line-height: 1.25;
  min-height: 2.5em;
}

.bay-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.bay.ready .bay-answer {
  max-height: 320px;
  opacity: 1;
  margin-top: 12px;
  transition: opacity 0.45s ease, max-height 0.45s ease;
}

.bay-answer p { color: var(--bone); font-size: 0.98rem; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.chips li {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(223, 242, 90, 0.45);
  color: var(--lime);
  padding: 4px 7px;
}

.marquee {
  overflow: hidden;
  background: var(--lime);
  color: #142000;
  padding: 13px 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
}

.marquee span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

section { padding: 88px 0; }

.intro { max-width: 40rem; }

.section-copy { margin-top: 16px; max-width: 46rem; color: var(--muted); }

.split {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 36px;
}

.card { padding: 18px; min-height: 100%; }

.card h3 {
  margin: 10px 0 6px;
  font-family: Outfit, sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.card p { color: var(--muted); }

.tag {
  color: var(--coral);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bridge {
  margin-top: 28px;
  font-family: Fraunces, serif;
  font-style: italic;
  font-size: 1.35rem;
}

.story {
  height: 240vh;
  padding: 0;
  background: #0c0f0b;
}

.story-sticky {
  position: sticky;
  top: var(--nav);
  height: calc(100vh - var(--nav));
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 28px;
  align-items: center;
}

.question {
  margin-top: 16px;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2.05rem);
  line-height: 1.15;
}

.story-count {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
}

.steps {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.steps li {
  color: var(--muted);
  padding: 8px 0 8px 14px;
  border-left: 2px solid rgba(244, 239, 230, 0.16);
}

.steps li.on { color: var(--bone); border-left-color: rgba(223, 242, 90, 0.4); }

.steps li.current { color: var(--lime); border-left-color: var(--lime); }

.paper {
  background: var(--paper);
  color: var(--paper-ink);
}

.paper .kicker { color: var(--olive); }

.paper .section-copy, .paper .note, .paper .figure .label { color: #3e4432; }

.figures-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 36px;
}

.figure strong {
  display: block;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
}

.figure .label {
  display: block;
  margin-top: 10px;
  max-width: 18ch;
}

.note { margin-top: 22px; font-size: 0.92rem; }

.use-video {
  display: block;
  width: min(1100px, 100%);
  margin-top: 28px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #10130f;
}

.hub {
  position: relative;
  width: min(680px, 100%);
  aspect-ratio: 1;
  margin: 36px auto 0;
  container-type: inline-size;
}

.hub-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 680px;
  height: 680px;
  zoom: calc(100cqi / 680px);
}

.hub-scene {
  position: absolute;
  inset: 0;
  perspective: 520px;
  perspective-origin: 50% 48%;
}

.hub-yaw {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  transform: rotateX(8deg) rotateY(var(--yaw, 0deg));
}

@property --t {
  syntax: "<number>";
  inherits: false;
  initial-value: 1;
}

.hub-core,
.hub-node,
.hub-proto,
.hub-tip,
.hub-bit {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
}

.hub-core {
  left: 50%;
  top: 50%;
  width: 27%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) translateZ(0);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fbfce0 0%, #e7f48a 22%, #dff25a 48%, #c3d24b 76%, #9aaa34 100%);
  box-shadow:
    inset -10px -14px 18px rgba(72, 80, 18, 0.32),
    inset 7px 9px 14px rgba(255, 255, 255, 0.5),
    0 14px 34px rgba(0, 0, 0, 0.38);
  color: #142000;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-size: 1.35rem;
  text-align: center;
}

.hub-core::before,
.hub-core::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hub-core::before {
  inset: -34%;
  border: 1px solid transparent;
  border-top-color: rgba(223, 242, 90, 0.85);
  border-left-color: rgba(255, 106, 74, 0.45);
  animation: hub-spin 2.8s linear infinite;
}

.hub-core::after {
  inset: -6%;
  border: 1px solid rgba(223, 242, 90, 0.55);
  animation: hub-arrive 2.1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.hub-node,
.hub-proto,
.hub-tip {
  transform: translate(-50%, -50%) translate3d(var(--x), var(--y), var(--z));
}

.hub-node {
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 1.2rem;
  white-space: nowrap;
}

.hub-proto {
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  background: var(--ink);
  border: 1px solid rgba(223, 242, 90, 0.55);
  color: var(--lime);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
}

.hub-tip {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 11px solid var(--coral);
  transform: translate(-50%, -50%) translate3d(var(--x), var(--y), var(--z)) rotate(var(--aim));
}

.hub-bit {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f6f8c6;
  box-shadow: 0 0 12px 3px rgba(223, 242, 90, 0.9);
  transform: translate(-50%, -50%) translate3d(calc(var(--x) * var(--t)), calc(var(--y) * var(--t)), calc(var(--z) * var(--t)));
  animation: hub-in 1.25s linear infinite;
  animation-delay: var(--delay, 0s);
  pointer-events: none;
}

@keyframes hub-in {
  from { --t: 0.96; }
  to { --t: 0.32; }
}

@keyframes hub-spin {
  to { transform: rotate(360deg); }
}

@keyframes hub-arrive {
  0% { transform: scale(1.9); opacity: 0; }
  18% { opacity: 0.8; }
  100% { transform: scale(0.94); opacity: 0; }
}

.how {
  position: relative;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
}

.how::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: rgba(223, 242, 90, 0.5);
  transform-origin: top center;
}

.js .how::before { transform: scaleY(0); }

.js .how.in::before { transform: scaleY(1); transition: transform 1.1s ease; }

.how li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 16px 0;
}

.how .n { color: var(--lime); }

.how p { color: var(--muted); max-width: 46ch; }

.close { padding-bottom: 72px; }

.close h2 {
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  line-height: 0.96;
}

.close .lede { color: #3e4432; max-width: 36ch; }

.site-footer {
  padding-bottom: 28px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  padding-bottom: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer a { color: var(--bone); }

.missing {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 10vh 8vw;
}

.missing h1 {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.96;
  max-width: 12ch;
}

.missing p { color: var(--muted); }

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

@keyframes packet {
  to { stroke-dashoffset: -36; }
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

@media (min-width: 1100px) {
  .spine {
    display: grid;
    place-items: center;
    position: fixed;
    z-index: 45;
    left: 0;
    top: 0;
    bottom: 0;
    width: 46px;
    margin: 0;
    writing-mode: vertical-rl;
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
  }

  body { padding-left: 46px; }

  .nav, .progress { left: 46px; }

  .skip:focus { left: 60px; }
}

@media (max-width: 980px) {
  .hero-grid, .story-sticky, .bay, .split, .figures-grid {
    grid-template-columns: 1fr;
  }

  .bay { min-height: 0; gap: 22px; }

  .wires { display: none; }

  .jack.live { box-shadow: inset 3px 0 0 var(--lime); }

  .story {
    height: auto;
    padding: 72px 0;
  }

  .story-sticky {
    position: static;
    height: auto;
    display: grid;
  }
}

@media (max-width: 720px) {
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 0.82rem; }

  .logo img { height: 28px; }

  h1 { font-size: clamp(2.8rem, 14vw, 4rem); }

  .split, .figures-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal,
  .js .reveal.in,
  .bay-answer,
  .bay.ready .bay-answer {
    opacity: 1;
    transform: none;
    max-height: none;
    transition: none;
  }

  .wire-packet.live { animation: none; }

  .wire-packet.live { stroke-dasharray: none; }

  .hub-packet,
  .hub-trail,
  .hub-orbit,
  .hub-bit,
  .hub-core::before,
  .hub-core::after { animation: none; }

  .hub-yaw { transform: rotateX(8deg); }

  .js .how::before { transform: none; }
}
