:root {
  color-scheme: dark;
  --bg: #081116;
  --bg-soft: #0d1820;
  --panel: #0d171f;
  --panel-2: #121f29;
  --line: rgba(196, 230, 224, 0.12);
  --line-strong: rgba(196, 230, 224, 0.22);
  --text: #e5f0eb;
  --muted: #94a9a3;
  --signal: #33d17a;
  --signal-rgb: 51, 209, 122;
  --signal-text: #33d17a;
  --ice: #79d7ff;
  --amber: #f8bf5d;
  --content: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --heading: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --body: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", "Cascadia Code", "Fira Code", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 8%, rgba(var(--signal-rgb), .11), transparent 27rem),
    var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.project-birdnest { --signal: #f08a4b; --signal-rgb: 240, 138, 75; --signal-text: #f08a4b; }
body.project-birdlg { --signal: #55bce8; --signal-rgb: 85, 188, 232; --signal-text: #55bce8; }
body.project-nosignal { --signal: #43df9b; --signal-rgb: 67, 223, 155; --signal-text: #43df9b; }

a { color: var(--ice); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--signal); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ice); outline-offset: 3px; }
img { display: block; max-width: 100%; }
.shell { width: min(var(--content), calc(100% - 2rem)); margin: 0 auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 17, 22, .92);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  backdrop-filter: saturate(150%) blur(12px);
}
.topbar-inner {
  width: min(1280px, calc(100% - 2rem));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.brand { display: flex; align-items: center; gap: .8rem; color: var(--text); }
.brand img { width: 40px; height: 40px; }
.brand strong { display: block; font-size: 1.02rem; letter-spacing: -.02em; }
.brand span { display: block; color: var(--muted); font-size: .78rem; }
.nav { display: flex; align-items: center; gap: 1.2rem; margin-left: auto; font-size: .9rem; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); }
.controls { display: flex; align-items: center; gap: .55rem; }
.lang-switch { display: flex; align-items: center; gap: .45rem; padding: .3rem .62rem; border: 1px solid var(--line-strong); border-radius: 7px; font: .75rem var(--mono); letter-spacing: .08em; }
.lang-link { color: var(--muted); }
.lang-link.active { color: var(--signal-text); font-weight: 700; }
.lang-sep { color: var(--line-strong); }
.theme-toggle, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.theme-toggle { width: 34px; height: 34px; border-radius: 8px; }
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--signal); color: var(--signal); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .moon { display: none; }
.menu-toggle { display: none; width: 36px; height: 34px; border-radius: 8px; }
.menu-toggle svg { width: 20px; height: 20px; }

main { padding-bottom: 4rem; }
.breadcrumb { padding-top: 2rem; color: var(--muted); font: .76rem var(--mono); letter-spacing: .06em; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { margin: 0 .5rem; color: var(--line-strong); }

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(3.5rem, 8vw, 7rem) 0 4.5rem;
}
.eyebrow, .section-kicker {
  margin: 0 0 1rem;
  color: var(--signal-text);
  font: .75rem var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
}
.project-hero h1 {
  margin: 0 0 1.25rem;
  font: 700 clamp(2.7rem, 5vw, 4.3rem)/1 var(--heading);
  letter-spacing: -.045em;
}
.project-hero .lead { margin: 0; max-width: 58ch; color: #c7d7d1; font-size: clamp(1.04rem, 1.7vw, 1.22rem); line-height: 1.6; }
.tag-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.tag { padding: .33rem .62rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.02); font: .72rem var(--mono); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1.15rem; border: 1px solid transparent; border-radius: 9px; font-weight: 700; }
.button-primary { background: var(--signal); color: #06110c; }
.button-primary:hover { color: #06110c; filter: brightness(1.08); }
.button-secondary { border-color: var(--line-strong); background: rgba(255,255,255,.025); color: var(--text); }
.button-secondary:hover { border-color: var(--signal); color: var(--text); }

.visual-wrap { position: relative; }
.visual-wrap::before { content: ""; position: absolute; inset: -8% 8% 10%; z-index: -1; background: rgba(var(--signal-rgb), .16); filter: blur(50px); border-radius: 50%; }
.product-visual { overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #f5f7f9; box-shadow: 0 28px 70px rgba(0,0,0,.42); }
.visual-link { display: block; background: #f5f7f9; }
.product-visual img { display: block; width: 100%; height: auto; }
.visual-caption { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-top: 1px solid var(--line); background: var(--panel); color: var(--muted); font: .68rem var(--mono); }
.visual-caption strong { color: var(--signal-text); font-weight: 600; }

.proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.proof-item { min-width: 0; padding: 1.35rem 1.5rem; border-right: 1px solid var(--line); }
.proof-item:first-child { padding-left: 0; }
.proof-item:last-child { border-right: 0; }
.proof-item strong { display: block; margin-bottom: .25rem; color: var(--text); font: 700 1rem var(--heading); }
.proof-item span { color: var(--muted); font-size: .84rem; }

.content-section { padding: clamp(4rem, 8vw, 7rem) 0; border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: .7fr 1.3fr; gap: 3rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; font: 700 clamp(2rem, 4vw, 3.25rem)/1.08 var(--heading); letter-spacing: -.03em; }
.section-head p { margin: 0; color: #c7d7d1; font-size: 1.05rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.feature-card { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: linear-gradient(145deg, rgba(255,255,255,.028), transparent); }
.feature-card .num { display: block; margin-bottom: 1.25rem; color: var(--signal-text); font: .7rem var(--mono); letter-spacing: .13em; }
.feature-card h3 { margin: 0 0 .55rem; font: 700 1.14rem var(--heading); }
.feature-card p { margin: 0; color: var(--muted); font-size: .91rem; line-height: 1.58; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.story-card { padding: clamp(1.5rem, 4vw, 2.3rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.story-card h2, .story-card h3 { margin: 0 0 .8rem; font-family: var(--heading); }
.story-card h2 { font-size: 1.8rem; }
.story-card h3 { font-size: 1.35rem; }
.story-card p { color: #c7d7d1; }
.story-card ul { margin: 1rem 0 0; padding: 0; list-style: none; color: var(--muted); }
.story-card li { position: relative; padding: .35rem 0 .35rem 1.1rem; }
.story-card li::before { content: ""; position: absolute; left: 0; top: .95rem; width: .36rem; height: .36rem; border-radius: 50%; background: var(--signal); }

.system-map { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.8rem; align-items: stretch; margin-top: 2rem; }
.system-node { position: relative; padding: 1.25rem; border: 1px solid rgba(var(--signal-rgb), .35); border-radius: var(--radius-sm); background: rgba(var(--signal-rgb), .06); }
.system-node:not(:last-child)::after { content: "→"; position: absolute; right: -1.35rem; top: 50%; transform: translateY(-50%); color: var(--signal); font: 1.2rem var(--mono); }
.system-node strong { display: block; margin-bottom: .3rem; font-size: .96rem; }
.system-node span { color: var(--muted); font-size: .82rem; }

.outcomes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.outcome { padding: 1.6rem; border-top: 2px solid var(--signal); background: rgba(var(--signal-rgb), .055); }
.outcome strong { display: block; margin-bottom: .45rem; font: 700 1.2rem var(--heading); }
.outcome span { color: var(--muted); font-size: .9rem; }

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.related-card { display: block; min-height: 190px; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); }
.related-card:hover { border-color: var(--signal); color: var(--text); transform: translateY(-2px); }
.related-card small { color: var(--signal-text); font: .68rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }

.availability {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .55rem 1rem;
  margin-top: 1.15rem;
  padding: .85rem 1rem;
  border-left: 2px solid var(--signal);
  background: rgba(var(--signal-rgb), .055);
  color: var(--muted);
  font-size: .82rem;
}
.availability strong { color: var(--text); font-family: var(--heading); font-size: .98rem; }
.related-card h3 { margin: 1.4rem 0 .45rem; font: 700 1.35rem var(--heading); }
.related-card p { margin: 0; color: var(--muted); font-size: .88rem; }

.cta { margin: 5rem 0 1rem; padding: clamp(2rem, 5vw, 3.5rem); border: 1px solid rgba(var(--signal-rgb), .35); border-radius: var(--radius); background: linear-gradient(120deg, rgba(var(--signal-rgb), .13), rgba(var(--signal-rgb), .025)); }
.cta h2 { max-width: 18ch; margin: 0 0 .9rem; font: 700 clamp(2rem, 4vw, 3.2rem)/1.05 var(--heading); letter-spacing: -.03em; }
.cta p { max-width: 60ch; margin: 0; color: #c7d7d1; }

footer { padding: 2.5rem 0 3rem; color: var(--muted); font-size: .82rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { color: var(--muted); }

.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 100; max-width: 840px; margin: auto; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(13,23,31,.97); box-shadow: 0 18px 55px rgba(0,0,0,.45); }
.cookie-banner[hidden] { display: none; }
.cookie-inner { display: flex; align-items: center; gap: 1.2rem; padding: 1rem 1.2rem; }
.cookie-copy { flex: 1; }
.cookie-copy strong { display: block; margin-bottom: .15rem; }
.cookie-copy p { margin: 0; color: var(--muted); font-size: .82rem; }
.cookie-actions { display: flex; gap: .5rem; }
.cookie-actions button { min-height: 38px; padding: 0 .9rem; border: 1px solid var(--line-strong); border-radius: 7px; background: transparent; color: var(--text); font-weight: 700; cursor: pointer; }
.cookie-actions .accept { border-color: var(--signal); background: var(--signal); color: #06110c; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8fa;
  --bg-soft: #edf1f3;
  --panel: #fff;
  --panel-2: #f6f8fa;
  --line: rgba(15,27,36,.09);
  --line-strong: rgba(15,27,36,.2);
  --text: #0d1b24;
  --muted: #56656e;
  --ice: #0e6fa8;
}
:root[data-theme="light"] body { background: radial-gradient(circle at 82% 8%, rgba(var(--signal-rgb), .09), transparent 27rem), var(--bg); }
:root[data-theme="light"] .topbar { background: rgba(255,255,255,.92); }
:root[data-theme="light"] .project-hero .lead,
:root[data-theme="light"] .section-head p,
:root[data-theme="light"] .story-card p,
:root[data-theme="light"] .cta p { color: #1f2c35; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
:root[data-theme="light"] body.project-rerouter { --signal-text: #08743a; }
:root[data-theme="light"] body.project-birdnest { --signal-text: #9a3f0c; }
:root[data-theme="light"] body.project-birdlg { --signal-text: #09658f; }
:root[data-theme="light"] body.project-nosignal { --signal-text: #087247; }
:root[data-theme="light"] .button-primary { color: #06110c; }
:root[data-theme="light"] .cookie-banner { background: rgba(255,255,255,.98); box-shadow: 0 18px 55px rgba(15,27,36,.16); }
:root[data-theme="light"] .cookie-actions .accept { color: #fff; }

@media (max-width: 900px) {
  .project-hero { grid-template-columns: 1fr; }
  .visual-wrap { max-width: 760px; }
  .proof-strip { grid-template-columns: 1fr 1fr; }
  .proof-item:nth-child(2) { border-right: 0; }
  .proof-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .proof-item:first-child { padding-left: 1.5rem; }
  .feature-grid, .outcomes, .related-grid { grid-template-columns: 1fr 1fr; }
  .system-map { grid-template-columns: 1fr 1fr; }
  .system-node:nth-child(2)::after { display: none; }
}

@media (max-width: 720px) {
  .topbar { top: .55rem; margin: 0 .6rem; border: 1px solid var(--line); border-radius: 12px; }
  .topbar-inner { min-height: 56px; position: relative; }
  .brand img { width: 34px; height: 34px; }
  .brand span { display: none; }
  .nav { display: none; position: absolute; top: calc(100% + .5rem); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: .1rem; padding: .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 14px 35px rgba(0,0,0,.3); }
  .nav.open { display: flex; }
  .nav a { padding: .65rem .75rem; }
  .controls { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .section-head, .split { grid-template-columns: 1fr; gap: 1rem; }
  .feature-grid, .outcomes, .related-grid, .system-map { grid-template-columns: 1fr; }
  .system-node:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -1.55rem; transform: translateX(-50%); }
  .system-node:nth-child(2)::after { display: block; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions { justify-content: flex-end; }
}

@media (max-width: 480px) {
  .shell { width: min(100% - 1.25rem, var(--content)); }
  .topbar-inner { width: calc(100% - 1rem); }
  .brand strong { font-size: .92rem; }
  .project-hero { padding-top: 2.8rem; }
  .project-hero h1 { font-size: 2.6rem; }
  .proof-strip { grid-template-columns: 1fr; }
  .proof-item, .proof-item:first-child { padding: 1rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .proof-item:last-child { border-bottom: 0; }
  .visual-caption { flex-direction: column; gap: .2rem; }
}

@media (max-width: 360px) {
  .brand strong { display: none; }
  .brand { gap: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
