/*
 * Fiddlehead — the site. One continuous sky from night to dawn to day and back to night;
 * each section is a moment of it, and one particle cloud (particle-scene.js) takes the
 * section's shape: the fiddlehead, noise, a path, a loss curve, attention heads, a frond.
 * Tokens follow the app's design system (frontend/src/ui.css).
 */
@font-face { font-family: "Geist"; src: url("fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;
  --sky-1: #dcece3;
  --sky-2: #ebf5ef;
  --sky-3: #f8f8f6;
  --dawn: #f1f6f2;
  --day: #f8f8f6;
  --ink: #111214;
  --ink-2: #4c525a;
  --ink-3: rgba(17, 18, 20, 0.3);
  --line: rgba(17, 18, 20, 0.1);
  --card: rgba(255, 255, 255, 0.76);
  --card-line: rgba(17, 18, 20, 0.08);
  --accent: #0b7e54;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 126, 84, 0.1);
  --warn: #b45309;
  --blue: #2563eb;
  --violet: #7c3aed;
  --shadow: 0 30px 80px -30px rgba(17, 34, 26, 0.35), 0 2px 8px rgba(17, 34, 26, 0.08);
  --night-1: #050b08;
  --night-2: #020403;
  --code-bg: #0c0e11;
  --font-display: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --page: 1180px;
  --gutter: clamp(18px, 4vw, 44px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark; --sky-1: #030605; --sky-2: #06110c; --sky-3: #0a1712; --dawn: #0a1410; --day: #0b0d0f;
    --ink: #ededef; --ink-2: #a3a8af; --ink-3: rgba(237, 237, 239, 0.28); --line: rgba(255, 255, 255, 0.08);
    --card: rgba(17, 19, 22, 0.72); --card-line: rgba(255, 255, 255, 0.07); --accent: #3dd68c; --accent-ink: #03140b;
    --accent-soft: rgba(61, 214, 140, 0.12); --warn: #f5a524; --blue: #60a5fa; --violet: #a78bfa;
    --shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark; --sky-1: #030605; --sky-2: #06110c; --sky-3: #0a1712; --dawn: #0a1410; --day: #0b0d0f;
  --ink: #ededef; --ink-2: #a3a8af; --ink-3: rgba(237, 237, 239, 0.28); --line: rgba(255, 255, 255, 0.08);
  --card: rgba(17, 19, 22, 0.72); --card-line: rgba(255, 255, 255, 0.07); --accent: #3dd68c; --accent-ink: #03140b;
  --accent-soft: rgba(61, 214, 140, 0.12); --warn: #f5a524; --blue: #60a5fa; --violet: #a78bfa;
  --shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
/* Night sections keep night colours in both themes */
.on-night {
  --ink: #eef3f0; --ink-2: rgba(238, 243, 240, 0.72); --ink-3: rgba(238, 243, 240, 0.26); --line: rgba(255, 255, 255, 0.1);
  --card: rgba(255, 255, 255, 0.045); --card-line: rgba(255, 255, 255, 0.08); --accent: #3dd68c; --accent-ink: #03140b;
  --accent-soft: rgba(61, 214, 140, 0.12); --warn: #f5a524;
  color: var(--ink); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--day); color: var(--ink); font: 400 1.0625rem/1.6 var(--font-body); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img, svg, canvas, video { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 1.1rem + 4.2vw, 4.4rem); font-weight: 600; letter-spacing: -0.045em; line-height: 0.98; }
h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.3rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.03; }
h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }
code { font-family: var(--font-mono); font-size: 0.88em; padding: 0.08em 0.36em; border-radius: 6px; background: var(--accent-soft); color: var(--ink); overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: calc(var(--page) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 0.74rem/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.lead { font-size: 1.18rem; line-height: 1.55; color: var(--ink-2); max-width: 34em; }
.section { --pad: clamp(88px, 11vw, 150px); padding-block: var(--pad); }
.section-head { display: grid; gap: 16px; justify-items: start; max-width: 720px; }
.stack { display: grid; gap: 22px; justify-items: start; align-content: start; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.stage { position: relative; min-height: clamp(340px, 38vw, 500px); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: none; }
.dot-warn { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.note { color: var(--ink-2); font-size: 0.97rem; }
.note > b { color: var(--ink); font-weight: 600; }

/* Cards: glass with a 1px inner light edge */
.card { position: relative; border-radius: 20px; background-color: var(--card); box-shadow: inset 0 0 0 1px var(--card-line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); padding: 24px; }
.card > h3 { margin-bottom: 8px; }
.card > p { color: var(--ink-2); font-size: 0.97rem; }

/* Buttons: a pill with a round knob holding the arrow */
.button { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 1.4rem; border-radius: 999px; font: 600 0.98rem/1 var(--font-body); text-decoration: none; white-space: nowrap; transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; }
.button-primary { padding-right: 6px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -12px var(--accent); }
.button-primary::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.34) 50%, transparent 68%); transform: translateX(-130%); animation: sheen 6s ease-in-out infinite; pointer-events: none; }
@keyframes sheen { 0%, 72% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.knob-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-ink); color: var(--accent); font-size: 1.1rem; transition: transform 0.3s ease; }
.button-primary:hover .knob-dot { transform: rotate(-45deg); }
.button-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); background-color: var(--card); }
.button-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.button:active { transform: translateY(1px); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header: a glass pill with the 3D mark */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; padding-block: 12px; }
.bar { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 7px 7px 7px 16px; border-radius: 999px; background: var(--card); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); box-shadow: inset 0 0 0 1px var(--card-line), 0 10px 30px -18px rgba(0, 0, 0, 0.5); }
.brand { display: inline-flex; align-items: center; gap: 11px; margin-right: auto; color: var(--ink); text-decoration: none; font: 600 1.18rem/1 var(--font-display); letter-spacing: -0.03em; }
.mark3d { width: 32px; height: 32px; perspective: 140px; }
.mark3d-body { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; animation: mark-turn 7s ease-in-out infinite; }
.m-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-layer:nth-child(1) { transform: translateZ(-5.2px); fill: #0c3b28; }
.m-layer:nth-child(2) { transform: translateZ(-3.9px); fill: #10523a; }
.m-layer:nth-child(3) { transform: translateZ(-2.6px); fill: #156a4b; }
.m-layer:nth-child(4) { transform: translateZ(-1.3px); fill: #1b845d; }
.m-top { fill: #3dd68c; }
.m-coil { fill: none; stroke: #03140b; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.brand:hover .mark3d-body { animation: mark-spin 1.2s ease; }
@keyframes mark-turn { 0%, 100% { transform: rotateY(-34deg) rotateX(10deg); } 50% { transform: rotateY(34deg) rotateX(-6deg); } }
@keyframes mark-spin { to { transform: rotateY(360deg); } }
.nav-links { display: flex; gap: 2px; margin: 0 6px 0 0; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 9px 13px; border-radius: 999px; color: var(--ink-2); font-size: 0.94rem; font-weight: 500; text-decoration: none; transition: color 0.2s ease, background-color 0.2s ease; }
.nav-links a:hover { color: var(--ink); background: var(--accent-soft); }
.theme-toggle { display: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.js .theme-toggle { display: grid; place-items: center; }
.theme-toggle:hover { color: var(--ink); background: var(--accent-soft); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-moon, .theme-toggle[data-mode="dark"] .i-sun { display: none; }
.theme-toggle[data-mode="dark"] .i-moon { display: block; }
.button-github { min-height: 44px; gap: 8px; padding: 0 16px 0 13px; color: var(--ink); background: var(--accent-soft); font-size: 0.93rem; }
.button-github svg { width: 18px; height: 18px; fill: currentColor; }
.button-github:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }

/* Skies */
/* The hero's sky darkens to night behind the (dark) launch video, so no text sits on a mid-tone. */
.hero { margin-top: -82px; padding: 140px 0 clamp(70px, 9vw, 120px); background: linear-gradient(180deg, var(--sky-1), var(--sky-2) 30%, var(--sky-3) 50%, color-mix(in srgb, var(--sky-3) 40%, var(--night-1)) 68%, var(--night-1) 86%); }
.sky-dawn { background: linear-gradient(180deg, var(--dawn), var(--day) 60%); }
.sky-day { background: var(--day); }
.night { background: linear-gradient(180deg, var(--night-1), var(--night-2)); }
.statement { background: linear-gradient(180deg, var(--night-1), var(--night-2)); }
/* Night to dawn: the next section's colour rises as a horizon, rimmed with fern-green light. */
.horizon { position: relative; height: clamp(180px, 22vw, 280px); overflow: hidden; background: var(--night-2); }
.horizon::after { content: ""; position: absolute; left: 50%; top: 58%; width: 170vw; height: 170vw; translate: -50% 0; border-radius: 50%; background: var(--dawn); box-shadow: 0 0 0 1.5px rgba(61, 214, 140, 0.75), 0 0 50px 14px rgba(61, 214, 140, 0.32), 0 0 160px 60px rgba(245, 194, 107, 0.14); }
.interlude { min-height: clamp(420px, 52vw, 640px); display: grid; align-content: end; padding-bottom: clamp(48px, 7vw, 90px); background: linear-gradient(180deg, var(--day), color-mix(in srgb, var(--day) 55%, #2f5b46) 34%, #12261c 62%, var(--night-1) 86%); }
.interlude-text { color: #eef3f0; font: 600 clamp(1.7rem, 1rem + 3vw, 3.4rem)/1.08 var(--font-display); letter-spacing: -0.04em; text-wrap: balance; max-width: 16em; }

/* Hero */
.hero-split { align-items: center; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
.hero-text { gap: 26px; }
.hero h1 { max-width: 12em; }
.accent-word { display: block; color: var(--accent); }
.ticks { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 4px 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 0.93rem; }
.ticks > li { display: inline-flex; align-items: center; gap: 8px; }
.ticks > li::before { content: ""; width: 14px; height: 14px; flex: none; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.hero-stage { min-height: clamp(380px, 42vw, 560px); }
.tag { position: absolute; display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 10px; background: rgba(6, 12, 9, 0.82); box-shadow: inset 0 0 0 1px rgba(61, 214, 140, 0.24); color: #d9f5e6; font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; animation: bob 7s ease-in-out infinite; z-index: 1; }
.tag-1 { top: 12%; left: 0; }
.tag-2 { top: 46%; right: 0; animation-delay: -2.3s; }
.tag-3 { bottom: 10%; left: 6%; animation-delay: -4.6s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* Product windows */
.window { position: relative; margin: 0; border-radius: 16px; background: var(--code-bg); box-shadow: var(--shadow); overflow: hidden; }
.window-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: #121418; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.window-bar > span { width: 11px; height: 11px; border-radius: 50%; background: #2a2d33; }
.window-bar > p { margin-left: 10px; color: #8b9097; font: 500 0.76rem/1 var(--font-mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window > video, .window > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0c0e11; }
.window > img { aspect-ratio: 1440 / 900; }
.window > figcaption { padding: 14px 18px; background: #0f1114; color: #a0a4ab; font-size: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.hero-window { margin-top: clamp(56px, 7vw, 96px); }
.sound { position: absolute; right: 16px; bottom: 64px; padding: 10px 16px; border: 0; border-radius: 999px; background: rgba(6, 12, 9, 0.82); box-shadow: inset 0 0 0 1px rgba(61, 214, 140, 0.35); color: #eef3f0; font: 600 0.88rem/1 var(--font-body); cursor: pointer; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sound:hover { background: rgba(10, 30, 20, 0.92); }

/* Statement */
.statement-text { margin-top: 22px; max-width: 26em; font: 600 clamp(1.7rem, 1rem + 2.6vw, 3.1rem)/1.16 var(--font-display); letter-spacing: -0.035em; color: var(--ink); }
.filling .word { color: var(--ink-3); transition: color 0.35s ease; }
.filling .word.on { color: var(--ink); }
.statement-note { margin-top: 30px; max-width: 34em; color: var(--ink-2); font-size: 1.08rem; }

/* How it works: a braided path through four stops, then the steps */
.track { position: relative; height: 120px; margin: clamp(40px, 6vw, 72px) 0 18px; }
.track > .anchor { top: 0; bottom: 0; }
.track-line { position: absolute; left: 12.5%; right: 12.5%; top: 50%; height: 2px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 40%, transparent)); border-radius: 2px; }
.track > span { position: absolute; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--day); box-shadow: inset 0 0 0 1px var(--accent), 0 0 24px -4px var(--accent); color: var(--accent); font: 600 0.82rem/1 var(--font-mono); }
.track > span:nth-of-type(1) { left: 12.5%; }
.track > span:nth-of-type(2) { left: 37.5%; }
.track > span:nth-of-type(3) { left: 62.5%; }
.track > span:nth-of-type(4) { left: 87.5%; }
.has-scene .track-line { opacity: 0; }
.has-scene .track > span { background: transparent; box-shadow: none; translate: -50% 30px; color: var(--ink-2); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }

/* Drawn stand-ins, shown only when the particle scene can't run */
.standin { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.has-scene .standin { display: none; }
.standin > svg { width: min(100%, 420px); height: auto; max-height: 100%; }
.standin-mark > svg { width: auto; height: 78%; }
.coil { fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.coil-heart { fill: var(--warn); }
.standin-curve .axis { fill: none; stroke: var(--line); stroke-width: 2; }
.standin-curve .marker { fill: none; stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 5 6; }
.standin-curve .loss { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; }
.standin-matrix .faint, .mini .faint { fill: color-mix(in srgb, var(--ink) 10%, transparent); }
.standin-matrix .hot { fill: var(--ink-2); }
.standin-matrix .hot-induction, .mini .hot-induction { fill: var(--accent); }
.standin-frond .leaves { fill: color-mix(in srgb, var(--accent) 70%, transparent); }
.standin-frond .stem, .standin-frond .curl { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }

/* The studio */
.studio-split { align-items: end; }
.curve-stage { min-height: clamp(240px, 26vw, 340px); }
.shot { margin-top: clamp(36px, 5vw, 64px); overflow: visible; }
.shot > img { border-radius: 0 0 16px 16px; }
.shot > .window-bar { border-radius: 16px 16px 0 0; }
.chip { position: absolute; display: grid; gap: 3px; padding: 12px 16px; border-radius: 14px; background: rgba(10, 14, 12, 0.86); box-shadow: inset 0 0 0 1px rgba(61, 214, 140, 0.28), 0 18px 40px -18px rgba(0, 0, 0, 0.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); animation: bob 7s ease-in-out infinite; }
.chip > b { color: #eef3f0; font: 600 0.98rem/1.1 var(--font-mono); }
.chip > span { color: #9fd8bb; font-size: 0.8rem; }
.chip-a { top: 14%; left: -3%; }
.chip-b { top: 60%; left: 24%; animation-delay: -2.4s; }
.chip-c { bottom: -4%; right: 4%; animation-delay: -4.8s; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; margin: clamp(48px, 6vw, 72px) 0 0; padding: 0; list-style: none; color: var(--ink-2); font-size: 0.97rem; }
.facts > li { padding-top: 16px; border-top: 1px solid var(--line); }
.facts > li > b { color: var(--ink); font-weight: 600; }

/* Attention circuitry */
.matrix-stage { min-height: clamp(380px, 42vw, 540px); }
.heads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; margin: 0; padding: 0; list-style: none; }
.head { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.head > svg { width: 58px; height: 58px; flex: none; }
.head h3 { font-size: 0.98rem; margin-bottom: 4px; }
.head p { color: var(--ink-2); font-size: 0.88rem; line-height: 1.45; }
.heads > li:nth-child(1) { --hc: var(--blue); }
.heads > li:nth-child(2) { --hc: var(--violet); }
.heads > li:nth-child(3) { --hc: var(--warn); }
.heads > li:nth-child(4) { --hc: var(--accent); }
.mini .hot { fill: var(--hc); }
.head h3::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--hc); vertical-align: 1px; }
@property --beam-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.head-induction::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--beam-angle), transparent 0 66%, color-mix(in srgb, var(--accent) 60%, #fff) 80%, var(--accent) 86%, transparent 93%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); animation: beam 6s linear infinite; pointer-events: none; }
@keyframes beam { to { --beam-angle: 360deg; } }

/* Serve it */
.frond-stage { min-height: clamp(380px, 42vw, 560px); }
.code { width: 100%; padding: 0; overflow: hidden; background-color: var(--code-bg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), var(--shadow); }
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 10px 18px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); color: #8b9097; font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.code-bar-sub { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; color: #e6e8eb; font: 400 0.86rem/1.65 var(--font-mono); }
.code pre > code { padding: 0; background: none; color: inherit; font-size: inherit; overflow-wrap: normal; }
.copy { padding: 6px 12px; border: 0; border-radius: 8px; background: rgba(61, 214, 140, 0.14); color: #9fe8c2; font: 600 0.74rem/1 var(--font-body); letter-spacing: 0.02em; text-transform: none; cursor: pointer; }
.copy:hover { background: rgba(61, 214, 140, 0.24); }

/* What you get: giant numbers on hairlines, then the kit */
.numbers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: clamp(40px, 6vw, 72px) 0 clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.numbers > div { display: grid; gap: 12px; align-content: start; padding: 28px 28px 32px 0; border-bottom: 1px solid var(--line); }
.numbers > div:nth-child(odd) { border-right: 1px solid var(--line); }
.numbers > div:nth-child(even) { padding-left: 28px; }
.numbers dt { font: 600 clamp(4.2rem, 2rem + 6vw, 7.6rem)/0.9 var(--font-display); letter-spacing: -0.06em; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.numbers dt > small { font-size: 0.42em; letter-spacing: -0.02em; color: var(--accent); margin-left: 4px; }
.numbers dd { margin: 0; max-width: 30em; color: var(--ink-2); }
.numbers dd > b { color: var(--ink); font-weight: 600; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }

/* Quickstart */
.start-stage { min-height: clamp(360px, 40vw, 520px); }

/* Questions */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq { display: grid; }
.faq > details { border-bottom: 1px solid var(--line); }
.faq > details:first-child { border-top: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.06rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font: 400 1.4rem/1 var(--font-mono); transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > p { padding: 0 0 22px; color: var(--ink-2); max-width: 40em; }

/* Footer: a giant wordmark that lights up under the pointer */
.site-footer { position: relative; overflow: hidden; padding: 56px 0 0; background: var(--night-2); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.footer-brand { color: var(--ink-2); font-size: 0.9rem; max-width: 40em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-size: 0.94rem; }
.footer-links a:hover { color: var(--accent); }
.footer-mark { position: relative; z-index: 1; margin: 0; padding: 18px 0 0; text-align: center; font: 600 clamp(4.6rem, 0.6rem + 18vw, 17rem)/0.8 var(--font-display); letter-spacing: -0.07em; color: rgba(238, 243, 240, 0.08); -webkit-text-fill-color: transparent; -webkit-text-stroke: 1px rgba(238, 243, 240, 0.12); background-image: radial-gradient(440px circle at var(--fx, 50%) var(--fy, 70%), #3dd68c, transparent 58%); -webkit-background-clip: text; background-clip: text; user-select: none; }

/* Pointer light on cards (site.js drives --sx/--sy) */
.spot { background-image: radial-gradient(340px circle at var(--sx, 50%) var(--sy, -40%), var(--spot-light, transparent), transparent 62%); }
.spot:hover { --spot-light: color-mix(in srgb, var(--accent) 10%, transparent); }

/* Stacking: section skies under the particles, content over them. Keep these. */
.hero, .section, .interlude, .site-footer { position: relative; }
.wrap { position: relative; z-index: 1; }
.anchor { position: absolute; pointer-events: none; }
.scene-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.scene-layer canvas { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; opacity: 0; transition: opacity 1s ease; }
.has-scene .scene-layer canvas { opacity: 1; }

/* Narrower windows */
@media (max-width: 1080px) {
  .steps, .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; }
}
@media (max-width: 900px) {
  .split, .faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 120px; }
  .hero-stage { min-height: 360px; order: -1; margin-bottom: -12px; }
  .circuits-split .matrix-stage { min-height: 340px; }
  .api-split .frond-stage, .start-stage { min-height: 320px; }
  .curve-stage { min-height: 220px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .shot { display: grid; }
  .shot > .chip { position: static; animation: none; margin: 10px 12px 0; justify-self: start; }
  .shot > .chip-c { margin-bottom: 12px; }
}
@media (max-width: 640px) {
  .steps, .features, .heads { grid-template-columns: minmax(0, 1fr); }
  .numbers { grid-template-columns: minmax(0, 1fr); }
  .numbers > div:nth-child(odd) { border-right: 0; }
  .numbers > div:nth-child(even) { padding-left: 0; }
  .button-github > span { display: none; }
  .button-github { padding: 0 13px; }
  .brand { font-size: 1.08rem; }
  .tag { font-size: 0.66rem; padding: 8px 11px; }
  .tag-2 { top: 40%; }
  .track { height: 96px; }
  .sound { bottom: auto; top: 50px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
