/* Nova website — one stylesheet for all pages.
   Identity: real Nova renders behind frosted night glass, starlight type, lantern amber + spirit teal. Dark-first. */

:root {
  --bg: #0d1820;
  --bg-deep: #09121a;
  --glass: rgba(13, 26, 35, .62);
  --glass-2: rgba(17, 33, 44, .8);
  --line: rgba(160, 196, 206, .2);
  --line-2: rgba(160, 196, 206, .36);
  --text: #eaf1f3;
  --muted: #a7bac2;
  --flare: #f2b45e;
  --flare-ink: #1b1306;
  --aurora: #78dccb;
  /* scenes fade to the page colour at both edges, so panels dissolve into each other */
  --veil: linear-gradient(180deg, #0d1820 0%, rgba(13, 24, 32, .52) 18%, rgba(13, 24, 32, .6) 76%, #0d1820 100%);
  --shade: rgba(9, 18, 26, .7);
  --radius-s: 4px;
  --radius-l: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1220px;
  --display: "Archivo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #e7eef1;
  --bg-deep: #dbe5e9;
  --glass: rgba(255, 255, 255, .7);
  --glass-2: rgba(255, 255, 255, .86);
  --line: rgba(19, 40, 52, .16);
  --line-2: rgba(19, 40, 52, .3);
  --text: #10202a;
  --muted: #44596a;
  --flare: #9a5710;
  --flare-ink: #ffffff;
  --aurora: #0d6c62;
  --veil: linear-gradient(180deg, #e7eef1 0%, rgba(231, 238, 241, .74) 18%, rgba(231, 238, 241, .8) 76%, #e7eef1 100%);
  --shade: rgba(231, 238, 241, .84);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--display); font-variation-settings: "wdth" 100;
  font-size: 17px; line-height: 1.6; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: var(--flare); text-underline-offset: 3px; }
a:hover { color: var(--flare); }
:focus-visible { outline: 3px solid var(--flare); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--flare); color: var(--flare-ink); padding: 8px 14px; z-index: 100; }
.skip-link:focus { left: 8px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: .8rem; letter-spacing: .02em; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

h1, h2, h3 { font-family: var(--display); line-height: 1.04; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 800; font-variation-settings: "wdth" 125; letter-spacing: -.015em; }
h2 { font-size: clamp(1.8rem, 4vw, 3.1rem); font-weight: 760; font-variation-settings: "wdth" 120; letter-spacing: -.005em; }
h3 { font-size: 1.22rem; font-weight: 700; font-variation-settings: "wdth" 108; line-height: 1.25; }
p { margin: 0 0 1em; max-width: 68ch; }
.lead { font-size: clamp(1.08rem, 1.6vw, 1.32rem); max-width: 58ch; }

/* ---------- top bar + numbered tabs ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; background: var(--shade);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-variation-settings: "wdth" 125; font-size: 1.15rem; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand small { font-family: var(--mono); font-weight: 400; font-size: .68rem; color: var(--muted); font-variation-settings: normal; }
.tabs { display: flex; gap: 2px; margin-left: auto; }
.tabs a { text-decoration: none; padding: 8px 12px; border-radius: var(--radius-s); display: flex; gap: 7px; align-items: baseline; font-size: .93rem; color: var(--muted); }
.tabs a .n { font-family: var(--mono); font-size: .7rem; }
.tabs a:hover { color: var(--text); background: var(--glass); }
.tabs a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--flare); }
.tabs a[aria-current="page"] .n { color: var(--flare); }
.tools { display: flex; gap: 6px; }
.tool {
  font: inherit; font-size: .78rem; font-family: var(--mono); background: transparent; color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 6px 9px; cursor: pointer; min-height: 34px;
}
.tool[aria-pressed="true"] { background: var(--flare); color: var(--flare-ink); border-color: var(--flare); }
.menu-btn { display: none; }
html:not(.js) .tools, html:not(.js) .intro, html:not(.js) .menu-btn, html:not(.js) [data-replay-intro], html:not(.js) .js-only { display: none !important; }
@media (max-width: 980px) {
  .topbar .wrap { flex-wrap: wrap; }
  .menu-btn { display: inline-block; margin-left: auto; }
  .tools { order: 2; }
  .tabs { order: 3; width: 100%; margin: 0 0 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
  html.js .tabs { display: none; }
  html.js .topbar.open .tabs { display: grid; }
  .brand small { display: none; }
}
@media (max-width: 420px) { .tabs { grid-template-columns: repeat(2, 1fr); } .tool { padding: 6px 7px; } }

/* ---------- scenes: every panel sits on its own blurred, darkened render ---------- */
/* overflow: clip (not hidden) so sticky children still stick to the viewport */
.scene { position: relative; isolation: isolate; overflow: clip; padding: clamp(64px, 10vw, 128px) 0; }
.scene > .backdrop {
  position: absolute; inset: -10% 0; z-index: -2; background-position: center; background-size: cover; background-repeat: no-repeat;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.1); transition: opacity 1s ease; will-change: transform;
}
.scene > .backdrop[data-step]:not(.on) { opacity: 0; }
.scene::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--veil); }
.sec-head { display: grid; grid-template-columns: 70px 1fr; gap: 0 18px; align-items: baseline; margin-bottom: 34px; }
.sec-head .idx { font-family: var(--mono); color: var(--flare); font-size: .85rem; }
.sec-head > div > p { color: var(--muted); }
@media (max-width: 640px) { .sec-head { grid-template-columns: 1fr; } }
/* heading reveal: a sweep of light, once */
html.js .sec-head .sweep { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s cubic-bezier(.2, .7, .1, 1); }
html.js .sec-head.in .sweep { clip-path: inset(0 0 0 0); }

.two { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 60px); align-items: start; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }

/* ---------- glass document cards (ID-tagged records) ---------- */
.doc {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 20px 22px; position: relative;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.doc .doc-id {
  font-family: var(--mono); font-size: .72rem; color: var(--muted); display: flex; justify-content: space-between; gap: 10px;
  border-bottom: 1px dashed var(--line-2); padding-bottom: 8px; margin-bottom: 12px;
}
.doc .doc-id b { color: var(--flare); font-weight: 500; }
.doc p:last-child { margin-bottom: 0; }

/* ---------- hero ---------- */
.hero { min-height: calc(100svh - 60px); display: flex; align-items: center; padding: clamp(40px, 7vh, 90px) 0; }
.hero > .wrap { width: 100%; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: end; }
.hero h1 { font-size: clamp(2.4rem, 6.6vw, 5.8rem); margin-bottom: .35em; }
.hero h1 span { display: block; }
.status-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .75rem; padding: 5px 10px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--glass); color: var(--text);
}
.pill::before { content: ""; width: 7px; height: 7px; background: var(--aurora); border-radius: 50%; box-shadow: 0 0 10px var(--aurora); }
.pill.done::before { background: var(--flare); box-shadow: none; border-radius: 1px; }
.pill.plan::before { background: transparent; outline: 1px solid var(--muted); box-shadow: none; border-radius: 1px; }
.pill.park::before { background: var(--muted); box-shadow: none; border-radius: 1px; }
.frame {
  margin: 0; position: relative; border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); transform: translate3d(0, var(--fy, 0px), 0);
}
.frame img { width: 100%; height: auto; }
.frame figcaption, .cap-tag {
  position: absolute; left: 12px; bottom: 12px; font-family: var(--mono); font-size: .7rem; color: #e8eff1;
  background: rgba(9, 18, 26, .7); padding: 4px 9px; border-radius: var(--radius-s); max-width: calc(100% - 24px);
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font: inherit; font-weight: 700;
  padding: 12px 18px; border-radius: var(--radius-s); border: 1px solid var(--flare); background: var(--flare); color: var(--flare-ink); min-height: 44px; cursor: pointer;
}
.btn:hover { color: var(--flare-ink); filter: brightness(1.08); }
.btn.ghost { background: var(--glass); color: var(--text); border-color: var(--line-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* problem -> solution -> audience: a real sequence */
.pss { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pss .step { font-family: var(--mono); font-size: .75rem; color: var(--flare); display: block; margin-bottom: 6px; }
@media (max-width: 820px) { .pss { grid-template-columns: 1fr; } }

/* ---------- pinned story: image + records change as you scroll ---------- */
.scrolly { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 4vw, 60px); }
.scrolly .stage {
  position: sticky; top: max(80px, calc(50vh - 280px)); align-self: start; aspect-ratio: 16 / 11; max-height: calc(100vh - 110px);
  border-radius: var(--radius-l); overflow: hidden; background: var(--bg-deep); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .75);
}
.scrolly .stage figure { position: absolute; inset: 0; margin: 0; opacity: 0; transform: scale(1.06); transition: opacity .8s ease, transform 6s ease-out; }
.scrolly .stage figure.on { opacity: 1; transform: scale(1); }
.scrolly .stage img { width: 100%; height: 100%; object-fit: cover; }
.scrolly .counter {
  position: absolute; top: 12px; left: 12px; z-index: 2; font-family: var(--mono); font-size: .8rem;
  color: #e8eff1; background: rgba(9, 18, 26, .7); padding: 4px 9px; border-radius: var(--radius-s);
}
.scrolly .meter { position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 2; background: rgba(255, 255, 255, .12); }
.scrolly .meter span { display: block; height: 100%; width: 0; background: var(--flare); }
.scrolly .steps { display: flex; flex-direction: column; gap: 42vh; padding: 16vh 0 28vh; }
.scrolly .steps .doc { transition: opacity .5s ease, border-color .5s ease, transform .5s ease; opacity: .42; }
.scrolly .steps .doc.on { opacity: 1; border-color: var(--flare); transform: translateX(-6px); }
html:not(.js) .scrolly .steps .doc { opacity: 1; }
html:not(.js) .scrolly .stage figure:first-of-type { opacity: 1; transform: none; }
@media (max-width: 860px) {
  .scrolly { grid-template-columns: 1fr; }
  .scrolly .stage { top: 70px; aspect-ratio: auto; height: 38vh; z-index: 1; }
  .scrolly .steps { gap: 44vh; padding: 4vh 0 16vh; position: relative; z-index: 2; }
  .scrolly .steps .doc { background: var(--glass-2); transform: none !important; }
}

/* ---------- counters ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { padding: 22px 22px 18px; }
.stat b { display: block; font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; font-variation-settings: "wdth" 125; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .arrow { color: var(--muted); font-weight: 400; font-size: .5em; vertical-align: middle; padding: 0 .2em; }
.stat span { display: block; color: var(--muted); margin-top: 10px; font-size: .95rem; }
.tech-line { font-family: var(--mono); font-size: .8rem; color: var(--aurora); margin: -6px 0 22px; }
.why h3 { margin: 14px 0 6px; }
.ledger { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 14px; }
.ledger .stat { padding: 16px 18px 14px; }
.ledger b { font-size: clamp(1.6rem, 3vw, 2.2rem); }
@media (max-width: 860px) { .ledger { grid-template-columns: repeat(2, 1fr); } }

/* ---------- people (about) ---------- */
.people { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.people li { display: flex; align-items: center; gap: 14px; }
.people b { display: block; }
.people li span:not(.avatar) { color: var(--muted); font-size: .92rem; }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: #0d1820; }
.avatar.a1 { background: conic-gradient(from 210deg, var(--aurora), #3b8fa0, var(--aurora)); }
.avatar.a2 { background: conic-gradient(from 30deg, var(--flare), #c46f4a, var(--flare)); }

/* ---------- under the hood (home) ---------- */
.hood { margin-top: clamp(40px, 6vw, 72px); }
.hood > h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin: 0 0 6px; }
.tech { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0 28px; margin: 18px 0 0; }
.tech div { padding: 12px 0; border-top: 1px solid var(--line); }
.tech dt { font-weight: 700; }
.tech dd { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.hood-more { margin-top: 36px; }
.hood-more h4 { margin: 0 0 10px; font-size: 1.05rem; }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 7px 0 7px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: var(--aurora); }
.ticks.no li::before { background: transparent; outline: 1px solid var(--muted); border-radius: 1px; }
.why p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }

/* ---------- before/after slider ---------- */
.ba { --pos: 50%; position: relative; overflow: hidden; border-radius: var(--radius-l); border: 1px solid var(--line-2); background: var(--bg-deep); user-select: none; touch-action: pan-y; }
.ba img { width: 100%; height: auto; }
.ba .after { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.ba .after img { width: 100%; height: 100%; object-fit: cover; }
.ba .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--flare); transform: translateX(-1px); pointer-events: none; }
.ba .handle::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%) rotate(45deg);
  background: var(--flare); border: 3px solid var(--bg-deep);
}
.ba input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba:has(input:focus-visible) { outline: 3px solid var(--flare); outline-offset: 3px; }
.ba .tag { position: absolute; top: 12px; font-family: var(--mono); font-size: .72rem; padding: 4px 9px; border-radius: var(--radius-s); background: rgba(9, 18, 26, .74); color: #e8eff1; pointer-events: none; }
.ba .tag.l { left: 12px; } .ba .tag.r { right: 12px; }
.ba.hint { animation: nudge 1.6s ease-in-out 1; }
@keyframes nudge { 0%, 100% { --pos: 50%; } 30% { --pos: 38%; } 65% { --pos: 62%; } }
@property --pos { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.ba-cap { margin: 10px 0 0; color: var(--muted); font-size: .92rem; }
.ba-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .ba-grid { grid-template-columns: 1fr; max-width: 720px; } }
.ba-grid.pairs { grid-template-columns: repeat(2, 1fr); align-items: start; }
@media (max-width: 860px) { .ba-grid.pairs { grid-template-columns: 1fr; } }

/* ---------- G-buffer explorer (home) ---------- */
.gb { display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
@media (max-width: 900px) { .gb { grid-template-columns: 1fr; } }
.gb-frame img { transition: opacity .25s ease; }
.gb-frame.loading img { opacity: .35; }

/* ---------- feature index with filters ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  font: inherit; font-size: .85rem; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--glass); color: var(--text); cursor: pointer; min-height: 36px;
}
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .c { font-family: var(--mono); font-size: .72rem; opacity: .7; margin-left: 4px; }
.feat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.feat-list .doc p { font-size: .95rem; color: var(--muted); }
.spot { background-image: radial-gradient(240px circle at var(--mx, -999px) var(--my, -999px), rgba(242, 180, 94, .12), transparent 70%); }
.badge { font-family: var(--mono); font-size: .68rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.badge.on { border-color: var(--flare); color: var(--flare); }
.badge.prog { border-color: var(--aurora); color: var(--aurora); }

/* ---------- now building ---------- */
.slot {
  position: relative; overflow: hidden; border-radius: var(--radius-l); border: 1px solid var(--line-2); min-height: 220px;
  display: grid; place-items: center; text-align: center; padding: 26px; isolation: isolate; background: var(--bg-deep);
}
.slot .slot-bg { position: absolute; inset: -20px; z-index: -1; background-position: center; background-size: cover; opacity: .55; }
.slot::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 50% 50%, rgba(9, 18, 26, .35), rgba(9, 18, 26, .85)); }
.slot svg { width: 46px; height: 46px; stroke: #e8eff1; fill: none; stroke-width: 1.4; opacity: .9; }
.slot .slot-k { font-family: var(--mono); font-size: .72rem; color: var(--flare); margin: 10px 0 4px; display: block; }
.slot h3 { color: #f1f5f6; margin: 0 0 6px; }
.slot p { color: #c4d3d9; font-size: .92rem; margin: 0 auto; max-width: 36ch; }
.demo { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line-2); background: var(--bg-deep); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); }
.demo .slot { position: absolute; inset: 0; border: 0; border-radius: 0; min-height: 0; }
.demo video { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: cover; }
.demo.missing video { display: none; }
.build-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .build-grid { grid-template-columns: 1fr; } }
.tl-illu { width: 100%; height: auto; display: block; border-radius: var(--radius-s); background: rgba(9, 18, 26, .6); border: 1px solid var(--line); }
.tl-illu .row { fill: rgba(160, 196, 206, .1); }
.tl-illu .lbl { fill: var(--muted); font-family: var(--mono); font-size: 11px; }
.tl-illu .kf { fill: var(--flare); transform-box: fill-box; transform-origin: center; }
.tl-illu .kf.ai { fill: var(--aurora); }
.tl-illu .ph { stroke: var(--flare); stroke-width: 2; }
html.js .tl-illu .kf.ai { opacity: 0; transform: scale(.2) rotate(45deg); transition: opacity .35s ease, transform .35s ease; }
html.js .tl-illu.play .kf.ai { opacity: 1; transform: rotate(45deg); }
.tl-illu .kf { transform: rotate(45deg); }

/* ---------- position map ---------- */
.posmap { width: 100%; max-width: 560px; height: auto; }
.posmap .axis { stroke: var(--line-2); stroke-width: 1.5; }
.posmap .grid { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 5; }
.posmap text { fill: var(--muted); font-family: var(--mono); font-size: 12px; }
.posmap .lbl { fill: var(--text); font-family: var(--display); font-size: 15px; font-weight: 700; }
.posmap .pt { fill: var(--glass-2); stroke: var(--muted); stroke-width: 2; }
.posmap .pt.nova { fill: var(--flare); stroke: var(--flare); }
.posmap .ring { fill: none; stroke: var(--flare); stroke-width: 1.5; stroke-dasharray: 4 4; }
.facts { display: grid; margin: 0; }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--mono); font-size: .78rem; color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 480px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- side index (home) ---------- */
.side-index { position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 30; display: none; }
.side-index ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.side-index a { display: flex; align-items: center; gap: 8px; justify-content: flex-end; text-decoration: none; font-family: var(--mono); font-size: .7rem; color: var(--muted); padding: 3px 0; }
.side-index a::after { content: ""; width: 14px; height: 1px; background: var(--line-2); transition: width .3s ease, background .3s ease; }
.side-index a .t { opacity: 0; transform: translateX(6px); transition: opacity .25s ease, transform .25s ease; white-space: nowrap; }
.side-index:hover a .t, .side-index a:focus-visible .t { opacity: 1; transform: none; }
.side-index a.on { color: var(--flare); }
.side-index a.on::after { width: 28px; background: var(--flare); }
@media (min-width: 1280px) { html.js .side-index { display: block; } }

/* ---------- page heads on other tabs ---------- */
.pagehead { min-height: 62vh; display: flex; align-items: flex-end; }
.pagehead h1 { font-size: clamp(2.3rem, 6vw, 4.8rem); max-width: 16ch; }

/* ---------- gallery ---------- */
/* sNM = spans N of 6 columns and M rows */
.shots { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(150px, 16vw, 230px); grid-auto-flow: dense; gap: 14px; }
.shot.s42 { grid-column: span 4; grid-row: span 2; } .shot.s21 { grid-column: span 2; }
.shot.s22 { grid-column: span 2; grid-row: span 2; } .shot.s41 { grid-column: span 4; }
.shot { position: relative; display: block; border-radius: var(--radius-s); overflow: hidden; border: 1px solid var(--line); background: var(--bg-deep); text-decoration: none; color: #e8eff1; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .1, 1); }
.shot:hover img, .shot:focus-visible img { transform: scale(1.04); }
.shot .cap-tag { transition: background .3s ease; }
.shot:hover .cap-tag { background: rgba(9, 18, 26, .9); }
@media (max-width: 860px) {
  .shots { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
  .shot.s42, .shot.s41 { grid-column: span 2; } .shot.s21, .shot.s22 { grid-column: span 1; }
}
@media (max-width: 480px) {
  .shots { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .shot.s42, .shot.s41, .shot.s21, .shot.s22 { grid-column: span 1; grid-row: auto; aspect-ratio: 16 / 10; }
}
dialog.lightbox { padding: 0; border: 1px solid var(--line-2); border-radius: var(--radius-l); background: var(--bg-deep); color: var(--text); max-width: min(1400px, 94vw); width: auto; }
dialog.lightbox::backdrop { background: rgba(5, 10, 14, .86); backdrop-filter: blur(6px); }
dialog.lightbox img { max-height: 80vh; width: auto; max-width: 100%; margin: 0 auto; }
dialog.lightbox p { margin: 0; padding: 12px 16px; font-size: .92rem; color: var(--muted); max-width: none; }
dialog.lightbox .x { position: absolute; top: 10px; right: 10px; }

/* progress filmstrip: scroll down, the strip moves sideways (desktop with motion) */
.film { position: relative; }
.film .track { display: flex; flex-direction: column; gap: 30px; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.film figure { margin: 0; }
.film figure img { border-radius: var(--radius-s); border: 1px solid var(--line-2); width: 100%; height: auto; }
.film time { font-family: var(--mono); font-size: .8rem; color: var(--flare); display: block; margin: 12px 0 2px; }
.film h3 { margin: 0 0 4px; }
.film p { color: var(--muted); font-size: .94rem; margin: 0; }
/* OS reduced motion and the Still button both get the plain vertical strip */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  html.js:not(.rm) .film.pinned { height: calc(var(--n, 8) * 60vh); }
  html.js:not(.rm) .film.pinned .sticky { position: sticky; top: 60px; height: calc(100vh - 60px); overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
  html.js:not(.rm) .film.pinned .track { flex-direction: row; gap: 36px; max-width: none; margin: 0; padding: 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); transform: translate3d(var(--x, 0px), 0, 0); width: max-content; }
  html.js:not(.rm) .film.pinned figure { width: min(560px, 44vw); flex: none; }
  html.js:not(.rm) .film.pinned .rail { height: 2px; background: var(--line); margin: 26px var(--gutter) 0; position: relative; }
  html.js:not(.rm) .film.pinned .rail span { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 0%); background: var(--flare); }
}
.film .rail { display: none; }
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) { html.js:not(.rm) .film.pinned .rail { display: block; } }

/* ---------- roadmap ---------- */
.now-panel { padding: 26px; }
.now-panel h2 { margin-bottom: .3em; }
.meterbar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(160, 196, 206, .14); margin: 18px 0 12px; }
.meterbar i { display: block; height: 100%; transition: width 1.4s cubic-bezier(.2, .7, .1, 1); }
.meterbar .d { background: var(--flare); } .meterbar .r { background: var(--aurora); } .meterbar .q { background: transparent; }
html.js .meterbar:not(.in) i { width: 0 !important; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 6px; }
.ladder { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; display: grid; gap: 22px; }
.ladder::before { content: ""; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 2px; background: var(--line-2); }
.ladder::after { content: ""; position: absolute; left: 9px; top: 8px; width: 2px; height: var(--fill, 0%); max-height: calc(100% - 16px); background: var(--flare); }
.ladder > li { position: relative; }
.ladder > li::before { content: ""; position: absolute; left: -31px; top: 22px; width: 14px; height: 14px; transform: rotate(45deg); background: var(--bg); border: 2px solid var(--line-2); }
.ladder > li.done::before { background: var(--flare); border-color: var(--flare); }
.ladder > li.now::before { background: var(--aurora); border-color: var(--aurora); box-shadow: 0 0 14px var(--aurora); }
.ladder .doc dl { margin: 0; display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; }
.ladder .doc dt { font-family: var(--mono); font-size: .75rem; color: var(--muted); padding-top: 3px; }
.ladder .doc dd { margin: 0; }
.ladder .doc ul { margin: 0; padding-left: 1.1em; }
.ladder .doc ul li { margin: 0 0 3px; }
.ladder li.done .doc { border-left: 3px solid var(--flare); }
.ladder li.now .doc { border-left: 3px solid var(--aurora); }
.ladder li.plan .doc { border-left: 3px dashed var(--line-2); }
.ladder .when { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
@media (max-width: 700px) { .ladder .doc dl { grid-template-columns: 1fr; gap: 2px; } .ladder .doc dd { margin-bottom: 8px; } }
.tracks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 900px) { .tracks { grid-template-columns: 1fr; } }

/* ---------- devlog ---------- */
.rail-wrap { position: relative; }
.builds { display: grid; grid-auto-flow: column; grid-auto-columns: min(330px, 82vw); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: thin; }
.builds .doc { scroll-snap-align: start; }
.builds .doc h3 { margin-bottom: .35em; }
.builds .doc ul { margin: 0; padding-left: 1.1em; color: var(--muted); font-size: .93rem; }
.rail-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: -8px; margin-bottom: 8px; }
.months { display: grid; gap: 34px; }
.month h3.mhead {
  position: sticky; top: 64px; z-index: 3; display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin: 0 0 14px; padding: 10px 14px; background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--radius-s);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 1.05rem;
}
.month h3.mhead span { font-family: var(--mono); font-size: .75rem; color: var(--muted); font-weight: 400; }
.mlist { list-style: none; margin: 0; padding: 0 0 0 26px; position: relative; display: grid; gap: 10px; }
.mlist::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.mlist li { position: relative; padding: 12px 16px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-s); }
.mlist li::before { content: ""; position: absolute; left: -24px; top: 18px; width: 10px; height: 10px; transform: rotate(45deg); background: var(--line-2); }
.mlist li[data-cat="render"]::before { background: var(--flare); }
.mlist li[data-cat="editor"]::before { background: var(--aurora); }
.mlist li.mile { border-color: var(--flare); }
.mlist time { font-family: var(--mono); font-size: .74rem; color: var(--flare); }
.mlist h4 { margin: 2px 0 4px; font-size: 1.02rem; font-variation-settings: "wdth" 108; }
.mlist p { margin: 0; color: var(--muted); font-size: .93rem; }
.mlist .cat { font-family: var(--mono); font-size: .68rem; color: var(--muted); float: right; margin-left: 10px; }

/* ---------- claude flow ---------- */
.flow { list-style: none; padding: 0; margin: 0; counter-reset: f; display: grid; border-top: 1px solid var(--line-2); }
.flow li { counter-increment: f; display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.flow li::before { content: counter(f, decimal-leading-zero); font-family: var(--mono); color: var(--flare); font-size: .85rem; padding-top: 3px; }
.flow li p { margin: 0; color: var(--muted); }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 40px 0 56px; background: var(--bg-deep); font-size: .9rem; }
footer.site .wrap { display: grid; grid-template-columns: 1fr auto; gap: 18px; }
footer.site p { margin: 0 0 .5em; color: var(--muted); }
footer.site .links { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; align-items: start; }
footer.site button.linklike { background: none; border: 0; color: inherit; font: inherit; text-decoration: underline; text-decoration-color: var(--flare); cursor: pointer; padding: 0; }
@media (max-width: 700px) { footer.site .wrap { grid-template-columns: 1fr; } footer.site .links { justify-content: flex-start; } }

/* ---------- cinematic grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
html.no-grain .grain { display: none; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

/* ---------- intro: starlight gathers into NOVA, then flies up and becomes the header wordmark ---------- */
/* the backdrop is its own layer: it clears (.open) while the stars stay; only the arrival crossfade (.gone) touches the stars */
.intro { position: fixed; inset: 0; z-index: 90; transition: opacity .15s ease, visibility .15s; }
.intro::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, #10202b, #060d12 70%); transition: opacity .7s ease; }
.intro.open::before { opacity: 0; }
.intro canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.brand { transition: opacity .15s ease; }
html.intro-run .brand { opacity: 0; }
.intro .skip {
  position: absolute; right: 18px; bottom: 18px; font-family: var(--mono); font-size: .78rem; background: rgba(9, 18, 26, .5);
  color: #b9c9cf; border: 1px solid #2c4655; border-radius: var(--radius-s); padding: 8px 12px; cursor: pointer; min-height: 36px;
}
.intro .tagline { max-width: none; margin: 0; position: absolute; left: 0; right: 0; top: calc(50% + min(15vw, 22vh) * .55); text-align: center; font-family: var(--mono); font-size: .8rem; color: #9fb4bc; opacity: 0; transition: opacity .8s ease; padding: 0 16px; }
.intro.formed .tagline { opacity: 1; }
.intro.open .tagline, .intro.open .skip { opacity: 0; transition: opacity .3s ease; }

/* hero entrance: the one orchestrated moment after the intro */
html.js .hero .reveal { opacity: 0; transform: translateY(16px); transition: opacity .9s ease, transform .9s ease; }
html.js body.entered .hero .reveal { opacity: 1; transform: none; }
html.js body.entered .hero .reveal.d1 { transition-delay: .1s; }
html.js body.entered .hero .reveal.d2 { transition-delay: .2s; }
html.js body.entered .hero .reveal.d3 { transition-delay: .3s; }
html.js body.entered .hero .reveal.d4 { transition-delay: .45s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .grain { display: none; }
}
html.rm *, html.rm *::before, html.rm *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
html.rm .scene > .backdrop, html.rm .frame { transform: scale(1.1); }
html.rm .frame { transform: none; }
