/*
 * Auralis website.
 * Interface palette: Pure Monochrome 06 (#141414 #1F1F1F #303030 #D4D4D4 #F2F2F2 #8C8C8C),
 * the six neutrals of the desktop app's default theme. Colour belongs to the 3D stage only.
 * Motion: 150 ms hover, 220 ms interface, 600 ms entrances, 900 ms scene. No springs.
 */

@font-face {
  font-family: "Quicksand";
  src: url("./assets/fonts/quicksand-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("./assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("./assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@property --glow { syntax: '<color>'; inherits: true; initial-value: rgba(255, 255, 255, 0.34); }
:root {
  /* colour roles: a theme swaps these and nothing else (html[data-theme="light"] below) */
  --fg: 242, 242, 242; /* tints of the text colour: hairlines, hover fills */
  --hi: 255, 255, 255; /* the brightest tint */
  --halo: 0, 0, 0; /* behind text that sits on the stage, so it reads */
  --depth: 0, 0, 0; --depth-k: 1; /* shadows that give depth */
  --surface: 13, 13, 14; /* smoke and scrims under text */
  --raise: 22, 22, 23; /* panels that stand above the page */
  --text-max: #fff; --canvas: #000; --canvas-top: #09090a;
  --rim-hi: 255, 255, 255; --rim-base: rgba(255, 255, 255, 0.07); /* the glass rim's light */
  --ink: #141414;
  --ink-2: #1f1f1f;
  --line: #303030;
  --text: #f2f2f2;
  --text-2: #d4d4d4;
  --muted: #8c8c8c;
  --hair: rgba(var(--fg), 0.12);
  --hair-strong: rgba(var(--fg), 0.26);
  /* every separator, frame and outline: one weight, matched to the rounded face */
  --stroke: 3px;
  --sans: "Quicksand", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 0.8, 0.3, 1);
  --t-hover: 150ms;
  --t-ui: 220ms;
  --t-enter: 600ms;
  --t-scene: 900ms;
  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --glass-bg: rgba(var(--hi), 0.035);
  --glass-filter: blur(10px) saturate(1.6) brightness(1.1);
  /* Depth comes from the shadow the glass casts, never from a glow inside it. */
  --glass-shadow: 0 1px 2px rgba(var(--depth), calc(0.28 * var(--depth-k))), 0 10px 30px rgba(var(--depth), calc(0.26 * var(--depth-k)));
  /* Where the rim cannot refract (Safari, Firefox): the same caught light, as two hairlines. */
  --glass-edge: inset 0.5px 0.5px 0 rgba(255, 255, 255, 0.3), inset -0.5px -0.5px 0 rgba(255, 255, 255, 0.14);
  /* the stage's glow on the page: follows the stage's theme (html[data-stage-theme]) */
  --glow: rgba(255, 255, 255, 0.34);
  --glow-soft: rgba(255, 255, 255, 0.08);
  --glow-wash: rgba(220, 220, 224, 0.12);
  color-scheme: dark;
  transition: --glow 900ms var(--ease);
}
html[data-stage-theme="silver"] { --glow: rgba(255, 255, 255, 0.34); --glow-soft: rgba(255, 255, 255, 0.08); --glow-wash: rgba(220, 220, 224, 0.12); }
html[data-stage-theme="violet"] { --glow: rgba(168, 140, 255, 0.4); --glow-soft: rgba(138, 92, 246, 0.14); --glow-wash: rgba(138, 92, 246, 0.2); }
html[data-stage-theme="blue"] { --glow: rgba(80, 200, 255, 0.4); --glow-soft: rgba(47, 140, 255, 0.14); --glow-wash: rgba(47, 140, 255, 0.2); }
html[data-stage-theme="stock"] { --glow: rgba(80, 200, 255, 0.38); --glow-soft: rgba(255, 60, 25, 0.12); --glow-wash: rgba(0, 102, 255, 0.18); }
html[data-stage-theme="crimson"] { --glow: rgba(255, 44, 40, 0.55); --glow-soft: rgba(224, 18, 30, 0.2); --glow-wash: rgba(224, 18, 30, 0.22); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-2);
  font: 500 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure, dl, dd, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
code { font: 0.92em var(--mono); color: var(--text); }
[hidden] { display: none !important; }
::selection { background: var(--text); color: var(--ink); }

:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; border-radius: 999px;
  background: var(--text); color: var(--ink); font-weight: 600; text-decoration: none;
  transform: translateY(-200%); transition: transform var(--t-ui) var(--ease);
}
.skip:focus { transform: none; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }

/* ---------------------------------------------------------------- stage */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ink); pointer-events: none; }
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity var(--t-scene) var(--ease); }
.stage.is-live .stage-canvas { opacity: 1; }
/* What you see without WebGL, and for the instant before the stage starts. */
.stage-fallback {
  position: absolute; inset: 0;
  background:
    radial-gradient(58% 34% at 50% 66%, var(--glow-wash), transparent 72%),
    radial-gradient(40% 22% at 50% 70%, rgba(var(--fg), 0.1), transparent 70%),
    linear-gradient(var(--canvas-top), var(--ink) 78%);
  transition: opacity var(--t-scene) var(--ease);
}
.stage-fallback::after {
  content: ""; position: absolute; left: -60%; right: -60%; top: 58%; height: 90%;
  background-image:
    linear-gradient(rgba(var(--fg), 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--fg), 0.13) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: perspective(520px) rotateX(66deg);
  transform-origin: 50% 0;
  -webkit-mask-image: radial-gradient(48% 62% at 50% 22%, #000 12%, transparent 74%);
  mask-image: radial-gradient(48% 62% at 50% 22%, #000 12%, transparent 74%);
}
.stage.is-live .stage-fallback { opacity: 0; }

.nav, main, .footer { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- glass */
/* Liquid glass, on small controls only and never nested. The stylesheet gives the plain
   surface; js/glass.mjs adds the refracting rim and its light where the browser can draw it. */
[data-glass] {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-filter);
  backdrop-filter: var(--glass-filter);
  box-shadow: var(--glass-shadow);
}
/* The light on the glass: a hairline rim whose brightest point faces the pointer, from each
   control's own centre, with a fainter catch on the far side (js/ui/light.mjs sets --la, the
   angle, and --ls, how near the pointer is). It replaces the light the refraction maps drew.
   ::before is the rim's own: no glass control uses it for anything else. */
:where([data-glass]) { position: relative; }
[data-glass]::before {
  content: ""; position: absolute; inset: 0; z-index: 2; padding: 1.5px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--la, -45deg),
    rgba(var(--rim-hi), var(--ls, 0.6)) 0deg,
    rgba(var(--rim-hi), calc(0.34 * var(--ls, 0.6))) 34deg,
    var(--rim-base) 92deg,
    rgba(var(--rim-hi), calc(0.42 * var(--ls, 0.6))) 180deg,
    var(--rim-base) 268deg,
    rgba(var(--rim-hi), calc(0.34 * var(--ls, 0.6))) 326deg,
    rgba(var(--rim-hi), var(--ls, 0.6)) 360deg);
  -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);
}
[data-glass].glass--refract { box-shadow: var(--glass-shadow); }
/* a refracting bar is tinted inside its filter, face only, so its rim stays clear */
[data-glass="frost"].glass--refract { background: transparent; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  [data-glass] { background: rgba(var(--raise), 0.95); box-shadow: var(--glass-shadow); }
}
@media (prefers-reduced-transparency: reduce) {
  [data-glass] { background: rgba(var(--raise), 0.97) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
/* Large cards (data-glass="panel"): the stage bends the rim, on the graphics card (js/ui/panes.mjs);
   here the face, inset by the rim's width (--rim, which the stage reads too): a blur and a tint so
   the card's words read. The rim itself stays clear. */
[data-glass="panel"] { --rim: 10px; isolation: isolate; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
[data-glass="panel"]::after {
  content: ""; position: absolute; inset: var(--rim); z-index: -1; pointer-events: none;
  border-radius: calc(var(--radius, 24px) - var(--rim)); /* concentric: outer radius = rim + inner radius */
  background: rgba(var(--surface), 0.7);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { [data-glass="panel"]::after { background: rgba(var(--raise), 0.95); } }
@media (prefers-reduced-transparency: reduce) { [data-glass="panel"]::after { background: rgba(var(--raise), 0.97); -webkit-backdrop-filter: none; backdrop-filter: none; } }
/* Bars that sit over running text: tinted and softened, so their own labels always read. */
[data-glass="frost"] { background: rgba(var(--surface), 0.34); -webkit-backdrop-filter: blur(12px) saturate(1.7) brightness(1.08); backdrop-filter: blur(12px) saturate(1.7) brightness(1.08); }
.glass-defs { position: absolute; width: 0; height: 0; pointer-events: none; }

/* ---------------------------------------------------------------- the opening (js/intro.mjs) */
.intro { display: none; }
.intro-on .intro { --s: 4; --lockup-w: 360px; --lockup-h: 110px; position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--canvas); color: var(--text-max); pointer-events: none; }
.intro.is-leaving { opacity: 0; transition: opacity 420ms var(--ease); }
/* the header's logo (.brand), laid out --s times larger: same proportions, so the flight is one scale */
.intro-lockup { display: inline-flex; align-items: baseline; font-weight: 700; font-size: calc(var(--brand-size) * var(--s)); line-height: 1; letter-spacing: -0.02em; transform-origin: 0 0; will-change: transform; }
.intro-mark { flex: none; translate: 0 var(--mark-drop); width: var(--mark-w); height: var(--mark-h); margin-right: var(--mark-gap); opacity: 0; overflow: visible; }
.intro-mark path { stroke-dasharray: 1 2; stroke-dashoffset: 1.01; } /* gap past the end: no cap dots before it draws */
.intro-word { white-space: nowrap; }
.intro-word span { display: inline-block; opacity: 0; will-change: transform, opacity, filter; }
/* the frame around it: four corner marks, a hairline and a caption beneath, an index in the corner */
.intro-frame { position: absolute; left: 50%; top: 50%; width: calc(var(--lockup-w) + 2 * clamp(28px, 5vw, 72px)); height: calc(var(--lockup-h) + 2 * clamp(64px, 9vh, 104px)); transform: translate(-50%, -50%); }
.intro-frame span { position: absolute; width: 32px; height: 32px; opacity: 0; color: rgba(var(--hi), 0.7); }
.intro-frame svg { width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 6; stroke-linecap: round; }
.intro-frame span:nth-child(1) { left: 0; top: 0; }
.intro-frame span:nth-child(2) { right: 0; top: 0; }
.intro-frame span:nth-child(3) { left: 0; bottom: 0; }
.intro-frame span:nth-child(4) { right: 0; bottom: 0; }
.intro-rule { position: absolute; left: 50%; top: calc(50% + var(--lockup-h) / 2 + clamp(16px, 2.6vh, 26px)); width: var(--lockup-w); height: 4px; border-radius: 4px; margin-left: calc(var(--lockup-w) / -2); background: rgba(var(--hi), 0.32); transform: scaleX(0); transform-origin: 50% 50%; }
.intro-caption { position: absolute; left: 0; right: 0; top: calc(50% + var(--lockup-h) / 2 + clamp(30px, 4.4vh, 44px)); margin: 0; text-align: center; font: 700 clamp(9px, 2.3vw, 11px)/1 var(--sans); letter-spacing: 0.3em; text-transform: uppercase; color: rgba(var(--hi), 0.56); white-space: nowrap; }
.intro-caption span { display: inline-block; opacity: 0; }
.intro-count { position: absolute; right: clamp(20px, 3vw, 40px); bottom: clamp(20px, 3vw, 36px); font: 500 11px/1 var(--mono); letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: rgba(var(--hi), 0.5); opacity: 0; }
/* held back while the logo is on screen; they follow it in when it lands */
.intro-on .nav .brand { opacity: 0; }
/* the header's own items fade, never .nav-end itself: an ancestor with opacity or a filter would
   become the glass's backdrop root, and the glass would show that empty layer until the fade ends */
.intro-on .nav-links, .intro-on .nav-end > * { opacity: 0; filter: blur(8px); }
.intro-done .nav-links, .intro-done .nav-end > * { transition: opacity 800ms var(--ease) 120ms, filter 900ms var(--ease-out) 120ms; }
.intro-on .hero [data-reveal] { opacity: 0 !important; transform: translate3d(0, 20px, 0) !important; }
.intro-on .hero [data-reveal]:not([data-glass]):not(:has([data-glass])) { filter: blur(10px) !important; }
.intro-on .hero [data-reveal]:has([data-glass]) { opacity: 1 !important; }
.intro-on .hero [data-reveal]:has([data-glass]) > :not(:has([data-glass])), .intro-on .hero [data-reveal]:has([data-glass]) :has([data-glass]) > :not(:has([data-glass])) { opacity: 0 !important; animation: none !important; } /* held until the intro ends, then it plays */
.intro-on .display .line > span { opacity: 0 !important; transform: translate3d(0, 0.26em, 0) !important; filter: blur(16px) !important; }

/* ---------------------------------------------------------------- type */
.display {
  font-size: clamp(2.9rem, 9.2vw, 8.4rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 700;
  color: var(--text);
  text-wrap: balance;
  text-shadow: 0 0 34px rgba(var(--fg), 0.24);
}
h2 {
  font-size: clamp(2.1rem, 5.2vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.038em;
  font-weight: 600;
  color: var(--text);
  text-wrap: balance;
}
h3 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.012em; font-weight: 600; color: var(--text); }
.lead { font-size: clamp(1.02rem, 1.35vw, 1.1875rem); line-height: 1.55; color: var(--text-2); max-width: 34em; text-wrap: pretty; }
.fine { font-size: 0.875rem; line-height: 1.55; color: var(--muted); max-width: 36em; }
.link { color: var(--text); }

/* The page is read like a track: each section carries a lyric-file timestamp. */
.stamp { display: inline-flex; align-items: baseline; gap: 10px; font: 700 0.75rem/1 var(--sans); letter-spacing: 0.02em; text-transform: uppercase; color: var(--text-2); }
.stamp-time { color: var(--muted); letter-spacing: 0; }

.tag {
  display: inline-block; margin-left: 10px; padding: 3px 7px 2px; border: var(--stroke) solid var(--hair-strong); border-radius: 999px;
  font: 700 0.6875rem/1.2 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); vertical-align: middle;
}
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px 5px; border: var(--stroke) solid var(--hair-strong); border-radius: 999px;
  font: 700 0.6875rem/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); white-space: nowrap;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.badge--available i { background: var(--text); box-shadow: 0 0 0 3px rgba(var(--fg), 0.18); }
.badge--in-development i { background: var(--text-2); animation: pulse 2.4s var(--ease) infinite; }
.badge--planned i, .badge--unavailable i { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
.badge--unavailable { color: var(--muted); border-color: var(--hair); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ---------------------------------------------------------------- buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--t-hover) var(--ease), border-color var(--t-hover) var(--ease), color var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}
.button--small { min-height: 38px; padding: 0 16px; font-size: 0.875rem; }
.button--primary { background: var(--text); color: var(--ink); }
@media (hover: hover) { .button--primary:hover { background: var(--text-max); box-shadow: 0 0 0 4px rgba(var(--fg), 0.14); } }
/* a little smoke in the glass, so the label reads when the stage behind it is bright */
.button--ghost { background: rgba(var(--surface), 0.24); color: var(--text); text-shadow: 0 1px 2px rgba(var(--halo), 0.6); }
@media (hover: hover) { .button--ghost:hover { background-color: rgba(var(--hi), 0.12); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------------------------------------------------------------- navigation */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 14px var(--gutter); padding-top: max(14px, env(safe-area-inset-top));
}
.nav--doc { grid-template-columns: 1fr auto; }
/* the wordmark: the mark, cropped to its ink, stands as the A (cap height, its feet level with the letters' feet) */
:root { --brand-size: 1.3125rem; --mark-h: 0.774em; --mark-w: calc(0.774em * 49 / 46.2); --mark-gap: 0.035em; --mark-drop: 0.04em; }
.brand { display: inline-flex; align-items: baseline; justify-self: start; color: var(--text); font-weight: 700; font-size: var(--brand-size); line-height: 1; letter-spacing: -0.02em; text-decoration: none; }
.brand .mark { flex: none; translate: 0 var(--mark-drop); width: var(--mark-w); height: var(--mark-h); margin-right: var(--mark-gap); overflow: visible; }
.nav-links { display: flex; align-items: center; gap: 2px; padding: 5px; border-radius: 999px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; color: var(--text-2); text-decoration: none;
  text-shadow: 0 1px 2px rgba(var(--halo), 0.55); transition: color var(--t-hover) var(--ease), background-color var(--t-hover) var(--ease);
}
@media (hover: hover) { .nav-links a:hover { color: var(--text); background: rgba(var(--hi), 0.07); } }
.nav-links a[aria-current] { color: var(--ink); background: var(--text); text-shadow: none; }
.nav-end { display: flex; align-items: center; gap: 10px; justify-self: end; }
/* Discord and GitHub: the brands' own marks in round liquid-glass buttons, smoked like the ghost buttons so the mark reads over a bright stage */
.icon-button {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; font: inherit; cursor: pointer; color: var(--text); text-decoration: none;
  background: rgba(var(--surface), 0.34); transition: background-color var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease);
}
@media (hover: hover) { .icon-button:hover, .icon-button:focus-visible { background-color: rgba(var(--hi), 0.12); } }
.icon-button:focus-visible { background-color: rgba(var(--hi), 0.12); }
.icon-button .brand-ico { width: 18px; height: 18px; filter: drop-shadow(0 1px 2px rgba(var(--halo), 0.6)); }
.icon-button--lg { width: 52px; height: 52px; }
.icon-button--lg .brand-ico { width: 22px; height: 22px; }
.brand-ico { flex: none; fill: currentColor; transition: transform 520ms cubic-bezier(0.62, 0, 0.3, 1); }
@media (hover: hover) { .icon-button:is(:hover, :focus-visible) .brand-ico { transform: translateY(-1px) rotate(-8deg) scale(1.08); } }
.icon-button:focus-visible .brand-ico { transform: translateY(-1px) rotate(-8deg) scale(1.08); }
.hero .socials { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
@media (max-width: 560px) { .nav-icon:not(.theme-toggle) { display: none; } } /* a phone header keeps logo, the theme switch, Download and the menu; the hero has both links */
@media (max-width: 360px) { .nav-end { gap: 6px; } .nav .button--small { padding: 0 12px; } } /* the narrowest phones: room for the switch */
.nav-toggle { display: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: rgba(var(--surface), 0.34); cursor: pointer; }
.nav-toggle-bars, .nav-toggle-bars::before { display: block; width: 16px; height: 3px; border-radius: 3px; margin: 0 auto; background: var(--text); transition: transform var(--t-ui) var(--ease); }
.nav-toggle-bars { position: relative; transform: translateY(-3px); }
.nav-toggle-bars::before { content: ""; position: absolute; left: 0; top: 6px; }
.nav.is-open .nav-toggle-bars { transform: translateY(0) rotate(45deg); }
.nav.is-open .nav-toggle-bars::before { transform: translateY(-6px) rotate(-90deg); }

/* ---------------------------------------------------------------- entrances */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 20px, 0); transition: opacity var(--t-enter) var(--ease-out), transform var(--t-enter) var(--ease-out), filter var(--t-enter) var(--ease-out); }
/* everything that arrives comes out of blur, unless it holds glass (a filter above glass flattens it) */
.js [data-reveal]:where(:not([data-glass]):not(:has([data-glass]))) { filter: blur(10px); }
.js [data-reveal="rise"] { transform: perspective(1400px) rotateX(9deg) translate3d(0, 48px, 0) scale(0.97); transform-origin: 50% 100%; transition-duration: var(--t-scene); }
.js [data-reveal].is-in, .js.reveal-all [data-reveal] { opacity: 1; transform: none; filter: none; }
/* A row that holds glass fades its parts, never itself nor any wrapper that holds glass: a see-through ancestor becomes the
   glass's backdrop, so the glass would refract that empty row (flat milky grey) and snap clear
   when the fade ends. Faded piece by piece (glass nested deep in a vignette too), each
   piece of glass sees the stage the whole time. */
.js [data-reveal]:has([data-glass]) { opacity: 1; }
/* an animation, not a transition: a transition here would replace each button's own (hover, press) */
.js [data-reveal]:has([data-glass]) > :not(:has([data-glass])), .js [data-reveal]:has([data-glass]) :has([data-glass]) > :not(:has([data-glass])) { opacity: 0; }
.js [data-reveal].is-in:has([data-glass]) > :not(:has([data-glass])), .js [data-reveal].is-in:has([data-glass]) :has([data-glass]) > :not(:has([data-glass])), .js.reveal-all [data-reveal]:has([data-glass]) > :not(:has([data-glass])), .js.reveal-all [data-reveal]:has([data-glass]) :has([data-glass]) > :not(:has([data-glass])) { opacity: 1; animation: part-in var(--t-enter) var(--ease-out) var(--reveal-delay, 0ms) both; }
@keyframes part-in { from { opacity: 0; } }
.js [data-reveal] :focus-visible { animation: focus-in 240ms var(--ease-out) !important; }
[data-i="1"] { transition-delay: 70ms !important; --reveal-delay: 70ms; }
[data-i="2"] { transition-delay: 140ms !important; --reveal-delay: 140ms; }
[data-i="3"] { transition-delay: 210ms !important; --reveal-delay: 210ms; }
[data-i="4"] { transition-delay: 280ms !important; --reveal-delay: 280ms; }
[data-i="5"] { transition-delay: 350ms !important; --reveal-delay: 350ms; }
[data-i="6"] { transition-delay: 900ms !important; --reveal-delay: 900ms; }
/* Each line rises from behind its own baseline. The mask is a clip-path, open on three sides so
   the glow is never cut, and it lets go of the bottom edge once the line has landed. */
.line { display: block; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.line > span { display: block; }
.js .display .line > span { display: inline-block; opacity: 0; transform: translate3d(0, 0.26em, 0); filter: blur(16px); transition: opacity 900ms var(--ease-out), transform 1150ms var(--ease-out), filter 1000ms var(--ease-out); }
.js .display .line:nth-child(2) > span { transition-delay: 150ms; }
.js .display.is-in .line > span, .js.reveal-all .display .line > span { opacity: 1; transform: none; filter: none; }

/* ---------------------------------------------------------------- hero */
/* Four things only: the line, the promise, two actions, one quiet fact. Centred on the screen. */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-block: 96px; text-align: center; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
/* The headline is sized by the shorter side too, so it always clears the field's horizon. */
.hero .display { font-size: clamp(2.9rem, min(9.2vw, 15.2vh), 8.4rem); }
.hero-sub { margin-top: clamp(16px, 2.8vh, 30px); font-size: clamp(1.1rem, 2vw, 1.5rem); letter-spacing: -0.02em; color: var(--text); text-shadow: 0 0 22px rgba(var(--fg), 0.2); }
.hero .actions { margin-top: clamp(26px, 4.4vh, 44px); justify-content: center; }
.hero-note { margin-top: 20px; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); text-shadow: 0 1px 2px rgba(var(--halo), 0.9), 0 0 14px rgba(var(--halo), 0.9); }

/* ---------------------------------------------------------------- sections */
.section { position: relative; padding-block: clamp(88px, 13vh, 168px); }
/* A soft dark band behind text, so copy never depends on what the stage is doing. */
.section::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(var(--surface), 0.78) 16%, rgba(var(--surface), 0.78) 84%, transparent);
}
.section--open::before { background: linear-gradient(to bottom, transparent, rgba(var(--surface), 0.7) 16%, rgba(var(--surface), 0.7) 84%, transparent); }
.section-head { display: grid; gap: 18px; align-content: start; }
.section-head .stamp { justify-self: start; }
.section-head--center { justify-items: center; text-align: center; }
.section-head--center .stamp { justify-self: center; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.split > .section-head { position: sticky; top: 112px; }

/* ---------------------------------------------------------------- lyric interludes */
.interlude { position: relative; height: 96vh; min-height: 520px; display: grid; place-items: center; overflow: hidden; pointer-events: none; }
.interlude--last { height: 80vh; }
.lyrics { --lh: 1.2em; font-size: clamp(1.45rem, 5.3vw, 5rem); font-weight: 700; letter-spacing: -0.035em; line-height: var(--lh); text-align: center; opacity: 0; transition: opacity var(--t-scene) var(--ease), transform 1100ms var(--ease-out); }
.interlude[data-line="0"] .lyrics { transform: translate3d(0, calc(var(--lh) * 1.5 + 0.5em), 0) scale(0.97); }
.interlude[data-line="1"] .lyrics { transform: translate3d(0, calc(var(--lh) * 0.5 + 0.5em), 0) scale(0.97); }
.interlude[data-line="2"] .lyrics { transform: translate3d(0, calc(var(--lh) * -0.5 + 0.5em), 0) scale(0.97); }
.interlude[data-line="3"] .lyrics { transform: translate3d(0, calc(var(--lh) * -1.5 + 0.5em), 0) scale(0.97); }
.interlude.is-in .lyrics { opacity: 1; }
.interlude.is-in[data-line="0"] .lyrics { transform: translate3d(0, calc(var(--lh) * 1.5), 0); }
.interlude.is-in[data-line="1"] .lyrics { transform: translate3d(0, calc(var(--lh) * 0.5), 0); }
.interlude.is-in[data-line="2"] .lyrics { transform: translate3d(0, calc(var(--lh) * -0.5), 0); }
.interlude.is-in[data-line="3"] .lyrics { transform: translate3d(0, calc(var(--lh) * -1.5), 0); }
.lyrics p { white-space: nowrap; color: rgba(var(--fg), 0.3); filter: blur(1.6px); transition: color var(--t-scene) var(--ease), filter var(--t-scene) var(--ease), text-shadow var(--t-scene) var(--ease), transform var(--t-scene) var(--ease-out); }
.lyrics p[data-offset="2"] { color: rgba(var(--fg), 0.24); filter: blur(2.2px); }
.lyrics p[data-offset="3"] { color: rgba(var(--fg), 0.14); filter: blur(3px); }
.lyrics p.is-past { color: rgba(var(--fg), 0.3); }
.interlude.is-in .lyrics p.is-active {
  color: var(--text-max); filter: none; transform: scale(1.045);
  /* a soft halo under the glow: the line still reads where it crosses the brightest field */
  text-shadow: 0 1px 3px rgba(var(--halo), 0.55), 0 0 26px rgba(var(--halo), 0.5), 0 0 18px rgba(var(--hi), 0.5), 0 0 64px var(--glow);
}

/* ---------------------------------------------------------------- experience */
.bento { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(48px, 7vh, 88px); border-top: var(--stroke) solid var(--hair); }
.cell { padding: clamp(28px, 3.4vw, 44px) clamp(24px, 3.4vw, 48px) clamp(32px, 4vw, 52px); border-bottom: var(--stroke) solid var(--hair); }
.cell:nth-child(odd) { padding-left: 0; border-right: var(--stroke) solid var(--hair); }
.cell:nth-child(even) { padding-right: 0; }
.cell h3 { margin-top: 28px; font-size: 1.375rem; letter-spacing: -0.025em; }
.cell p { margin-top: 10px; max-width: 32em; color: var(--muted); font-size: 0.9375rem; }
.vignette { position: relative; height: 216px; display: grid; place-items: center; overflow: hidden; }
.vignette:not(.is-visible) *, .vignette:not(.is-visible) *::before { animation-play-state: paused !important; }

.lrc { display: grid; gap: 6px; width: 100%; }
.lrc li { display: grid; grid-template-columns: 88px 1fr; align-items: baseline; gap: 14px; transition: opacity 500ms var(--ease), transform 600ms var(--ease-out); opacity: 0.34; }
.lrc span { font: 700 0.6875rem/1 var(--sans); color: var(--muted); }
.lrc b { font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.25; color: var(--text-2); filter: blur(0.7px); transition: filter 500ms var(--ease), text-shadow 500ms var(--ease), color 500ms var(--ease); white-space: nowrap; }
.lrc li.is-past { opacity: 0.2; }
.lrc li.is-active { opacity: 1; transform: translate3d(8px, 0, 0); }
.lrc li.is-active b { color: var(--text-max); filter: none; text-shadow: 0 0 16px rgba(var(--hi), 0.5); }
.lrc li.is-active span { color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-content: center; }
.chips li { padding: 7px 12px 6px; border: var(--stroke) solid var(--hair-strong); border-radius: 999px; font: 700 0.75rem/1 var(--sans); color: var(--text-2); }
.chips li.is-on { background: var(--text); border-color: var(--text); color: var(--ink); box-shadow: 0 0 26px rgba(var(--fg), 0.28); }
/* room for that glow: the vignette clips, so its box reaches 24px past the chips on each side
   (a cell's padding is never less; on a phone, no more than the page's margin), and the chips
   stay where they were */
.vignette--presets { --room: min(24px, var(--gutter)); margin-inline: calc(var(--room) * -1); padding-inline: var(--room); }

.plates { position: relative; width: 300px; height: 170px; }
.plate { position: absolute; width: 168px; height: 104px; border-radius: 10px; box-shadow: 0 0 0 var(--stroke) var(--hair-strong), 0 18px 40px rgba(var(--depth), calc(0.55 * var(--depth-k))); overflow: hidden; animation: drift 9s var(--ease) infinite alternate; }
.plate i { position: absolute; left: 9px; top: 7px; font: 700 0.625rem/1 var(--sans); font-style: normal; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text); text-shadow: 0 1px 4px rgba(var(--halo), 0.8); }
.plate--colour { left: 0; top: 4px; background: var(--line); }
.plate--cover { left: 44px; top: 22px; background: radial-gradient(90% 90% at 30% 25%, #b9a2ff, #5a45c9 45%, #1b1640 100%); animation-delay: -2s; }
.plate--image { left: 88px; top: 40px; background: linear-gradient(170deg, #cfd6dd 0%, #7f8b97 44%, #2a2f35 45%, #15181b 100%); animation-delay: -4s; }
.plate--video { left: 132px; top: 58px; background: linear-gradient(135deg, #25303f, #0d1117); animation-delay: -6s; }
.plate--video::before { content: ""; position: absolute; left: 50%; top: 46%; border: 9px solid transparent; border-left: 15px solid var(--text); transform: translate(-30%, -50%); }
@keyframes drift { from { transform: translate3d(0, -4px, 0); } to { transform: translate3d(0, 5px, 0); } }

.vignette--glass { place-items: center; }
.stripes {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(102deg, rgba(var(--fg), 0.9) 0 9px, transparent 9px 36px);
  -webkit-mask-image: radial-gradient(70% 90% at 50% 50%, #000 30%, transparent 78%);
  mask-image: radial-gradient(70% 90% at 50% 50%, #000 30%, transparent 78%);
  animation: slide 16s linear infinite;
}
@keyframes slide { to { background-position: 368px 0; } }
.glass-pill { position: relative; display: flex; align-items: center; justify-content: center; gap: 22px; width: min(300px, 84%); height: 72px; border-radius: 36px; }
.glass-pill span { width: 14px; height: 14px; border-radius: 3px; background: rgba(var(--fg), 0.9); box-shadow: 0 1px 3px rgba(var(--depth), calc(0.5 * var(--depth-k))); }
.glass-pill span:first-child, .glass-pill span:last-child { width: 8px; height: 8px; border-radius: 50%; opacity: 0.7; }
.glass-pill .glass-pill-play { width: 44px; height: 44px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px rgba(var(--fg), 0.9); position: relative; }
.glass-pill .glass-pill-play::before, .glass-pill .glass-pill-play::after { content: ""; position: absolute; top: 14px; width: 4px; height: 16px; border-radius: 1px; background: var(--text); }
.glass-pill .glass-pill-play::before { left: 15px; }
.glass-pill .glass-pill-play::after { right: 15px; }

/* ---------------------------------------------------------------- library */
.tracklist { border-top: var(--stroke) solid var(--hair); }
.tracklist li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 26px 0; border-bottom: var(--stroke) solid var(--hair); }
.tracklist-no { font: 700 0.75rem/1 var(--sans); color: var(--muted); }
.tracklist h3 { font-size: 1.375rem; letter-spacing: -0.025em; }
.tracklist p { margin-top: 6px; max-width: 34em; font-size: 0.9375rem; color: var(--muted); }
.tracklist-meta { font: 700 0.6875rem/1.4 var(--sans); letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); text-align: right; }

/* ---------------------------------------------------------------- personalization */
.split--console { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.console {
  margin-top: clamp(32px, 5vh, 52px); max-width: 440px; padding: 22px; --radius: 22px; border-radius: var(--radius); /* 22 = 10 rim + 12 face */
  /* liquid glass (data-glass="panel") */
}
.console-title { display: flex; align-items: center; gap: 10px; font: 700 0.75rem/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); }
.console-title .tag { margin-left: auto; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text); animation: pulse 2.4s var(--ease) infinite; }
html:not(.stage-live) .live-dot { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); animation: none; }
.console-row { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: var(--stroke) solid var(--hair); font-size: 0.875rem; color: var(--text-2); }
.console-row legend { float: left; width: 128px; margin-right: 14px; padding: 0; line-height: 30px; }
fieldset.console-row { display: block; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatch { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px 5px 6px; border-radius: 999px; border: var(--stroke) solid var(--hair); cursor: pointer; font-size: 0.8125rem; transition: border-color var(--t-hover) var(--ease), background-color var(--t-hover) var(--ease); }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch::before { content: ""; width: 16px; height: 16px; border-radius: 50%; }
.swatch--violet::before { background: linear-gradient(135deg, #5a78ff, #8a5cf6); }
.swatch--silver::before { background: linear-gradient(135deg, #8c8c8c, #f2f2f2); }
.swatch--blue::before { background: linear-gradient(135deg, #0066ff, #33e6ff); }
.swatch--stock::before { background: linear-gradient(135deg, #0066ff 0 50%, #ff3c19 50%); }
@media (hover: hover) { .swatch:hover { border-color: var(--hair-strong); } }
.swatch:has(input:checked) { border-color: var(--text); background: rgba(var(--fg), 0.09); color: var(--text); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 3px; }
.swatch:has(input:disabled), .console-row:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: var(--hair-strong); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--hair-strong); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; border: 0; background: var(--text); box-shadow: 0 0 0 0 rgba(var(--fg), 0.2); transition: box-shadow var(--t-hover) var(--ease); }
input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; border: 0; background: var(--text); }
@media (hover: hover) { input[type="range"]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(var(--fg), 0.16); } }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--text); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--text); }
input[type="range"]:disabled { cursor: not-allowed; }

.console-row--toggle { position: relative; cursor: pointer; }
.console-row--toggle input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch { justify-self: start; position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--line); transition: background-color var(--t-ui) var(--ease); }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform var(--t-ui) var(--ease), background-color var(--t-ui) var(--ease); }
.console-row--toggle input:checked + .switch { background: var(--text); }
.console-row--toggle input:checked + .switch::after { transform: translateX(18px); background: var(--ink); }
.console-row--toggle input:focus-visible + .switch { outline: 2px solid var(--text); outline-offset: 3px; }
.console-note { margin-top: 18px; padding-top: 16px; border-top: var(--stroke) solid var(--hair); font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }

.facets { border-top: var(--stroke) solid var(--hair); }
.facets li { padding: 24px 0; border-bottom: var(--stroke) solid var(--hair); }
.facets h3 { font-size: 1.25rem; letter-spacing: -0.022em; }
.facets p { margin-top: 8px; max-width: 38em; font-size: 0.9375rem; color: var(--text-2); }
.status-inline { color: var(--muted); }

/* ---------------------------------------------------------------- principles */
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--stroke) solid var(--hair); }
.values li { position: relative; padding: 34px 28px 38px 52px; border-bottom: var(--stroke) solid var(--hair); border-right: var(--stroke) solid var(--hair); }
.values li:nth-child(3n) { border-right: 0; }
.values li:nth-child(3n + 1) { padding-left: 34px; }
.values svg { position: absolute; left: 14px; top: 35px; width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.values li:nth-child(3n + 1) svg { left: 0; }
.values h3 { font-size: 1rem; }
.values p { margin-top: 6px; font-size: 0.9375rem; color: var(--muted); max-width: 26em; }

/* ---------------------------------------------------------------- accounts */
.statuses { border-top: var(--stroke) solid var(--hair); }
.statuses li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 24px 0; border-bottom: var(--stroke) solid var(--hair); }
.statuses h3 { font-size: 1.25rem; letter-spacing: -0.022em; }
.statuses p { margin-top: 6px; max-width: 32em; font-size: 0.9375rem; color: var(--muted); }

/* ---------------------------------------------------------------- download */
.platforms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: clamp(40px, 6vh, 72px); border-top: var(--stroke) solid var(--hair); }
.platform { padding: 24px 20px 28px 0; border-bottom: var(--stroke) solid var(--hair); }
.platform + .platform:not(:nth-child(2)) { padding-left: 20px; border-left: var(--stroke) solid var(--hair); }
.platform--primary { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(36px, 6vw, 96px); row-gap: 14px; padding: 36px 0 40px; }
.platform-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.platform h3 { font-size: 1.0625rem; }
.platform:not(.platform--primary) .platform-head { flex-direction: column; align-items: flex-start; gap: 10px; }
.platform--primary .platform-head { grid-column: 1; align-content: start; justify-content: flex-start; gap: 18px; }
.platform--primary h3 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); letter-spacing: -0.035em; }
.platform-summary { margin-top: 10px; font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.platform--primary .platform-summary { grid-column: 1; margin-top: 0; max-width: 30em; font-size: 0.9375rem; }
.coming-soon { grid-column: 2; grid-row: 1; align-self: center; font-size: clamp(1.25rem, 2.2vw, 1.75rem); letter-spacing: -0.025em; line-height: 1.25; color: var(--text); text-wrap: balance; }
.platform--primary .specs, .platform--primary .platform-notes, .platform--primary .button { grid-column: 2; }
.platform--primary .button { justify-self: start; margin-top: 6px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: var(--stroke) solid var(--hair); }
.spec { padding: 14px 16px 14px 0; border-bottom: var(--stroke) solid var(--hair); }
.spec dt { font: 700 0.6875rem/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin-top: 8px; font-size: 0.9375rem; color: var(--text); overflow-wrap: anywhere; }
.spec dd.mono { font-size: 0.875rem; }
.spec:has(.hash) { grid-column: 1 / -1; }
.hash { font-size: 0.75rem; color: var(--text-2); }
.platform-notes { font-size: 0.9375rem; color: var(--text-2); }

/* ---------------------------------------------------------------- source */
.rows { border-top: var(--stroke) solid var(--hair); }
.row-link { display: grid; grid-template-columns: minmax(0, 1fr) auto 18px; align-items: baseline; gap: 16px; padding: 22px 0; border-bottom: var(--stroke) solid var(--hair); color: var(--text); font-size: 1.25rem; letter-spacing: -0.022em; text-decoration: none; transition: padding var(--t-ui) var(--ease), background-color var(--t-ui) var(--ease); }
.row-link .mono { font-size: 0.75rem; letter-spacing: 0; color: var(--muted); text-align: right; overflow-wrap: anywhere; }
.row-link::after { content: ""; width: 9px; height: 9px; border-top: 3px solid var(--muted); border-right: 3px solid var(--muted); border-top-right-radius: 3px; transform: rotate(45deg); transition: border-color var(--t-hover) var(--ease), transform var(--t-ui) var(--ease); }
@media (hover: hover) { .row-link:hover { padding-left: 10px; } }
@media (hover: hover) { .row-link:hover::after { border-color: var(--text); transform: translateX(3px) rotate(45deg); } }
.source-pending { padding: 22px 0; border-bottom: var(--stroke) solid var(--hair); font-size: 0.9375rem; color: var(--muted); }

/* ---------------------------------------------------------------- questions */
.faq { border-top: var(--stroke) solid var(--hair); }
.faq details { border-bottom: var(--stroke) solid var(--hair); }
.faq summary { position: relative; display: block; padding: 22px 44px 22px 0; font-size: 1.125rem; letter-spacing: -0.015em; color: var(--text); cursor: pointer; list-style: none; transition: color var(--t-hover) var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 15px; height: 3px; border-radius: 3px; background: var(--muted); transition: transform 420ms var(--ease), background-color var(--t-hover) var(--ease); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details.is-shutting summary::after { transform: rotate(90deg); } /* turns back as it starts to close (js/ui/faq.mjs) */
.faq details.is-moving { overflow: hidden; }
@media (hover: hover) { .faq summary:hover::before, .faq summary:hover::after { background: var(--text); } }
.faq details p { padding: 0 44px 24px 0; max-width: 40em; font-size: 0.9375rem; color: var(--text-2); }

/* ---------------------------------------------------------------- close */
.final { position: relative; min-height: 92vh; display: grid; place-items: center; padding-block: 120px 160px; text-align: center; }
.final::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; width: min(760px, 100%); height: 70%; transform: translate(-50%, -50%); /* never wider than the page: a phone would zoom out to fit it */ pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--surface), 0.66), rgba(var(--surface), 0.3) 60%, transparent);
}
.final-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.final .display { font-size: clamp(2.8rem, 10vw, 9rem); }
.final .lead { text-shadow: 0 1px 14px rgba(var(--halo), 0.8); }
.final .actions { justify-content: center; margin-top: 12px; }

/* ---------------------------------------------------------------- footer */
.footer { padding-bottom: 112px; }
.footer-card {
  display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 36px 28px; padding: clamp(24px, 3vw, 40px);
  --radius: 24px; border-radius: var(--radius); /* liquid glass (data-glass="panel"): 24 = 10 rim + 14 face */
}
.footer-brand p { margin-top: 14px; max-width: 24em; font-size: 0.9375rem; color: var(--text-2); }
.footer-col h2 { margin-bottom: 14px; font-size: 0.875rem; letter-spacing: 0; line-height: 1.4; font-weight: 600; color: var(--text); }
.footer-col a { display: block; padding: 5px 0; font-size: 0.875rem; color: var(--muted); text-decoration: none; transition: color var(--t-hover) var(--ease); }
@media (hover: hover) { .footer-col a:hover { color: var(--text); } }
.footer-col p { font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
/* the full release, under the platforms: a row on the hairlines, as the Source section's rows */
.release-row {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px 32px;
  padding: 34px 0; border-bottom: var(--stroke) solid var(--hair); /* the platforms above end on a hairline of their own */
}
.release-row-text { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; font-size: clamp(1.25rem, 2vw, 1.625rem); line-height: 1.3; letter-spacing: -0.022em; color: var(--text); }
.release-row-text strong { font-weight: 600; }
.release-row-text > span:last-child { color: var(--text-2); }
.release-row .button { flex: none; }
@media (max-width: 560px) { .release-row .button { width: 100%; } }
.footer-legal { grid-column: 1 / -1; padding-top: 24px; border-top: var(--stroke) solid var(--hair); font: 500 0.75rem/1.5 var(--sans); color: var(--muted); }

/* ---------------------------------------------------------------- page position bar */
.transport {
  /* Centred with margins and moved with `bottom`, never `transform`: the refraction map is
     placed against the untransformed box, and a transform would slide it off the bar. */
  position: fixed; left: 0; right: 0; margin-inline: auto; bottom: -80px; z-index: 40; display: flex; align-items: center; gap: 6px;
  width: min(720px, calc(100vw - 24px)); height: 54px; padding: 0 8px; border-radius: 999px; color: var(--text);
  opacity: 0; visibility: hidden;
  transition: bottom 420ms var(--ease-out), opacity 300ms var(--ease), visibility 0s linear 420ms;
}
.transport.is-shown { bottom: max(16px, env(safe-area-inset-bottom)); opacity: 1; visibility: visible; transition-delay: 0s; }
.transport-button { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; transition: background-color var(--t-hover) var(--ease); }
@media (hover: hover) { .transport-button:hover { background-color: rgba(var(--hi), 0.1); } }
.transport-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px rgba(var(--halo), 0.6)); }
.transport-button--text { width: auto; grid-auto-flow: column; gap: 8px; padding: 0 12px 0 10px; font-size: 0.8125rem; font-weight: 600; text-shadow: 0 1px 2px rgba(var(--halo), 0.6); }
.transport-now { display: flex; align-items: baseline; gap: 10px; min-width: 0; margin-left: 6px; flex: 0 1 auto; text-shadow: 0 1px 2px rgba(var(--halo), 0.7); }
.transport-time, .transport-total { flex: none; font: 500 0.75rem/1 var(--mono); color: var(--text); }
.transport-total { color: var(--text-2); text-shadow: 0 1px 2px rgba(var(--halo), 0.7); }
.transport-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; font-weight: 600; }
.transport-bar { position: relative; flex: 1 1 60px; min-width: 40px; height: 4px; margin-inline: 8px; border-radius: 4px; background: rgba(var(--fg), 0.26); overflow: hidden; }
.transport-bar i { position: absolute; inset: 0; background: var(--text); transform-origin: 0 50%; transform: scaleX(0); }
.stage-menu { position: relative; flex: none; }
.stage-options {
  position: absolute; right: -2px; bottom: calc(100% + 14px); width: 280px; padding: 16px;
  /* liquid glass (data-glass="panel", live): 26 = 8 rim + 18 face, and 18 = 8 gap + 10 row */
  --rim: 8px; --radius: 26px; border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(var(--depth), calc(0.45 * var(--depth-k)));
  animation: pop var(--t-ui) var(--ease-out);
}
@keyframes pop { from { opacity: 0; transform: translate3d(0, 8px, 0); } }
.stage-options legend { padding: 2px 6px 10px; font: 700 0.6875rem/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.stage-options label { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: background-color var(--t-hover) var(--ease); }
@media (hover: hover) { .stage-options label:hover { background: rgba(var(--hi), 0.06); } }
.stage-options input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.stage-options span { grid-column: 2; font-size: 0.875rem; font-weight: 600; color: var(--text); }
.stage-options small { grid-column: 2; font-size: 0.75rem; color: var(--muted); }
.stage-options label::before { content: ""; grid-row: 1 / span 2; align-self: center; width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--muted); }
.stage-options label:has(input:checked)::before { box-shadow: inset 0 0 0 4.5px var(--text); }
.stage-options label:has(input:checked) { background: rgba(var(--hi), 0.08); box-shadow: inset 0 0 0 var(--stroke) var(--hair); }
.stage-options label:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 1px; }
.stage-options label:has(input:disabled) { opacity: 0.4; cursor: not-allowed; }
.stage-status { margin-top: 10px; padding: 12px 6px 2px; border-top: var(--stroke) solid var(--hair); font-size: 0.75rem; line-height: 1.5; color: var(--muted); }

.noscript { position: relative; z-index: 2; margin: 0; padding: 14px var(--gutter) 90px; font-size: 0.8125rem; color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- document pages (privacy, license, credits, docs) */
.doc { position: relative; z-index: 1; padding: 148px 0 120px; }
.doc .wrap { max-width: calc(760px + var(--gutter) * 2); }
.doc-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 36px; font: 700 0.75rem/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color var(--t-hover) var(--ease); }
@media (hover: hover) { .doc-back:hover { color: var(--text); } }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: 600; color: var(--text); }
.doc h2 { margin-top: 56px; font-size: 1.5rem; letter-spacing: -0.025em; line-height: 1.2; }
.doc h3 { margin-top: 32px; }
.doc p, .doc ul, .doc ol, .doc table, .doc pre { margin-top: 18px; }
.doc p, .doc li { color: var(--text-2); max-width: 46em; }
.doc ul { list-style: none; }
.doc ul li { position: relative; padding-left: 20px; margin-top: 8px; }
.doc ul li::before { content: ""; position: absolute; left: 2px; top: 0.68em; width: 8px; height: 3px; border-radius: 3px; background: var(--muted); }
.doc ol { padding-left: 22px; list-style: decimal; }
.doc ol li { margin-top: 8px; }
.doc a { color: var(--text); }
.doc pre { padding: 18px 20px; border-radius: 12px; background: rgba(var(--raise), 0.8); box-shadow: inset 0 0 0 var(--stroke) var(--hair); overflow-x: auto; font: 0.8125rem/1.6 var(--mono); color: var(--text-2); }
.doc table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.doc th, .doc td { padding: 10px 12px 10px 0; border-bottom: var(--stroke) solid var(--hair); text-align: left; vertical-align: top; color: var(--text-2); }
.doc th { font: 700 0.6875rem/1.4 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.doc .doc-note { margin-top: 28px; padding: 16px 18px; border-radius: 12px; box-shadow: inset 0 0 0 var(--stroke) var(--hair-strong); font-size: 0.875rem; color: var(--text-2); }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1020px) {
  .split, .split--console, .platform--primary { grid-template-columns: minmax(0, 1fr); }
  .split > .section-head { position: static; }
  .coming-soon, .platform--primary .specs, .platform--primary .platform-notes, .platform--primary .button, .platform--primary .platform-head, .platform--primary .platform-summary { grid-column: 1; grid-row: auto; }
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .values li, .values li:nth-child(3n + 1) { padding: 30px 20px 32px 40px; border-right: var(--stroke) solid var(--hair); }
  .values li svg, .values li:nth-child(3n + 1) svg { left: 0; top: 31px; }
  .values li:nth-child(2n) { border-right: 0; padding-left: 60px; }
  .values li:nth-child(2n) svg { left: 20px; }
  .platforms { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .platform + .platform:not(:nth-child(2)) { padding-left: 0; border-left: 0; }
  .footer-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-links {
    position: absolute; top: calc(100% - 2px); left: var(--gutter); right: var(--gutter); flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px; border-radius: 20px; background: rgb(var(--raise)) !important; box-shadow: inset 0 0 0 var(--stroke) var(--hair-strong), 0 24px 70px rgba(var(--depth), calc(0.6 * var(--depth-k)));
    -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
    opacity: 0; visibility: hidden; transform: translate3d(0, -8px, 0);
    transition: opacity var(--t-ui) var(--ease), transform var(--t-ui) var(--ease), visibility 0s linear var(--t-ui);
  }
  .nav.is-open .nav-links { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-links a { padding: 13px 14px; font-size: 1rem; text-shadow: none; }
  html:not(.js) .nav-links { position: static; grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; opacity: 1; visibility: visible; transform: none; }
  html:not(.js) .nav-toggle { display: none; }
}

@media (max-width: 700px) {
  .hero-sub { font-size: 1.02rem; letter-spacing: -0.015em; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .cell, .cell:nth-child(odd), .cell:nth-child(even) { padding: 28px 0 34px; border-right: 0; }
  .vignette { height: 196px; }
  .lrc li { grid-template-columns: 76px 1fr; gap: 10px; }
  .tracklist li { grid-template-columns: 32px minmax(0, 1fr); }
  .tracklist-meta { grid-column: 2; text-align: left; }
  .values { grid-template-columns: minmax(0, 1fr); }
  .values li, .values li:nth-child(3n + 1), .values li:nth-child(2n) { padding: 26px 0 28px 38px; border-right: 0; }
  .values li svg, .values li:nth-child(3n + 1) svg, .values li:nth-child(2n) svg { left: 0; top: 27px; }
  .statuses li { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .statuses .badge { justify-self: start; }
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .specs { grid-template-columns: minmax(0, 1fr); }
  .row-link { grid-template-columns: minmax(0, 1fr) 18px; font-size: 1.125rem; }
  .row-link .mono { grid-column: 1; grid-row: 2; text-align: left; }
  .row-link::after { grid-column: 2; grid-row: 1; }
  .console-row { grid-template-columns: 104px minmax(0, 1fr); }
  .console-row legend { float: none; width: auto; margin: 0 0 8px; line-height: 1.4; }
  .footer-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .transport { height: 50px; gap: 2px; padding: 0 6px; }
  .transport-total, .transport-button[data-step="-1"] { display: none; }
  .transport-button--text span { display: none; }
  .transport-button--text { width: 38px; padding: 0; }
  .stage-options { right: -6px; width: min(280px, calc(100vw - 32px)); }
}

@media (max-width: 400px) {
  .platforms { grid-template-columns: minmax(0, 1fr); }
  .button { padding: 0 18px; }
  .footer-card { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- phones and touch */
/* Once the page moves, a soft fade of the page's own colour sits under the header, so words
   scrolling up go out of sight before they reach the logo and the buttons. */
@media (max-width: 860px) {
  .nav::before {
    content: ""; position: absolute; inset: 0 0 -36px; z-index: -1; pointer-events: none;
    background: rgba(var(--surface), 0.94);
    -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent);
    opacity: 0; transition: opacity var(--t-ui) var(--ease);
  }
  .nav.is-scrolled::before, .nav.is-open::before { opacity: 1; }
}
/* the lyric lines keep to one line each at any width: the type follows the box */
.vignette--lrc { container-type: inline-size; }
@media (max-width: 700px) {
  .lrc li { grid-template-columns: 66px minmax(0, 1fr); gap: 8px; }
  .lrc b { font-size: min(1.15rem, calc((100cqi - 100px) / 11.6)); } /* 66 + 8 of stamp and gap, 8 for the active line's step in, and a little air */
}
/* a tap answers with the page's own press states (motion section), not the browser's grey flash;
   links without one dim for the length of the press */
a, button, summary, label, input { -webkit-tap-highlight-color: transparent; }
:is(.nav-links a, .footer-col a, .doc-back, .link, .faq summary, .appearance label, .stage-options label):active { opacity: 0.6; transition: opacity 60ms linear; }
/* fingers: every link and switch is at least 40 px tall where the pointer is coarse */
@media (pointer: coarse) {
  .footer-col a { padding: 10px 0; }
  fieldset.appearance label { padding: 11px 15px; }
  .brand { position: relative; } /* a larger target, without moving the logo the opening lands on */
  .brand::after { content: ""; position: absolute; inset: -10px -6px; }
}

/* ---------------------------------------------------------------- motion (js/ui/motion.mjs)
   One vocabulary for the whole page: plain eases, nothing overshoots. Hover answers in
   --t-hover, things that travel take ~500 ms on --ease-out, a press answers at once. Glass
   controls are never moved with transform (js/glass.mjs places the refraction against the
   untransformed box), so they answer with light and with what is inside them. */
@property --lit { syntax: "<number>"; inherits: false; initial-value: 0; }

/* light under the pointer: a soft spot that follows it (--mx, --my) and fades in and out */
.button--ghost, .icon-button, .transport-button, .nav-toggle {
  background-image: radial-gradient(circle 64px at var(--mx, 50%) var(--my, 50%), rgba(var(--hi), calc(var(--lit) * 0.16)), transparent);
  transition: --lit 380ms var(--ease), background-color var(--t-hover) var(--ease), box-shadow var(--t-hover) var(--ease), color var(--t-hover) var(--ease);
}
@media (hover: hover) { :is(.button--ghost, .icon-button, .transport-button, .nav-toggle):hover { --lit: 1; } }
/* The grid's cells sit flush with the page's column (their text starts on its edge), so their
   light is a layer of its own that reaches past the cell into the margin and fades out there:
   the text never stands on the light's cut edge. */
@media (hover: hover) {
  .cell, .values li, .platform { position: relative; isolation: isolate; --spill: min(32px, calc(var(--gutter) - 4px)); }
  :is(.cell, .values li, .platform)::before {
    content: ""; position: absolute; inset: 0 calc(var(--spill) * -1); z-index: -1; pointer-events: none;
    background: radial-gradient(circle 360px at calc(var(--mx, 50%) + var(--spill)) var(--my, 50%), rgba(var(--hi), calc(var(--lit) * 0.05)), transparent 72%);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--spill), #000 calc(100% - var(--spill)), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--spill), #000 calc(100% - var(--spill)), transparent);
    transition: --lit 520ms var(--ease);
  }
  :is(.cell, .values li, .platform):hover::before { --lit: 1; }
}

/* press: solid buttons sink a little; glass ones brighten, and their marks sink */
.button--primary { transition: background-color var(--t-hover) var(--ease), box-shadow var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); }
@media (hover: hover) { .button--primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 4px rgba(var(--fg), 0.14), 0 10px 28px rgba(var(--depth), calc(0.35 * var(--depth-k))); } }
.button--primary:active { transform: scale(0.97); transition-duration: 90ms; }
.button--ghost:active, .icon-button:active, .nav-toggle:active { background-color: rgba(var(--hi), 0.2); transition-duration: 60ms; }
.transport-button:active { background-color: rgba(var(--hi), 0.18); }
.transport-button svg { transition: transform var(--t-ui) var(--ease); }
.transport-button:active svg { transform: scale(0.86); transition-duration: 80ms; }
.swatch { transition: border-color var(--t-hover) var(--ease), transform var(--t-ui) var(--ease); }
.swatch:active { transform: scale(0.96); }

/* the brand marks: they lean in under the pointer, sink when pressed, and the glass catches
   a slow glint now and then, each button on its own beat */
.icon-button { position: relative; overflow: hidden; }
.icon-button .brand-ico { position: relative; z-index: 1; }
.icon-button:active .brand-ico { transform: scale(0.84); transition-duration: 90ms; }
.icon-button::after {
  content: ""; position: absolute; inset: -30% -60%; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.2) 50%, transparent 62%);
  transform: translateX(-70%); animation: glint 8s var(--ease) infinite; animation-delay: var(--glint-at, 1.2s);
}
.icon-button + .icon-button { --glint-at: 1.5s; }
@media (hover: hover) { .icon-button:is(:hover, :focus-visible)::after { animation: glint-now 760ms var(--ease-out) both; } }
.icon-button:focus-visible::after { animation: glint-now 760ms var(--ease-out) both; }
@keyframes glint { 0%, 86% { transform: translateX(-70%); } 100% { transform: translateX(70%); } }
@keyframes glint-now { from { transform: translateX(-70%); } to { transform: translateX(70%); } }

/* the menu: the current section's pill slides from link to link and grows to fit */
.nav-links a { position: relative; z-index: 1; transition: color 360ms var(--ease), background-color var(--t-hover) var(--ease); }
.nav-links.has-pill a[aria-current] { background: transparent; }
.nav-pill {
  position: absolute; left: 0; top: 0; z-index: 0; width: var(--pw, 0px); height: var(--ph, 0px); border-radius: 999px; background: var(--text);
  transform: translate(var(--px, 0px), var(--py, 0px)); opacity: 0; pointer-events: none;
  transition: transform 560ms var(--ease-out), width 560ms var(--ease-out), height 560ms var(--ease-out), opacity var(--t-ui) var(--ease);
}
.nav-pill.is-shown { opacity: 1; }
.nav-pill.is-instant { transition: opacity var(--t-ui) var(--ease); }

/* links: the underline draws in from the left over a faint one */
.link, .doc a {
  text-decoration: none; padding-bottom: 1px;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(var(--hair-strong), var(--hair-strong));
  background-repeat: no-repeat; background-position: 0 100%, 0 100%; background-size: 0% 2px, 100% 2px;
  transition: background-size 460ms var(--ease-out), color var(--t-hover) var(--ease);
}
@media (hover: hover) { .link:is(:hover, :focus-visible), .doc a:is(:hover, :focus-visible) { background-size: 100% 2px, 100% 2px; } }
.link:focus-visible, .doc a:focus-visible { background-size: 100% 2px, 100% 2px; }
.footer-col a, .doc-back { transition: color var(--t-hover) var(--ease), transform var(--t-ui) var(--ease-out); }
@media (hover: hover) { .footer-col a:hover { transform: translateX(4px); } }
@media (hover: hover) { .doc-back:hover { transform: translateX(-4px); } }
.brand { transition: opacity var(--t-hover) var(--ease); }
.brand:active { opacity: 0.7; }

/* questions and rows: the line you point at steps forward */
.faq summary { transition: color var(--t-hover) var(--ease), padding var(--t-ui) var(--ease-out); }
@media (hover: hover) { .faq summary:hover { padding-left: 8px; } }
.row-link:active { background-color: rgba(var(--hi), 0.04); }

/* line icons draw themselves in when they come into view, and again under the pointer */
.draw :is(path, line, polyline, polygon, circle, rect, ellipse) { stroke-dasharray: 1 2; stroke-dashoffset: 0; }
.draw.is-hidden :is(path, line, polyline, polygon, circle, rect, ellipse) { stroke-dashoffset: 1.001; }
.draw.is-drawn :is(path, line, polyline, polygon, circle, rect, ellipse) { transition: stroke-dashoffset 1100ms var(--ease-out) 120ms; }
.draw.is-redraw :is(path, line, polyline, polygon, circle, rect, ellipse) { animation: redraw 900ms var(--ease-out); }
@keyframes redraw { from { stroke-dashoffset: 1.001; } }

/* the stage console: sliders, rows and the switch answer the pointer too */
input[type="range"]::-webkit-slider-runnable-track { transition: background-color var(--t-ui) var(--ease); }
@media (hover: hover) { input[type="range"]:hover::-webkit-slider-runnable-track { background: rgba(var(--fg), 0.42); } }
input[type="range"]::-webkit-slider-thumb { transition: box-shadow var(--t-hover) var(--ease), transform var(--t-ui) var(--ease); }
input[type="range"]::-moz-range-thumb { transition: box-shadow var(--t-hover) var(--ease), transform var(--t-ui) var(--ease); }
@media (hover: hover) { input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.12); } }
@media (hover: hover) { input[type="range"]:hover::-moz-range-thumb { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(var(--fg), 0.16); } }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.25); }
input[type="range"]:active::-moz-range-thumb { transform: scale(1.25); }
input[type="range"]:disabled::-webkit-slider-thumb { transform: none; box-shadow: none; }
.console-row { transition: color var(--t-hover) var(--ease), border-color var(--t-ui) var(--ease); }
@media (hover: hover) { .console-row:hover:not(:has(input:disabled)) { color: var(--text); } }
.switch { transition: background-color var(--t-ui) var(--ease), box-shadow var(--t-ui) var(--ease); }
.switch::after { transition: transform var(--t-ui) var(--ease), background-color var(--t-ui) var(--ease), width var(--t-ui) var(--ease); }
@media (hover: hover) { .console-row--toggle:hover .switch { box-shadow: 0 0 0 4px rgba(var(--fg), 0.1); } }
@media (hover: hover) { .console-row--toggle:hover input:not(:checked) + .switch { background: var(--hair-strong); } }
.console-row--toggle:active input:not(:disabled) + .switch::after { width: 21px; }
.console-row--toggle:active input:checked:not(:disabled) + .switch::after { transform: translateX(13px); }
/* the wordmark writes itself out and back in under the pointer (js/ui/brand.mjs): a pen going
   back over it. "uralis" wipes away from its last letter behind a soft edge, the A's wave and then
   its arch retract to where they began, and the pen writes it all again: arch, wave, letters.
   One 1.3 s timeline; each stroke eases in as it leaves and out as it lands. */
.brand.is-writing > span {
  -webkit-mask-image: linear-gradient(90deg, #000 0 45.5%, transparent 54.5% 100%); mask-image: linear-gradient(90deg, #000 0 45.5%, transparent 54.5% 100%);
  -webkit-mask-size: 220% 100%; mask-size: 220% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: word-write 1300ms linear both;
}
.brand.is-writing .mark path { stroke-dasharray: 1 2; }
.brand.is-writing .mark-arch { animation: arch-write 1300ms linear both; }
.brand.is-writing .mark-wave { animation: wave-write 1300ms linear both; }
@keyframes word-write {
  0% { -webkit-mask-position: 0 0; mask-position: 0 0; animation-timing-function: cubic-bezier(0.55, 0, 0.8, 0.3); }
  22%, 66% { -webkit-mask-position: 100% 0; mask-position: 100% 0; animation-timing-function: cubic-bezier(0.16, 0.8, 0.3, 1); }
  100% { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
@keyframes wave-write {
  0%, 12% { stroke-dashoffset: 0; animation-timing-function: cubic-bezier(0.55, 0, 0.8, 0.3); }
  32%, 58% { stroke-dashoffset: 1.001; animation-timing-function: cubic-bezier(0.16, 0.8, 0.3, 1); }
  84%, 100% { stroke-dashoffset: 0; }
}
@keyframes arch-write {
  0%, 20% { stroke-dashoffset: 0; animation-timing-function: cubic-bezier(0.55, 0, 0.8, 0.3); }
  40%, 46% { stroke-dashoffset: 1.001; animation-timing-function: cubic-bezier(0.16, 0.8, 0.3, 1); }
  74%, 100% { stroke-dashoffset: 0; }
}
.skip { transition: transform var(--t-ui) var(--ease-out), background-color var(--t-hover) var(--ease); }
@media (hover: hover) { .skip:hover { background-color: var(--text-max); } }

/* keyboard focus: the ring settles out to its place */
:focus-visible { animation: focus-in 240ms var(--ease-out); }
@keyframes focus-in { from { outline-offset: 0; outline-color: transparent; } }

/* moving between the page and its documents: the old page dims away, the new one rises in, and
   the whole page moves as one. Nothing here takes a view-transition-name of its own: that makes
   the element a backdrop root, and the glass inside it would show that empty layer (flat grey). */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out 240ms var(--ease) both; }
::view-transition-new(root) { animation: page-in 560ms var(--ease-out) both; }
@keyframes page-out { to { opacity: 0; filter: blur(4px); } }
@keyframes page-in { from { opacity: 0; transform: translate3d(0, 16px, 0); filter: blur(4px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .draw.is-hidden :is(path, line, polyline, polygon, circle, rect, ellipse) { stroke-dashoffset: 0; }
  .icon-button::after { display: none; }
  .button--primary:hover { transform: none; }
}

/* ---------------------------------------------------------------- light mode
   The same page on paper: only the colour roles change (see :root). The theme comes from the
   visitor's system until they choose one (js/theme-boot.js, js/ui/theme.mjs). */
html[data-theme="light"] {
  color-scheme: light;
  --ink: #f3f3f1;
  --ink-2: #e7e7e4;
  --line: #cdcdc9;
  --text: #161616;
  --text-2: #3a3a3a;
  --muted: #686868;
  --fg: 22, 22, 22;
  --hi: 0, 0, 0;
  --halo: 255, 255, 255;
  --depth-k: 0.34;
  --surface: 246, 246, 243;
  --raise: 255, 255, 255;
  --text-max: #000;
  --canvas: #f3f3f1;
  --canvas-top: #fbfbf9;
  --rim-hi: 255, 255, 255;
  --rim-base: rgba(0, 0, 0, 0.16);
  --glass-bg: rgba(255, 255, 255, 0.3);
  --glass-filter: blur(10px) saturate(1.4) brightness(1.04);
}
/* bars that float over anything keep a paper face so their dark text always reads */
html[data-theme="light"] .transport { background-color: rgba(var(--surface), 0.78); }
html[data-theme="light"] :is(.nav .icon-button, .nav-toggle) { background-color: rgba(var(--surface), 0.72); }
/* the silver stage's white glow reads as nothing on paper: a soft grey instead */
html[data-theme="light"]:is([data-stage-theme="silver"], :not([data-stage-theme])) {
  --glow: rgba(22, 22, 22, 0.16); --glow-soft: rgba(22, 22, 22, 0.06); --glow-wash: rgba(22, 22, 22, 0.05);
}

/* the switch: a sun that becomes a moon. Its rays draw in and turn; a shadow slides over the
   disc to leave the crescent. Plain eases. */
.theme-ico { width: 18px; height: 18px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; filter: drop-shadow(0 1px 2px rgba(var(--halo), 0.6)); }
.theme-ico .sun-core { fill: currentColor; stroke: none; transition: r 520ms var(--ease-out); }
.theme-ico .sun-rays { transform-origin: 12px 12px; transition: transform 620ms var(--ease-out), opacity 300ms var(--ease); }
.theme-ico .moon-shade { transition: transform 620ms var(--ease-out); }
html:not([data-theme="light"]) .theme-ico .sun-rays { transform: rotate(-90deg) scale(0.4); opacity: 0; }
html:not([data-theme="light"]) .theme-ico .sun-core { r: 7px; }
html[data-theme="light"] .theme-ico .moon-shade { transform: translate(12px, -12px); }
@media (hover: hover) { .theme-toggle:is(:hover, :focus-visible) .theme-ico { transform: rotate(-14deg); } }
.theme-toggle:focus-visible .theme-ico { transform: rotate(-14deg); }
.theme-ico { transition: transform 520ms cubic-bezier(0.62, 0, 0.3, 1); }

/* Appearance, in the footer: System, Light, Dark */
.appearance { display: inline-flex; gap: 2px; margin-top: 18px; padding: 3px; border: 0; border-radius: 999px; box-shadow: inset 0 0 0 var(--stroke) var(--hair); }
.appearance legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.appearance label { position: relative; padding: 6px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: color var(--t-hover) var(--ease), background-color var(--t-ui) var(--ease); }
@media (hover: hover) { .appearance label:hover { color: var(--text); } }
.appearance label:has(input:checked) { background: var(--text); color: var(--ink); }
.appearance input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.appearance label:has(input:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }

/* changing theme: the new one opens out from the switch in a circle (js/ui/theme.mjs). For the
   flip itself no element runs its own colour transition: hundreds would start at once and the page
   would restyle on every frame for as long as they ran (the circle already carries the change). */
html.theme-snap, html.theme-snap *, html.theme-snap *::before, html.theme-snap *::after { transition: none !important; }
html.is-theming::view-transition-old(root) { animation: none; }
html.is-theming::view-transition-new(root) { animation: theme-in 760ms var(--ease-out) both; }
@keyframes theme-in {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0%)); }
  to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 50%) var(--vt-y, 0%)); }
}

/* ---------------------------------------------------------------- reduced motion */
/* ---------------------------------------------------------------- the icons (js/ui/icons.mjs)
   Every one keeps moving, each in its own way, and faster under the pointer (--k); pressed, it
   does its move at once. Strokes are the page's 2 px with round ends. Nothing overshoots: one
   ease for the moves, one for a throw. Paused while off screen (.is-live). */
.ico {
  --move: cubic-bezier(0.62, 0, 0.3, 1); --throw: cubic-bezier(0.1, 0.7, 0.2, 1); --k: 1;
  flex: none; width: 16px; height: 16px; overflow: hidden; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.ico * { transform-box: fill-box; transform-origin: center; animation-play-state: paused; }
.ico.is-live * { animation-play-state: running; }
@media (hover: hover) { :is(a, button, li):is(:hover, :focus-visible) .ico { --k: 0.42; } }
:is(a, button, li):focus-visible .ico { --k: 0.42; }

/* go: a copy leaves along its way and a fresh one comes up behind it, then a rest */
.ico-download { --gx: 0px; --gy: 13px; }
.ico-along { --gx: 15px; --gy: 0px; }
.ico-out { --gx: 13px; --gy: -13px; }
.ico-down { --gx: 0px; --gy: 14px; }
.ico .go-a { animation: go-out calc(3.2s * var(--k)) var(--move) infinite; }
.ico .go-b { animation: go-in calc(3.2s * var(--k)) var(--move) infinite; }
@keyframes go-out { 0% { transform: none; opacity: 1; } 24%, 100% { transform: translate(var(--gx), var(--gy)); opacity: 0; } }
@keyframes go-in { 0% { transform: translate(calc(var(--gx) * -1), calc(var(--gy) * -1)); opacity: 0; } 24%, 100% { transform: none; opacity: 1; } }
.ico.is-pressed .go-a { animation: go-throw 340ms var(--throw) both; }
.ico.is-pressed .go-b { animation: go-back 420ms var(--move) 260ms both; }
@keyframes go-throw { 0% { transform: none; opacity: 1; } 55% { opacity: 1; } 100% { transform: translate(calc(var(--gx) * 2), calc(var(--gy) * 2)); opacity: 0; } }
@keyframes go-back { 0% { transform: translate(calc(var(--gx) * -1), calc(var(--gy) * -1)); opacity: 0; } 100% { transform: none; opacity: 1; } }
/* (the download arrow goes into its tray: fading as it reaches it) */
.ico-download .go-a, .ico-download .go-b { transform-origin: 50% 100%; }

/* open source: the brackets part and the slash tips, then close */
.ico-code .cl { animation: code-l calc(3s * var(--k)) var(--move) infinite; }
.ico-code .cr { animation: code-r calc(3s * var(--k)) var(--move) infinite; }
.ico-code .cs { animation: code-s calc(3s * var(--k)) var(--move) infinite; }
@keyframes code-l { 0%, 44%, 100% { transform: none; } 14%, 30% { transform: translateX(-1.8px); } }
@keyframes code-r { 0%, 44%, 100% { transform: none; } 14%, 30% { transform: translateX(1.8px); } }
@keyframes code-s { 0%, 44%, 100% { transform: none; } 14%, 30% { transform: rotate(16deg); } }

/* your files: the folder's front leans open and shuts */
.ico-folder .ff { transform-origin: 50% 100%; animation: fold calc(2.8s * var(--k)) var(--move) infinite; }
@keyframes fold { 0%, 52%, 100% { transform: none; } 64%, 80% { transform: skewX(-16deg) scaleY(0.74); } }

/* no account: the line through the guest is drawn, held, rubbed out */
.ico .nx { stroke-dasharray: 1; animation: cross calc(2.6s * var(--k)) var(--move) infinite; }
@keyframes cross { 0% { stroke-dashoffset: 1; } 30%, 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }

/* scales to the machine: a level meter that never settles */
.ico-bars .b { stroke-dasharray: 1; animation: level calc(var(--d) * var(--k)) ease-in-out infinite alternate; }
.ico-bars .b1 { --d: 1.8s; stroke-dashoffset: 0.31; }
.ico-bars .b2 { --d: 1.24s; animation-delay: -0.46s; }
.ico-bars .b3 { --d: 2.1s; stroke-dashoffset: 0.46; animation-delay: -0.9s; }
.ico-bars .b4 { --d: 1.48s; stroke-dashoffset: 0.69; animation-delay: -0.3s; }
@keyframes level { 0% { stroke-dashoffset: 0.74; } 40% { stroke-dashoffset: 0; } 70% { stroke-dashoffset: 0.5; } 100% { stroke-dashoffset: 0.16; } }

/* two languages: the globe turns */
.ico .gm { animation: turn calc(3.6s * var(--k)) ease-in-out infinite; }
@keyframes turn { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(0.1); } }

/* written down: lines are written, one after the other, held, and wiped */
.ico .w1, .ico .w2 { stroke-dasharray: 1; animation: write calc(3.4s * var(--k)) var(--move) infinite; }
.ico .w2 { animation-delay: calc(0.36s * var(--k)); }
@keyframes write { 0%, 4% { stroke-dashoffset: 1; } 26%, 78% { stroke-dashoffset: 0; } 96%, 100% { stroke-dashoffset: -1; } }

/* previous / next: the head leans into its bar, now and then */
.ico-next .nudge { animation: nudge-r calc(2.8s * var(--k)) var(--move) infinite; }
.ico-prev .nudge { animation: nudge-l calc(2.8s * var(--k)) var(--move) infinite; }
@keyframes nudge-r { 0%, 30%, 100% { transform: none; } 13% { transform: translateX(2.5px); } }
@keyframes nudge-l { 0%, 30%, 100% { transform: none; } 13% { transform: translateX(-2.5px); } }

/* stage settings: the three knobs slide in turn */
.ico-sliders .track { opacity: 0.5; }
.ico-sliders .k { fill: currentColor; stroke: none; }
.ico-sliders .k1 { animation: knob-a calc(4.8s * var(--k)) var(--move) infinite; }
.ico-sliders .k2 { animation: knob-b calc(4.8s * var(--k)) var(--move) infinite; }
.ico-sliders .k3 { animation: knob-c calc(4.8s * var(--k)) var(--move) infinite; }
@keyframes knob-a { 0%, 8%, 52%, 100% { transform: none; } 20%, 40% { transform: translateX(-7px); } }
@keyframes knob-b { 0%, 28%, 72%, 100% { transform: none; } 40%, 60% { transform: translateX(8px); } }
@keyframes knob-c { 0%, 48%, 92%, 100% { transform: none; } 60%, 80% { transform: translateX(-6px); } }

/* platforms: a screen being built, a prompt waiting, a laptop asleep, a phone being drawn */
.ico .cursor { animation: blink calc(1.1s * var(--k)) steps(1) infinite; }
.ico .blink { animation: blink-slow calc(3.2s * var(--k)) ease-in-out infinite; }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes blink-slow { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; } }

/* pressed, the rest do their move once, quickly */
:root .ico.is-pressed { --k: 0.3; }

/* where they sit */
.button .ico { width: 16px; height: 16px; margin-right: -4px; }
.button--small .ico { width: 14px; height: 14px; }
.row-link.has-ico::after { content: none; }
.row-link .ico { align-self: center; width: 18px; height: 18px; color: var(--muted); transition: color var(--t-hover) var(--ease); }
@media (hover: hover) { .row-link:hover .ico, .row-link:focus-visible .ico { color: var(--text); } }
.row-link:focus-visible .ico { color: var(--text); }
.platform h3 .ico { display: inline-block; width: 0.95em; height: 0.95em; margin-right: 0.4em; vertical-align: -0.12em; stroke-width: 2.6; color: var(--text-2); }
.platform--primary h3 .ico { stroke-width: 2.1; }

@media (prefers-reduced-motion: reduce) {
  .ico *, .ico.is-pressed * { animation: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js [data-reveal="rise"], .js .display .line > span { opacity: 1; transform: none; filter: none; }
  .js [data-reveal]:has([data-glass]) > :not(:has([data-glass])), .js [data-reveal]:has([data-glass]) :has([data-glass]) > :not(:has([data-glass])) { opacity: 1; }
  .interlude .lyrics, .interlude.is-in .lyrics { opacity: 1; }
}

@media print {
  .stage, .nav, .transport, .interlude { display: none !important; }
  body { background: #fff; color: #000; }
  .js [data-reveal], .js .display .line > span { opacity: 1 !important; transform: none !important; filter: none !important; }
  .js [data-reveal]:has([data-glass]) > :not(:has([data-glass])), .js [data-reveal]:has([data-glass]) :has([data-glass]) > :not(:has([data-glass])) { opacity: 1 !important; }
  .intro { display: none !important; }
}

/* ---------------------------------------------------------------- the lens (js/ui/lens.mjs)
   The pointer itself is the system's (the A, drawn in js/ui/cursor.mjs). Over the page, a
   layer that only draws while the pointer moves or presses: white shapes, laid on by
   difference, so under them the page turns to its other theme. */
.lens { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; z-index: 2147483000; pointer-events: none; mix-blend-mode: difference; }
.lens[hidden] { display: none; }
@media print { .lens { display: none; } }
