/* ============================================================
   overhaul.css — the 2026 overhaul design system.
   The artwork is the palette authority. Legacy pages keep style.css;
   nothing here loads on them.
   ============================================================ */

:root {
  --bg: #080808;
  --ink: #0d0b09;            /* warm card-table black */
  --gold: #c4922a;
  --moon: #f2e2a0;           /* moonlight, glyph glow */
  --teal: #3d8a8a;
  --moth: #d4622a;           /* moth orange, hover heat */
  --leaf: #4a8f4f;
  --text: #f0ede6;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-ui: 'Space Grotesk', system-ui, sans-serif;
}

/* ---- base ---- */
.overhaul *, .overhaul *::before, .overhaul *::after { box-sizing: border-box; }
.overhaul {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.overhaul img { max-width: none; }
.overhaul ::selection { background: var(--gold); color: var(--ink); }

/* custom focus, always visible, never the default blue */
.overhaul :focus { outline: none; }
.overhaul :focus-visible {
  outline: 1px solid var(--moon);
  outline-offset: 4px;
  border-radius: 2px;
}

/* the unifying grade: fine grain everywhere, on top of everything */
.grain-veil {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 90;
  opacity: 0.05;
  mix-blend-mode: overlay;
  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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- the custom cursor and its trail ---- */
.has-custom-cursor body.overhaul,
.has-custom-cursor body.overhaul * { cursor: none !important; }
.mw-cursor-moon {
  position: fixed; top: 0; left: 0;
  width: 22px; height: 22px;
  object-fit: contain;
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 0 7px rgba(242, 120, 90, 0.5));
}
.mw-cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(242, 226, 160, 0.55);
  z-index: 300;
  pointer-events: none;
  opacity: 0;
  transition: width 0.2s ease, height 0.2s ease, border-color 0.2s ease, margin 0.2s ease;
}
.mw-cursor-ring.is-active {
  width: 52px; height: 52px;
  margin: -9px 0 0 -9px;
  border-color: var(--gold);
}
.mw-cursor-ring.is-down { border-color: var(--moth); }
#mw-trail {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
}
/* the trail lives between the dark ground and the work: full-bleed stages
   swallow it, content blocks ride above it */
#journey, #scrub-wrap { z-index: 2; }
#fourth-door > *, #outro > *, .chamber-outro > *,
#rack-track, .design-piece .piece-media, .piece-caption,
#cube, .cube-hint { position: relative; z-index: 2; }

/* soft vignette for full-bleed moments */
.vignette::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 120% 105% at 50% 45%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* ============================================================
   Act 0 — the Threshold
   ============================================================ */
#threshold {
  position: fixed; inset: 0;
  z-index: 200;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.4rem;
  transition: opacity 1.3s ease;
}
#threshold.is-leaving { opacity: 0; pointer-events: none; }
.threshold-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  letter-spacing: 0.05em;
  color: var(--text);
  margin: 0;
  opacity: 0;
  animation: thresh-up 1.6s 0.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes thresh-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 0.85; transform: none; }
}
.threshold-moons { display: flex; gap: clamp(0.9rem, 3vw, 2rem); align-items: center; }
.threshold-moon {
  width: clamp(30px, 5vw, 52px);
  aspect-ratio: 1 / 2.6;
  object-fit: contain;
  filter: grayscale(1) brightness(0.35);
  transition: filter 0.9s ease;
}
.threshold-moon.is-filled {
  filter: none;
  animation: moon-breathe 5.5s ease-in-out infinite;
}
@keyframes moon-breathe {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(242, 120, 90, 0.2)); }
  50% { filter: drop-shadow(0 0 16px rgba(242, 120, 90, 0.5)); }
}

/* ============================================================
   the veil nav (all overhaul pages)
   ============================================================ */
.veil-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.4rem;
  pointer-events: none;
}
.veil-nav > * { pointer-events: auto; }
.veil-mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  opacity: 0.85;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.veil-mark:hover { color: var(--moon); opacity: 1; }
/* the Mikey wordmark: blackletter drawn dark, inverted to read on the night */
.veil-mark img {
  display: block;
  width: clamp(88px, 9vw, 108px);
  filter: invert(1);
  transition: opacity 0.15s ease;
}
#mute-btn {
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid rgba(240, 237, 230, 0.2);
  border-radius: 50%;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease;
}
#mute-btn:hover { border-color: var(--gold); color: var(--moon); }
/* two bars while sound plays (pause); the third unfolds when it rests (wave) */
#mute-btn rect {
  fill: currentColor;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.3s ease;
}
#mute-btn .b2 { opacity: 0; transform: scaleY(0.4); }
#mute-btn.is-muted .b1,
#mute-btn.is-muted .b3 { transform: scaleY(0.55); }
#mute-btn.is-muted .b2 { opacity: 1; transform: none; }

/* ============================================================
   the journey stage (Acts I to V)
   ============================================================ */
#journey { position: relative; height: 900vh; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: #000;         /* the film's own field */
  will-change: transform;   /* the stage warps with scroll velocity */
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Act I: the wordmark stencil. The letterforms are punched clean through
   the ink plate; the film holds still behind while the plate slides off,
   its letter-shaped windows travelling across the standing image. */
#logo-veil, #gate-plate {
  position: absolute; inset: 0;
  z-index: 3;
  background: var(--bg);
  will-change: transform;
  -webkit-mask-image: linear-gradient(#000 0 0), url('../assets/brand/mikey-logo-hi.webp');
          mask-image: linear-gradient(#000 0 0), url('../assets/brand/mikey-logo-hi.webp');
  -webkit-mask-size: 100% 100%, min(82vw, 880px) auto;
          mask-size: 100% 100%, min(82vw, 880px) auto;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}
.hero-roles {
  position: absolute;
  left: 0; right: 0;
  bottom: 16vh;
  margin: 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.8;
}
.hero-hint {
  position: absolute;
  left: 0; right: 0;
  bottom: 5vh;
  margin: 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--moon);
  animation: hint-breathe 3.2s ease-in-out infinite;
}
@keyframes hint-breathe {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-hint { animation: none; opacity: 0.6; }
}

/* ============================================================
   Act VI — the Reading
   ============================================================ */
/* the wrap climbs 100vh under the journey so its ground pins while the
   film's stage still holds the offering; the swap is pixel-identical */
#reading-wrap { position: relative; height: 450vh; margin-top: -100vh; background: var(--ink); }
/* the film's last frame (the offered hands) holds beneath the table, so
   the seam from the scrub is invisible; the ink breathes in over it */
#reading-ground {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  margin-bottom: -100vh;
  overflow: hidden;
}
#reading-ground img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#reading-ground .ground-ink { position: absolute; inset: 0; background: var(--ink); opacity: 0; }
#reading {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  display: grid; place-items: center;
  /* the ink ground lives on #reading-wrap, beneath the cursor trail;
     this layer rides above it (z 2) so the cards cover the trail */
  z-index: 2;
  background:
    radial-gradient(ellipse 60% 48% at 50% 46%, rgba(242, 226, 160, 0.07), transparent 70%);
}
#reading::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../assets/textures/paper-grain.webp');
  background-size: 480px;
  opacity: 0.04;
  mix-blend-mode: overlay;
}
#reading::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  /* the pool of light breathes, and drifts after the visitor's hand */
  background: radial-gradient(ellipse 52% 40% at var(--mx, 50%) var(--my, 46%), rgba(242, 226, 160, 0.055), transparent 70%);
  animation: pool-breathe 9s ease-in-out infinite;
}
#card-table { position: relative; z-index: 10; }
@keyframes pool-breathe {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
#card-table {
  display: flex;
  gap: clamp(1rem, 4vw, 3.2rem);
  perspective: 1400px;
}
.card {
  position: relative;
  width: clamp(120px, 19vw, 220px);
  aspect-ratio: 2 / 3.1;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  opacity: 0;                      /* dealt in by cards.js */
}
.card.is-dealt { opacity: 1; }
.card-3d {
  --tiltX: 0deg; --tiltY: 0deg; --glintX: 50%; --lift: 1;
  --fs: 1; --fy: 0vh;              /* scroll focus: scale and rise */
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: translateY(var(--fy)) rotateX(var(--tiltX)) rotateY(var(--tiltY)) scale(calc(var(--lift) * var(--fs)));
  transition: transform 0.15s ease-out;
  display: block;
}
.card.is-turned .card-3d {
  transform: translateY(var(--fy)) rotateX(var(--tiltX)) rotateY(calc(180deg + var(--tiltY))) scale(calc(var(--lift) * var(--fs)));
}
.card.is-turned:hover .card-3d, .card.is-turned:focus-visible .card-3d { --lift: 1.035; }
.card.is-turning .card-3d { transition: transform 0.6s cubic-bezier(0.45, 0, 0.55, 1); }
.card-face {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  border-radius: 8px;
  border: 1px solid rgba(196, 146, 42, 0.35);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.card-face-back { background-color: #10201c; }
.card-face-front {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 252, 240, 1), rgba(233, 226, 208, 1) 80%);
  display: grid; place-items: center;
}
.card-face-front::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../assets/textures/paper-grain.webp');
  background-size: 320px;
  opacity: 0.5;
  mix-blend-mode: multiply;
}
.card-glyph {
  position: relative;
  width: 62%; height: 74%;
  object-fit: contain;
  filter: drop-shadow(0 0 0 transparent);
  transition: filter 0.15s ease;
}
.card:hover .card-glyph, .card:focus-visible .card-glyph {
  filter: drop-shadow(0 0 14px rgba(196, 146, 42, 0.55));
}
.card-glint {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent calc(var(--glintX) - 18%), rgba(255, 250, 230, 0.35) var(--glintX), transparent calc(var(--glintX) + 18%));
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.card:hover .card-glint, .card:focus-visible .card-glint { opacity: 1; }
.card-title {
  position: absolute;
  left: 0; right: 0;
  bottom: -3.3rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  color: var(--moon);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
/* the medium named quietly beneath the reading's poetic title */
.card-medium {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.5;
}
.card:hover .card-title, .card:focus-visible .card-title,
.card.is-focus .card-title { opacity: 0.9; transform: none; }
.card.is-opening { z-index: 40; }
#doorway-veil {
  position: fixed; inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 150;
}

/* ============================================================
   Act VII — the fourth door (coding)
   ============================================================ */
#fourth-door {
  position: relative;
  padding: 22vh 6vw 18vh;
  /* the room lightens to paper, then hands back to ink for Onwards */
  background: linear-gradient(var(--ink) 0%, #ece7db 16%, #e8e2d3 84%, #060809 100%);
  color: #171310;
  text-align: center;
}
#fourth-door .door-eyebrow { color: #2c6666; }
#fourth-door .door-sub { color: #7c5c14; opacity: 0.85; }
#fourth-door .artefact {
  color: #171310;
  border-color: rgba(23, 19, 16, 0.18);
  background: rgba(255, 253, 246, 0.55);
}
#fourth-door .artefact:hover { border-color: rgba(124, 92, 20, 0.6); }
#fourth-door .artefact .artefact-cta { color: #7c5c14; }
/* on paper the marker sigils keep their own colours */
#fourth-door .artefact-sigil { filter: none; opacity: 0.9; }
#fourth-door .artefact:hover .artefact-sigil { filter: none; opacity: 1; }
#fourth-door .door-credit a { color: #2c6666; }

/* fixed chrome adapts while the paper room owns the viewport */
.veil-mark img { transition: filter 0.5s ease; }
body.mode-light .veil-mark img { filter: none; }
body.mode-light #mute-btn { color: #171310; border-color: rgba(23, 19, 16, 0.35); }
body.mode-light #mute-btn:hover { border-color: #7c5c14; color: #171310; }
body.mode-light .mw-cursor-ring { border-color: rgba(23, 19, 16, 0.55); }
body.mode-light #mw-trail { mix-blend-mode: multiply; opacity: 0.45; }
.door-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 1rem;
}
.door-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5rem);
  margin: 0 auto 0.6rem;
  line-height: 1.02;
  letter-spacing: 0.01em;
}
.door-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  color: var(--moon);
  opacity: 0.8;
  margin: 0 0 8vh;
}
.artefacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(1.2rem, 3vw, 2.6rem);
  max-width: 1200px;
  margin: 0 auto;
}
.artefact {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(240, 237, 230, 0.12);
  padding: 3rem 2rem 2.4rem;
  background: rgba(13, 11, 9, 0.6);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.artefact::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(196, 146, 42, 0.12), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.artefact:hover { border-color: rgba(196, 146, 42, 0.5); transform: translateY(-4px); }
.artefact:hover::before { opacity: 1; }
/* the tower, drawn in marker, read as oxidised silver */
.artefact-sigil {
  height: 96px;
  width: auto;
  margin-bottom: 1.6rem;
  opacity: 0.82;
  filter: grayscale(1) brightness(1.15) contrast(1.12);
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.artefact:hover .artefact-sigil { opacity: 1; filter: grayscale(0.7) brightness(1.2) contrast(1.15); transform: translateY(-3px); }
.artefact h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  margin: 0 0 0.5rem;
}
.artefact p { font-size: 0.86rem; line-height: 1.55; opacity: 0.72; margin: 0 0 1.4rem; }
.artefact .artefact-cta {
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
}
.door-credit { margin-top: 10vh; font-size: 0.75rem; opacity: 0.5; }
.door-credit a { color: var(--moon); text-decoration: none; }
.door-credit a:hover { text-decoration: underline; }

/* ============================================================
   Act VIII — the outro
   ============================================================ */
#outro {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  text-align: center;
  background: linear-gradient(#060809, #000 85%);
  padding: 16vh 6vw 10vh;
}
.outro-moons { display: flex; gap: 1.5rem; opacity: 0.65; }
.outro-moons img {
  width: clamp(18px, 2.6vw, 30px);
  object-fit: contain;
  animation: moon-set 16s ease-in-out infinite alternate;
}
.outro-moons img:nth-child(2) { animation-delay: -3s; }
.outro-moons img:nth-child(3) { animation-delay: -6s; }
.outro-moons img:nth-child(4) { animation-delay: -9s; }
.outro-moons img:nth-child(5) { animation-delay: -12s; }
@keyframes moon-set {
  from { transform: translateY(-4px); }
  to { transform: translateY(7px); }
}
.outro-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 4.4vw, 3.2rem);
  margin: 0;
  line-height: 1.1;
}
.outro-contact { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.contact-pill {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid rgba(240, 237, 230, 0.2);
  padding: 0.85em 1.6em;
  border-radius: 100px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.contact-pill:hover { border-color: var(--gold); color: var(--moon); }
.contact-pill svg { width: 15px; height: 15px; }
.outro-links { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; font-size: 0.74rem; letter-spacing: 0.12em; }
.outro-links a { color: var(--text); opacity: 0.6; text-decoration: none; transition: opacity 0.15s ease, color 0.15s ease; }
.outro-links a:hover { opacity: 1; color: var(--moon); }
.outro-credit { font-size: 0.68rem; letter-spacing: 0.1em; opacity: 0.4; line-height: 2; }

/* ============================================================
   Act IX — the loop gate
   The film's first frame returns; the stencil plate slides back
   in from the east; at rest the view equals the top of the page,
   and the scroll quietly teleports home.
   ============================================================ */
#loop-gate { position: relative; height: 220vh; background: #000; }
.gate-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
#gate-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
#gate-plate { transform: translate3d(112%, 0, 0); }

/* ---- indigo finesse: numbered eyebrows and edge-of-frame index ---- */
.outro-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.64rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0;
}
.eb-num {
  color: var(--gold);
  margin-right: 0.7em;
  font-style: normal;
  letter-spacing: 0.1em;
}
/* a quiet label pinned to the corner of the frame, indigo-fashion;
   each lights only while its chamber owns the viewport */
.chamber-edge {
  position: fixed;
  left: 1.5rem; bottom: 1.3rem;
  z-index: 110;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  mix-blend-mode: difference;
}
.chamber-edge.is-on { opacity: 0.42; }
.chamber-edge em { font-style: normal; color: var(--gold); margin-right: 0.5em; }

/* ============================================================
   chamber i — film
   ============================================================ */
#film { position: relative; background: #050403; }
#scrub-wrap { position: relative; height: 1100vh; }
#scrub-stage {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: #050403;
}
#scrub-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scrub-brand {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.scrub-brand img {
  width: clamp(220px, 34vw, 460px);
  filter: invert(1) drop-shadow(0 4px 30px rgba(0, 0, 0, 0.6));
}
.letterbox {
  position: absolute;
  left: 0; right: 0;
  height: 9vh;
  background: #000;
  z-index: 4;
  transform: scaleY(0);
  will-change: transform;
}
.letterbox-top { top: 0; transform-origin: top; }
.letterbox-bottom { bottom: 0; transform-origin: bottom; }
.scrub-brand p {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
  margin-top: 1.2rem;
}
.scrub-cta {
  display: inline-block;
  margin-top: 1.8rem;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--moon);
  text-decoration: none;
  border: 1px solid rgba(240, 237, 230, 0.32);
  padding: 0.85em 1.9em;
  border-radius: 100px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.scrub-cta:hover { border-color: var(--gold); background: rgba(196, 146, 42, 0.08); }
/* the films: full-bleed hero banners, one per screen, legacy-scale but
   riding above the cursor trail and warped by scroll momentum */
#film-banners { position: relative; z-index: 2; }
.film-banner {
  position: relative;
  display: block;
  height: 100vh; height: 100svh;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  background: #050403;
}
.banner-media { position: absolute; inset: 0; will-change: transform; }
.banner-media img, .banner-media video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);      /* overscan so the warp skew never shows an edge */
}
.banner-media video { opacity: 0; transition: opacity 0.7s ease; }
.banner-media video.is-playing { opacity: 1; }
/* a scrim so the caption always reads, heaviest at the foot */
.film-banner::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5,4,3,0.45) 0%, transparent 24%, transparent 52%, rgba(5,4,3,0.85) 100%);
}
.banner-caption {
  position: absolute;
  left: clamp(1.4rem, 6vw, 6rem);
  bottom: clamp(2.4rem, 8vh, 6rem);
  z-index: 2;
  display: flex; flex-direction: column; gap: 0.55rem;
  max-width: 82vw;
}
.banner-caption.is-centre { left: 50%; bottom: 50%; transform: translate(-50%, 50%); text-align: center; align-items: center; }
.banner-num { font-size: 0.66rem; letter-spacing: 0.34em; color: var(--gold); opacity: 0.75; }
.banner-caption h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 1;
  margin: 0;
  transition: color 0.2s ease;
}
.film-banner:hover .banner-caption h3 { color: var(--moon); }
.banner-tag { font-size: 0.66rem; letter-spacing: 0.26em; text-transform: uppercase; opacity: 0.62; display: flex; gap: 1.3rem; align-items: baseline; flex-wrap: wrap; }
.banner-caption.is-centre .banner-tag { justify-content: center; }
.banner-tag em { font-style: normal; color: var(--gold); opacity: 0.95; letter-spacing: 0.24em; }
.film-banner.is-more { background: linear-gradient(#050403, #000); display: grid; place-items: center; }

/* ============================================================
   chamber ii — writing: the cube
   ============================================================ */
/* the dark ground and its pool of light pin with the cube, beneath the
   cursor trail; the scene above is transparent so the trail shows on the
   background but the opaque cube covers it */
#writing { position: relative; background: var(--ink); }
#cube-pin { position: relative; height: 340vh; }
.writing-ground {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  margin-bottom: -100vh;
  background: radial-gradient(ellipse 62% 50% at 50% 44%, rgba(242, 226, 160, 0.06), transparent 70%);
  pointer-events: none;
}
#cube-scene {
  position: sticky; top: 0;
  z-index: 2;
  height: 100vh; height: 100svh;
  display: grid; place-items: center;
  perspective: 1200px;
  overflow: hidden;
  background: transparent;
  /* vertical swipes keep the page travelling; sideways drags turn the cube */
  touch-action: pan-y;
}
#cube-scene::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url('../assets/textures/paper-grain.webp');
  background-size: 480px;
  opacity: 0.035;
  mix-blend-mode: overlay;
}
#cube-scene, #cube-scene * { user-select: none; }
#cube-scene { perspective-origin: 42% 38%; }   /* the off-centre gaze */
#cube {
  --size: min(56vh, 62vw);
  position: relative;
  width: var(--size); height: var(--size);
  transform-style: preserve-3d;
  will-change: transform;
}
.cube-face {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(196, 146, 42, 0.3);
  background-color: #120f0c;
  backface-visibility: hidden;
  overflow: hidden;
}
.cube-face.is-content { cursor: pointer; }
/* the caption strip above each collection's grid */
.face-head {
  display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.7rem 0.85rem 0.5rem;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(196, 146, 42, 0.16);
}
.face-eyebrow { font-size: 0.5rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--teal); }
.face-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.1rem, 3vh, 1.6rem); line-height: 1; color: var(--text); }

/* the grid of little cubes */
.cube-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 3px;
  padding: 3px;
}
.cube-grid.is-glyph-grid { gap: 2px; padding: 2px; }
.cube-cell {
  position: relative;
  border: 0;
  background: #171310;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), inset 0 -10px 16px rgba(0, 0, 0, 0.45);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, color 0.2s ease, filter 0.35s ease;
}
.cube-cell.is-paper {
  background-image: url('../assets/textures/paper-grain.webp');
  background-size: 220px;
  background-blend-mode: multiply;
  opacity: 0.62;
}
.cube-cell.is-titled {
  display: flex; align-items: center; justify-content: center;
  padding: 0.28rem;
  color: var(--text);
  cursor: pointer;
  background-image: url('../assets/textures/paper-grain.webp');
  background-size: 220px;
  background-blend-mode: multiply;
}
.cell-label {
  font-family: var(--font-display);
  font-size: 0.62rem;
  line-height: 1.12;
  text-align: center;
  letter-spacing: 0.01em;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cell-label em { display: block; font-style: normal; font-family: var(--font-ui); font-size: 0.5rem; letter-spacing: 0.14em; color: var(--gold); opacity: 0.8; }
/* .is-hover is driven from JS so the glow also fires on the 90° face,
   where the browser's own :hover cannot */
.cube-cell.is-titled:hover, .cube-cell.is-titled:focus-visible, .cube-cell.is-titled.is-hover {
  transform: translateZ(22px) scale(1.04);
  color: var(--moon);
  box-shadow: 0 0 22px rgba(196, 146, 42, 0.4), inset 0 0 0 1px rgba(196, 146, 42, 0.4);
  z-index: 3;
  outline: none;
}
/* glyph tiles: a slice of the artwork, brightening as the hand passes */
.cube-cell.is-glyph-cell {
  background-size: 400% 400%;
  background-repeat: no-repeat;
  filter: grayscale(0.2) brightness(0.9);
}
.cube-cell.is-glyph-cell:hover {
  transform: translateZ(20px) scale(1.05);
  filter: grayscale(0) brightness(1.12);
  box-shadow: 0 0 18px rgba(242, 226, 160, 0.35);
  z-index: 3;
}
.cube-hint {
  position: absolute;
  bottom: 7vh; left: 50%;
  transform: translateX(-50%);
  font-size: 0.64rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.4;
  pointer-events: none;
}

/* the reading plane: a face zoomed to full screen */
#reading-plane {
  position: fixed; inset: 0;
  z-index: 130;
  background: var(--ink);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
#reading-plane.is-open { opacity: 1; pointer-events: auto; }
.plane-inner { max-width: 65ch; margin: 0 auto; padding: 14vh 1.4rem 20vh; }
.plane-close {
  position: fixed;
  top: 1.1rem; right: 4.4rem;
  z-index: 140;
  background: transparent;
  border: 1px solid rgba(240, 237, 230, 0.2);
  color: var(--text);
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 0.7em 1.4em;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.plane-close:hover { border-color: var(--gold); color: var(--moon); }
.plane-eyebrow { font-size: 0.64rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--teal); margin: 0 0 2rem; }
.issue-list { list-style: none; margin: 0; padding: 0; }
.issue-list li { border-bottom: 1px solid rgba(240, 237, 230, 0.1); }
.issue-list button, .issue-list a {
  display: flex;
  width: 100%;
  align-items: baseline;
  gap: 1.4rem;
  background: transparent;
  border: 0;
  color: var(--text);
  text-decoration: none;
  text-align: left;
  font-family: var(--font-ui);
  padding: 1.3rem 0.2rem;
  cursor: pointer;
  transition: color 0.15s ease;
}
.issue-list button:hover, .issue-list a:hover { color: var(--moon); }
.issue-num { font-size: 0.68rem; color: var(--gold); letter-spacing: 0.1em; flex: 0 0 2.6em; }
.issue-title { font-family: var(--font-display); font-size: clamp(1.15rem, 2.6vw, 1.55rem); line-height: 1.2; flex: 1; }
.issue-date { font-size: 0.64rem; opacity: 0.45; letter-spacing: 0.12em; }
.issue-excerpt { font-size: 0.8rem; opacity: 0.55; line-height: 1.5; margin: -0.6rem 0 1.2rem 3.9em; }

/* the issue reading view: a measured typographic column */
.issue-body h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 5.2vw, 3.2rem);
  line-height: 1.06;
  margin: 0 0 0.4em;
  text-wrap: balance;
}
.issue-body .issue-meta { font-size: 0.66rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 3.4rem; }
.issue-body p { font-size: 1.02rem; line-height: 1.78; margin: 0 0 1.35em; opacity: 0.92; }
.issue-body .drop-heading {
  font-family: var(--font-ui);
  font-size: 0.74rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 2.8em 0 1.1em;
}
.back-to-list { margin-bottom: 3rem; }

/* ============================================================
   chamber iii — design
   ============================================================ */
#design { position: relative; background: #060607; }
.design-piece { position: relative; min-height: 100vh; padding: 14vh 0; display: grid; place-items: center; }
.design-piece .piece-media {
  position: relative;
  width: min(92vw, 1500px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
/* a tall board (a lookbook, an identity sheet) gets a portrait frame that
   matches its shape, so the whole thing shows without a crop */
.design-piece.is-portrait .piece-media { width: min(82vw, 560px); aspect-ratio: 256 / 481; }
.design-piece .piece-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* no titles: the work speaks, an eyebrow marks it, micro copy only where
   a section opens */
.piece-caption { width: min(92vw, 1500px); margin-top: 1.1rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; flex-wrap: wrap; }
.piece-caption .piece-eyebrow { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--teal); }
.piece-copy { max-width: 44ch; text-align: right; }
.piece-caption p { font-size: 0.85rem; line-height: 1.6; opacity: 0.7; margin: 0 0 0.4rem; }
.piece-caption a { color: var(--gold); font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; }
.piece-caption a:hover { color: var(--moon); }
#gl-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.gl-on .piece-media img { opacity: 0; }

/* line-mask typography reveal */
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: block; transform: translateY(110%); transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.is-revealed .reveal-line > span { transform: none; }

/* ============================================================
   mixdebug overlay
   ============================================================ */
#mixdebug {
  position: fixed;
  bottom: 12px; left: 12px;
  z-index: 300;
  background: rgba(0, 0, 0, 0.82);
  border: 1px solid rgba(240, 237, 230, 0.2);
  padding: 0.8rem 1rem;
  font-size: 0.7rem;
  display: grid;
  gap: 0.35rem;
  color: var(--text);
  font-family: var(--font-ui);
}
#mixdebug label { display: flex; gap: 0.6rem; align-items: center; }
#mixdebug input { width: 130px; accent-color: var(--gold); }

/* ============================================================
   noscript poster
   ============================================================ */
.noscript-poster {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.6rem;
  text-align: center;
  padding: 3rem 1.5rem;
}
.noscript-poster nav { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.noscript-poster a { color: var(--moon); }

/* ============================================================
   motion + mobile tiers
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .overhaul *, .overhaul *::before, .overhaul *::after {
    animation-duration: 0.001s !important;
  }
  .world-layer { transition: transform 0.6s ease; }
  .solo-stage, #goddess-rig, #mask-box { transition: opacity 0.8s ease; }
}

@media (max-width: 768px) {
  #journey { height: 760vh; }
  #logo-veil {
    -webkit-mask-size: 100% 100%, 92vw auto;
            mask-size: 100% 100%, 92vw auto;
  }
  .hero-roles { font-size: 0.58rem; letter-spacing: 0.24em; padding: 0 1.2rem; }
  .card-title { opacity: 0.9; transform: none; }      /* no hover on touch */
  #card-table { gap: 0.8rem; padding: 0 0.8rem; }
  .card { width: min(27vw, 150px); }
  .plane-close { right: 1.1rem; top: 4.4rem; }
  .film-plane, .film-plane:first-child,
  .film-plane:nth-child(3n+2), .film-plane:nth-child(3n) { width: 84vw; transform: none; }
  #cube-pin { height: 300vh; }
  #cube { --size: min(74vw, 58vh); }
  .plane-inner { padding-top: 16vh; }
}
