/* Glint's site. The colors, the type and the corner radius are the app's own (ui/style.css):
   near-black grounds, one sapphire accent. One type family: Geist for everything,
   Geist Mono (its sibling) only for times, sizes and other figures inside the pictures. */
:root {
  --bg: #05070b;
  --panel: #0a0e16;
  --raised: #0f141e;
  --raised-2: #151b27;
  --line: #19212f;
  --line-2: #263043;
  --text: #e8edf6;
  --muted: #8591a5;
  --dim: #556073;
  --accent: #62b6f7;
  --accent-2: #8ccbff;
  --sapphire: #1f5fbf;
  --accent-ink: #051322;
  --sans: "Geist", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", "Cascadia Mono", Consolas, monospace;
  --r: 7px;
  --r-lg: 14px;
  --wrap: 1180px;
  --gut: clamp(20px, 4vw, 40px);
  --loop: 8s;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
h1, h2, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
svg { display: block; }
::selection { background: var(--sapphire); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--accent); color: var(--accent-ink); border-radius: var(--r); font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 19px/1 var(--sans); letter-spacing: -.03em; }
.brand-ver { margin-left: 2px; padding: 3px 7px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); font: 500 11.5px/1 var(--sans); letter-spacing: 0; }
.brand-ver[hidden] { display: none; }
.logo { width: 22px; height: 22px; fill: var(--accent); }
.logo .spark { fill: var(--accent-2); }
.nav-links { display: flex; gap: 26px; margin-right: auto; font-size: 14.5px; color: var(--muted); }
.nav-links a, .nav-gh { position: relative; padding: 6px 0; transition: color .15s; }
.nav-links a::after, .nav-gh::after, .foot-col a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s cubic-bezier(.3, .7, .2, 1); }
.nav-links a:hover, .nav-gh:hover { color: var(--text); }
.nav-links a:hover::after, .nav-gh:hover::after, .foot-col a:hover::after { transform: scaleX(1); }
.nav-end { display: flex; align-items: center; gap: 18px; font-size: 14.5px; }
.nav-gh { color: var(--muted); }
.motion-toggle { padding: 0; border: 0; background: none; color: var(--dim); font: 500 13.5px var(--sans); cursor: pointer; }
.motion-toggle:hover { color: var(--text); }
.motion-toggle[aria-pressed="true"] { color: var(--accent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 0 20px; border-radius: var(--r); border: 1px solid transparent; font: 600 15.5px/1 var(--sans); white-space: nowrap; cursor: pointer; transition: transform .12s, background-color .15s, border-color .15s, color .15s; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: var(--accent-2); }
.btn-line { border-color: var(--line-2); color: var(--text); }
.btn-line:hover { border-color: var(--accent); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 9vw, 120px); }
.hero .wrap { position: relative; }
.hero-copy { max-width: 900px; }
h1 { font: 600 clamp(46px, 7.4vw, 104px)/.98 var(--sans); letter-spacing: -.048em; text-wrap: balance; }
h1 em, .close h2 em, .page-hero h1 em { font-style: normal; color: var(--accent); }
.lede { max-width: 620px; margin-top: 28px; color: var(--muted); font-size: clamp(17px, 1.5vw, 19.5px); line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-stage { margin-top: clamp(48px, 7vw, 84px); }

/* The hero's copy and picture come in once, on load. */
[data-enter] { animation: enter .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-stage[data-enter] { animation-delay: .18s; }
@keyframes enter { from { opacity: 0; transform: translateY(18px); } }

/* ---------- a stage: the frame a picture sits in ---------- */
.stage { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); background:
  linear-gradient(var(--panel), var(--panel)) padding-box,
  var(--panel); overflow: hidden; }
.stage::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 44px 44px; opacity: .35; mask-image: radial-gradient(120% 90% at 50% 0%, #000 0%, transparent 78%); }
.block .stage { display: grid; place-items: center; min-height: 440px; padding: clamp(22px, 3.4vw, 44px); }
.panel { position: relative; width: 100%; border: 1px solid var(--line-2); border-radius: 11px; background: var(--raised); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }

/* Motion runs only for a stage on screen, and never when it is paused or not wanted. */
.stage:not(.is-live) *, .stage:not(.is-live) *::before, .stage:not(.is-live) *::after,
html[data-motion="off"] .stage *, html[data-motion="off"] .stage *::before, html[data-motion="off"] .stage *::after { animation-play-state: paused !important; }

/* ---------- the app window of the hero ---------- */
.win { position: relative; }
.win-bar { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--panel); font-size: 13px; }
.win-logo svg { width: 18px; height: 18px; fill: var(--accent); }
.win-title { color: var(--muted); font-weight: 500; }
.win-sp { flex: 1; }
/* GAME | DESKTOP: two halves of one width; the lit half fills its half to the edge. */
.seg { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raised); font: 700 10.5px var(--sans); color: var(--muted); }
.seg i { padding: 6px 8px; border-radius: 5px; font-style: normal; text-align: center; }
.seg i.on { background: var(--accent); color: var(--accent-ink); }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raised); font-weight: 600; font-size: 12.5px; }
kbd { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border: 1px solid var(--line-2); border-radius: 5px; background: var(--raised-2); color: var(--text); font: 600 10.5px var(--sans); }
.cap { position: relative; display: grid; grid-template-columns: 58px 1fr; min-height: clamp(300px, 40vw, 500px); }
.cap-side { display: flex; flex-direction: column; gap: 10px; padding: 16px 12px; border-right: 1px solid var(--line); }
.cap-side i { height: 26px; border-radius: 6px; background: var(--raised); }
.cap-side i.on { background: var(--accent); }
.cap-side i.gap { height: 8px; background: none; }
.cap-main { display: flex; flex-direction: column; min-width: 0; }
.cap-grid { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px); padding: clamp(14px, 2vw, 24px); align-content: start; }
.card .thumb { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; }
.card .thumb span { position: absolute; right: 6px; bottom: 6px; padding: 1px 5px; border-radius: 4px; background: rgba(5, 7, 11, .8); font: 500 10px var(--mono); }
.card b { display: block; margin-top: 8px; overflow: hidden; font-size: 12px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.card small { display: block; margin-top: 1px; overflow: hidden; color: var(--dim); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
/* Thumbnails: drawn game scenes (img/), one per game. */
.t1, .t2, .t3, .t4, .t5, .t6 { background-color: var(--raised-2); background-size: cover; background-position: center; }
.t1 { background-image: url("img/thumb-tactical.svg"); }
.t2 { background-image: url("img/thumb-arena.svg"); }
.t3 { background-image: url("img/thumb-island.svg"); }
.t4 { background-image: url("img/thumb-canyon.svg"); }
.t5 { background-image: url("img/thumb-dust.svg"); }
.t6 { background-image: url("img/thumb-city.svg"); }
.cap-status { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 16px; border-top: 1px solid var(--line); color: var(--text); font-size: 11.5px; }
.cap-dim { color: var(--dim); }
.cap-rec { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.cap-buf { width: 90px; height: 4px; margin-left: auto; border-radius: 2px; background: var(--raised-2); overflow: hidden; }
.cap-buf i { display: block; width: 100%; height: 100%; background: var(--sapphire); }
.toast { position: absolute; right: 18px; top: 16px; display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 11px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(10, 14, 22, .94); font-size: 12.5px; }
.toast svg { width: 22px; height: 22px; fill: var(--accent); }
.toast b { display: block; font-weight: 600; }
.toast small { color: var(--muted); font-size: 11px; }
.keycap { position: absolute; right: 26px; bottom: 56px; display: grid; place-items: center; width: 66px; height: 58px; border: 1px solid var(--line-2); border-bottom-width: 5px; border-radius: 11px; background: var(--raised-2); font: 600 17px var(--sans); }

/* capture: the key goes down, the overlay comes in, the new clip takes its place */
[data-demo="capture"] .keycap { animation: key-press 6s infinite; }
[data-demo="capture"] .toast { animation: toast 6s infinite; }
[data-demo="capture"] .card-new { animation: card-in 6s infinite; }
@keyframes key-press {
  0%, 14%, 26%, 100% { transform: translateY(0); border-bottom-width: 5px; background: var(--raised-2); color: var(--text); }
  18%, 22% { transform: translateY(4px); border-bottom-width: 1px; background: var(--accent); color: var(--accent-ink); }
  70% { opacity: 1; } 84%, 96% { opacity: 0; }
}
@keyframes toast { 0%, 20% { opacity: 0; transform: translateY(-10px); } 27%, 78% { opacity: 1; transform: none; } 86%, 100% { opacity: 0; transform: translateY(-10px); } }
/* The new clip's place is there all along, empty; the saved clip fills it and is ringed for a moment. */
@keyframes card-in { 0%, 26% { opacity: .16; } 34%, 90% { opacity: 1; } 97%, 100% { opacity: .16; } }
@keyframes card-ring { 0%, 28% { box-shadow: 0 0 0 0 transparent; } 34%, 60% { box-shadow: 0 0 0 2px var(--accent); } 70%, 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- alternating blocks ---------- */
.blocks { padding-bottom: clamp(40px, 6vw, 80px); }
.block { padding: clamp(56px, 8.5vw, 124px) 0; }
.block-in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 40px); align-items: center; }
.block-copy { grid-column: 1 / span 5; }
.block .stage { grid-column: 6 / span 7; }
.block.flip .block-copy { grid-column: 8 / span 5; grid-row: 1; }
.block.flip .stage { grid-column: 1 / span 7; grid-row: 1; }
.label { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; color: var(--muted); font: 600 13px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.label span { min-width: 2.4em; color: var(--accent); letter-spacing: .04em; }
h2 { font: 600 clamp(32px, 3.9vw, 52px)/1.04 var(--sans); letter-spacing: -.04em; text-wrap: balance; }
.block-copy > p:not(.label) { max-width: 46ch; margin-top: 20px; color: var(--muted); }
.ticks { display: grid; gap: 11px; margin-top: 26px; font-size: 15.5px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 11px; height: 6px; border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(-45deg); }

/* ---------- 01 buffer ---------- */
.buf { padding: 22px; }
.buf-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; font-weight: 600; }
.buf-len { color: var(--muted); font: 500 12px var(--mono); }
.buf-track { position: relative; height: 54px; margin-top: 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); overflow: hidden; }
/* Time flows to the left: the newest picture is at the right edge. */
.buf-fill { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 22px, var(--line) 22px 23px); animation: buf-flow 2.2s linear infinite; }
.buf-head { position: absolute; right: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); }
.buf-cut { position: absolute; right: 0; top: 0; bottom: 0; border-left: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); opacity: 0; }
.buf-cut-short { width: 9%; animation: cut-short var(--loop) infinite; }
.buf-cut-long { width: 100%; border-left: 0; animation: cut-long var(--loop) infinite; }
.buf-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.buf-key { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 13px; color: var(--muted); }
.buf-key span { margin-left: auto; }
.k-short { animation: key-short var(--loop) infinite; }
.k-long { animation: key-long var(--loop) infinite; }
.buf-out { display: grid; gap: 8px; margin-top: 16px; min-height: 96px; }
.clipline { display: flex; align-items: center; gap: 11px; padding: 7px 10px 7px 7px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); font-size: 13px; }
.clipline i { flex: none; width: 54px; aspect-ratio: 16 / 9; border-radius: 4px; }
.clipline span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.clipline em { margin-left: auto; color: var(--muted); font: 500 11.5px var(--mono); font-style: normal; }
.c-short { animation: out-short var(--loop) infinite; }
.c-long { animation: out-long var(--loop) infinite; }
@keyframes buf-flow { to { background-position-x: -23px; } }
@keyframes cut-short { 0%, 12% { opacity: 0; } 15%, 34% { opacity: 1; } 40%, 100% { opacity: 0; } }
@keyframes cut-long { 0%, 52% { opacity: 0; } 55%, 74% { opacity: 1; } 80%, 100% { opacity: 0; } }
@keyframes key-short { 0%, 11%, 22%, 100% { border-color: var(--line-2); color: var(--muted); background: none; } 13%, 19% { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); } }
@keyframes key-long { 0%, 51%, 62%, 100% { border-color: var(--line-2); color: var(--muted); background: none; } 53%, 59% { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 12%, transparent); } }
@keyframes out-short { 0%, 16% { opacity: 0; transform: translateY(8px); } 22%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes out-long { 0%, 56% { opacity: 0; transform: translateY(8px); } 62%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }

/* ---------- 02 timeline ---------- */
.tl { padding: 16px 16px 18px; }
.tl-ruler { display: flex; justify-content: space-between; margin-left: 92px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--dim); font: 400 10.5px var(--mono); }
.tl-rows { position: relative; display: grid; gap: 7px; padding-top: 10px; }
.tl-row { display: grid; grid-template-columns: 92px 1fr; align-items: center; }
.tl-head { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tl-lane { display: flex; height: 38px; min-width: 0; }
.tl-video .tl-lane { height: 50px; }
.tl-clip { height: 100%; border: 1px solid var(--line-2); border-radius: 6px; background: var(--raised-2); min-width: 0; overflow: hidden; }
/* The video row is a film strip of the clip's own pictures. */
.tl-video .tl-clip { background: url("img/thumb-tactical.svg") left center / auto 100% repeat-x, var(--raised-2); }
.tl-video .v-b { background-image: url("img/thumb-dust.svg"); }
.v-a, .a-a { width: 30%; }
.v-b, .a-b { width: 48%; }
/* The part that is cut out: marked, then gone, and the clip closes over it. */
.v-cut, .a-cut { width: 22%; animation: tl-cut var(--loop) infinite; }
.wave { background-image: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent) 80%, transparent) 0 2px, transparent 2px 5px); background-size: auto 46%; background-repeat: repeat-x; background-position: center; -webkit-mask-image: linear-gradient(90deg, #000 0 8%, rgba(0,0,0,.5) 14%, #000 22%, rgba(0,0,0,.35) 31%, #000 40%, rgba(0,0,0,.6) 52%, #000 60%, rgba(0,0,0,.4) 71%, #000 80%, rgba(0,0,0,.55) 90%, #000); mask-image: linear-gradient(90deg, #000 0 8%, rgba(0,0,0,.5) 14%, #000 22%, rgba(0,0,0,.35) 31%, #000 40%, rgba(0,0,0,.6) 52%, #000 60%, rgba(0,0,0,.4) 71%, #000 80%, rgba(0,0,0,.55) 90%, #000); background-color: var(--panel); }
.wave-2 { background-size: auto 26%; }
.wave-3 { background-size: auto 62%; background-image: repeating-linear-gradient(90deg, color-mix(in srgb, var(--accent-2) 85%, transparent) 0 2px, transparent 2px 5px); }
.tl-song .tl-clip { position: relative; width: 78%; border-color: var(--accent); }
.tl-song b { position: absolute; left: 8px; bottom: 5px; padding: 2px 7px; border-radius: 5px; background: var(--accent); color: var(--accent-ink); font: 600 10.5px var(--sans); animation: tl-note var(--loop) infinite; }
.tl-playhead { position: absolute; top: 4px; bottom: -4px; left: 92px; width: 2px; background: var(--text); animation: tl-head var(--loop) linear infinite; }
.tl-playhead::before { content: ""; position: absolute; left: -5px; top: -4px; border: 6px solid transparent; border-top-color: var(--text); }
@keyframes tl-cut {
  0%, 24% { width: 22%; opacity: 1; background-image: none; }
  28%, 44% { width: 22%; opacity: 1; background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--text) 16%, transparent) 6px 7px); }
  54%, 92% { width: 0%; opacity: 0; border-width: 0; }
  100% { width: 22%; opacity: 1; }
}
@keyframes tl-note { 0%, 50% { opacity: 0; transform: translateY(4px); } 58%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; } }
@keyframes tl-head { 0% { left: 92px; } 92%, 100% { left: calc(92px + (100% - 92px) * .76); } }

/* ---------- 03 canvas ---------- */
.cv { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: clamp(12px, 2vw, 26px); padding: clamp(18px, 2.6vw, 30px); }
.cv small { display: block; margin-top: 10px; color: var(--dim); font: 400 11px var(--mono); text-align: center; }
.cv-frame { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line-2); border-radius: 7px; background: url("img/thumb-tactical.svg") center / cover; overflow: hidden; }
.hud { position: absolute; display: block; }
.hud-feed { right: 5%; top: 7%; width: 26%; height: 14%; border-radius: 3px; background: repeating-linear-gradient(180deg, var(--accent-2) 0 3px, transparent 3px 6px); opacity: .85; }
.hud-hp { left: 5%; bottom: 8%; width: 24%; height: 9%; border-radius: 3px; background: linear-gradient(90deg, #e8edf6 0 70%, rgba(232, 237, 246, .25) 70%); }
.hud-cross { left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 1.5px solid var(--text); border-radius: 50%; }
.cv-box { position: absolute; border: 1.5px dashed var(--accent); border-radius: 4px; background: color-mix(in srgb, var(--accent) 10%, transparent); opacity: 0; }
.cv-box.b1 { right: 1%; top: 2%; width: 30%; height: 20%; animation: cv-pick var(--loop) infinite; }
.cv-box.b2 { left: 21%; top: 0; width: 58%; height: 100%; animation: cv-pick var(--loop) .7s infinite; }
.cv-box.b3 { left: 2%; bottom: 3%; width: 24%; height: 13%; animation: cv-pick var(--loop) 1.4s infinite; }
.cv-arrow svg { width: 26px; height: 26px; fill: none; stroke: var(--dim); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cv-phone { display: grid; grid-template-rows: 24fr 50fr 26fr; gap: 3px; width: clamp(104px, 13vw, 150px); aspect-ratio: 9 / 16; padding: 3px; border: 1px solid var(--line-2); border-radius: 9px; background: #000; }
/* Each piece shows its own part of the same picture (the scene is 320 x 180 units). */
.cv-piece { position: relative; display: block; border-radius: 5px; background: url("img/thumb-tactical.svg") no-repeat var(--raised-2); overflow: hidden; opacity: 0; }
.cv-piece.p1 { background-size: 356% auto; background-position: 98% 0; }   /* kill feed, x 226 to 316 */
.cv-piece.p2 { background-size: 175% auto; background-position: 50% 50%; } /* the middle of the picture */
.cv-piece.p3 { background-size: 444% auto; background-position: 3% 100%; } /* health, x 8 to 80 */
.cv-piece.p1 { animation: cv-place var(--loop) 2.4s infinite; }
.cv-piece.p2 { animation: cv-place var(--loop) 3s infinite; }
.cv-piece.p3 { animation: cv-place var(--loop) 3.6s infinite; }
.cv-piece .hud-feed { inset: 22% 10%; width: auto; height: auto; }
.cv-piece .hud-hp { inset: 32% 12%; width: auto; height: auto; }
@keyframes cv-pick { 0%, 4% { opacity: 0; transform: scale(1.08); } 10%, 78% { opacity: 1; transform: none; } 86%, 100% { opacity: 0; } }
@keyframes cv-place { 0%, 4% { opacity: 0; transform: scale(.8); } 11%, 56% { opacity: 1; transform: none; } 64%, 100% { opacity: 0; } }

/* ---------- 04 keyframes ---------- */
.kf { padding: 14px; }
.kf-view { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line-2); border-radius: 7px; background: url("img/thumb-arena.svg") center / cover; overflow: hidden; }
.kf-path { position: absolute; left: 14%; right: 14%; top: 50%; border-top: 1px dashed color-mix(in srgb, var(--text) 30%, transparent); transform: rotate(-11deg); }
.kf-target, .kf-text, .kf-blur { position: absolute; left: 12%; top: 62%; animation: kf-move 6s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
.kf-target { width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--text); }
.kf-blur { width: 22%; height: 26%; margin: -13% 0 0 -11%; border: 1px dashed var(--text); border-radius: 5px; backdrop-filter: blur(7px); background: rgba(232, 237, 246, .06); }
.kf-text { margin: -19% 0 0 -6%; padding: 0 2px; font: 700 clamp(16px, 2.1vw, 24px)/1 var(--sans); letter-spacing: -.02em; text-transform: uppercase; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.kf-bar { position: relative; height: 20px; margin-top: 14px; border-radius: 5px; background: var(--panel); border: 1px solid var(--line-2); }
.kf-dia { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--accent); transform: rotate(45deg); border-radius: 2px; }
.kf-dia.d1 { left: 6%; } .kf-dia.d2 { left: 50%; } .kf-dia.d3 { left: 94%; }
.kf-now { position: absolute; top: -4px; bottom: -4px; left: 6%; width: 2px; margin-left: -1px; background: var(--text); animation: kf-now 6s cubic-bezier(.45, 0, .55, 1) infinite alternate; }
@keyframes kf-move { 0% { left: 12%; top: 62%; } 50% { left: 50%; top: 50%; } 100% { left: 86%; top: 34%; } }
@keyframes kf-now { to { left: 94%; } }

/* ---------- 05 mixer ---------- */
.mx { padding: 20px; }
/* Two halves of one width; the thumb is exactly one half and slides by its own width. */
.mx-switch { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); font: 700 11px var(--sans); }
.mx-switch i { position: relative; z-index: 1; padding: 8px 12px; font-style: normal; text-align: center; color: var(--muted); }
.mx-switch i:nth-of-type(1) { animation: mx-lab-a var(--loop) infinite; }
.mx-switch i:nth-of-type(2) { animation: mx-lab-b var(--loop) infinite; }
.mx-thumb { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 5px; background: var(--accent); animation: mx-thumb var(--loop) cubic-bezier(.3, .7, .2, 1) infinite; }
.mx-strips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.mx-strip { padding: 12px 12px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); }
.mx-strip b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-strip small { color: var(--muted); font: 500 11px var(--mono); }
.mx-body { display: flex; gap: 12px; height: 150px; margin-top: 12px; }
.mx-fader { position: relative; width: 4px; margin: 0 8px; border-radius: 2px; background: var(--raised-2); }
.mx-fader i { position: absolute; left: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); }
.s-desk .mx-fader i { top: 36%; } .s-mic .mx-fader i { top: 30%; } .s-game .mx-fader i { top: 22%; }
.mx-meter { display: flex; gap: 3px; height: 100%; }
.mx-meter i { position: relative; width: 9px; border-radius: 2px; background: var(--raised-2); overflow: hidden; }
.mx-meter i::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 100%; background: linear-gradient(to top, var(--sapphire) 0 62%, var(--accent) 62% 86%, var(--accent-2) 86%); transform-origin: bottom; animation: mx-level 1.7s ease-in-out infinite alternate; }
.mx-meter i:nth-child(2)::after { animation-duration: 1.3s; animation-delay: -.4s; }
.s-mic .mx-meter i::after { animation-name: mx-level-low; animation-duration: 2.1s; }
.s-game .mx-meter i::after { animation-duration: 1.1s; }
/* In GAME the desktop is not recorded: its strip rests. */
.s-desk { animation: mx-desk var(--loop) infinite; }
@keyframes mx-thumb { 0%, 42% { transform: translateX(0); } 50%, 92% { transform: translateX(100%); } 100% { transform: translateX(0); } }
@keyframes mx-lab-a { 0%, 44% { color: var(--accent-ink); } 50%, 94% { color: var(--muted); } 100% { color: var(--accent-ink); } }
@keyframes mx-lab-b { 0%, 44% { color: var(--muted); } 50%, 94% { color: var(--accent-ink); } 100% { color: var(--muted); } }
@keyframes mx-desk { 0%, 42% { opacity: .35; } 50%, 92% { opacity: 1; } 100% { opacity: .35; } }
@keyframes mx-level { 0% { transform: scaleY(.34); } 35% { transform: scaleY(.78); } 60% { transform: scaleY(.52); } 100% { transform: scaleY(.9); } }
@keyframes mx-level-low { 0% { transform: scaleY(.12); } 40% { transform: scaleY(.46); } 100% { transform: scaleY(.22); } }

/* ---------- 06 render rules ---------- */
.rl { padding: 20px; }
.rl-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; }
.rl-head span { color: var(--muted); font: 500 11.5px var(--mono); }
.rl-chain { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rl-block { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); font-size: 13px; font-weight: 600; }
.rl-block i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--raised-2); font: 600 10.5px var(--mono); font-style: normal; color: var(--muted); }
.rl-block.r1 { animation: rl-on var(--loop) infinite; }
.rl-block.r2 { animation: rl-on var(--loop) 1.7s infinite; }
.rl-block.r3 { animation: rl-on var(--loop) 3.4s infinite; }
.rl-block.r4 { animation: rl-on var(--loop) 5.1s infinite; }
.rl-job { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.rl-state::after { content: "Color"; animation: rl-state var(--loop) steps(1) infinite; }
.rl-prog { height: 5px; margin-top: 12px; border-radius: 3px; background: var(--raised-2); overflow: hidden; }
.rl-prog i { display: block; height: 100%; background: var(--accent); transform-origin: left; animation: rl-prog var(--loop) linear infinite; }
@keyframes rl-on { 0%, 2% { border-color: var(--line-2); background: var(--panel); } 4%, 20% { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--panel)); } 23%, 100% { border-color: var(--line-2); background: var(--panel); } }
@keyframes rl-state { 0% { content: "Color"; } 21% { content: "Canvas"; } 42% { content: "Blur"; } 64% { content: "Compress"; } 86% { content: "Done"; } }
@keyframes rl-prog { 0% { transform: scaleX(0); } 86%, 100% { transform: scaleX(1); } }

/* ---------- the list ---------- */
.inside { padding: clamp(64px, 9vw, 130px) 0; border-top: 1px solid var(--line); }
.inside-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.list { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(28px, 6vw, 90px); counter-reset: n; }
.list li { counter-increment: n; display: grid; grid-template-columns: 44px minmax(120px, 190px) 1fr; align-items: baseline; gap: 6px 14px; padding: 15px 0; border-top: 1px solid var(--line); font-size: 15.5px; }
.list li::before { content: counter(n, upper-roman); color: var(--accent); font: 600 12.5px var(--sans); letter-spacing: .04em; }
.list b { font-weight: 600; }
.list span { color: var(--muted); }

/* ---------- questions ---------- */
.faq { padding: clamp(64px, 9vw, 130px) 0; border-top: 1px solid var(--line); }
.faq-in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(20px, 3vw, 40px); }
.faq-head { grid-column: 1 / span 5; }
.faq-list { grid-column: 7 / span 6; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { position: relative; display: block; padding: 20px 44px 20px 0; font-size: 18px; font-weight: 500; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: linear-gradient(var(--muted), var(--muted)) center / 12px 1.5px no-repeat, linear-gradient(var(--muted), var(--muted)) center / 1.5px 12px no-repeat; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
summary:hover { color: var(--accent-2); }
details p { max-width: 58ch; padding: 0 0 22px; color: var(--muted); }

/* ---------- closing ---------- */
.close { padding: clamp(80px, 12vw, 170px) 0; border-top: 1px solid var(--line); }
.close-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.close-mark { width: 40px; height: 40px; margin-bottom: 26px; fill: var(--accent); }
.close-mark .spark { fill: var(--accent-2); }
.close h2 { font-size: clamp(46px, 7vw, 96px); line-height: .96; }
.close .hero-actions { justify-content: center; }

/* ---------- footer ---------- */
.foot { padding: 54px 0 44px; border-top: 1px solid var(--line); font-size: 14.5px; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px clamp(24px, 5vw, 70px); }
.foot-brand p { max-width: 34ch; margin-top: 12px; color: var(--muted); }
.foot-col { display: grid; gap: 9px; align-content: start; justify-items: start; }
.foot-col b { margin-bottom: 4px; color: var(--dim); font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.foot-col a { position: relative; color: var(--muted); padding: 2px 0; }
.foot-col a:hover { color: var(--text); }
.foot-note { grid-column: 1 / -1; padding-top: 26px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12.5px; }

/* ---------- memory page ---------- */
.page-hero { padding: clamp(56px, 9vw, 116px) 0 clamp(40px, 6vw, 80px); }
.page-hero h1 { max-width: 15ch; font-size: clamp(40px, 6vw, 84px); }
.mem-parts, .mem-why, .mem-calc, .mem-compare, .mem-check { padding: clamp(56px, 8vw, 116px) 0; border-top: 1px solid var(--line); }
.mem-head { max-width: 760px; margin-bottom: clamp(30px, 4.5vw, 56px); }
.mem-sub { max-width: 60ch; margin-top: 18px; color: var(--muted); }
.mem-fine { max-width: 86ch; margin-top: 18px; color: var(--dim); font-size: 13.5px; }
.mem-stack-stage, .calc-stage { padding: clamp(18px, 3vw, 40px); }

.mem-stack { display: grid; gap: 0; padding: 6px 22px; }
.ms-row { display: grid; grid-template-columns: 210px 1fr; grid-template-areas: "name bar" ". note"; gap: 4px 24px; align-items: center; padding: 20px 0; }
.ms-row + .ms-row { border-top: 1px solid var(--line); }
.ms-name { grid-area: name; }
.ms-name b { display: block; font-size: 15px; font-weight: 600; }
.ms-name small { color: var(--dim); font-size: 12.5px; }
.ms-bar { grid-area: bar; position: relative; height: 34px; border-radius: 7px; background: var(--panel); border: 1px solid var(--line-2); }
.ms-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: max(var(--w), 4px); border-radius: 6px; }
.ms-bar span { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); color: var(--text); font: 500 12.5px var(--mono); white-space: nowrap; }
.ms-buf { background: repeating-linear-gradient(135deg, var(--line-2) 0 6px, var(--raised-2) 6px 12px); }
.ms-buf span { left: auto; right: 12px; color: var(--muted); }
.ms-ram { background: var(--accent); }
.ms-enc { background: var(--accent); }
.ms-app { background: var(--accent-2); }
.ms-note { grid-area: note; color: var(--muted); font-size: 14px; }
.stage.is-live .ms-bar i { animation: ms-grow 1.1s cubic-bezier(.2, .7, .2, 1) both; transform-origin: left; }
.stage.is-live .ms-row:nth-child(2) .ms-bar i { animation-delay: .15s; }
.stage.is-live .ms-row:nth-child(3) .ms-bar i { animation-delay: .3s; }
@keyframes ms-grow { from { transform: scaleX(0); } }

.why-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--line); overflow: hidden; counter-reset: w; }
.why-grid li { counter-increment: w; padding: clamp(22px, 3vw, 36px); background: var(--bg); }
.why-grid li::before { content: counter(w, upper-roman); display: block; margin-bottom: 18px; color: var(--accent); font: 600 12.5px var(--sans); letter-spacing: .06em; }
.why-grid b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.why-grid p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }

.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(20px, 3vw, 40px); padding: clamp(20px, 2.6vw, 32px); }
.calc-in { display: grid; gap: 26px; align-content: start; }
.calc-field { display: grid; gap: 12px; }
.calc-field > span { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 14px; font-weight: 500; }
.calc-field output { color: var(--text); font: 500 13px var(--mono); }
.calc input[type="range"] { width: 100%; height: 22px; margin: 0; background: transparent; accent-color: var(--accent); cursor: pointer; }
.calc-seg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); }
.calc-seg button { padding: 9px 6px; border: 0; border-radius: 5px; background: none; color: var(--muted); font: 600 13px var(--sans); cursor: pointer; transition: background-color .15s, color .15s; }
.calc-seg button:hover { color: var(--text); }
.calc-seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.calc-out { display: grid; gap: 16px; align-content: start; padding: clamp(16px, 2vw, 24px); border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); }
.calc-big { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calc-big small { display: block; color: var(--muted); font-size: 13px; }
.calc-big b { display: block; margin-top: 2px; font: 600 clamp(28px, 3.4vw, 42px)/1.1 var(--sans); letter-spacing: -.04em; }
.calc-bar { display: flex; height: 14px; border-radius: 4px; background: var(--raised-2); overflow: hidden; }
.calc-bar i { display: block; height: 100%; transition: width .35s cubic-bezier(.3, .7, .2, 1); }
.cb-ram { background: var(--accent); }
.cb-disk { background: repeating-linear-gradient(135deg, var(--line-2) 0 5px, var(--raised-2) 5px 10px); }
.calc-legend { display: flex; gap: 18px; color: var(--dim); font-size: 12.5px; }
.calc-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 2px; vertical-align: -1px; }
.lg-ram::before { background: var(--accent); }
.lg-disk::before { background: var(--line-2); }
.calc-total { padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.calc-total b { color: var(--text); }

.cmp-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.cmp { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 14.5px; }
.cmp th, .cmp td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp thead th { position: sticky; top: 0; background: var(--panel); font-size: 15px; font-weight: 600; }
.cmp tbody th { width: 24%; color: var(--text); font-weight: 500; }
.cmp td { color: var(--muted); }
.cmp td i, .cmp-key i { display: inline-block; width: 8px; height: 8px; margin-right: 9px; border-radius: 50%; vertical-align: 1px; }
.cmp .cmp-glint { background: color-mix(in srgb, var(--sapphire) 9%, transparent); color: var(--text); }
.cmp thead .cmp-glint { color: var(--accent); }
.cmp .cmp-group th { padding-top: 22px; color: var(--dim); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: var(--bg); }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
i.y { background: var(--accent); }
i.p { background: transparent; box-shadow: inset 0 0 0 2px var(--accent); }
i.n { background: var(--line-2); }
i.q { background: transparent; box-shadow: inset 0 0 0 1.5px var(--dim); }
.cmp-key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; color: var(--dim); font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sources { margin-top: 30px; border-top: 1px solid var(--line); }
.sources summary { font-size: 15.5px; }
.sources ul { display: grid; gap: 10px; padding-bottom: 14px; color: var(--muted); font-size: 14px; }
.sources a { color: var(--accent-2); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent-2) 40%, transparent); text-underline-offset: 3px; }
.sources p { padding-bottom: 20px; font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); counter-reset: s; }
.steps li { counter-increment: s; padding-top: 18px; border-top: 2px solid var(--line-2); }
.steps li::before { content: counter(s, upper-roman); display: block; margin-bottom: 12px; color: var(--accent); font: 600 12.5px var(--sans); letter-spacing: .06em; }
.steps b { display: block; font-size: 16.5px; font-weight: 600; }
.steps span { display: block; margin-top: 8px; color: var(--muted); font-size: 14.5px; }

@media (max-width: 1000px) {
  .calc { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ms-row { grid-template-columns: 1fr; grid-template-areas: "name" "bar" "note"; gap: 10px; }
  .ms-bar { margin-right: 96px; }
  .ms-buf span { display: none; }
  .why-grid, .steps { grid-template-columns: 1fr; }
  .calc-seg button { font-size: 12px; }
}

/* ---------- smaller screens ---------- */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
  .block-in, .faq-in { display: flex; flex-direction: column; align-items: stretch; gap: 34px; }
  .block.flip .block-in { flex-direction: column; }
  .block .stage { min-height: 0; }
  .cap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cap-grid .card:nth-child(n + 7) { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-gh, .motion-toggle { display: none; }
  .hero-actions .btn { width: 100%; }
  .win-bar .seg, .win-bar .chip:not(.chip-key) { display: none; }
  .cap { grid-template-columns: 1fr; }
  .cap-side { display: none; }
  .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap-grid .card:nth-child(n + 5) { display: none; }
  .cap-status .cap-dim, .cap-buf { display: none; }
  .keycap { right: 14px; bottom: 14px; }
  .list { grid-template-columns: 1fr; }
  .list li { grid-template-columns: 36px 1fr; }
  .list span { grid-column: 2; }
  .tl-ruler { margin-left: 70px; }
  .tl-row { grid-template-columns: 70px 1fr; }
  .tl-head { font-size: 10.5px; }
  .tl-playhead { animation-name: tl-head-s; left: 70px; }
  .mx-body { height: 110px; }
  .mx-strip b { font-size: 11px; }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@keyframes tl-head-s { 0% { left: 70px; } 92%, 100% { left: calc(70px + (100% - 70px) * .76); } }

/* ---------- no motion wanted: every picture rests in its finished state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cv-box, .cv-piece, .buf-cut-short { opacity: 1; }
  .v-cut, .a-cut { display: none; }
  .motion-toggle { display: none; }
}
html[data-motion="off"] .cv-box, html[data-motion="off"] .cv-piece { opacity: 1; }
