/* apps.dinami.ai — Atelier Zero · Navy (tokens mirror dinami.ai DESIGN.md §2–3) */
:root {
  --bg: #0d1520;
  --surface: #131e2d;
  --surface-2: #182536;
  --fg: #e8edf4;
  --muted: #93a1b4;
  --faint: #5f6e83;
  --border: #243348;
  --border-soft: #1a2638;
  --accent: #ed6f5c;
  --accent-soft: #f08e7c;
  --mustard: #e9b94a;
  --bone: #f7f1de;
  --ink: #15140f;

  --accent-wash: color-mix(in oklab, var(--accent) 14%, transparent);
  --fg-wash: color-mix(in oklab, var(--fg) 6%, transparent);
  --glass: color-mix(in oklab, var(--bg) 72%, transparent);

  --font-display: 'Inter Tight', -apple-system, system-ui, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --container: 1360px;
  --gutter: clamp(16px, 4.4vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --nav-h: 72px;
}

/* ── reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-padding-top: var(--nav-h); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 16px; font-weight: 300; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.98; }
ul { margin: 0; padding: 0; list-style: none; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 500; letter-spacing: -0.01em; color: var(--accent-soft); }
kbd {
  font-family: var(--font-mono); font-size: 11px; line-height: 1; padding: 4px 6px;
  border: 1px solid var(--border); border-radius: 5px; color: var(--muted); background: var(--fg-wash);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 500; }
.skip:focus { top: 12px; }
.mono { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.04em; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* paper grain, like dinami.ai */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
}

/* ── shared bits ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}
.eyebrow.mono { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.16em; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 70%, transparent); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap;
  height: 46px; padding: 0 22px; border-radius: 999px;
  font-family: var(--font-display); font-size: 14px; font-weight: 700; letter-spacing: 0.01em;
  transition: transform .2s var(--ease), background .2s ease, color .2s ease, border-color .2s ease, gap .2s ease;
}
.btn:hover { gap: 14px; }
.btn:active { transform: scale(.97); }
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: var(--accent-soft); }
.btn-ghost { border: 1px solid color-mix(in oklab, var(--fg) 28%, transparent); color: var(--fg); background: color-mix(in oklab, var(--bg) 35%, transparent); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--fg); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn kbd { border-color: color-mix(in oklab, var(--fg) 22%, transparent); }

/* ── nav ── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); border-bottom-color: var(--border-soft); }
.nav-logo img { height: 34px; width: auto; }
.nav-links { display: flex; gap: 26px; font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--muted); }
.nav-links a:hover { color: var(--fg); }
.nav-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.kbd-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 8px 0 14px; border-radius: 999px;
  border: 1px solid var(--border); background: color-mix(in oklab, var(--surface) 70%, transparent); color: var(--muted);
  font-family: var(--font-display); font-size: 13px; font-weight: 600; transition: border-color .2s ease, color .2s ease;
}
.kbd-btn:hover { border-color: var(--faint); color: var(--fg); }
.kbd-btn svg, .search svg, .palette-search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.lang button { height: 32px; min-width: 38px; padding: 0 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 12px; color: var(--faint); transition: background .2s, color .2s; }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.nav-cta { height: 40px; padding: 0 18px; font-size: 13px; }

/* ── film (scroll scrub) ── */
.film { position: relative; height: 560vh; background: var(--bg); }
.film-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.film-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg); }
.film-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in oklab, var(--bg) 82%, transparent) 0%, color-mix(in oklab, var(--bg) 40%, transparent) 38%, transparent 62%),
    linear-gradient(0deg, color-mix(in oklab, var(--bg) 70%, transparent) 0%, transparent 30%),
    linear-gradient(180deg, color-mix(in oklab, var(--bg) 60%, transparent) 0%, transparent 18%);
}
.film-hud { position: absolute; inset: calc(var(--nav-h) + 8px) var(--gutter) 28px; pointer-events: none; }
.hud-corner { position: absolute; width: 18px; height: 18px; border-color: color-mix(in oklab, var(--fg) 34%, transparent); border-style: solid; border-width: 0; }
.hud-tl { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.hud-tr { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.hud-bl { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.hud-br { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.hud-meter { position: absolute; right: 30px; bottom: -6px; display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.hud-bar { width: 140px; height: 1px; background: color-mix(in oklab, var(--fg) 20%, transparent); position: relative; }
.hud-bar i { position: absolute; left: 0; top: -1px; height: 3px; width: 0; background: var(--accent); }
.hud-code:empty { display: none; }

.chapters { position: absolute; inset: 0; padding: 0 var(--gutter); pointer-events: none; }
.chapter {
  --o: 0; --y: 24px;
  position: absolute; left: var(--gutter); bottom: clamp(56px, 13vh, 140px); width: min(640px, calc(100% - 2 * var(--gutter)));
  display: flex; flex-direction: column; gap: 22px; opacity: var(--o); transform: translate3d(0, var(--y), 0);
  will-change: opacity, transform;
}
.chapter.is-on { pointer-events: auto; }
/* type scales with the viewport HEIGHT too, so a bottom-anchored chapter never climbs under the nav */
.chapter h1 { font-size: clamp(38px, min(7.4vw, 11svh), 118px); }
.chapter h2 { font-size: clamp(32px, min(5.4vw, 8.5svh), 84px); }
.chapter-lead { font-size: clamp(15px, 1.25vw, 19px); color: color-mix(in oklab, var(--fg) 82%, transparent); max-width: 48ch; }
.chapter-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.ch-1 { bottom: clamp(56px, 13vh, 170px); }
@media (min-width: 761px) {
  /* the closing frame puts the plinth arc mid-screen: read under it, centred */
  .ch-4 { left: 50%; bottom: clamp(36px, 6vh, 64px); width: min(900px, calc(100% - 2 * var(--gutter))); align-items: center; text-align: center; gap: 16px; transform: translate3d(-50%, var(--y), 0); }
  .ch-4 h2 { font-size: clamp(28px, min(3.3vw, 6svh), 54px); }
}
@media (max-height: 760px) {
  .chapter { gap: 14px; }
  .scroll-cue { display: none; }
}
@media (max-height: 560px) {
  .ch-1 .chapter-lead, .ch-2 .chapter-lead { display: none; }
}
.chapter-panel {
  padding: clamp(20px, 2.2vw, 32px); border-radius: 22px; border: 1px solid color-mix(in oklab, var(--fg) 12%, transparent);
  background: color-mix(in oklab, var(--bg) 78%, transparent); backdrop-filter: blur(18px) saturate(1.1);
}
.chapter-panel h2 { font-size: clamp(30px, min(3.6vw, 6.5svh), 60px); }

/* ── ch-3: the collection — floating product medallions over the plinth hall ── */
.ch-3 {
  width: calc(100% - 2 * var(--gutter)); display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px); align-items: end; bottom: clamp(40px, 9vh, 110px);
}
.ch3-copy { display: flex; flex-direction: column; gap: 14px; }
.ch3-hint { display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.orbs {
  --orb: clamp(74px, min(7.2vw, 13svh), 124px);
  display: flex; flex-wrap: wrap; justify-content: center; align-content: end; gap: clamp(10px, 1.4vw, 22px) clamp(8px, 1.2vw, 20px);
  padding-bottom: 6px;
}
.orb {
  --mx: 0px; --my: 0px; --i: 0;
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; width: calc(var(--orb) + 18px);
  -webkit-tap-highlight-color: transparent;
  animation: bob calc(3.2s + var(--i) * .23s) ease-in-out calc(var(--i) * -.41s) infinite alternate;
}
.orb:nth-child(even) { margin-top: calc(var(--orb) * .32); }
@keyframes bob { from { transform: translateY(-9px) rotate(-1.2deg); } to { transform: translateY(9px) rotate(1.2deg); } }
/* staggered pop-in when the chapter arrives */
.orb-pop { display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0; transform: scale(.4) translateY(30px); transition: opacity .5s var(--ease), transform .8s cubic-bezier(.34, 1.56, .64, 1); transition-delay: calc(var(--i) * 55ms); }
.ch-3.is-on .orb-pop, .orbs.is-on .orb-pop { opacity: 1; transform: none; }
.orb-disc {
  position: relative; width: var(--orb); height: var(--orb); border-radius: 50%; perspective: 700px;
  transform: translate3d(var(--mx), var(--my), 0) scale(var(--s, 1)); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.orb-disc::before, .orb-disc::after {   /* two staggered sonar rings: "press me" */
  content: ''; position: absolute; inset: -2px; border-radius: 50%; border: 1.5px solid var(--accent); opacity: 0; pointer-events: none;
  animation: sonar 2.8s cubic-bezier(.2, .6, .3, 1) calc(var(--i) * .37s) infinite;
}
.orb-disc::after { animation-delay: calc(var(--i) * .37s + 1.4s); }
@keyframes sonar { 0% { transform: scale(1); opacity: .75; } 80%, 100% { transform: scale(1.55); opacity: 0; } }
.orb-card { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.34, 1.36, .64, 1); }
.orb.is-flipped .orb-card { transform: rotateY(180deg); }
.orb-face {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 1.5px solid color-mix(in oklab, var(--bone) 55%, transparent);
  box-shadow: 0 18px 40px -14px rgba(5, 9, 15, .85), 0 0 0 5px color-mix(in oklab, var(--bg) 55%, transparent);
}
.orb-front img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.18); transition: transform .8s var(--ease); }
.orb-front::after {  /* glossy sweep */
  content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%);
  transform: translateX(-120%); animation: sweep 5.5s ease-in-out calc(var(--i) * .5s) infinite;
}
@keyframes sweep { 0%, 70% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.orb-back { transform: rotateY(180deg); display: grid; place-items: center; background: var(--bone); }
.orb-back[data-bg="dark"] { background: #0f1722; }
.orb-back[data-bg="white"] { background: #fff; }
.orb-back img { width: 74%; height: 74%; object-fit: contain; }
.orb-back .orb-word { font-family: var(--font-display); font-weight: 800; font-size: calc(var(--orb) * .17); line-height: 1; letter-spacing: -.03em; color: var(--ink); text-align: center; padding: 0 10%; }
.orb-back .orb-word em { color: var(--accent); display: block; font-size: 1.05em; }
.orb-name .on-short { display: none; }
.orb-name {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .03em; white-space: nowrap; color: var(--fg);
  padding: 4px 9px; border-radius: 999px; background: color-mix(in oklab, var(--bg) 78%, transparent); backdrop-filter: blur(6px);
  border: 1px solid color-mix(in oklab, var(--fg) 12%, transparent); transition: background .25s, color .25s, border-color .25s;
}
@media (hover: hover) {
  .orb:hover { animation-play-state: paused; z-index: 2; }
  .orb:hover .orb-disc { --s: 1.16; }
  .orb:hover .orb-face { box-shadow: 0 24px 50px -12px rgba(5, 9, 15, .9), 0 0 0 5px color-mix(in oklab, var(--accent) 45%, transparent), 0 0 46px color-mix(in oklab, var(--accent) 55%, transparent); }
  .orb:hover .orb-front img { transform: scale(1.32); }
  .orb:hover .orb-name { background: var(--accent); color: var(--ink); border-color: var(--accent); }
}
.orb:focus-visible { outline: none; }
.orb:focus-visible .orb-face { box-shadow: 0 0 0 3px var(--accent); }
.orb:active .orb-disc { --s: .94; }
/* an attention "ping" that hops between medallions */
.orb.is-ping .orb-disc { animation: ping .9s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes ping { 0%, 100% { scale: 1; } 30% { scale: 1.2; } 55% { scale: .96; } 75% { scale: 1.06; } }
/* burst of sparks when pressed */
.orb-spark { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--accent); pointer-events: none; animation: spark .75s cubic-bezier(.2, .7, .3, 1) forwards; }
.orb-spark:nth-child(3n) { background: var(--mustard); }
.orb-spark:nth-child(3n+1) { background: var(--bone); }
@keyframes spark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--sx), var(--sy)) scale(.2); opacity: 0; } }
/* wide screens: the medallions sit on the film's plinths; app.js sets --orb, --tx, --ty every frame */
.orbs.is-tracked { position: absolute; inset: 0; display: block; padding: 0; pointer-events: none; opacity: 0; will-change: opacity; }
.orbs.is-tracked .orb { position: absolute; left: 0; top: 0; translate: var(--tx, -999px) var(--ty, -999px); gap: 6px; }
.orbs.is-tracked .orb:nth-child(even) { margin-top: 0; }
.orbs.is-tracked .orb-pop { gap: 6px; }
.orbs.is-tracked.is-on .orb-pop { pointer-events: auto; }
.orbs.is-tracked .orb { animation-name: hover-bob; }
@keyframes hover-bob { from { transform: translateY(-4px); } to { transform: translateY(3px); } }
.orbs.is-tracked .orb-face { box-shadow: 0 14px 26px -12px rgba(5, 9, 15, .8), 0 0 0 3px color-mix(in oklab, var(--bg) 45%, transparent); }
.orbs.is-tracked .orb-name { font-size: 10.5px; padding: 3px 8px; }
.film.is-tracked .ch-3 { display: flex; width: min(420px, calc(100% - 2 * var(--gutter))); top: calc(var(--nav-h) + 20px); bottom: auto; }
.film.is-tracked .ch3-copy h2 { font-size: clamp(26px, min(3vw, 5.4svh), 50px); }
@media (max-height: 720px) {
  .film.is-tracked .ch3-copy { padding: 14px 18px; gap: 8px; }
  .film.is-tracked .ch3-copy h2 { font-size: clamp(22px, min(2.6vw, 5svh), 40px); }
  .film.is-tracked .ch-3 { top: calc(var(--nav-h) + 10px); }
}
.orbs.is-tracked.is-short .orb-name .on-full { display: none; }
.orbs.is-tracked.is-short .orb-name .on-short { display: inline; }
.orbs.is-tracked.is-bare .orb-name { opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
.orbs.is-tracked.is-bare .orb:hover .orb-name, .orbs.is-tracked.is-bare .orb-pop:focus-visible .orb-name { opacity: 1; transform: none; }
@media (max-width: 1080px) {
  .ch-3 { grid-template-columns: 1fr; align-items: stretch; }
  .ch3-copy { order: 2; }
  .orbs { order: 1; }
}
@media (max-width: 760px) {
  .ch-3 { bottom: 40px; gap: 14px; }
  .orbs { --orb: clamp(54px, 15vw, 70px); gap: 8px 4px; }
  .orb { gap: 6px; }
  .orb:nth-child(even) { margin-top: 0; }
  .orb-name { font-size: 9.5px; padding: 3px 7px; max-width: calc(var(--orb) + 22px); overflow: hidden; text-overflow: ellipsis; }
  .orb-name .on-full { display: none; }
  .orb-name .on-short { display: inline; }
  .ch3-copy { padding: 16px 18px; gap: 8px; }
  .ch3-copy h2 { font-size: 26px; }
}
.rm .orb, .rm .orb-disc::before, .rm .orb-disc::after, .rm .orb-front::after { animation: none; }
.rm .orb-pop { opacity: 1; transform: none; }
.rm .ch-3 { width: auto; }

.scroll-cue { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); margin-top: 8px; }
.scroll-cue i { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); animation: cue 2s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ── launcher ── */
.launch { position: relative; padding: clamp(80px, 11vw, 150px) 0 clamp(70px, 9vw, 120px); background: var(--bg); }
.launch::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.launch-head { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: end; margin-bottom: 40px; }
.launch-head h2 { font-size: clamp(38px, 5vw, 76px); margin-top: 16px; }
.launch-lead { color: var(--muted); max-width: 44ch; justify-self: end; }
.launch-lead b { color: var(--fg); font-weight: 500; }
.launch-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 28px; position: sticky; top: calc(var(--nav-h) + 6px); z-index: 5; padding: 10px; margin-inline: -10px; border-radius: 18px; transition: background .3s, backdrop-filter .3s; }
.launch-bar.is-stuck { background: var(--glass); backdrop-filter: blur(14px); box-shadow: 0 0 0 1px var(--border-soft); }
.search { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--faint); min-width: min(360px, 100%); flex: 0 1 360px; transition: border-color .2s; }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--fg); font: inherit; font-size: 15px; outline: none; }
.search input::placeholder { color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--muted); transition: all .2s ease; }
.chip:hover { color: var(--fg); border-color: var(--faint); }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chip .n { font-family: var(--font-mono); font-weight: 400; font-size: 11px; opacity: .6; margin-left: 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.tile {
  --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-soft);
  transition: transform .45s var(--ease), border-color .3s ease, box-shadow .45s var(--ease), opacity .4s ease;
  opacity: 0; transform: translateY(18px);
}
.tile.is-in { opacity: 1; transform: none; }
.tile:hover { border-color: var(--border); transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.tile::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in oklab, var(--accent) 12%, transparent), transparent 60%); }
.tile:hover::after { opacity: 1; }
.tile-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); cursor: pointer; }
.tile-media img, .tile-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .5s ease; }
.tile-media video { opacity: 0; }
.tile.is-playing .tile-media video { opacity: 1; }
.tile:hover .tile-media img, .tile:hover .tile-media video { transform: scale(1.045); }
.tile-media::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, color-mix(in oklab, var(--surface) 92%, transparent)); }
.tile-num { position: absolute; left: 16px; top: 14px; z-index: 1; font-family: var(--font-mono); font-size: 11px; color: color-mix(in oklab, var(--bone) 70%, transparent); }
.status { position: absolute; right: 14px; top: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; background: color-mix(in oklab, var(--bg) 70%, transparent); backdrop-filter: blur(8px); color: var(--fg); border: 1px solid color-mix(in oklab, var(--fg) 14%, transparent); }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #7fcf9a; }
.status[data-s="beta"]::before { background: var(--mustard); }
.status[data-s="dev"]::before { background: var(--muted); }
.tile-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; padding: 4px 22px 22px; flex: 1; }
.tile-name { font-size: 26px; letter-spacing: -0.03em; line-height: 1.05; }
.tile-name button { text-align: left; }
.tile-lead { color: var(--muted); font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-aud { font-family: var(--font-mono); font-size: 11px; color: var(--faint); letter-spacing: .04em; margin-top: auto; padding-top: 6px; }
.tile-actions { display: flex; gap: 8px; margin-top: 8px; }
.tile-actions .btn { flex: 1; }
.btn-enter[data-fallback] { background: transparent; color: var(--fg); border: 1px solid var(--border); }
.btn-enter[data-fallback]:hover { border-color: var(--accent); background: var(--accent-wash); }
.btn-present { border: 1px solid var(--border); color: var(--fg); }
.btn-present:hover { border-color: var(--fg); }
.grid-empty { color: var(--muted); padding: 40px 0; text-align: center; }
.noscript { color: var(--muted); padding: 30px 0; }
.noscript a { color: var(--accent); }

/* ── closing ── */
.closing { padding: 0 0 clamp(80px, 10vw, 140px); }
.closing-inner { position: relative; }
.closing-art { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: center 60%; border-radius: 26px; border: 1px solid var(--border-soft); }
.closing-copy { position: absolute; left: calc(var(--gutter) + clamp(20px, 4vw, 60px)); top: 50%; transform: translateY(-50%); max-width: 480px; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.closing-copy h2 { font-size: clamp(34px, 4.4vw, 66px); }
.closing-copy p:not(.eyebrow) { color: color-mix(in oklab, var(--fg) 80%, transparent); }

/* ── footer ── */
.foot { border-top: 1px solid var(--border-soft); padding: 34px 0 40px; color: var(--faint); font-size: 12px; }
.foot-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-logo img { height: 26px; width: auto; opacity: .85; }
.foot-links { margin-left: auto; display: flex; gap: 22px; font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--muted); }
.foot-links a:hover { color: var(--fg); }

/* ── presentation ── */
.present { position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: 1fr auto; overflow: hidden; }
.present[hidden] { display: none; }
.present-bg { position: absolute; inset: 0; background: var(--bg); clip-path: circle(0 at var(--ox, 50%) var(--oy, 50%)); transition: clip-path .75s var(--ease); }
.present.is-open .present-bg { clip-path: circle(150vmax at var(--ox, 50%) var(--oy, 50%)); }
.present-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(900px 600px at 20% 30%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 70%), radial-gradient(700px 500px at 90% 90%, rgba(120, 150, 210, .06), transparent 70%); }
.present-close { position: absolute; right: var(--gutter); top: 22px; z-index: 3; display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 8px 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); opacity: 0; transition: opacity .3s .35s, border-color .2s; }
.present-close:hover { border-color: var(--fg); }
.present.is-open .present-close { opacity: 1; }
.present-inner {
  position: relative; z-index: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 90px var(--gutter) 24px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 80px); align-items: center; min-height: 0;
}
.present-plate { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--border-soft); opacity: 0; transform: scale(.94) translateY(20px); transition: opacity .6s var(--ease) .2s, transform .9s var(--ease) .2s; max-height: calc(100svh - 220px); justify-self: center; width: 100%; }
.present.is-open .present-plate { opacity: 1; transform: none; }
.present-plate video { width: 100%; height: 100%; object-fit: cover; }
.plate-mark { position: absolute; width: 22px; height: 22px; border: 0 solid color-mix(in oklab, var(--bone) 55%, transparent); }
.pm-tl { left: 14px; top: 14px; border-left-width: 1px; border-top-width: 1px; }
.pm-br { right: 14px; bottom: 14px; border-right-width: 1px; border-bottom-width: 1px; }
.present-index { position: absolute; left: 18px; bottom: 14px; font-size: 12px; color: color-mix(in oklab, var(--bone) 75%, transparent); }
.present-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.present-copy > * { opacity: 0; transform: translateY(16px); transition: opacity .55s var(--ease), transform .7s var(--ease); }
.present.is-open .present-copy > * { opacity: 1; transform: none; }
.present.is-open .present-copy > :nth-child(1) { transition-delay: .32s; }
.present.is-open .present-copy > :nth-child(2) { transition-delay: .38s; }
.present.is-open .present-copy > :nth-child(3) { transition-delay: .44s; }
.present.is-open .present-copy > :nth-child(4) { transition-delay: .5s; }
.present.is-open .present-copy > :nth-child(5) { transition-delay: .56s; }
.present.is-open .present-copy > :nth-child(6) { transition-delay: .62s; }
.present.is-swapping .present-copy > *, .present.is-swapping .present-plate { opacity: 0; transform: translateX(calc(var(--dir, 1) * -24px)); transition-delay: 0s; transition-duration: .22s; }
.present-kicker { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: .14em; }
.present-kicker .status { position: static; }
.present-title { font-size: clamp(44px, 6vw, 96px); }
.present-lead { font-size: clamp(16px, 1.3vw, 19px); color: color-mix(in oklab, var(--fg) 82%, transparent); max-width: 50ch; }
.present-bullets { display: grid; gap: 0; border-top: 1px solid var(--border-soft); }
.present-bullets li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; padding: 13px 0; border-bottom: 1px solid var(--border-soft); font-size: 15px; line-height: 1.5; }
.present-bullets li span { font-family: var(--font-mono); font-size: 11px; color: var(--accent); padding-top: 3px; }
.present-aud { font-size: 12px; color: var(--faint); }
.present-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.present-nav { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter) max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border-soft); opacity: 0; transition: opacity .4s .5s; }
.present.is-open .present-nav { opacity: 1; }
.pn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--muted); padding: 8px 4px; transition: color .2s; }
.pn:hover { color: var(--fg); }
.present-dots { display: flex; gap: 6px; }
.present-dots button { width: 22px; height: 22px; display: grid; place-items: center; }
.present-dots button::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: background .2s, transform .2s; }
.present-dots button[aria-current="true"]::before { background: var(--accent); transform: scale(1.4); }
.present-dots button:hover::before { background: var(--muted); }

/* ── palette ── */
.palette { position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding: 14vh 16px 16px; background: color-mix(in oklab, #05090f 62%, transparent); backdrop-filter: blur(6px); }
.palette[hidden] { display: none; }
.palette-box { width: min(620px, 100%); border-radius: 20px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 40px 120px -20px rgba(0, 0, 0, .8); overflow: hidden; animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.palette-search { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 62px; border-bottom: 1px solid var(--border-soft); color: var(--faint); }
.palette-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--fg); font: inherit; font-size: 17px; }
.palette-list { max-height: min(56vh, 520px); overflow: auto; padding: 8px; }
.palette-list li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 9px 10px; border-radius: 12px; cursor: pointer; }
.palette-list li[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); }
.palette-list img { width: 44px; height: 33px; border-radius: 6px; object-fit: cover; }
.palette-list .pl-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.palette-list .pl-sub { display: block; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-list .pl-go { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.palette-list li[aria-selected="true"] .pl-go { color: var(--accent); }
.palette-hint { padding: 10px 18px 12px; border-top: 1px solid var(--border-soft); font-size: 11px; color: var(--faint); }

/* ── responsive ── */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .launch-head { grid-template-columns: 1fr; }
  .launch-lead { justify-self: start; }
  .present-inner { grid-template-columns: 1fr; align-content: start; overflow-y: auto; padding-top: 80px; gap: 26px; }
  .present-inner { align-items: start; }
  .present-plate { aspect-ratio: auto; height: min(42svh, 60vw); max-height: none; }
}
@media (max-width: 760px) {
  :root { --nav-h: 62px; }
  .nav { gap: 12px; }
  .nav-logo img { height: 28px; }
  .kbd-btn span, .kbd-btn kbd, .nav-cta { display: none; }
  .kbd-btn { padding: 0; width: 40px; justify-content: center; }
  .film { height: 460vh; }
  .film-scrim { background: linear-gradient(0deg, color-mix(in oklab, var(--bg) 92%, transparent) 0%, color-mix(in oklab, var(--bg) 55%, transparent) 42%, transparent 70%), linear-gradient(180deg, color-mix(in oklab, var(--bg) 60%, transparent) 0%, transparent 20%); }
  .chapter { bottom: 64px; gap: 16px; }
  .ch-1 { bottom: 64px; }
  .hud-meter { right: 20px; bottom: -4px; }
  .hud-bar { width: 80px; }
  .launch-bar { position: static; }
  .search { flex: 1 1 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .closing-art { aspect-ratio: 4 / 5; object-position: center 70%; }
  .closing-copy { top: auto; bottom: 28px; transform: none; left: calc(var(--gutter) + 20px); right: calc(var(--gutter) + 20px); }
  .present-nav .pn-name { display: none; }
  .present-dots { display: none; }
  .present-actions .btn { flex: 1 1 auto; }
  .foot-links { margin-left: 0; }
}

/* ── reduced motion: the whole story stays readable, zero video fetches ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.rm .film { height: auto; }
.rm .film-stage { position: relative; height: auto; overflow: visible; }
.rm .film-video { position: absolute; inset: 0; height: 100%; }
.rm .chapters { position: relative; padding: calc(var(--nav-h) + 60px) var(--gutter) 80px; display: grid; gap: 70px; }
.rm .chapter { position: relative; left: auto; bottom: auto; --o: 1; --y: 0px; pointer-events: auto; }
.rm .scroll-cue, .rm .film-hud { display: none; }
.rm .tile { opacity: 1; transform: none; }

/* real logo badge in the showcase kicker */
.pr-logo { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--bone); border: 1px solid color-mix(in oklab, var(--bone) 40%, transparent); overflow: hidden; flex: none; }
.pr-logo[data-bg="dark"] { background: #0f1722; }
.pr-logo[data-bg="white"] { background: #fff; }
.pr-logo img { width: 76%; height: 76%; object-fit: contain; }
