/* Plush landing page. Black and quiet, so the app's own screens carry the colour. */

@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #050506;
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.14);
  --fg: #f4f2f6;
  --body: #b9b6c0;
  --muted: #86838e;
  --faint: #55535c;
  --accent: #e6c3ff;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", ui-monospace, Consolas, monospace;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wide: 80rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ul, pre, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
svg, img, video { display: block; }
em { font-style: italic; }
::selection { background: var(--accent); color: #1b1326; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 0.5rem; }

/* Film grain over everything: what keeps large black areas from looking flat. */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem; padding: 1.125rem var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), padding 0.3s var(--ease), border-color 0.3s;
}
.nav.is-stuck { padding-block: 0.75rem; background: rgb(5 5 6 / 0.72); backdrop-filter: blur(18px) saturate(1.3); border-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--fg); font: 600 1.0625rem/1 var(--sans); letter-spacing: -0.01em; }
.brand-mark { width: 1.5rem; height: 1.5rem; color: var(--accent); transition: transform 0.5s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.nav-links { display: flex; gap: 0.25rem; margin-left: auto; }
.nav-links a { padding: 0.375rem 0.75rem; border-radius: 99rem; color: var(--muted); font-size: 0.875rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 99rem; background: var(--fg); color: #0a0a0c; font-weight: 600; white-space: nowrap; will-change: transform;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.2), 0 1rem 3rem -1rem rgb(255 255 255 / 0.35);
  transition: background 0.2s, box-shadow 0.3s var(--ease);
}
.btn:hover { background: #fff; box-shadow: 0 0 0 1px #fff, 0 1rem 3.5rem -0.75rem rgb(255 255 255 / 0.55); }
.btn svg { width: 1.125rem; height: 1.125rem; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateY(2px); }
.btn-small { padding: 0.4375rem 1rem; font-size: 0.875rem; box-shadow: none; }
.btn-big { padding: 0.8125rem 1.75rem 0.8125rem 1.5rem; font-size: 1rem; }

/* ---------- Type ---------- */
.kicker { color: var(--muted); font: 500 0.75rem/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.kicker b { margin-right: 0.75rem; color: var(--accent); font-weight: 500; }
h1, h2 { color: var(--fg); font-family: var(--serif); font-weight: 400; letter-spacing: -0.015em; }
h2 { margin-top: 1.25rem; font-size: clamp(2.5rem, 5.6vw, 4.75rem); line-height: 1.02; }
h1 em, h2 em { color: var(--accent); }
h3 { color: var(--fg); font: 600 0.9375rem/1.4 var(--sans); letter-spacing: -0.005em; }
.lead { max-width: 30rem; color: var(--muted); font-size: 1.0625rem; }
.meta { display: flex; align-items: center; justify-content: center; gap: 0.75rem; color: var(--faint); font: 0.75rem/1 var(--mono); letter-spacing: 0.04em; }
.meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* ---------- Frames: every capture of the app sits in one of these ---------- */
.frame {
  position: relative; overflow: hidden; border-radius: clamp(0.5rem, 1vw, 0.875rem); background: #000;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.1), 0 3rem 7rem -2rem rgb(0 0 0 / 0.9), 0 0 9rem -3rem rgb(230 195 255 / 0.2);
  transform-style: preserve-3d; will-change: transform;
}
/* A lit top edge, as glass catches a lamp. */
.frame::before {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.45), rgb(255 255 255 / 0.04) 22%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* The sheen that follows the pointer. */
.frame::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(34rem circle at var(--mx, 50%) var(--my, 0%), rgb(255 255 255 / 0.09), transparent 60%);
}
.frame:hover::after { opacity: 1; }
.frame img, .frame video { width: 100%; height: auto; }
.slide .frame, .shot { aspect-ratio: 16 / 10; }

/* ---------- The scene: dust, glass, and a dark horizon ---------- */
.scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.dust { position: absolute; inset: 0 0 auto 0; width: 100%; height: 100svh; }
/* The hero's backdrop: the shot the player below opens on, graded down until the words sit on it. */
.backdrop {
  position: absolute; inset: 0 0 auto 0; height: min(120svh, 80rem); overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 36%, transparent 96%); mask-image: linear-gradient(#000 36%, transparent 96%);
}
.backdrop img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.66) saturate(0.9) contrast(1.05); will-change: transform; }
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 58% 40% at 50% 46%, rgb(5 5 6 / 0.55), transparent 74%),
    linear-gradient(180deg, rgb(5 5 6 / 0.35), transparent 16%),
    linear-gradient(90deg, rgb(5 5 6 / 0.55), transparent 24%, transparent 76%, rgb(5 5 6 / 0.55));
}
.planet {
  --d: max(150rem, 190vw);
  position: absolute; left: 50%; bottom: calc(var(--d) * -1 + 7.5rem); width: var(--d); height: var(--d); margin-left: calc(var(--d) / -2); border-radius: 50%;
  background: radial-gradient(ellipse 30% 4% at 50% 0%, rgb(255 255 255 / 0.16), transparent), #050506;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), inset 0 3rem 5rem -3rem rgb(255 255 255 / 0.16), 0 -1px 1.25rem rgb(255 255 255 / 0.22), 0 -4rem 10rem -1rem rgb(230 195 255 / 0.16);
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(8rem, 17vh, 11rem) var(--gutter) 0; text-align: center; }
.hero-copy { display: flex; flex-direction: column; align-items: center; }
.hero-title { margin-top: 1.75rem; font-size: clamp(3.25rem, 9.4vw, 7.5rem); line-height: 0.96; letter-spacing: -0.025em; }
.hero-title > span { display: block; }
.hero-sub { margin-top: 1.75rem; max-width: 34rem; color: var(--body); font-size: clamp(1rem, 1.5vw, 1.125rem); }
.hero-cta { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.25rem 1.75rem; }
.hero .meta { margin-top: 1.75rem; }

/* The player. Behind it, the film's own colours spill onto the page. */
.stage { position: relative; max-width: var(--wide); margin: clamp(3.5rem, 7vw, 5.5rem) auto 0; perspective: 1800px; }
.ambient { position: absolute; inset: -6% -4% -10%; width: 108%; height: 116%; z-index: -1; filter: blur(70px) saturate(1.5); opacity: 0.6; pointer-events: none; }
.player { aspect-ratio: 1280 / 536; transform-origin: 50% 0; cursor: default; }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.player .ui { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; transition: opacity 0.6s var(--ease); }
.player.is-idle .ui { opacity: 0; }
.credit { margin-top: 1.25rem; color: var(--faint); font: 0.75rem/1.5 var(--mono); letter-spacing: 0.02em; }
.credit em { color: var(--muted); }

/* ---------- Statement ---------- */
.statement { max-width: 68rem; margin: 0 auto; padding: clamp(6rem, 15vw, 11rem) var(--gutter) 0; text-align: center; }
.statement-text { margin-top: 1.75rem; color: var(--fg); font: 400 clamp(2.125rem, 5.2vw, 4.25rem)/1.08 var(--serif); letter-spacing: -0.02em; text-wrap: balance; }
.statement-text em, .statement-text .em { color: var(--accent); font-style: italic; }

/* The shelf: two rows of posters lying back under the words, sliding past each other on scroll. */
.shelf {
  height: clamp(13rem, 27vw, 23rem); margin-top: clamp(2.5rem, 6vw, 4.5rem); overflow: hidden; perspective: 1100px;
  -webkit-mask-image: linear-gradient(#000 20%, transparent 94%), linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(#000 20%, transparent 94%), linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-composite: intersect;
}
.shelf-plane { display: grid; gap: 1rem; transform: rotateX(40deg) scale(1.18); transform-origin: 50% 0; }
.shelf-row { display: flex; gap: 1rem; width: max-content; margin-left: 50%; translate: -50% 0; will-change: transform; }
.shelf-row img { width: clamp(6rem, 10.5vw, 9.5rem); aspect-ratio: 12 / 17; border-radius: 0.5rem; object-fit: cover; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08); filter: brightness(0.78) saturate(0.9); transition: filter 0.4s, transform 0.4s var(--ease); }
.shelf-row img:hover { filter: none; transform: translateY(-6px) scale(1.04); }

/* ---------- Sections ---------- */
.section { max-width: var(--wide); margin: 0 auto; padding: clamp(6rem, 14vw, 11rem) var(--gutter) 0; }
.head-split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 3rem; }

/* A capture beside its words. */
.row { margin-top: clamp(3.5rem, 8vw, 6.5rem); display: grid; grid-template-columns: 1.7fr 1fr; align-items: center; gap: clamp(2rem, 5vw, 5rem); perspective: 1600px; }
.row-flip { grid-template-columns: 1fr 1.7fr; }
.row-flip .frame { order: 2; }
.row-copy h3 { font: 400 clamp(1.75rem, 2.8vw, 2.5rem)/1.1 var(--serif); letter-spacing: -0.01em; }
.row-copy p { margin-top: 1rem; color: var(--muted); max-width: 26rem; }
.ticks { margin-top: 1.5rem; border-top: 1px solid var(--line); max-width: 26rem; }
.ticks li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); color: var(--body); font-size: 0.875rem; }
.ticks li::before { content: "+"; margin-right: 0.75rem; color: var(--accent); font-family: var(--mono); }

.comp { aspect-ratio: var(--ar); }
.comp-in { position: absolute; inset: 0; transform-origin: var(--ox) var(--oy); }
.comp-in img { position: absolute; inset: 0; width: 100%; height: 100%; }
.comp-in .pic { object-fit: cover; }

/* Sources: each under its own mark, in the colours the app gives them. */
.cell.src { padding: 1.5rem 1.5rem 1.75rem; }
.src > span { display: block; margin-bottom: 2.25rem; color: var(--faint); font: 0.75rem/1 var(--mono); letter-spacing: 0.08em; transition: color 0.3s; }
.src:hover > span { color: var(--accent); }
.src:hover .marks svg { transform: translateY(-3px); filter: drop-shadow(0 0.5rem 1rem rgb(255 255 255 / 0.18)); }
.src:hover .marks svg + svg { transition-delay: 0.06s; }
.cell p { margin-top: 0.375rem; color: var(--muted); font-size: 0.875rem; line-height: 1.55; }
.marks { display: flex; gap: 0.875rem; margin-bottom: 1.5rem; }
.marks svg { width: 2.25rem; height: 2.25rem; transition: transform 0.5s var(--ease), filter 0.5s; }

/* ---------- The library: three screens passing sideways while the page holds still ---------- */
.gallery { margin-top: clamp(4rem, 9vw, 7rem); overflow: hidden; }
.gallery-pin { display: flex; flex-direction: column; justify-content: center; gap: clamp(1.5rem, 4vh, 3rem); min-height: 100svh; padding: 5rem 0 2rem; }
.gallery-head { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.gallery-head h2 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); }
.gallery-track { display: flex; gap: clamp(1.5rem, 4vw, 4rem); padding: 0 max(var(--gutter), calc((100vw - var(--wide)) / 2 + var(--gutter))); width: max-content; will-change: transform; }
.slide { width: min(78vw, 64rem, calc((100svh - 21rem) * 1.6)); min-width: 18rem; }
.slide figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-top: 1.25rem; }
.slide figcaption b { color: var(--fg); font: 400 1.5rem/1.2 var(--serif); }
.slide figcaption span { color: var(--muted); font-size: 0.9375rem; }

/* ---------- The feature grid: cells share hairlines instead of each having its own box ---------- */
.grid { margin-top: 3.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; }
.cell { position: relative; padding: 0 1.5rem 1.75rem; background: var(--bg); overflow: hidden; }
.cell::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 0%), rgb(255 255 255 / 0.06), transparent 65%);
}
.cell:hover::before { opacity: 1; }
.cell h3 { display: flex; align-items: center; gap: 0.5rem; }
.cell h3 svg { width: 1rem; height: 1rem; color: var(--muted); transition: color 0.3s; }
.cell:hover h3 svg { color: var(--accent); }
.art { height: 11.5rem; margin: 0 -1.5rem 1.25rem; padding: 1.75rem; display: grid; align-items: center; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.art > div { position: relative; }

/* The player's four extras: the same grid, two across, with taller pictures. */
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); margin-top: clamp(3.5rem, 8vw, 6.5rem); }
.grid-2 .art { height: 17rem; }
.art-shot { display: block; position: relative; padding: 0; overflow: hidden; }
.art-shot img { position: absolute; max-width: none; }
.art-palette .back { inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(8px) brightness(0.4); transform: scale(1.1); }
.art-palette img:not(.back) { left: 50%; top: 0.25rem; width: 104%; translate: -50% 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); transition: transform 0.8s var(--ease); }
.cell:hover .art-palette img:not(.back) { transform: translateY(-6px) scale(1.02); }
.art-resume img { left: 1.5rem; top: 2rem; height: calc(100% - 2rem); width: auto; transition: transform 1.8s var(--ease); }
.cell:hover .art-resume img { transform: translateX(-14%); }
.art-tv img { left: 1.5rem; top: 1.75rem; width: 112%; border-radius: 0.625rem 0 0 0; box-shadow: 0 0 0 1px var(--line-2); transform-origin: 0 0; transition: transform 1.4s var(--ease); }
.cell:hover .art-tv img { transform: scale(1.05); }

/* Keys that answer to the visitor's own keyboard. */
.grid-2 .art-keys { --k: clamp(1.875rem, 3.6vw, 2.75rem); display: grid; align-content: center; justify-items: center; gap: 1.5rem; padding: 1.5rem; -webkit-mask-image: none; mask-image: none; }
.keys { display: grid; grid-template-columns: repeat(8, var(--k)); gap: 0.45rem; }
.keys-row { display: contents; }
.keys button {
  height: var(--k); padding: 0; border: 0; border-radius: 0.5rem; cursor: pointer; color: var(--body); font: 500 0.8125rem/1 var(--mono);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0.03));
  box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgb(255 255 255 / 0.2), 0 2px 0 rgb(0 0 0 / 0.7);
  transition: transform 0.12s, background 0.2s, color 0.2s, box-shadow 0.25s;
}
.keys button:hover { color: var(--fg); }
.keys .key-up { grid-column: 7; }
.keys .key-space { grid-column: 1 / span 5; }
.keys button.is-down { transform: translateY(2px); color: #1b1326; background: var(--accent); box-shadow: 0 0 1.75rem rgb(230 195 255 / 0.55); }
.key-say { display: flex; align-items: baseline; gap: 0.75rem; color: var(--muted); font: 0.8125rem/1 var(--mono); }
.key-say b { color: var(--accent); font-weight: 500; }

.hdr { --split: 50%; height: 100%; border-radius: 0.625rem; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); cursor: ew-resize; touch-action: pan-y; }
.hdr-pic { position: absolute; inset: 0; background: url("media/still-valley.jpg") 62% 30% / 190% auto; filter: saturate(0.45) brightness(0.55) contrast(0.85); }
.hdr-on { filter: saturate(1.15) brightness(1.12) contrast(1.05); clip-path: inset(0 0 0 var(--split)); }
.hdr-line { position: absolute; top: 0; bottom: 0; left: var(--split); width: 1px; background: #fff; box-shadow: 0 0 0.75rem rgb(255 255 255 / 0.9); }
.hdr-line::after { content: ""; position: absolute; top: 50%; left: 50%; width: 0.75rem; height: 0.75rem; margin: -0.375rem; border-radius: 50%; background: #fff; }
.tag { position: absolute; top: 0.5rem; padding: 0.125rem 0.375rem; border-radius: 0.25rem; background: rgb(0 0 0 / 0.45); color: rgb(255 255 255 / 0.85); font: 0.625rem/1.2 var(--mono); letter-spacing: 0.1em; }
.tag-l { left: 0.5rem; } .tag-r { right: 0.5rem; }

.motion { display: grid; gap: 1.5rem; }
.motion div { display: grid; grid-template-columns: 4rem 1fr; align-items: center; }
.motion span { color: var(--faint); font: 0.625rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.motion b { position: relative; height: 1px; background: var(--line-2); }
.ball { position: absolute; top: -0.25rem; left: 0; width: 0.5625rem; height: 0.5625rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0.75rem var(--accent); animation: glide 2.4s linear infinite alternate; }
.ball-step { background: var(--muted); box-shadow: none; animation-timing-function: steps(8); }
@keyframes glide { to { left: calc(100% - 0.5625rem); } }

.memory { display: grid; }
.memory div { display: flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.75rem; }
.memory div:first-child { border-top: 0; }
.memory span { margin-right: auto; }
.memory b { padding: 0.125rem 0.5rem; border-radius: 99rem; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--body); font: 500 0.625rem/1.5 var(--sans); white-space: nowrap; }
.memory b.pop { color: var(--accent); box-shadow: inset 0 0 0 1px rgb(230 195 255 / 0.3); }

.band { height: 100%; border-radius: 0.625rem; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-2); }
.band i { position: absolute; inset: 0; background: linear-gradient(90deg, #08080a, #5d5a64 60%, #ece9f0); }
.band-steps { display: flex; animation: unband 5s ease-in-out infinite; }
.band-steps > u { flex: 1; }
@keyframes unband { 0%, 30% { opacity: 1; } 55%, 85% { opacity: 0; } }

.flyout { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.75rem; padding: 0.875rem; border-radius: 0.75rem; box-shadow: inset 0 0 0 1px var(--line-2); background: rgb(255 255 255 / 0.02); }
.fly-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; box-shadow: inset 0 0 0 1px var(--line-2); }
.fly-icon svg { width: 1.5rem; height: 1.5rem; color: var(--accent); }
.fly-text { display: grid; min-width: 0; font-size: 0.8125rem; line-height: 1.3; }
.fly-text b { color: var(--fg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fly-text em { font-style: normal; color: var(--muted); font-size: 0.6875rem; }
.fly-keys { display: flex; gap: 0.375rem; color: var(--body); }
.fly-keys svg { width: 1rem; height: 1rem; }
.fly-bar { grid-column: 1 / -1; height: 1px; background: var(--line-2); }
.fly-bar i { display: block; height: 1px; width: 30%; background: var(--accent); box-shadow: 0 0 0.5rem var(--accent); animation: fill 9s linear infinite; }
@keyframes fill { to { width: 100%; } }

.tune { display: grid; gap: 0.75rem; }
.tune-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0.875rem; border-radius: 0.75rem; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--fg); font-size: 0.8125rem; }
.toggle { flex: none; width: 2.25rem; height: 1.25rem; padding: 0; border: 0; border-radius: 99rem; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; transition: background 0.3s var(--ease), box-shadow 0.3s; }
.toggle i { display: block; width: 0.75rem; height: 0.75rem; margin-left: 0.25rem; border-radius: 50%; background: var(--muted); transition: transform 0.35s var(--ease), background 0.3s; }
.toggle[aria-checked="true"] { background: var(--accent); box-shadow: 0 0 1rem rgb(230 195 255 / 0.4); }
.toggle[aria-checked="true"] i { transform: translateX(1rem); background: #1b1326; }
.tune-code { padding: 0 0.875rem; color: var(--body); font: 0.75rem/1.7 var(--mono); }
.tune-code code { font: inherit; }
.tune-code .c { color: var(--faint); }
.tune-code .v { color: var(--accent); }
.deband { border-radius: 0.25rem; transition: background 0.6s; }
.deband.flash { background: rgb(230 195 255 / 0.2); transition: none; }

.row-settings { grid-template-columns: 1.3fr 1fr; }
.row-settings .row-copy p + p { margin-top: 0.75rem; }

/* The extras ticker. Still: a centred list. Live (main.js): one row sliding left for ever, fading at both ends. */
.ticker { margin-top: 2.5rem; color: var(--muted); font: 0.75rem/1.4 var(--mono); letter-spacing: 0.02em; }
.ticker-track { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 0; }
.ticker li { padding: 0 1.125rem; white-space: nowrap; }
.ticker li::before { content: "+ "; color: var(--accent); }
.ticker.is-live { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker.is-live .ticker-track { flex-wrap: nowrap; justify-content: flex-start; width: max-content; animation: ticker var(--time, 40s) linear infinite; }
.ticker.is-live:hover .ticker-track { animation-play-state: paused; }
.ticker li { transition: color 0.3s; }
.ticker li:hover { color: var(--fg); }
@keyframes ticker { to { transform: translateX(calc(var(--set) * -1)); } }

/* ---------- Download ---------- */
.cta { position: relative; margin-top: clamp(6rem, 14vw, 11rem); padding: clamp(6rem, 14vw, 10rem) 1.5rem 14rem; text-align: center; display: flex; flex-direction: column; align-items: center; overflow: hidden; }
.cta-mark { width: 3.5rem; height: 3.5rem; color: var(--accent); filter: drop-shadow(0 0 2rem rgb(230 195 255 / 0.5)); }
.cta h2 { margin-top: 1.75rem; font-size: clamp(3rem, 8vw, 6.5rem); }
.cta .lead { margin: 1.5rem 0 2.25rem; }
.cta .meta { margin-top: 1.75rem; }

/* ---------- Footer: one quiet row, a rule, the small print, and the name writ large ---------- */
.footer { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding: 3.5rem var(--gutter) 0; background: var(--bg); color: var(--muted); font-size: 0.875rem; }
.footer-in { max-width: var(--wide); margin: 0 auto; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 3rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; }
.footer-nav a, .to-top { position: relative; color: var(--muted); transition: color 0.25s; }
.footer-nav a::after, .to-top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -0.25rem; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.4s var(--ease); }
.footer-nav a:hover, .to-top:hover { color: var(--fg); }
.footer-nav a:hover::after, .to-top:hover::after { transform: scaleX(1); }
.footer-note { margin-top: 1.5rem; max-width: 28rem; color: var(--faint); line-height: 1.6; }
.footer-base { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 2rem; margin-top: 3.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--faint); font: 0.6875rem/1.6 var(--mono); letter-spacing: 0.03em; }
.footer-base p { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.footer-base i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.to-top { color: var(--faint); }
.footer-credits { margin-top: 0.75rem; max-width: 46rem; color: var(--faint); font: 0.6875rem/1.7 var(--mono); letter-spacing: 0.02em; opacity: 0.75; }
.footer-word {
  margin: clamp(0.5rem, 2vw, 2rem) 0 -0.19em; text-align: center; pointer-events: none; user-select: none;
  font: 400 clamp(7rem, 27vw, 26rem)/1 var(--serif); letter-spacing: -0.045em;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.13), rgb(255 255 255 / 0.03) 90%); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Smaller screens ---------- */
@media (max-width: 64rem) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid-5 .cell:last-child { grid-column: 1 / -1; }
  .row, .row-flip, .row-settings { grid-template-columns: 1fr; }
  .row-flip .frame { order: 0; }
}
/* Too narrow (or too still) to pass sideways: the three screens stack. */
@media (max-width: 47.99rem), (prefers-reduced-motion: reduce) {
  .gallery-pin { min-height: 0; padding-top: 0; }
  .gallery-track { flex-direction: column; width: auto; padding: 0 var(--gutter); gap: 3rem; }
  .slide { width: 100%; }
}
@media (max-width: 40rem) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; }
  .grid { grid-template-columns: 1fr; }
  .ambient { filter: blur(40px) saturate(1.5); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ball, .band-steps, .fly-bar i { animation: none; }
  .band-steps { opacity: 0; }
}
