/* SaberLab website.
   Visual language: a measuring instrument. Thin rules, corner ticks, monospace
   read-outs; red and blue mean left and right hand, exactly as in the game, and amber
   means points lost. Nothing glows unless it carries a value. */
@font-face {
  font-family: "Beon";
  src: url("fonts/Beon-Regular.otf") format("opentype");
  font-display: swap;
}

:root {
  --bg: #06080d;
  --panel: rgba(12, 17, 27, 0.72);
  --panel-solid: #0c111b;
  --line: rgba(160, 190, 255, 0.10);
  --line-strong: rgba(160, 190, 255, 0.20);
  --text: #eef2f8;
  --text-2: #aeb8c8;
  --muted: #8490a4;
  --blue: #3d9bff;
  --blue-hi: #8cc4ff;
  --red: #ff3d5a;
  --red-hi: #ff8ea0;
  --amber: #f5b942;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-gap: clamp(72px, 11vw, 150px);
  --radius: 4px;
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "PingFang SC",
          "Microsoft YaHei", "Hiragino Sans", sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono",
          "Microsoft YaHei", monospace;
  --display: "Beon", var(--font);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue-hi); text-underline-offset: 3px; }
a:hover { color: #b9dbff; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); }
.note { color: var(--muted); font-size: 0.85rem; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; top: 8px; }
.skip-link:focus { left: 8px; z-index: 30; padding: 8px 12px; background: var(--panel-solid);
                   color: var(--text); border-radius: var(--radius); }
/* ---- wordmark (Beon), shared by header and download panel ---- */
.brand-saber, .brand-lab { font-family: var(--display); letter-spacing: 0.04em; }
/* SABER red, LAB blue: same as the app header and the icon's two halves */
.brand-saber { color: #ffe1e6; text-shadow: 0 0 6px rgba(255, 61, 90, 0.9), 0 0 18px rgba(255, 61, 90, 0.45); }
.brand-lab { color: #d9ecff; text-shadow: 0 0 6px rgba(61, 155, 255, 0.9), 0 0 18px rgba(61, 155, 255, 0.45); }
.brand-icon { display: block; flex: none; }

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(6, 8, 13, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.45rem; line-height: 1;
         text-decoration: none; margin-right: auto; padding: 6px 0; }
.brand .brand-icon { width: 30px; height: 30px; }
.site-nav, .lang-switch { display: flex; align-items: center; gap: 4px; font-size: 0.9rem; }
.site-nav a, .lang-switch a {
  color: var(--text-2); text-decoration: none; padding: 6px 10px; border-radius: var(--radius);
}
.site-nav a:hover, .lang-switch a:hover { color: var(--text); background: rgba(160, 190, 255, 0.07); }
.lang-switch { border-left: 1px solid var(--line-strong); padding-left: 12px; }
.lang-switch [aria-current] { color: var(--text); box-shadow: inset 0 -1px 0 var(--blue); }
main[id] { scroll-margin-top: 76px; }
.section[id] { scroll-margin-top: calc(84px - var(--section-gap)); }   /* land on the heading, not the gap */

/* ---- buttons ---- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.button {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--text); background: rgba(160, 190, 255, 0.05);
  font-weight: 600; text-decoration: none;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.button:hover { color: var(--text); border-color: rgba(140, 196, 255, 0.5); background: rgba(160, 190, 255, 0.09); }
.button.primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, #1f6fd6, #1553a8);
  box-shadow: 0 0 0 1px rgba(140, 196, 255, 0.35) inset, 0 10px 30px -12px rgba(61, 155, 255, 0.8);
}
.button.primary:hover { background: linear-gradient(135deg, #2a7de8, #1a60bf);
  box-shadow: 0 0 0 1px rgba(140, 196, 255, 0.55) inset, 0 12px 34px -10px rgba(61, 155, 255, 0.95); }

/* ---- panels: thin frame with instrument corner ticks ---- */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.panel::before {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  --tick: rgba(140, 196, 255, 0.55);
  background:
    linear-gradient(var(--tick), var(--tick)) top left / 12px 1px,
    linear-gradient(var(--tick), var(--tick)) top left / 1px 12px,
    linear-gradient(var(--tick), var(--tick)) top right / 12px 1px,
    linear-gradient(var(--tick), var(--tick)) top right / 1px 12px,
    linear-gradient(var(--tick), var(--tick)) bottom left / 12px 1px,
    linear-gradient(var(--tick), var(--tick)) bottom left / 1px 12px,
    linear-gradient(var(--tick), var(--tick)) bottom right / 12px 1px,
    linear-gradient(var(--tick), var(--tick)) bottom right / 1px 12px;
  background-repeat: no-repeat;
}
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font: 600 0.78rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue-hi);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; box-shadow: 0 0 8px currentColor; }
/* ---- hero ---- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 9vw, 120px); }
.hero::before {
  /* floor grid fading into a blue glow: the intro's world, at rest */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 72% 38%, rgba(61, 155, 255, 0.13), transparent 70%),
    linear-gradient(rgba(140, 196, 255, 0.05) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(140, 196, 255, 0.05) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: radial-gradient(90% 80% at 60% 40%, #000 30%, transparent 85%);
  mask-image: radial-gradient(90% 80% at 60% 40%, #000 30%, transparent 85%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 6vw, 80px); align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.4rem); letter-spacing: -0.02em; margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 30%, #b8c9e6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--text); font-weight: 600; margin-bottom: 12px; }
.hero-body { color: var(--text-2); max-width: 36em; }

/* ---- readout: one illustrative cut ---- */
.readout { padding: 22px 22px 18px; box-shadow: 0 30px 80px -40px rgba(61, 155, 255, 0.45); }
.readout-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; }
.readout-head > * { white-space: nowrap; }   /* narrow screens wrap the row, not the words */
.readout-title { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); margin: 0; }
.readout-tag, .readout-replay {
  font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 99px; padding: 1px 8px;
}
/* a real control, not a tag: larger and in the accent colour */
.readout-replay { margin-left: auto; background: none; cursor: pointer; font-family: var(--mono);
                  font-size: 0.8rem; padding: 5px 14px; color: var(--blue-hi);
                  border-color: rgba(61, 155, 255, 0.45); }
.readout-replay:hover { color: var(--text); border-color: rgba(140, 196, 255, 0.75);
                        background: rgba(61, 155, 255, 0.1); }
.readout-row {
  display: grid; grid-template-columns: 5.2em minmax(0, 1fr) auto; align-items: baseline;
  column-gap: 12px; row-gap: 6px; padding: 12px 0; border-top: 1px solid var(--line);
  transition: opacity 0.4s;
}
.rr-name { font-weight: 700; color: var(--text); }
.rr-sub { color: var(--muted); font-size: 0.85rem; }
.rr-measure { justify-self: end; color: var(--blue-hi); font-size: 1.02rem; }
.rr-meter {
  grid-column: 1 / 3; height: 4px; align-self: center; border-radius: 2px;
  background: rgba(160, 190, 255, 0.1); overflow: hidden;
}
.rr-meter i {
  display: block; height: 100%; width: calc(var(--fill) * 100%); border-radius: inherit;
  background: linear-gradient(90deg, #1f6fd6, var(--blue-hi));
  box-shadow: 0 0 10px rgba(61, 155, 255, 0.8);
  transform-origin: left; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rr-points { justify-self: end; color: var(--muted); font-size: 0.9rem; }
.rr-points b { color: var(--text); font-size: 1.12rem; }
.readout-total {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px;
  padding: 14px 0 6px; border-top: 1px solid var(--line-strong);
}
.rt-label { color: var(--text-2); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.rt-value { margin-left: auto; font-family: var(--display); font-size: 2.6rem; line-height: 1; }
.rt-value b { font-weight: 400; color: #eaf4ff; text-shadow: 0 0 10px rgba(61, 155, 255, 0.85), 0 0 26px rgba(61, 155, 255, 0.4); }
.rt-max { font-size: 0.95rem; color: var(--muted); margin-left: 4px; }
.rt-lost { flex-basis: 100%; text-align: right; color: var(--amber); font-size: 0.85rem; transition: opacity 0.4s; }
.readout-formula { margin: 10px 0 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }

/* While the intro measures the cut, the readout fills in row by row
   (intro.js sets is-live on each row, then is-total). */
html.intro .readout-row:not(.is-live) { opacity: 0.18; }
html.intro .readout-row:not(.is-live) .rr-meter i { transform: scaleX(0); }
html.intro .readout:not(.is-total) .rt-lost { opacity: 0; }
html.intro .readout-row.is-live .rr-measure { text-shadow: 0 0 12px rgba(61, 155, 255, 0.9); }
/* ---- intro: full-screen WebGL stage; the readout floats above it ---- */
.intro-stage { display: none; }
html.intro .intro-stage {
  display: block; position: fixed; inset: 0; z-index: 40; background: var(--bg);
  transition: opacity 0.9s ease;
}
html.intro .intro-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* no scrollbar while the stage is up; its return at landing is absorbed by the readout's FLIP */
html.intro:not(.intro-landing) { overflow: hidden; }
html.intro .readout {
  position: relative; z-index: 45;
  background: rgba(8, 12, 20, 0.62);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
html.intro .site-header, html.intro .hero::before, html.intro .hero-copy,
html.intro .section, html.intro .site-footer { opacity: 0; }
/* the page arrives while the stage fades; the readout slides into its place */
html.intro-landing .site-header, html.intro-landing .hero::before, html.intro-landing .hero-copy,
html.intro-landing .section, html.intro-landing .site-footer {
  opacity: 1; transition: opacity 0.8s ease 0.25s;
}
html.intro-landing .hero-copy { transition-delay: 0.35s; }
/* skipped: the same hand-over, shortened */
html.intro-quick .intro-stage { transition-duration: 0.35s; }
html.intro-quick.intro-landing .site-header, html.intro-quick.intro-landing .hero::before,
html.intro-quick.intro-landing .hero-copy, html.intro-quick.intro-landing .section,
html.intro-quick.intro-landing .site-footer { transition-duration: 0.35s; transition-delay: 0s; }
html.intro-landing .intro-stage { opacity: 0; pointer-events: none; }
.intro-skip {
  position: fixed; top: 16px; right: 16px; z-index: 50;
  padding: 8px 14px; border-radius: var(--radius); cursor: pointer;
  font: 600 0.8rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-2); background: rgba(8, 12, 20, 0.6); border: 1px solid var(--line-strong);
}
.intro-skip:hover { color: var(--text); border-color: rgba(140, 196, 255, 0.5); }
html.intro-landing .intro-skip { opacity: 0; pointer-events: none; transition: opacity 0.3s; }

/* ---- sections ---- */
.section { padding: var(--section-gap) 0 0; }
.section h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: -0.01em; max-width: 22em; }
.section-lead { color: var(--text-2); font-size: 1.05rem; max-width: 46em; }
.site-footer { margin-top: var(--section-gap); border-top: 1px solid var(--line); padding: 36px 0 48px; }
.footer-inner { color: var(--muted); font-size: 0.88rem; }
.footer-inner p { margin-bottom: 0.6em; max-width: 60em; }
.footer-inner a { color: var(--text-2); }
/* ---- 01 · a real run ---- */
.run-meta { color: var(--text-2); font-size: 0.85rem; margin: 18px 0 26px; }
.run-meta b { color: var(--text); }
.run-stats { display: flex; flex-wrap: wrap; margin: 0 0 22px; border-top: 1px solid var(--line); }
.run-stats > div { flex: 1 1 130px; padding: 14px 18px 12px 0; border-bottom: 1px solid var(--line); }
.run-stats > div:last-child { flex: 2 1 250px; }
.run-stats dt { color: var(--muted); font: 0.75rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.run-stats dd { margin: 4px 0 0; font: 600 1.3rem/1.2 var(--mono); color: var(--text); white-space: nowrap; }
.run-stats small { color: var(--muted); font-size: 0.8rem; font-weight: 400; margin-left: 2px; }

.run-chart { margin: 0; padding: 18px 18px 14px; }
.run-plot { position: relative; height: clamp(300px, 34vw, 400px); margin-bottom: 26px; }
.run-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.run-svg path, .run-svg use { fill: none; }
.run-weak { fill: rgba(245, 185, 66, 0.07); stroke: rgba(245, 185, 66, 0.35); stroke-width: 1;
            stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.run-grid { stroke: rgba(160, 190, 255, 0.09); stroke-width: 1; vector-effect: non-scaling-stroke; }
.run-final { stroke: rgba(140, 196, 255, 0.35); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.run-miss { stroke: rgba(255, 61, 90, 0.55); stroke-width: 1; vector-effect: non-scaling-stroke; }
.run-bad { stroke: rgba(245, 185, 66, 0.5); stroke-width: 1; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.run-tick { stroke-width: 1.25; opacity: 0.55; vector-effect: non-scaling-stroke; }
.run-tick.run-l { stroke: var(--red); }
.run-tick.run-r { stroke: var(--blue); }
.run-avg { stroke-width: 2; }
.run-avg.run-l { stroke: var(--red-hi); }
.run-avg.run-r { stroke: var(--blue-hi); }
.run-avg-glow { stroke-width: 7; opacity: 0.28; }
.run-avg-glow.run-l { stroke: var(--red); }
.run-avg-glow.run-r { stroke: var(--blue); }
.run-acc { stroke: #f2f6ff; stroke-width: 1.75; }
.run-acc-glow { stroke: var(--blue); stroke-width: 6; opacity: 0.3; }

.run-y, .run-x, .run-lane, .run-weak-tag {
  position: absolute; font: 0.7rem/1.3 var(--mono); color: var(--muted); white-space: nowrap; pointer-events: none;
}
.run-y { right: 4px; transform: translateY(-50%); padding: 0 4px; background: rgba(12, 17, 27, 0.75); border-radius: 2px; }
.run-y-final { right: auto; left: 4px; color: var(--blue-hi); }
.run-x { top: calc(100% + 6px); transform: translateX(-50%); }
.run-lane { left: 4px; top: 2px; color: var(--text-2); letter-spacing: 0.08em; text-transform: uppercase; }
.run-lane-acc { top: calc(var(--acc-top) - 1.6em); }
.run-weak-tag { top: -1.6em; transform: translateX(-50%); color: var(--amber); }
.run-cursor {
  position: absolute; top: 0; bottom: 0; width: 1px; pointer-events: none;
  background: rgba(238, 242, 248, 0.6); box-shadow: 0 0 8px rgba(140, 196, 255, 0.8);
}
.run-tip {
  position: absolute; top: 8px; z-index: 2; pointer-events: none; min-width: 11em;
  padding: 8px 10px; font-size: 0.75rem; line-height: 1.5;
  background: rgba(8, 12, 20, 0.92); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}
.run-tip .tip-head { color: var(--muted); }
.run-tip .tip-hand-l { color: var(--red-hi); }
.run-tip .tip-hand-r { color: var(--blue-hi); }
.run-tip .tip-total { font-size: 1.05rem; color: var(--text); font-weight: 700; }
.run-tip .tip-parts { color: var(--text-2); }
.run-tip .tip-miss { color: var(--red-hi); font-weight: 700; }
.run-tip .tip-bad { color: var(--amber); font-weight: 700; }
.run-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.75rem; color: var(--text-2); }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.lg::before { content: ""; width: 16px; height: 2px; border-radius: 1px; }
/* hands are drawn as tick clouds, the averages as one bright line per hand */
.lg-r::before { height: 9px; background: repeating-linear-gradient(90deg, var(--blue) 0 1px, transparent 1px 4px); }
.lg-l::before { height: 9px; background: repeating-linear-gradient(90deg, var(--red) 0 1px, transparent 1px 4px); }
.lg-avg::before { background: linear-gradient(90deg, var(--red-hi) 50%, var(--blue-hi) 50%); box-shadow: 0 0 6px rgba(140, 196, 255, 0.7); }
.lg-acc::before { background: #f2f6ff; }
.lg-miss::before { width: 2px; height: 12px; background: var(--red); }
.lg-weak { color: var(--amber); }
.lg-weak::before { width: 12px; height: 12px; background: rgba(245, 185, 66, 0.15); border: 1px dashed rgba(245, 185, 66, 0.6); }
/* ---- 02 · note grid ---- */
.grid-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.swatch-weak { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: -1px;
               border: 1px solid var(--amber); border-radius: 2px; }
.tile-figure { margin: 0; padding: 18px; display: grid; gap: 10px; }
.tile-axis { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile {
  --heat: 0;
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--radius); border: 1px solid rgba(140, 196, 255, calc(0.12 + var(--heat) * 0.4));
  background: rgba(61, 155, 255, calc(0.05 + var(--heat) * 0.3));
  box-shadow: 0 0 calc(var(--heat) * 26px) rgba(61, 155, 255, calc(var(--heat) * 0.35));
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: calc(var(--i, 0) * 45ms);
}
.tile b { font: 700 clamp(0.95rem, 2.2vw, 1.35rem)/1 var(--mono); color: var(--text); }
.tile small { font: 0.7rem/1 var(--mono); color: var(--muted); }
.tile-weak { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber) inset, 0 0 22px rgba(245, 185, 66, 0.3); }
.tile-weak b { color: #ffd98f; }
.tile-empty { border-style: dashed; background: none; box-shadow: none; }
.tile-empty b { color: var(--muted); font-weight: 400; }

/* ---- 03 · pipeline ---- */
.pipeline {
  list-style: none; margin: 40px 0 0; padding: 0; position: relative;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px;
}
.pipeline li { position: relative; }
/* the measured steps share one solid rail; the AI step hangs off it, dashed */
.pipeline li:not(:last-child)::after {
  content: ""; position: absolute; top: 15px; left: 0; right: -22px; height: 1px;
  background: var(--blue); box-shadow: 0 0 8px rgba(61, 155, 255, 0.7);
}
.pipeline li:nth-child(4)::after {
  background: repeating-linear-gradient(90deg, var(--red-hi) 0 4px, transparent 4px 8px); box-shadow: none;
}
.pipeline h3 { font-size: 1.1rem; margin: 18px 0 8px; }
.pipeline p { color: var(--text-2); font-size: 0.92rem; margin: 0; }
.pipe-i {
  position: relative; z-index: 1; display: inline-block; padding: 5px 9px; font-size: 0.75rem; color: var(--blue-hi);
  background: var(--bg); border: 1px solid rgba(61, 155, 255, 0.55); border-radius: var(--radius);
}
.pipe-ai .pipe-i { color: var(--red-hi); border-color: rgba(255, 61, 90, 0.55); }

/* ---- 04 · screenshots ---- */
.shot { margin: 32px 0 0; }
.shot img { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius);
            box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9), 0 0 60px -30px rgba(61, 155, 255, 0.35); }
.shot figcaption { margin-top: 10px; color: var(--muted); font-size: 0.88rem; }
.shot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.shot-grid .shot { margin-top: 24px; }
.screens-note, .section > .container > .note { margin-top: 20px; }

/* ---- 05 · features ---- */
.feature-grid {
  list-style: none; margin: 36px 0 0; padding: 0; counter-reset: feat;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.feature { padding: 24px 24px 26px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); counter-increment: feat; }
.feature::before { content: counter(feat, decimal-leading-zero); display: block; margin-bottom: 12px;
                   font: 0.72rem/1 var(--mono); color: var(--blue-hi); letter-spacing: 0.1em; }
.feature h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: 0.93rem; margin: 0; }

/* ---- download ---- */
.download { padding: clamp(28px, 5vw, 56px); text-align: center; overflow: hidden;
            background: radial-gradient(70% 90% at 50% 0%, rgba(61, 155, 255, 0.12), transparent 70%), var(--panel); }
.download-mark { font-size: clamp(2.2rem, 7vw, 4.2rem); line-height: 1; margin-bottom: 18px; }
.download-mark .brand-icon { width: clamp(72px, 12vw, 104px); height: auto; margin: 0 auto 16px; }
.download h2 { margin-inline: auto; }
.download > p { color: var(--text-2); max-width: 40em; margin-inline: auto; }
.download .cta-row { justify-content: center; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px auto 20px; max-width: 40em; text-align: left; }
.steps li { position: relative; counter-increment: step; padding: 10px 0 10px 44px; color: var(--text-2); border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 9px; width: 28px; height: 28px;
  display: grid; place-items: center; font: 700 0.8rem/1 var(--mono); color: var(--blue-hi);
  border: 1px solid rgba(61, 155, 255, 0.5); border-radius: 50%;
}

/* ---- 404 ---- */
.not-found { padding: 80px 0; text-align: center; }
.not-found-code { font: 400 clamp(4rem, 14vw, 8rem)/1 var(--display); margin-bottom: 16px; color: #e6f2ff;
                  text-shadow: 0 0 12px rgba(61, 155, 255, 0.9), 0 0 36px rgba(61, 155, 255, 0.45); }
.not-found-logo { width: min(320px, 70vw); margin: 0 auto 28px; }
.not-found-block { padding: 22px 0; border-top: 1px solid var(--line); max-width: 36em; margin: 0 auto; }
.not-found-block h2 { font-size: 1.3rem; }

/* ---- scroll reveals (site.js marks only what starts below the fold) ---- */
.run-chart.will-draw .run-svg { clip-path: inset(0 100% 0 0); }
.run-chart.is-drawn .run-svg { clip-path: inset(0 0 0 0); transition: clip-path 1.6s cubic-bezier(0.3, 0.1, 0.2, 1); }
.run-chart.will-draw .run-y, .run-chart.will-draw .run-x, .run-chart.will-draw .run-weak-tag { opacity: 0; }
.run-chart.is-drawn .run-y, .run-chart.is-drawn .run-x, .run-chart.is-drawn .run-weak-tag { opacity: 1; transition: opacity 0.6s ease 1.1s; }
.tile-figure.will-draw .tile { opacity: 0; transform: scale(0.85); }
.pipeline.will-draw li { opacity: 0; transform: translateY(12px); }
.pipeline.is-drawn li { transition: opacity 0.5s ease, transform 0.5s ease; }
.pipeline.is-drawn li:nth-child(2) { transition-delay: 0.15s; }
.pipeline.is-drawn li:nth-child(3) { transition-delay: 0.3s; }
.pipeline.is-drawn li:nth-child(4) { transition-delay: 0.45s; }
.pipeline.is-drawn li:nth-child(5) { transition-delay: 0.8s; }

/* ---- breakpoints ---- */
@media (max-width: 980px) {
  .hero-grid, .grid-layout { grid-template-columns: minmax(0, 1fr); }
  .readout { max-width: 560px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-left: 50px; }
  .pipe-i { position: absolute; left: -50px; top: -4px; }
  .pipeline h3 { margin-top: 0; }
  .pipeline li:not(:last-child)::after { top: 12px; bottom: -30px; left: -33px; right: auto; width: 1px; height: auto; }
  .pipeline li:nth-child(4)::after { background: repeating-linear-gradient(180deg, var(--red-hi) 0 4px, transparent 4px 8px); }
}
@media (max-width: 720px) {
  .header-inner { gap: 4px 12px; padding-bottom: 6px; }
  .brand { order: 1; }
  .lang-switch { order: 2; border-left: 0; padding-left: 0; }
  .site-nav { order: 3; width: 100%; overflow-x: auto; margin-inline: -10px; gap: 0; }
  .site-nav a { white-space: nowrap; }
  main[id] { scroll-margin-top: 104px; }
  .section[id] { scroll-margin-top: calc(112px - var(--section-gap)); }
  .shot-grid, .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .run-chart { padding: 14px 10px 12px; }
  .run-plot { height: 320px; }
  .rt-value { font-size: 2.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
}
