:root {
  --ink: #f2efe8;
  --muted: rgba(242, 239, 232, .66);
  --faint: rgba(242, 239, 232, .38);
  --line: rgba(242, 239, 232, .15);
  --line-strong: rgba(242, 239, 232, .28);
  --accent: #d9ae76;
  --accent-rgb: 217, 174, 118;
  --surface: #090908;
  --surface-deep: #050605;
  --serif: "Newsreader", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
  --mono: "DM Mono", Consolas, monospace;
  --global-progress: 0;
}

* { box-sizing: border-box; }

html { background: var(--surface-deep); color: var(--ink); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--surface-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body[data-theme="aurelia"] { --accent: #e5af5d; --accent-rgb: 229, 175, 93; --surface: #0a0806; --surface-deep: #050403; }
body[data-theme="nox"] { --accent: #a7c397; --accent-rgb: 167, 195, 151; --surface: #080b09; --surface-deep: #040605; }
body[data-theme="still"] { --accent: #d7a25d; --accent-rgb: 215, 162, 93; --surface: #0b0805; --surface-deep: #050302; }
body[data-theme="abyss"] { --accent: #73cfe3; --accent-rgb: 115, 207, 227; --surface: #050b13; --surface-deep: #02060c; }
body[data-theme="noir"] { --accent: #e0ac7c; --accent-rgb: 224, 172, 124; --surface: #090807; --surface-deep: #040403; }
body[data-theme="gallery"] { --accent: #d6b078; --accent-rgb: 214, 176, 120; --surface: #0a0908; --surface-deep: #040403; }

a { color: inherit; text-decoration: none; }

button, a { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 5px; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 1rem;
  left: 1rem;
  padding: .6rem .8rem;
  background: var(--ink);
  color: var(--surface-deep);
  font: 500 .68rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.loader {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 1.2rem;
  background: var(--surface-deep);
  color: var(--muted);
  font: .66rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: opacity .8s ease, visibility .8s ease;
}

.loader i {
  display: block;
  width: 9rem;
  height: 1px;
  overflow: hidden;
  background: var(--line);
}

.loader i::after {
  display: block;
  width: 38%;
  height: 100%;
  background: var(--accent);
  content: "";
  animation: load-line 1.1s ease-in-out infinite alternate;
}

.loader.is-complete { opacity: 0; visibility: hidden; pointer-events: none; }

@keyframes load-line { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  width: 100%;
  padding: 1.4rem clamp(1.2rem, 4vw, 4rem);
  color: rgba(242, 239, 232, .84);
  pointer-events: none;
  mix-blend-mode: screen;
}

.wordmark, .header-link { pointer-events: auto; }

.wordmark {
  display: inline-grid;
  width: max-content;
  gap: .03rem;
  font: 600 .61rem/.85 var(--mono);
  letter-spacing: .16em;
}

.wordmark span:last-child { color: var(--accent); }

.header-meta {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  font: .61rem/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.header-meta span:last-child { color: var(--accent); }

.header-link {
  justify-self: end;
  font: .61rem/1 var(--mono);
  letter-spacing: .12em;
}

.header-link span { color: var(--accent); font-size: 1rem; }

.chapter {
  position: relative;
  height: 225vh;
  background: var(--surface);
}

.chapter__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 34rem;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface);
}

.chapter__stage::before {
  position: absolute;
  z-index: 2;
  inset: 0;
  border: 1px solid rgba(242, 239, 232, .08);
  content: "";
  pointer-events: none;
}

[data-cinematic-canvas], [data-cinematic-poster], [data-cinematic-video] {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

[data-cinematic-canvas] { background: var(--surface); }

[data-cinematic-poster] {
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

[data-cinematic-video] { visibility: hidden; object-fit: cover; pointer-events: none; }

.chapter--video [data-cinematic-canvas] { opacity: 1; transition: opacity .7s ease; }
.chapter--video [data-cinematic-video] { opacity: 0; transition: opacity .7s ease; }
.chapter--video.is-video-ready [data-cinematic-canvas] { opacity: 0; }
.chapter--video.is-video-ready [data-cinematic-video] { visibility: visible; opacity: 1; }

.stage-vignette {
  position: absolute;
  z-index: 1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 5, 4, .9) 0%, rgba(4, 5, 4, .46) 34%, rgba(4, 5, 4, .04) 67%, rgba(4, 5, 4, .3) 100%),
    linear-gradient(0deg, rgba(4, 5, 4, .62) 0%, transparent 22%, transparent 73%, rgba(4, 5, 4, .44) 100%);
  pointer-events: none;
}

body[data-theme="abyss"] .stage-vignette { background: linear-gradient(90deg, rgba(2, 7, 13, .88), rgba(2, 7, 13, .22) 48%, rgba(2, 7, 13, .2)), linear-gradient(0deg, rgba(2, 7, 13, .72), transparent 28%, rgba(2, 7, 13, .24)); }
body[data-theme="gallery"] .stage-vignette { background: linear-gradient(90deg, rgba(4, 4, 3, .75), rgba(4, 4, 3, .1) 50%, rgba(4, 4, 3, .2)), linear-gradient(0deg, rgba(4, 4, 3, .5), transparent 30%, rgba(4, 4, 3, .18)); }

.hero-copy, .chapter__copy {
  position: absolute;
  z-index: 3;
  width: min(34rem, 42vw);
}

.hero-copy { top: 50%; left: clamp(1.2rem, 8vw, 9rem); transform: translateY(-45%); }

.eyebrow {
  margin: 0 0 1.4rem;
  color: var(--accent);
  font: 500 .65rem/1.2 var(--mono);
  letter-spacing: .15em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; font-family: var(--serif); font-weight: 400; letter-spacing: -.045em; }

h1 { max-width: 8ch; font-size: clamp(4.7rem, 8.6vw, 9.4rem); line-height: .82; }

h2 { font-size: clamp(3.8rem, 7vw, 8rem); line-height: .84; }

h1 em, h2 em { color: var(--accent); font-style: italic; }

.hero-copy__body, .chapter__copy > p:not(.eyebrow), .notes__aside p {
  max-width: 31rem;
  margin: 2.1rem 0 0;
  color: var(--muted);
  font-size: clamp(.92rem, 1.25vw, 1.12rem);
  line-height: 1.7;
}

.hero-copy__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2.7rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  width: max-content;
  padding-bottom: .42rem;
  border-bottom: 1px solid var(--accent);
  color: var(--ink);
  font: 500 .7rem/1 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .25s ease, gap .25s ease;
}

.text-link span { color: var(--accent); font-size: 1.1rem; }
.text-link:hover { gap: 1.05rem; color: var(--accent); }

.quiet-label {
  max-width: 15rem;
  color: var(--faint);
  font: .56rem/1.45 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-index, .scrub-cue, .chapter-progress, .route-signature, .chapter-mark, .material-notes, .release-orbit { position: absolute; z-index: 3; }

.hero-index { top: 50%; right: clamp(1.2rem, 4vw, 4rem); display: grid; gap: .25rem; color: var(--accent); transform: translateY(-50%); font: .63rem/1 var(--mono); letter-spacing: .1em; }

.hero-index span:first-child { color: var(--ink); font-size: 1rem; }

.scrub-cue { bottom: 2.2rem; left: 50%; display: grid; justify-items: center; gap: .7rem; color: var(--muted); transform: translateX(-50%); font: .6rem/1 var(--mono); letter-spacing: .15em; }

.scrub-cue i { display: block; width: 1px; height: 3rem; background: linear-gradient(var(--accent), transparent); }

.chapter-progress { right: clamp(1.2rem, 4vw, 4rem); bottom: 2.35rem; display: flex; align-items: center; gap: .7rem; color: var(--muted); font: .6rem/1 var(--mono); letter-spacing: .08em; }

.chapter-progress i { display: block; width: 7rem; height: 1px; overflow: hidden; background: var(--line); transform-origin: left center; }
.chapter-progress i::after { display: block; width: 100%; height: 100%; background: var(--accent); content: ""; transform: scaleX(var(--chapter-progress, 0)); transform-origin: left; }

.route-signature { right: 12vw; bottom: 9vh; color: var(--accent); opacity: .9; }

.signature { display: grid; gap: .55rem; color: var(--accent); font: .58rem/1 var(--mono); letter-spacing: .14em; }
.signature i { display: block; width: 8rem; height: 1px; background: currentColor; transform-origin: left; animation: signature-pulse 2.8s ease-in-out infinite alternate; }
.signature b { color: var(--ink); font-weight: 400; }

@keyframes signature-pulse { from { transform: scaleX(.3); opacity: .35; } to { transform: scaleX(1); opacity: 1; } }

.interlude {
  display: grid;
  grid-template-columns: minmax(3rem, .35fr) minmax(0, 1fr) minmax(14rem, .7fr);
  gap: clamp(1.2rem, 4vw, 4rem);
  align-items: center;
  min-height: 72vh;
  padding: 10rem clamp(1.2rem, 8vw, 9rem);
  background: var(--surface-deep);
}

.interlude__rule { align-self: center; width: 100%; height: 1px; background: var(--line); }
.interlude .eyebrow { align-self: start; margin: 0; }
.interlude h2 { max-width: 8ch; }
.interlude > p:last-child { align-self: end; max-width: 24rem; margin: 0; color: var(--muted); line-height: 1.75; }

.chapter__grid {
  position: absolute;
  z-index: 1;
  inset: 0;
  background-image: linear-gradient(rgba(var(--accent-rgb), .12) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--accent-rgb), .12) 1px, transparent 1px);
  background-size: 9rem 9rem;
  opacity: .15;
  mask-image: linear-gradient(90deg, black, transparent 70%);
  pointer-events: none;
}

.chapter__copy { top: 50%; transform: translateY(-50%); }
.chapter__copy--left { left: clamp(1.2rem, 8vw, 9rem); }
.chapter__copy--right { right: clamp(1.2rem, 8vw, 9rem); }
.chapter__copy > p:not(.eyebrow) { margin-top: 1.8rem; }

.chapter--detail .chapter__copy, .chapter--release .chapter__copy { padding: 2rem 3rem 2rem 0; background: linear-gradient(90deg, rgba(5, 6, 5, .93), rgba(5, 6, 5, .72) 65%, transparent); }
.chapter--release .chapter__copy--right { padding: 2rem 0 2rem 3rem; background: linear-gradient(270deg, rgba(5, 6, 5, .93), rgba(5, 6, 5, .72) 65%, transparent); }
body[data-theme="abyss"] .chapter--detail .chapter__copy, body[data-theme="abyss"] .chapter--release .chapter__copy { background: linear-gradient(90deg, rgba(2, 7, 13, .96), rgba(2, 7, 13, .7) 65%, transparent); }
body[data-theme="abyss"] .chapter--release .chapter__copy--right { background: linear-gradient(270deg, rgba(2, 7, 13, .96), rgba(2, 7, 13, .7) 65%, transparent); }

.spec-list { display: grid; gap: .7rem; max-width: 23rem; margin-top: 2.4rem; color: var(--muted); font: .61rem/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.spec-list span { display: grid; grid-template-columns: 2.2rem 1fr; padding-top: .7rem; border-top: 1px solid var(--line); }
.spec-list b { color: var(--accent); font-weight: 400; }

.chapter-mark { right: clamp(2rem, 10vw, 12rem); bottom: 16vh; display: grid; justify-items: end; gap: .7rem; color: var(--accent); font: .6rem/1 var(--mono); letter-spacing: .14em; transform: rotate(-90deg); transform-origin: right bottom; }
.chapter-mark i { display: block; width: 8rem; height: 1px; background: var(--accent); }

.release-orbit { top: 14%; left: 50%; width: min(34vw, 28rem); aspect-ratio: 1; border: 1px solid rgba(var(--accent-rgb), .26); border-radius: 50%; transform: translateX(-50%); }
.release-orbit::before, .release-orbit::after { position: absolute; inset: 11%; border: 1px solid rgba(var(--accent-rgb), .2); border-radius: 50%; content: ""; }
.release-orbit::after { inset: 28%; border-color: rgba(var(--accent-rgb), .15); }
.release-orbit span { position: absolute; top: 50%; left: 50%; color: var(--accent); font: .56rem/1 var(--mono); letter-spacing: .16em; transform: translate(-50%, -50%); white-space: nowrap; }

.chapter--release .chapter__copy { top: 61%; }

.surface-mask { position: absolute; z-index: 1; inset: 0; background: linear-gradient(0deg, rgba(4, 5, 4, .88), transparent 48%, rgba(4, 5, 4, .14)); pointer-events: none; }
.chapter__copy--bottom { top: auto; bottom: 14vh; transform: none; }
.material-notes { right: clamp(1.2rem, 4vw, 4rem); bottom: 14vh; display: grid; gap: .55rem; justify-items: end; color: var(--faint); font: .58rem/1 var(--mono); letter-spacing: .14em; }
.material-notes span:first-child { color: var(--accent); }

.notes { display: grid; grid-template-columns: 1fr minmax(18rem, .7fr); gap: clamp(2rem, 8vw, 10rem); align-items: end; min-height: 62vh; padding: 10rem clamp(1.2rem, 8vw, 9rem) 8rem; background: var(--surface-deep); }
.notes h2 { max-width: 7ch; }
.notes__aside { max-width: 28rem; }
.notes__aside p { margin: 0 0 2.5rem; font-size: .9rem; }
.notes__actions { display: flex; flex-wrap: wrap; gap: 1.35rem 2rem; align-items: center; }
.text-link--quiet { color: var(--muted); border-color: var(--line-strong); }

.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.35rem clamp(1.2rem, 4vw, 4rem); border-top: 1px solid var(--line); color: var(--faint); font: .58rem/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.site-footer span:nth-child(2) { color: var(--accent); }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

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

@media (max-width: 48rem) {
  .site-header { grid-template-columns: 1fr auto; padding: 1rem 1.1rem; }
  .header-meta { display: none; }
  .header-link { font-size: .56rem; }
  .chapter { height: 180vh; }
  .chapter__stage { min-height: 32rem; }
  .stage-vignette { background: linear-gradient(0deg, rgba(4, 5, 4, .92) 0%, rgba(4, 5, 4, .16) 48%, rgba(4, 5, 4, .2) 100%); }
  [data-cinematic-canvas] { opacity: .94; }
  .hero-copy, .chapter__copy { width: calc(100% - 2.2rem); left: 1.1rem; right: auto; }
  .hero-copy { top: auto; bottom: 15vh; transform: none; }
  h1 { max-width: 7ch; font-size: clamp(4rem, 16vw, 6rem); }
  h2 { font-size: clamp(3.1rem, 14vw, 5rem); }
  .hero-copy__body, .chapter__copy > p:not(.eyebrow) { max-width: 21rem; margin-top: 1.5rem; font-size: .86rem; }
  .hero-copy__actions { gap: 1rem; margin-top: 1.6rem; }
  .quiet-label { display: none; }
  .hero-index { top: 5.7rem; right: 1.1rem; transform: none; }
  .route-signature { right: 1.1rem; bottom: 31vh; }
  .scrub-cue { bottom: 1.25rem; left: 1.1rem; justify-items: start; transform: none; }
  .scrub-cue i { height: 1.9rem; }
  .chapter-progress { right: 1.1rem; bottom: 1.55rem; }
  .chapter-progress i { width: 4.5rem; }
  .interlude { grid-template-columns: 1fr; gap: 1.6rem; min-height: 76vh; padding: 7rem 1.1rem; }
  .interlude__rule { width: 6rem; }
  .interlude .eyebrow, .interlude h2, .interlude > p:last-child { grid-column: 1; }
  .interlude h2 { max-width: 8ch; }
  .interlude > p:last-child { max-width: 21rem; margin: .2rem 0 0; font-size: .88rem; }
  .chapter__copy { top: auto; bottom: 12vh; transform: none; padding: 1.3rem 1.3rem 1.3rem 0 !important; background: linear-gradient(90deg, rgba(5, 6, 5, .94), rgba(5, 6, 5, .62) 84%, transparent) !important; }
  .chapter--release .chapter__copy { bottom: 13vh; }
  .chapter--release .chapter__copy--right { left: 1.1rem; right: auto; padding-left: 0 !important; }
  .chapter-mark { right: 1.1rem; bottom: 33vh; font-size: .52rem; }
  .release-orbit { top: 11%; width: 72vw; }
  .release-orbit span { font-size: .48rem; }
  .material-notes { right: 1.1rem; bottom: 11vh; font-size: .5rem; }
  .notes { grid-template-columns: 1fr; gap: 3rem; min-height: 75vh; padding: 7rem 1.1rem 5rem; }
  .notes__aside p { font-size: .82rem; }
  .site-footer { flex-direction: column; gap: .55rem; padding: 1.1rem; font-size: .52rem; }
}
