/* OpenGrid Studio — 2026 site. Violet-black and neon; accent colours follow the selected reverb space. */

:root {
  color-scheme: dark;

  /* Neon on violet-black: the whole palette. app.js and limiter.js read these for the canvases. */
  --bg: #0a0614;
  --bg-2: #110a22;
  --bg-3: #1d1136;
  --bg-plum: #1a0a29;
  --panel: #140c28;
  --ink: #f4edff;
  --ink-soft: #d8ccf0;
  --muted: #ad9fcc;
  --line: #b48cff2e;
  --line-strong: #7c63b0;
  --purple: #b57bff;
  --magenta: #ff4fd8;
  --pink: #ff5c9d;
  --cyan: #38e8ff;
  --gold: #ffc857;
  --green: #5cf2a8;
  --blue: #6ea8ff;
  --red: #ff6b7d;
  --tint: #4a1a6b;
  --shadow: #000000b3;
  --on-accent: var(--bg);

  /* Driven from app.js by the current space palette: bright ink, text accent, deep ink */
  --lo: #8a3ffc;
  --hi: #ff4fd8;
  --hot: #ffd6f6;

  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1200px;
  --r: 8px;
  --glow: 0 0 18px -4px var(--hi);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; scrollbar-color: var(--line-strong) var(--bg-2); accent-color: var(--hi); }
::selection { background: var(--tint); color: var(--ink); }
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-thumb { background: var(--line-strong); }
  ::-webkit-scrollbar-track { background: var(--bg-2); }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--hi); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--hi); outline-offset: 3px; border-radius: 6px; }

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important; clip-path: inset(50%) !important; overflow: hidden !important;
  width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
  border: 0 !important; white-space: nowrap !important;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--hi); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- background ---------- */
#space {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -2; display: block;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand img { height: 40px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--muted); font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--ink); background: var(--bg-2); text-decoration: none; }
.main-nav .nav-gh { color: var(--ink); border: 1px solid var(--line-strong); margin-left: 8px; }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; line-height: 1; white-space: nowrap;
  transition: transform .15s, box-shadow .25s, background .2s, border-color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary {
  background: var(--hi);
  color: var(--on-accent);
  box-shadow: var(--glow);
}
.btn.primary:hover { box-shadow: 0 0 28px -2px var(--hi); }
.btn.ghost { background: var(--panel); border-color: var(--line-strong); color: var(--ink); }
.btn.ghost:hover { border-color: var(--hi); box-shadow: var(--glow); }
.btn.sm { padding: 9px 15px; font-size: 13px; }
.btn.tiny { padding: 6px 12px; font-size: 12px; }

.sound-icon { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.sound-icon i { width: 3px; height: 4px; background: currentColor; border-radius: 1px; }
.sound-toggle[aria-pressed="true"] { border-color: var(--hi); color: var(--hi); }
.sound-toggle.primary[aria-pressed="true"] { color: var(--on-accent); }
.sound-toggle[aria-pressed="true"] .sound-icon i { animation: eqbar .9s ease-in-out infinite; }
.sound-icon i:nth-child(2) { animation-delay: -.3s !important; }
.sound-icon i:nth-child(3) { animation-delay: -.6s !important; }
.sound-icon i:nth-child(4) { animation-delay: -.15s !important; }
@keyframes eqbar { 0%, 100% { height: 4px; } 50% { height: 14px; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: calc(100vh - 68px); min-height: calc(100svh - 68px); display: flex; align-items: center; padding: 40px 0 90px; }
.hero-inner { max-width: var(--max); position: relative; }
.hero::before { /* keeps the copy readable over the surface */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 86%, transparent) 42%, transparent 68%);
}
.hero h1 {
  font-size: clamp(46px, 9vw, 116px); font-weight: 800; letter-spacing: -0.045em; line-height: .95;
  margin: 0 0 22px;
}
.grad { color: var(--hi); text-shadow: 0 0 .3em color-mix(in oklab, var(--hi) 55%, transparent); }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.space-picker {
  margin-top: 44px; max-width: 760px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 18px 20px 16px;
  box-shadow: 0 0 40px -20px var(--hi);
}
.space-note { font-size: 14px; color: var(--muted); }
.space-note strong { color: var(--ink); }
.space-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip {
  --c: var(--hi);
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em;
  padding: 7px 13px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line-strong); color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px; transition: all .2s;
}
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.chip:hover { color: var(--ink); border-color: var(--c); }
.chip[aria-pressed="true"] { color: var(--on-accent); background: var(--c); border-color: var(--c); font-weight: 600; }
.chip[aria-pressed="true"]::before { background: var(--on-accent); box-shadow: none; }
.space-readout { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0; font-family: var(--mono); font-size: 12px; }
.space-readout div { display: flex; gap: 8px; }
.space-readout dt { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.space-readout dd { margin: 0; color: var(--hot); min-width: 62px; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 2px solid var(--line-strong); border-radius: 14px;
}
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--hi); border-radius: 2px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- sections ---------- */
.section { padding: 110px 0; position: relative; background: var(--sec, var(--bg)); border-top: 1px solid var(--line); }
/* Sections are divided by solid colour, hard edge to hard edge. */
.gallery    { --sec: var(--bg-2); }
.playground { --sec: var(--bg); }
.ol-section { --sec: var(--bg-2); }
.software   { --sec: var(--bg); }
.artist     { --sec: var(--bg-plum); }
.philosophy { --sec: var(--bg-2); }
.open       { --sec: var(--bg); }
/* Faint floor grid, only behind the sections that are mostly pictures or empty space */
.section.gallery, .section.artist {
  --grid: color-mix(in oklab, var(--line) 55%, transparent);
  background-image: linear-gradient(var(--grid) 1px, transparent 0), linear-gradient(90deg, var(--grid) 1px, transparent 0);
  background-size: 48px 48px;
}
.section-head { max-width: 760px; margin-bottom: 40px; }
.gallery .section-head { text-align: center; }
.section-head h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 800; margin: 0 0 14px; }
.sub { color: var(--muted); font-size: 17px; }
/* Neon rule above each heading */
.section-head::before {
  content: ''; display: block; width: 132px; height: 2px; margin-bottom: 18px;
  background: linear-gradient(90deg in oklab, var(--lo), var(--hi) 60%, var(--cyan));
  box-shadow: 0 0 12px var(--hi);
}
.gallery .section-head::before { margin-inline: auto; }

.panel {
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r);
  box-shadow: 0 0 40px -24px var(--lo);
}

/* ---------- coverflow ---------- */
.gallery { padding-bottom: 80px; overflow: hidden; }
.flow { position: relative; height: clamp(250px, 44vw, 520px); outline-offset: -4px; touch-action: pan-y; cursor: grab; user-select: none; }
.flow:active { cursor: grabbing; }
.flow-stage { position: absolute; inset: 0; perspective: 1600px; transform-style: preserve-3d; }
.slide {
  position: absolute; left: 50%; top: 50%;
  width: min(74vw, 800px); aspect-ratio: 16 / 9;
  margin: 0; padding: 0; border: 1px solid var(--line-strong); border-radius: 18px;
  background: var(--panel); overflow: hidden;
  transform: translate(-50%, -50%) translateX(var(--x, 0)) translateZ(var(--z, 0)) rotateY(var(--ry, 0deg));
  opacity: var(--o, 1);
  transition: transform .8s cubic-bezier(.2,.8,.2,1), opacity .6s, box-shadow .6s;
  box-shadow: 0 24px 50px -24px var(--shadow);
  will-change: transform;
}
.slide.front { box-shadow: 0 0 60px -14px var(--hi), 0 0 0 1px var(--hi); cursor: zoom-in; }
.slide .blur { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(34px) saturate(1.3); opacity: .4; }
.slide img, .slide canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 14px; pointer-events: none; }
.slide canvas { padding: 0; }
.slide::after { /* side pictures fade into the dark */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: var(--bg-2); opacity: calc(1 - var(--b, 1)); transition: opacity .6s;
}
.flow-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1;
  background: var(--panel); border: 1px solid var(--line-strong); color: var(--ink);
}
.flow-nav:hover { border-color: var(--hi); color: var(--hi); box-shadow: var(--glow); }
.flow-nav.prev { left: max(16px, calc(50% - 560px)); }
.flow-nav.next { right: max(16px, calc(50% - 560px)); }
.flow-caption { text-align: center; margin-top: 26px; }
.flow-caption h3 { font-size: 28px; font-weight: 800; }
.flow-caption h3 small { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--hi); margin-left: 10px; letter-spacing: 0; }
.flow-caption p { color: var(--muted); margin-top: 6px; min-height: 1.6em; }
.flow-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
/* The button is a 24px target; the bar you see is drawn inside it. */
.flow-dots button { position: relative; min-inline-size: 24px; min-block-size: 24px; padding: 0; border: 0; background: transparent; transition: min-inline-size .3s; }
.flow-dots button::before { content: ""; position: absolute; left: 1px; right: 1px; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--line-strong); transition: background .3s; }
.flow-dots button[aria-current="true"] { min-inline-size: 40px; }
.flow-dots button[aria-current="true"]::before { background: var(--hi); }

/* ---------- playground ---------- */
.bench { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 20px; }
.panel-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); border-radius: var(--r) var(--r) 0 0; }
.panel-title { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--hi); border: 1px solid var(--hi); box-shadow: var(--glow); padding: 2px 8px; white-space: nowrap; }
.panel-hint { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-right: auto; }
#eq { width: 100%; height: 380px; display: block; touch-action: pan-y; cursor: crosshair; }
.eq-readout { font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 10px 16px; border-top: 1px solid var(--line); }
.radar-panel { display: flex; flex-direction: column; }
#radar { width: 100%; flex: 1; min-height: 300px; display: block; }
.radar-readout { display: flex; align-items: center; gap: 20px; padding: 10px 16px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
.radar-readout > div span { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-right: 8px; }
.radar-readout b { color: var(--hot); font-weight: 600; display: inline-block; min-width: 46px; }
.radar-readout .btn { margin-left: auto; }

/* ---------- catalogue ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter {
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
  background: var(--panel); border: 1px solid var(--line-strong); color: var(--muted);
  transition: all .2s;
}
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--hi); color: var(--on-accent); border-color: var(--hi); box-shadow: var(--glow); }
.filter small { font-family: var(--mono); margin-left: 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; perspective: 1400px; }
.card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out, border-color .3s, opacity .35s, box-shadow .3s;
  transform-style: preserve-3d;
}
.card::before { /* cursor glow */
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--hi) 18%, transparent), transparent 60%);
}
.card:hover { border-color: var(--hi); box-shadow: 0 0 36px -10px var(--hi); }
.card:hover::before { opacity: 1; }
.card.hide { display: none; }
.card.enter { animation: rise .5s both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.card-media {
  position: relative; aspect-ratio: 16 / 10; width: 100%; border: 0; padding: 0;
  background: var(--bg-2); overflow: hidden; cursor: zoom-in; display: block;
}
.card-media .blur { position: absolute; inset: -24px; background-size: cover; background-position: center; filter: blur(26px) saturate(1.3); opacity: .4; transition: background-image .8s; }
.card-media img, .card-media canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px;
  opacity: 0; transition: opacity .9s, transform 6s linear;
}
.card-media canvas { padding: 0; opacity: 1; }
.card-media img.on { opacity: 1; transform: scale(1.03); }
.card-media .pips { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 5px; z-index: 3; }
.card-media .pips i { width: 14px; height: 3px; border-radius: 2px; background: var(--line-strong); box-shadow: 0 0 0 1px var(--bg); }
.card-media .pips i.on { background: var(--hi); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 9px; border-radius: 6px; background: var(--panel); border: 1px solid currentColor; color: var(--muted);
}
.badge.released { color: var(--green); }
.badge.beta { color: var(--gold); }
.badge.dev { color: var(--pink); }
.badge.closed { color: var(--ink); }
.closed-note { flex-basis: 100%; font-size: 13px; color: var(--muted); line-height: 1.5; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.card-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card-top h3 { font-size: 22px; font-weight: 800; }
.ver { font-family: var(--mono); font-size: 12px; color: var(--hi); white-space: nowrap; }
.card-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card-desc { color: var(--ink-soft); font-size: 14.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 0; padding: 0; list-style: none; }
.chips li { font-family: var(--mono); font-size: 10.5px; padding: 3px 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); }
.chips li.os { color: var(--ink); border-color: var(--line-strong); background: var(--bg-2); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.board-link { margin-top: 30px; color: var(--muted); font-size: 14px; }
/* Links inside running text are underlined, so colour is not the only cue */
.board-link a, .closed-note a, .build p a, .ol-note a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- artist ---------- */
.artist-inner { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: center; }
.artist-logo img { border-radius: 28px; border: 1px solid var(--line-strong); box-shadow: 0 0 60px -16px var(--hi); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px) rotate(1.2deg); } }
.artist-copy h2 { font-size: clamp(36px, 5vw, 64px); font-weight: 800; margin: 0 0 18px; }
.artist-copy p { color: var(--ink-soft); margin-bottom: 14px; max-width: 680px; }
.artist-copy blockquote {
  margin: 22px 0 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--hi);
  font-size: 18px; font-weight: 500; color: var(--ink); max-width: 680px;
}
.artist-copy cite { display: block; margin-top: 10px; font-size: 13px; font-style: normal; font-family: var(--mono); color: var(--muted); }

/* ---------- philosophy ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1400px; }
.trio .panel { padding: 28px 26px; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out, border-color .3s; }
.trio .panel:hover { border-color: var(--hi); }
.num { font-family: var(--mono); font-size: 44px; font-weight: 600; line-height: 1; color: var(--hi); text-shadow: 0 0 14px var(--lo); }
.trio h3 { font-size: 21px; margin: 16px 0 10px; }
.trio p { color: var(--muted); font-size: 15px; }

/* ---------- compare / build ---------- */
.compare { overflow: hidden; }
.compare-row { display: grid; grid-template-columns: 1fr 1.3fr 1.3fr; gap: 16px; padding: 16px 22px; border-top: 1px solid var(--line); font-size: 15px; }
.compare-row > span:first-child { font-weight: 700; }
.compare-head { border-top: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.compare-head > span:last-child { color: var(--hi); }
.no { color: var(--muted); }
.no::before { content: '✕  '; color: var(--red); }
.yes::before { content: '✓  '; color: var(--green); font-weight: 700; }
.build { display: grid; grid-template-columns: 1fr 1.4fr; gap: 28px; align-items: center; padding: 26px; margin-top: 22px; }
.codes { display: grid; gap: 14px; min-width: 0; }
.code-block { margin: 0; min-width: 0; }
.code-block figcaption { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.build h3 { font-size: 22px; margin-bottom: 8px; }
.build p { color: var(--muted); font-size: 15px; }
.code { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.code pre { margin: 0; padding: 18px; overflow-x: auto; font-family: var(--mono); font-size: 13px; color: var(--ink); line-height: 1.7; }
.code .btn { position: absolute; top: 10px; right: 10px; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--hi); box-shadow: 0 -8px 30px -18px var(--hi); padding: 50px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 30px 50px; }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 12px; }
.footer-brand .tagline { font-family: var(--mono); color: var(--hi); font-size: 12px; letter-spacing: .08em; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; align-content: start; }
.site-footer nav a { color: var(--ink); font-size: 14px; font-weight: 600; }
.legal { grid-column: 1 / -1; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); padding-top: 20px; }

/* ---------- imprint and privacy pages ---------- */
.legal-body { background: var(--bg); }
.legal-body .site-header { background: color-mix(in srgb, var(--bg) 90%, transparent); border-bottom-color: var(--line); }
.legal-head { padding-top: 56px; padding-bottom: 28px; }
.legal-head h1 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin: 18px 0 14px; }
.legal-head .sub { color: var(--muted); max-width: 720px; }
.legal-back { font-family: var(--mono); font-size: 13px; color: var(--hi); }
.legal-text { max-width: 780px; padding-bottom: 90px; overflow-wrap: anywhere; }
.legal-text h2 { font-size: 21px; font-weight: 700; line-height: 1.3; margin: 40px 0 12px; padding-top: 26px; border-top: 1px solid var(--line); }
.legal-text h2:first-child, .legal-badge-pill + h2 { margin-top: 0; }
.legal-text h3 { font-size: 16px; font-weight: 700; margin: 26px 0 8px; }
.legal-text p, .legal-text li { color: var(--ink-soft); }
.legal-text p { margin: 0 0 14px; }
.legal-text ul { margin: 0 0 14px; padding-left: 22px; }
.legal-text li { margin-bottom: 8px; }
.legal-text strong { color: var(--ink); }
.legal-text a { color: var(--hi); text-decoration: underline; text-underline-offset: 3px; }
.legal-text code { font-family: var(--mono); font-size: .9em; color: var(--ink); background: var(--bg-2); border-radius: 6px; padding: 2px 6px; }
.legal-badge-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px; padding: 6px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-family: var(--mono); font-size: 12px; color: var(--hi); }
.legal-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--hi); }
.legal-updated { margin-top: 26px; font-size: 14px; color: var(--muted); }
.site-footer nav a[aria-current="page"] { color: var(--hi); }

/* ---------- lightbox ---------- */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; color: var(--ink); overflow: visible; }
.lightbox:modal { overscroll-behavior: contain; }
.lightbox::backdrop { background: color-mix(in srgb, var(--bg-2) 94%, transparent); backdrop-filter: blur(10px); overflow: hidden; overscroll-behavior: contain; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 12px; border: 1px solid var(--line-strong); box-shadow: 0 24px 60px -20px var(--shadow); margin: 0 auto; }
.lightbox p { text-align: center; margin-top: 12px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.lb-close, .lb-nav { position: fixed; width: 46px; height: 46px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line-strong); font-size: 24px; line-height: 1; z-index: 2; }
.lb-close { top: 16px; right: 16px; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-close:hover, .lb-nav:hover { border-color: var(--hi); color: var(--hi); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- OpenLimiter playground ---------- */
.ol-rack { overflow: hidden; }
.ol-rack .panel-bar { flex-wrap: wrap; }
.ol-rack .panel-hint { min-width: 6em; }
.ol-file { cursor: pointer; }
.ol-file:focus-within { outline: 2px solid var(--hi); outline-offset: 3px; }
.ol-status { margin: 0; padding: 0 16px; min-height: 0; font-family: var(--mono); font-size: 12px; color: var(--gold); }
.ol-status:not(:empty) { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.ol-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ol-module { padding: 16px 18px 20px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ol-module + .ol-module { border-left: 1px solid var(--line); }
.ol-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ol-head h3 { font-size: 18px; font-weight: 700; margin-right: auto; letter-spacing: -.01em; }
.ol-switch { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); cursor: pointer; }
.ol-switch input { width: 16px; height: 16px; margin: 0; }
#ol-eq, #ol-wave { width: 100%; height: 260px; display: block; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); touch-action: pan-y; }
#ol-eq { cursor: crosshair; }
.ol-readout { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0; min-height: 1.6em; }
.ol-bands, .ol-modes { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; gap: 6px; align-items: center; }
.ol-bands legend { float: left; font-family: var(--mono); font-size: 12px; color: var(--muted); padding: 0 8px 0 0; text-transform: uppercase; letter-spacing: .1em; }
.ol-bands label, .ol-modes label { position: relative; }
.ol-bands input, .ol-modes input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ol-bands span, .ol-modes span {
  display: inline-block; min-width: 34px; padding: 6px 12px; text-align: center; border-radius: 8px;
  border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 12px; color: var(--muted); background: var(--bg);
}
.ol-bands input:checked + span, .ol-modes input:checked + span { color: var(--on-accent); background: var(--hi); border-color: var(--hi); font-weight: 600; }
.ol-bands input:focus-visible + span, .ol-modes input:focus-visible + span { outline: 2px solid var(--hi); outline-offset: 3px; }
.ol-sliders { display: grid; gap: 10px; }
.ol-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; grid-template-areas: "l r v"; align-items: center; column-gap: 12px; }
.ol-row label { grid-area: l; font-size: 13px; color: var(--muted); }
.ol-row output { grid-area: v; font-family: var(--mono); font-size: 12px; color: var(--hot); min-width: 5.5em; text-align: right; font-variant-numeric: tabular-nums; }
.ol-row .ol-range { grid-area: r; }
.ol-auto { justify-self: start; }
.ol-meters { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--mono); font-size: 12px; }
.ol-meters span { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-right: 8px; }
.ol-meters b { color: var(--hot); font-weight: 600; display: inline-block; min-width: 5.2em; font-variant-numeric: tabular-nums; }
.ol-grbar { height: 8px; border-radius: 4px; background: var(--bg-3); overflow: hidden; --gr: 0; }
.ol-grbar i { display: block; height: 100%; width: calc(var(--gr) * 100%); background: var(--gold); transition: width .08s linear; }
.ol-note { padding: 14px 18px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

.ol-lufs { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
.ol-lufs-head h4 { font-size: 14px; font-weight: 700; margin: 0 auto 0 0; letter-spacing: 0; }
.ol-lufs-head abbr { text-decoration: none; font-family: var(--mono); font-size: 12px; color: var(--hi); margin-left: 6px; }
.ol-target { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.ol-target select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 8px; padding: 5px 8px; }
#ol-lufs { width: 100%; height: 64px; display: block; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }

/* Native range input, restyled with custom properties (--control-value is kept in step by limiter.js). */
.ol-range {
  --slider-track-size: 6px; --slider-thumb-size: 18px;
  --slider-track-color: var(--line-strong); --slider-fill-color: var(--hi); --slider-thumb-color: var(--hot);
  --attr-min: 0; --attr-max: 100; --control-value: 50;
  --slider-progress: calc((var(--control-value) - var(--attr-min)) / (var(--attr-max) - var(--attr-min)) * 100%);
  appearance: none; -webkit-appearance: none; inline-size: 100%; block-size: 2rem; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
}
.ol-range::-webkit-slider-runnable-track {
  block-size: var(--slider-track-size); border-radius: 999px;
  background: linear-gradient(to right, var(--slider-fill-color) var(--slider-progress), var(--slider-track-color) var(--slider-progress));
}
.ol-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; inline-size: var(--slider-thumb-size); block-size: var(--slider-thumb-size);
  margin-block-start: calc((var(--slider-track-size) - var(--slider-thumb-size)) / 2);
  border: 2px solid var(--panel); border-radius: 50%; background: var(--slider-thumb-color);
}
.ol-range::-moz-range-track { block-size: var(--slider-track-size); border-radius: 999px; background: var(--slider-track-color); }
.ol-range::-moz-range-progress { block-size: var(--slider-track-size); border-radius: 999px; background: var(--slider-fill-color); }
.ol-range::-moz-range-thumb { inline-size: var(--slider-thumb-size); block-size: var(--slider-thumb-size); box-sizing: border-box; border: 2px solid var(--panel); border-radius: 50%; background: var(--slider-thumb-color); }
.ol-range:focus-visible { outline: 2px solid var(--hi); outline-offset: 4px; }
.ol-range:disabled { opacity: .4; cursor: not-allowed; }
@media (max-width: 980px) {
  .ol-grid { grid-template-columns: 1fr; }
  .ol-module + .ol-module { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  #ol-eq, #ol-wave { height: 210px; }
  .ol-row { grid-template-columns: 4.5rem minmax(0, 1fr) auto; column-gap: 8px; }
  .panel-bar { flex-wrap: wrap; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .bench { grid-template-columns: 1fr; }
  .trio { grid-template-columns: 1fr; }
  .artist-inner { grid-template-columns: 1fr; gap: 30px; }
  .artist-logo img { width: 180px; height: 180px; }
  .build, .footer-inner { grid-template-columns: 1fr; }
  .panel-hint { display: none; }
  .panel-bar .btn { margin-left: auto; }
}
@media (max-width: 760px) {
  .hero::before { background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 94%, transparent) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 60%, color-mix(in srgb, var(--bg) 30%, transparent) 100%); }
  .wrap { padding: 0 16px; }
  .section { padding: 72px 0; }
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line-strong); padding: 8px 16px 16px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 8px; border-radius: 8px; font-size: 16px; }
  .main-nav .nav-gh { margin: 8px 0 0; text-align: center; }
  .hero { padding-top: 20px; }
  .slide { width: 84vw; }
  .flow-nav { display: none; }
  .grid { grid-template-columns: 1fr; }
  #eq { height: 300px; }
  .compare-row { grid-template-columns: 1fr; gap: 6px; }
  /* Not shown on phones, but kept for screen readers so the cells keep their column names. */
  .compare-head { position: absolute; clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; white-space: nowrap; }
  .space-readout { gap: 4px 18px; }
}

/* Forced colours drop the gradient fill and the second-ink backgrounds: draw the controls in system colours. */
@media (forced-colors: active) {
  .ol-range::-webkit-slider-runnable-track { background: CanvasText; }
  .ol-range::-webkit-slider-thumb { background: Highlight; }
  .ol-range::-moz-range-track { background: CanvasText; }
  .ol-range::-moz-range-thumb { background: Highlight; }
  .ol-range::-moz-range-progress { background: Highlight; }
  .section-head::before { display: none; }
  .chip[aria-pressed="true"], .filter[aria-pressed="true"], .ol-bands input:checked + span, .ol-modes input:checked + span { outline: 3px solid Highlight; }
  .ol-bands input:focus-visible + span, .ol-modes input:focus-visible + span { outline: 3px dashed CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
