/* ============================================================
   CAMERON ROBERTS — GARNET HOUR
   A title sequence in six acts, graded in maroon.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-vf.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-italic-vf.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Great Vibes";
  src: url("/fonts/greatvibes.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-vf.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --black: #0D0709;          /* black cherry */
  --garnet: #C4515C;         /* luminous maroon-red — display accents, the dust */
  --garnet-hi: #DE7B84;      /* lit garnet — small accent text, AA-safe */
  --maroon: #7A2431;         /* deep maroon — hairlines, borders, engraving */
  --ivory: #F2EBDD;
  --sapphire: #141B2E;
  --mauve: #97828D;          /* muted metadata — AA on black cherry */
  --ember: #D2825C;

  --bg: var(--black);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Great Vibes", "Snell Roundhand", "Apple Chancery", cursive;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  --hairline: 1px solid color-mix(in srgb, var(--maroon) 55%, transparent);
  --pad: clamp(1.25rem, 4vw, 4rem);
  --measure: 38rem;

  /* live values written by JS */
  --vel-wdth: 100;
  --light-warmth: 0;
}

@property --qp { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --p  { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --hp { syntax: "<number>"; inherits: true; initial-value: 0; }

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--sans);
  font-weight: 380;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background 1.2s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--garnet); color: var(--black); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: fixed; top: -4rem; left: 1rem; z-index: 200;
  background: var(--garnet); color: var(--black);
  font: 600 0.75rem/1 var(--sans); letter-spacing: 0.15em;
  padding: 0.8em 1.2em; transition: top 0.2s;
}
.skip:focus { top: 1rem; }

/* ---------- Fixed atmosphere layers ---------- */
#dust {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 1; pointer-events: none;
}
.grain {
  position: fixed; inset: -3%; z-index: 90; pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.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-shift 0.9s steps(3) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-2%, 1%); }
  66% { transform: translate(1%, -2%); }
}

/* The gold spine thread */
.spine {
  position: fixed; top: 0; bottom: 0;
  left: max(calc(50% - 46rem), 1.35rem);
  width: 1px; z-index: 80; pointer-events: none;
  background: color-mix(in srgb, var(--maroon) 22%, transparent);
}
.spine-fill {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--maroon), var(--garnet));
  transform-origin: top;
  transform: scaleY(var(--progress, 0));
}
.spine-tip {
  position: absolute; left: -2px; width: 5px; height: 5px;
  top: 0;
  transform: translateY(calc(var(--progress, 0) * 100dvh));
  border-radius: 50%;
  background: var(--garnet);
  box-shadow: 0 0 12px 2px color-mix(in srgb, var(--garnet) calc(40% + var(--light-warmth) * 40%), transparent);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 1.4rem;
  padding: 1.1rem clamp(1.25rem, 3vw, 2.5rem);
}
.nav-mark {
  font: 500 1.05rem/1 var(--serif);
  color: var(--garnet-hi);
  border: 1px solid color-mix(in srgb, var(--maroon) 70%, transparent);
  padding: 0.42em 0.5em 0.32em;
  letter-spacing: 0.08em;
}
.nav-acts { display: flex; gap: 1.1rem; list-style: none; }
.nav-acts a {
  font: 500 0.68rem/1 var(--sans);
  font-variation-settings: "wdth" var(--vel-wdth);
  letter-spacing: 0.22em;
  color: var(--mauve);
  padding: calc((44px - 1em) / 2) 0.3em;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.nav-acts a:hover, .nav-acts a:focus-visible, .nav-acts a[aria-current] {
  color: var(--garnet-hi);
  border-bottom-color: var(--maroon);
}
.nav-mark:focus-visible, .nav-acts a:focus-visible, a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 1px solid var(--garnet); outline-offset: 3px;
}

/* ---------- Scene counter (film slate) ---------- */
.counter {
  position: fixed; left: clamp(1.25rem, 3vw, 2.5rem); bottom: 1.2rem; z-index: 100;
  display: flex; gap: 0.6em; align-items: baseline;
  font: 500 0.68rem/1 var(--sans);
  font-variation-settings: "wdth" var(--vel-wdth);
  letter-spacing: 0.24em;
  color: var(--mauve);
  font-variant-numeric: tabular-nums;
}
.counter-num { color: var(--garnet-hi); }

/* ---------- Acts (shared) ---------- */
.act { position: relative; z-index: 10; padding: 0 var(--pad); }
.act-head {
  max-width: 72rem; margin: 0 auto;
  padding: clamp(5rem, 14vh, 9rem) 0 clamp(2rem, 5vh, 3.5rem);
}
.act-eyebrow {
  display: block;
  font: 600 0.66rem/1 var(--sans);
  letter-spacing: 0.32em;
  color: var(--mauve);
  margin-bottom: 1.1rem;
}
.act-title {
  font: 500 clamp(2.6rem, 6.5vw, 5.2rem)/1.02 var(--serif);
  letter-spacing: -0.01em;
  color: var(--garnet);
}

/* Reveal choreography (JS adds .in; html.js gates the hidden state) */
html.js .rv { opacity: 0; transform: translateY(26px); }
html.js .rv.in { opacity: 1; transform: none; transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }

/* ============================================================
   ACT 01 — HERO
   ============================================================ */
.act-hero { height: 250svh; padding: 0; }
.hero-stick {
  position: sticky; top: 0; height: 100svh;
  display: grid; place-items: center;
  overflow: clip;
}
.hero-frame { text-align: center; position: relative; z-index: 5; padding: 0 var(--pad); }
.hero-name {
  font: 400 clamp(2.9rem, 10.5vw, 10rem)/1.12 var(--script);
  letter-spacing: normal; /* script joins must stay connected */
  color: var(--garnet);
  opacity: calc(1 - min(1, var(--hp) * 2.1));
  transform: translateY(calc(var(--hp) * -6vh));
}
.hero-line { display: block; }
html.js .hero-name { animation: hero-ignite 2.6s cubic-bezier(0.19, 1, 0.22, 1) backwards; }
@keyframes hero-ignite {
  0% { opacity: 0; filter: blur(14px); }
  100% { opacity: 1; filter: blur(0); }
}
.hero-credit {
  margin-top: clamp(1.2rem, 3vh, 2.2rem);
  font: 600 clamp(0.62rem, 1.4vw, 0.8rem)/1 var(--sans);
  letter-spacing: 0.34em;
  color: var(--ivory);
  min-height: 1em;
  opacity: calc(1 - min(1, var(--hp) * 2.6));
}
.hero-tagline {
  margin-top: clamp(1rem, 2.5vh, 1.8rem);
  font: italic 300 clamp(1.15rem, 3vw, 1.9rem)/1.3 var(--serif);
  color: color-mix(in srgb, var(--ivory) 78%, var(--mauve));
  opacity: calc(1 - min(1, max(0, var(--hp) - 0.25) * 2.6));
}
.hero-locale {
  margin-top: clamp(1rem, 2.6vh, 1.6rem);
  display: inline-flex; align-items: center; gap: 0.7em;
  font: 500 0.64rem/1 var(--sans);
  letter-spacing: 0.3em;
  color: var(--mauve);
  opacity: calc(1 - min(1, max(0, var(--hp) - 0.25) * 2.6));
}
.hero-locale .tick { width: 2.2em; height: 1px; background: var(--maroon); }
.hero-hint {
  position: absolute; bottom: 4.5rem; left: 50%;
  opacity: calc(1 - min(1, var(--hp) * 4));
}
.hero-hint i {
  display: block; width: 1px; height: 4rem;
  background: linear-gradient(to bottom, transparent, var(--garnet));
  animation: hint-pulse 2.2s ease-in-out infinite;
}
@keyframes hint-pulse {
  0%, 100% { transform: scaleY(0.35); transform-origin: top; opacity: 0.35; }
  55% { transform: scaleY(1); opacity: 1; }
}

/* ============================================================
   Letterboxed frames + darkroom develop
   ============================================================ */
.frame {
  position: relative;
  max-width: 62rem;
  margin: clamp(2rem, 6vh, 4rem) auto;
}
.frame-media {
  position: relative;
  overflow: clip;
  aspect-ratio: 21 / 10;
  clip-path: inset(calc((1 - var(--p)) * 15%) 0);
}
.frame-media img {
  width: 100%; height: 118%; object-fit: cover; object-position: center 28%;
  transform: translateY(calc((var(--p) - 0.5) * -7%)) scale(1.06);
  filter: grayscale(1) contrast(1.04) brightness(calc(0.35 + min(1, var(--p) * 1.6) * 0.62));
}
/* champagne duotone grade */
.frame-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--garnet) 80%, transparent) 0%,
    color-mix(in srgb, var(--maroon) 72%, transparent) 55%,
    color-mix(in srgb, var(--ember) 55%, transparent) 100%);
  mix-blend-mode: color;
  pointer-events: none;
}
/* developer bath: dither veil that clears as you scroll */
.develop::before {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='d'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23d)' fill='%230A0908'/%3E%3C/svg%3E");
  opacity: calc(1 - min(1, var(--p) * 1.9));
  pointer-events: none;
}
.frame-slate {
  margin-top: 0.8rem;
  font: 500 0.62rem/1 var(--sans);
  letter-spacing: 0.3em;
  color: var(--mauve);
}
/* viewfinder corner ticks */
.frame::before, .frame::after {
  content: ""; position: absolute; width: 1.1rem; height: 1.1rem; z-index: 3;
  border-color: var(--maroon); border-style: solid; opacity: 0.9;
}
.frame::before { top: -0.45rem; left: -0.45rem; border-width: 1px 0 0 1px; }
.frame::after { bottom: 1.55rem; right: -0.45rem; border-width: 0 1px 1px 0; }

/* ============================================================
   ACT 02 — THE VISIONARY
   ============================================================ */
.act-visionary { padding-bottom: 4rem; }
.visionary-copy {
  max-width: var(--measure);
  margin: clamp(1rem, 3vh, 2rem) auto 0;
}
.visionary-copy p { margin-bottom: 1.4rem; font-size: clamp(1rem, 1.5vw, 1.13rem); color: color-mix(in srgb, var(--ivory) 92%, var(--mauve)); }
.visionary-copy .lede { font: 400 clamp(1.25rem, 2.4vw, 1.6rem)/1.5 var(--serif); color: var(--ivory); }
.visionary-copy strong { font-weight: 600; color: var(--garnet); }

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 1px;
  max-width: 62rem;
  margin: clamp(3rem, 8vh, 5rem) auto 0;
  background: color-mix(in srgb, var(--maroon) 30%, transparent);
  border: var(--hairline);
}
.fact {
  background: var(--bg);
  padding: 1.4rem 1.5rem 1.3rem;
  transition: background 1.2s ease;
}
.fact dt { font: 600 0.6rem/1 var(--sans); letter-spacing: 0.3em; color: var(--mauve); margin-bottom: 0.7rem; }
.fact dd { font: 500 1.05rem/1.2 var(--sans); letter-spacing: 0.06em; color: var(--ivory); font-variant-numeric: tabular-nums; }
.fact dd [data-odo] { color: var(--garnet); font-size: 1.6rem; }

/* voiceover quote — word-by-word scrub */
.voiceover {
  min-height: 70svh;
  display: grid; place-items: center;
  max-width: 58rem; margin: 0 auto;
  padding: clamp(3rem, 10vh, 6rem) 0;
}
.voiceover p {
  font: italic 300 clamp(1.7rem, 4.6vw, 3.6rem)/1.35 var(--serif);
  text-align: center;
}
.voiceover .w {
  color: color-mix(in oklab, var(--garnet) calc(min(100, max(0, (var(--qp) - var(--wi)) * 320)) * 1%), var(--mauve));
}

/* ============================================================
   ACT 03 — SOLVEX (sapphire scene)
   ============================================================ */
body.scene-sapphire { --bg: var(--sapphire); }
body.scene-sapphire .fact { background: var(--bg); }
.act-head-overlay .act-eyebrow { color: color-mix(in srgb, var(--ivory) 55%, var(--mauve)); }

.act-solvex { padding: 0; }
.pillars-stage { height: 440svh; }
.pillars-stick {
  position: sticky; top: 0; height: 100svh;
  overflow: clip;
  display: grid;
}
.act-head-overlay {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  padding: clamp(3.2rem, 8vh, 5rem) var(--pad) 0;
  max-width: none;
}
.pillars-track {
  display: flex;
  width: 400vw; height: 100%;
  transform: translate3d(calc(var(--p) * -300vw), 0, 0);
  will-change: transform;
}
.pillar {
  width: 100vw; height: 100%;
  display: grid; place-content: center; justify-items: start;
  padding: 0 clamp(2rem, 12vw, 16rem);
  row-gap: 1.6rem;
}
.pillar-motif { width: clamp(9rem, 16vw, 15rem); overflow: visible; }
.pillar-motif .draw, .still-motif .draw {
  stroke: var(--garnet); stroke-width: 1.1; fill: none;
  vector-effect: non-scaling-stroke;
}
.pillar-name {
  font: 800 clamp(3rem, 9vw, 8.5rem)/1 var(--sans);
  font-stretch: 118%;
  letter-spacing: 0.06em;
  color: var(--ivory);
}
.pillar-desc {
  max-width: 26rem;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  color: color-mix(in srgb, var(--ivory) 75%, var(--mauve));
}
.pillar-exit { place-content: center; justify-items: center; }
.burn {
  font: 500 clamp(2.2rem, 6vw, 5rem)/1.15 var(--serif);
  text-align: center;
  color: var(--garnet);
  text-shadow: 0 0 40px color-mix(in srgb, var(--garnet) 35%, transparent);
}

/* ============================================================
   ACT 04 — SERVICES (the ledger)
   ============================================================ */
.ledger { list-style: none; max-width: 72rem; margin: 0 auto clamp(4rem, 10vh, 7rem); }
.ledger-row {
  position: relative;
  display: grid;
  grid-template-columns: 4rem 1fr;
  grid-template-areas: "num name" "num detail";
  align-items: baseline;
  padding: clamp(1.6rem, 4vh, 2.6rem) 1rem;
  border-top: var(--hairline);
  cursor: default;
  overflow: clip;
}
.ledger-row:last-child { border-bottom: var(--hairline); }
.ledger-numeral {
  grid-area: num;
  font: 400 1rem/1 var(--serif);
  color: var(--maroon);
}
.ledger-name {
  grid-area: name;
  font: 500 clamp(1.5rem, 3.4vw, 2.6rem)/1.1 var(--serif);
  color: var(--ivory);
  transition: color 0.4s;
}
.ledger-detail {
  grid-area: detail;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--mauve);
  transition: color 0.4s;
}
.ledger-row::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(16rem circle at calc(var(--px, 50) * 1%) calc(var(--py, 50) * 1%),
    color-mix(in srgb, var(--garnet) 10%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}
.ledger-row:hover::after { opacity: 1; }
.ledger-row:hover .ledger-name { color: var(--garnet); }
.ledger-row:hover .ledger-detail { color: color-mix(in srgb, var(--ivory) 80%, var(--mauve)); }
.chip {
  display: inline-block;
  font: 600 0.6rem/1 var(--sans);
  letter-spacing: 0.22em;
  color: var(--garnet-hi);
  border: 1px solid color-mix(in srgb, var(--maroon) 55%, transparent);
  padding: 0.45em 0.7em 0.35em;
  margin-left: 0.5em;
  vertical-align: 0.15em;
}

/* ============================================================
   ACT 05 — SELECTED WORK
   ============================================================ */
.stills {
  max-width: 72rem; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: clamp(1.4rem, 3vh, 2.2rem);
}
.still {
  position: relative;
  border: var(--hairline);
  padding: clamp(1.6rem, 4vw, 2.8rem);
  overflow: clip;
}
.still::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(20rem circle at calc(var(--px, 50) * 1%) calc(var(--py, 50) * 1%),
    color-mix(in srgb, var(--garnet) 7%, transparent), transparent 70%);
  opacity: 0; transition: opacity 0.4s;
}
.still:hover::after { opacity: 1; }
.still-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem 1rem; flex-wrap: wrap; }
.still-title { font: 500 clamp(1.7rem, 2.6vw, 2.3rem)/1.05 var(--serif); color: var(--garnet); }
.still-years {
  font: 500 0.78rem/1 var(--sans);
  letter-spacing: 0.18em;
  color: var(--mauve);
  font-variant-numeric: tabular-nums;
}
.still-meta { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; }
.still-site {
  font: 600 0.64rem/1 var(--sans);
  letter-spacing: 0.2em;
  color: var(--mauve);
  border-bottom: 1px solid color-mix(in srgb, var(--maroon) 60%, transparent);
  padding: calc((34px - 1em) / 2) 0.2em 0.2em;
  transition: color 0.3s, border-color 0.3s;
}
.still-site:hover, .still-site:focus-visible { color: var(--garnet-hi); border-bottom-color: var(--garnet-hi); }
.chip-owned { margin-left: 0; }

/* the "many more" ghost frame */
.still-more {
  border-style: dashed;
  display: grid; place-content: center; justify-items: center;
  gap: 0.5rem; text-align: center;
  min-height: 14rem;
}
.still-more-mark { font: 300 2.4rem/1 var(--serif); color: var(--maroon); }
.still-more-line { font: italic 300 1.35rem/1.4 var(--serif); color: color-mix(in srgb, var(--ivory) 80%, var(--mauve)); }
.still-more-sub { font: 600 0.56rem/1.6 var(--sans); letter-spacing: 0.26em; color: var(--mauve); }
.still-logline { max-width: 44rem; margin-top: 1rem; color: color-mix(in srgb, var(--ivory) 84%, var(--mauve)); }
.still-motif { width: min(100%, 22rem); margin-top: 1.6rem; overflow: visible; opacity: 0.85; }

/* testimonial */
.review {
  position: relative;
  max-width: 62rem;
  margin: clamp(4rem, 12vh, 8rem) auto;
  padding: 0 var(--pad);
  text-align: center;
}
.review-glyph {
  position: absolute; top: -0.55em; left: 50%; transform: translateX(-50%);
  font: 500 clamp(8rem, 18vw, 14rem)/1 var(--serif);
  color: color-mix(in srgb, var(--maroon) 26%, transparent);
  pointer-events: none;
}
.review-text {
  position: relative;
  font: italic 300 clamp(1.5rem, 3.6vw, 2.7rem)/1.4 var(--serif);
  color: var(--ivory);
}
.review-credit {
  margin-top: 1.6rem;
  font: 600 0.66rem/1 var(--sans);
  letter-spacing: 0.3em;
  color: var(--mauve);
}
.frame-ease { max-width: 54rem; }
.frame-ease .frame-media { aspect-ratio: 16 / 10; }
.frame-ease .frame-media img { object-position: center 30%; }

/* partners */
.partners {
  max-width: 72rem;
  margin: clamp(3rem, 9vh, 6rem) auto clamp(4rem, 10vh, 7rem);
  padding-top: 1.6rem;
  border-top: var(--hairline);
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: baseline;
}
.partners-label { font: 600 0.6rem/1 var(--sans); letter-spacing: 0.3em; color: var(--garnet-hi); }
.partners-row { list-style: none; display: flex; flex-wrap: wrap; gap: 0.8rem 2.5rem; }
.partners-row li {
  font: 500 0.72rem/1 var(--sans);
  letter-spacing: 0.24em;
  color: var(--mauve);
  transition: color 0.4s;
}
.partners-row li:hover { color: var(--garnet-hi); }

/* ============================================================
   ACT 06 — FIN
   ============================================================ */
.act-contact { min-height: 100svh; display: flex; flex-direction: column; }
.closing {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  gap: clamp(1.6rem, 4vh, 2.6rem);
  padding: clamp(3rem, 8vh, 5rem) 0;
}
.closing-mail {
  font: 500 clamp(1.9rem, 6.4vw, 6rem)/1.06 var(--serif);
  color: var(--garnet);
  overflow-wrap: anywhere;
  transition: text-shadow 0.5s, color 0.5s;
}
.closing-mail:hover, .closing-mail:focus-visible {
  color: color-mix(in srgb, var(--garnet) 80%, var(--ivory));
  text-shadow: 0 0 50px color-mix(in srgb, var(--garnet) 45%, transparent);
}
.closing-copy {
  appearance: none; background: none;
  border: 1px solid color-mix(in srgb, var(--maroon) 65%, transparent);
  color: var(--ivory);
  font: 600 0.64rem/1 var(--sans);
  letter-spacing: 0.3em;
  padding: calc((44px - 1em) / 2) 1.6em;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.closing-copy:hover, .closing-copy:focus-visible { border-color: var(--garnet); color: var(--garnet); }
.closing-copy.copied { background: var(--garnet); color: var(--black); border-color: var(--garnet); }
.closing-credits { display: flex; flex-direction: column; gap: 0; }
.credit-line {
  font: 500 0.72rem/1 var(--sans);
  letter-spacing: 0.26em;
  color: var(--mauve);
  padding: calc((44px - 1em) / 2) 0.5em;
  transition: color 0.3s;
}
.credit-line:hover, .credit-line:focus-visible { color: var(--garnet-hi); }
.credit-wa:hover, .credit-wa:focus-visible { color: var(--ember); }

.signoff { display: flex; align-items: center; gap: 1.3rem; margin-top: 1rem; }
.signoff-photo {
  width: clamp(3.6rem, 8vw, 5rem); height: clamp(3.6rem, 8vw, 5rem);
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--maroon);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--maroon) 18%, transparent);
}
.signoff-line { text-align: left; font: italic 400 1.05rem/1.5 var(--serif); color: color-mix(in srgb, var(--ivory) 82%, var(--mauve)); }
.signoff-name { font-style: normal; color: var(--garnet-hi); }

.couplet { margin-top: clamp(1.5rem, 4vh, 2.5rem); max-width: 34rem; }
.couplet-lines {
  font: italic 300 clamp(1.05rem, 2.2vw, 1.35rem)/1.7 var(--serif);
  color: color-mix(in srgb, var(--ivory) 70%, var(--mauve));
  min-height: 3.4em;
}
.couplet-slate {
  display: block; margin-top: 0.9rem;
  font: 600 0.55rem/1 var(--sans);
  letter-spacing: 0.3em;
  color: var(--mauve);
}

.colophon {
  padding: 2rem 0 4.4rem;
  display: flex; flex-wrap: wrap; gap: 0.8rem 3rem; justify-content: center;
  font: 500 0.62rem/1 var(--sans);
  letter-spacing: 0.26em;
  color: var(--mauve);
}
.colophon-fin { color: var(--maroon); }
.colophon-hint kbd {
  font: 600 0.62rem/1 var(--mono);
  border: 1px solid color-mix(in srgb, var(--maroon) 55%, transparent);
  padding: 0.25em 0.5em;
  margin: 0 0.2em;
}

/* ============================================================
   Terminal easter egg
   ============================================================ */
.term {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--black) 72%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 1rem;
}
.term[hidden] { display: none; }
.term-window {
  width: min(44rem, 100%);
  background: #0D0C0Aee;
  border: 1px solid color-mix(in srgb, var(--maroon) 55%, transparent);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px color-mix(in srgb, var(--garnet) 8%, transparent);
}
.term-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid color-mix(in srgb, var(--maroon) 35%, transparent);
}
.term-bar span { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: color-mix(in srgb, var(--maroon) 45%, transparent); }
.term-bar b { margin-left: 0.6rem; font: 500 0.68rem/1 var(--mono); letter-spacing: 0.08em; color: var(--mauve); }
.term-scroll { max-height: 55svh; overflow-y: auto; padding: 1rem 1.1rem 1.2rem; }
.term-out { font: 400 0.82rem/1.75 var(--mono); color: var(--ivory); white-space: pre-wrap; overflow-wrap: anywhere; }
.term-out b { color: var(--garnet-hi); font-weight: 600; }
.term-out .t-poem { display: block; font: italic 400 1.05rem/1.7 var(--serif); color: var(--garnet-hi); padding: 0.6em 0 0.6em 1em; border-left: 1px solid var(--maroon); margin: 0.5em 0; }
.term-out .t-dim { color: var(--mauve); }
.term-out .t-ok { color: #9BC48A; }
.term-line { display: flex; align-items: baseline; margin-top: 0.4rem; }
.term-ps1 { font: 600 0.82rem/1 var(--mono); color: var(--garnet-hi); }
.term-line input {
  flex: 1; background: none; border: 0; outline: 0;
  font: 400 0.82rem/1.6 var(--mono);
  color: var(--ivory);
  caret-color: var(--garnet);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .spine { left: 0.55rem; }
  .frame-media { aspect-ratio: 4 / 5; clip-path: inset(calc((1 - var(--p)) * 10%) 0); }
  .frame-ease .frame-media { aspect-ratio: 4 / 5; }
  .frame::after { bottom: 1.9rem; }

  /* pillars become vertical cards */
  .pillars-stage { height: auto; }
  .pillars-stick { position: static; height: auto; overflow: visible; display: block; }
  .act-head-overlay { position: static; padding: clamp(5rem, 14vh, 9rem) 0 1rem; }
  .act-solvex { padding: 0 var(--pad); }
  .pillars-track { display: block; width: auto; height: auto; transform: none; }
  .pillar { width: auto; min-height: 72svh; padding: 3rem 0; justify-items: start; }
  .pillar-exit { min-height: 60svh; justify-items: center; }

  .ledger-row { grid-template-columns: 2.4rem 1fr; }
  .nav-acts { gap: 0.8rem; }
  .counter { bottom: 0.9rem; }
  .colophon { padding-bottom: 5.2rem; }
}

@media (max-width: 480px) {
  .nav { padding-top: 0.9rem; }
  .nav-acts a { font-size: 0.62rem; }
  .signoff { flex-direction: column; }
  .signoff-line { text-align: center; }
}

/* ============================================================
   Reduced motion — the still version of the film
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .rv { opacity: 1; transform: none; transition: none; }
  html.js .hero-name { animation: none; }
  .grain { animation: none; }
  .hero-hint i { animation: none; transform: none; opacity: 0.6; }
  .act-hero { height: auto; }
  .hero-stick { position: static; height: 100svh; }
  .hero-name, .hero-credit, .hero-tagline, .hero-locale { opacity: 1 !important; transform: none !important; }
  .frame-media { clip-path: none; }
  .frame-media img { transform: none; filter: grayscale(1) contrast(1.04) brightness(0.97); }
  .develop::before { display: none; }
  .voiceover .w { color: var(--garnet); }
  .pillars-stage { height: auto; }
  .pillars-stick { position: static; height: auto; display: block; overflow: visible; }
  .act-head-overlay { position: static; padding: clamp(5rem, 14vh, 9rem) var(--pad) 1rem; }
  .pillars-track { display: block; width: auto; transform: none; }
  .pillar { width: auto; min-height: 0; padding: 3rem var(--pad); }
  #dust { display: none; }
  .counter, .nav-acts a { font-variation-settings: "wdth" 100; }
  * { scroll-behavior: auto !important; }
}
