*, *::before, *::after { box-sizing: border-box; }
html { background: var(--body); color: var(--text); color-scheme: dark; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100svh; font: 400 16px/1.5 var(--font-fallback); background: var(--body); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lcd-neon); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Pixel text: real text is the no-JS fallback, canvas replaces it when drawn. */
.px { display: block; margin: 0; font-family: var(--font-fallback); font-weight: 700; text-transform: uppercase;
  font-size: calc(var(--cell) * 6); line-height: calc(var(--cell) * 9); letter-spacing: 0.04em; }
.px canvas { display: block; image-rendering: pixelated; }
.px--on .sr { position: absolute; }
.js .px:not(.px--on) { visibility: hidden; }

/* Hold the stage content until the first glyph draw so the text swap never shifts layout (CLS 0).
   The animation reveals it after 1.5 s even if the script never runs. */
.js:not(.px-ready) .stage__pin, .js:not(.px-ready) .top { visibility: hidden; animation: reveal 0s 1.5s forwards; }
@keyframes reveal { to { visibility: visible; } }
[hidden] { display: none !important; }
