:root {
  --void: #0A0806;
  --soot: #140C08;
  --parchment: #F5E8D1;
  --parchment-2: rgba(245, 232, 209, .72);
  --parchment-3: rgba(245, 232, 209, .7);
  --ember: #F2C46B;
  --bronze: #A07840;
  --umber: #2A1204;
  /* frontier cold, sampled from the Soulwell glow in the game */
  --frost: #8FD3CC;
  --frost-deep: #1B3A3C;
  --gutter: clamp(20px, 5vw, 72px);
  --serif: "Spectral", Georgia, serif;
  --display: "Cinzel", "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--void); overflow-x: clip; }
body {
  margin: 0; overflow-x: clip; /* tooltips near edges must not widen the page */ background: var(--void); color: var(--parchment);
  font: 400 1.125rem/1.7 var(--serif);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-user-select: none; user-select: none;
}
input, textarea { -webkit-user-select: text; user-select: text; } /* form fields stay editable */
img { display: block; max-width: 100%; }
h1, h2 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; }

/* ---------- top bar: appears once the hero card leaves the screen ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--gutter);
  background: rgba(10, 8, 6, .72); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(160, 120, 64, .18);
  translate: 0 -100%; opacity: 0; visibility: hidden;
  transition: translate .45s cubic-bezier(.16, 1, .3, 1), opacity .3s, visibility 0s .45s;
}
.top.on { translate: 0 0; opacity: 1; visibility: visible; transition-delay: 0s; }
.mark, footer .mark { font-family: var(--display); font-weight: 600; letter-spacing: .14em; text-decoration: none; font-size: .95rem; }
.top nav { display: flex; gap: clamp(14px, 3vw, 36px); font-size: .95rem; }
.top nav a { text-decoration: none; color: var(--parchment-2); transition: color .2s; }
.top nav a:hover { color: var(--ember); }
.menu-btn { display: none; }
@media (max-width: 560px) { .top nav a:nth-child(2) { display: none; } }

/* ---------- hero: framed card ---------- */
@property --ig { syntax: "<number>"; inherits: true; initial-value: 1; }
.hero {
  --pad: clamp(14px, 2.4vw, 40px);
  --tw: clamp(190px, 19vw, 340px);          /* tile width */
  --hang: calc(var(--tw) * .3);             /* how far tiles hang below the card */
  position: relative; display: flex; flex-direction: column;
  height: 100svh; min-height: 680px;
  padding: clamp(56px, 9svh, 96px) var(--pad) var(--hang);
}
.card {
  position: relative; flex: 1; overflow: hidden; isolation: isolate;
  border-radius: clamp(14px, 1.6vw, 24px); background: var(--void);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(160, 120, 64, .22), inset 0 1px 0 rgba(245, 232, 209, .06);
  display: grid; grid-template-columns: minmax(15rem, 22rem) 1fr minmax(19rem, 25rem) 2.5rem; grid-template-rows: 1fr;
  gap: clamp(20px, 3vw, 48px);
  padding: clamp(26px, 3vw, 52px) clamp(22px, 2.4vw, 40px) calc(var(--hang) + clamp(28px, 4svh, 52px)) clamp(26px, 3vw, 56px);
  animation: card-in 1.3s cubic-bezier(.16, 1, .3, 1) backwards;
}
@keyframes card-in { from { opacity: 0; scale: .965; } }
.card > :not(.scene, .hero-scrim) { position: relative; z-index: 2; }

.scene {
  --lx: 50%; --ly: 58%; --lr: clamp(170px, 26vmin, 340px);
  position: absolute; left: 52%; top: 56%; translate: -50% -50%;
  width: max(100%, 175svh); aspect-ratio: 2 / 1;
  animation: ignite 3.6s cubic-bezier(.2, .6, .2, 1) .3s backwards;
}
@keyframes ignite { from { --ig: 0; } }
.scene img { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene .dim { filter: brightness(.2) saturate(.4); }
.scene .lit {
  --mask: radial-gradient(circle calc(var(--lr) * var(--ig)) at var(--lx) var(--ly), #000 0, rgba(0, 0, 0, .6) 38%, transparent 100%),
          radial-gradient(ellipse calc(24% * var(--ig)) calc(28% * var(--ig)) at 50% 57%, #000 30%, transparent 100%);
  -webkit-mask-image: var(--mask); mask-image: var(--mask);
}
.lantern {
  position: absolute; inset: 0; mix-blend-mode: screen; pointer-events: none;
  background:
    radial-gradient(circle calc(var(--lr) * .5 * var(--ig)) at var(--lx) var(--ly), rgba(130, 232, 220, .34), rgba(60, 170, 170, .08) 60%, transparent),
    radial-gradient(ellipse calc(11% * var(--ig)) calc(13% * var(--ig)) at 50% 57%, rgba(120, 225, 214, .5), transparent);
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to right, rgba(10, 8, 6, .9), rgba(10, 8, 6, .35) 28%, transparent 46%, transparent 58%, rgba(10, 8, 6, .55) 76%, rgba(10, 8, 6, .85)),
    linear-gradient(to top, rgba(10, 8, 6, .9), transparent 30%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .5));
}

/* left column: logo, big nav, studio + platforms */
.hero-left { grid-column: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; margin-bottom: calc(-1 * var(--hang)); }
.logo { position: relative; width: clamp(190px, 17vw, 300px); aspect-ratio: 1114 / 696; margin: 0 0 0 -4%; filter: drop-shadow(0 8px 30px rgba(10, 8, 6, .8)); animation: emerge 1.6s cubic-bezier(.16, 1, .3, 1) .5s backwards; }
@keyframes emerge { from { clip-path: inset(100% 0 0 0); translate: 0 36px; opacity: 0; } }
.logo img, .logo canvas { position: absolute; display: block; }
.logo img { inset: 0; width: 100%; height: 100%; transition: opacity .5s; }
.logo canvas { inset: -6%; width: 112%; height: 112%; pointer-events: none; } /* margin so tilt never clips */
.logo.live img { opacity: 0; }

.hero-nav { display: grid; justify-items: start; gap: clamp(.4rem, 1.6svh, 1.1rem); }
.hero-nav a {
  position: relative; text-decoration: none; padding: .15rem 0 .15rem 0;
  font: 600 clamp(1.35rem, 2.1vw, 2rem)/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase;
  color: var(--parchment-2); text-shadow: 0 2px 18px rgba(10, 8, 6, .9);
  transition: color .3s, translate .4s cubic-bezier(.16, 1, .3, 1), letter-spacing .4s cubic-bezier(.16, 1, .3, 1);
  animation: rise .9s cubic-bezier(.16, 1, .3, 1) calc(.7s + var(--i) * 90ms) backwards;
}
.hero-nav a::before { /* ember diamond that slides in on hover */
  content: ""; position: absolute; left: -1.1rem; top: 50%; width: 7px; height: 7px; background: var(--ember);
  rotate: 45deg; translate: -6px -50%; opacity: 0;
  transition: opacity .25s, translate .4s cubic-bezier(.16, 1, .3, 1);
}
.hero-nav a:hover, .hero-nav a:focus-visible { color: var(--parchment); translate: 10px 0; letter-spacing: .11em; }
.hero-nav a:hover::before, .hero-nav a:focus-visible::before { opacity: 1; translate: 0 -50%; }
.hero-nav:hover a:not(:hover) { color: rgba(245, 232, 209, .45); }

.hero-foot { display: grid; justify-items: start; gap: .9rem; animation: rise 1s ease-out 1.2s backwards; }
.platforms { font-size: 1rem; color: var(--parchment-2); }
.platforms b { font: 600 1.05rem/1 var(--display); letter-spacing: .06em; color: var(--parchment); }

/* right column: line, tagline arrow, trailer, signup */
.hero-right { grid-column: 3; align-self: center; display: grid; justify-items: start; animation: rise 1.1s cubic-bezier(.16, 1, .3, 1) 1s backwards; }
.status { margin-bottom: .9rem; font: 600 clamp(.72rem, .9vw, .85rem)/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--ember); text-shadow: 0 1px 12px rgba(10, 8, 6, .95); }
.premise {
  font: 600 clamp(1.35rem, 2vw, 2.1rem)/1.22 var(--display); letter-spacing: .02em;
  color: var(--parchment); text-wrap: balance; text-shadow: 0 2px 24px rgba(10, 8, 6, .95);
}
.tagline {
  margin-top: 1.1rem; display: flex; align-items: center; gap: .9rem; width: 100%; text-decoration: none;
  font: 600 clamp(.72rem, .9vw, .85rem)/1 var(--display); letter-spacing: .3em; text-transform: uppercase; color: #F0D2AE;
}
.arrow { /* chevrons, then a hairline that draws itself, then an arrowhead */
  flex: 1; height: 9px; position: relative; transform-origin: left; animation: draw 1.2s cubic-bezier(.65, 0, .35, 1) 1.6s backwards;
  background: linear-gradient(var(--ember), var(--ember)) 18px 50% / calc(100% - 18px) 1px no-repeat;
  -webkit-mask: linear-gradient(to right, #000 70%, rgba(0, 0, 0, .9)); mask: linear-gradient(to right, #000 70%, rgba(0, 0, 0, .9));
}
.arrow::before { content: "\00BB\00BB"; position: absolute; left: 0; top: 50%; translate: 0 -54%; letter-spacing: -.1em; color: var(--ember); font: 400 1rem/1 var(--serif); }
.arrow::after { content: ""; position: absolute; right: 0; top: 50%; width: 7px; height: 7px; border: solid var(--ember); border-width: 1px 1px 0 0; rotate: 45deg; translate: 0 -50%; transition: translate .4s cubic-bezier(.16, 1, .3, 1); }
@keyframes draw { from { scale: 0 1; opacity: 0; } }
.tagline:hover { color: var(--ember); }
.tagline:hover .arrow::after { translate: 6px -50%; }

.trailer {
  all: unset; box-sizing: border-box; margin-top: clamp(1.6rem, 5svh, 3rem); display: inline-flex; align-items: center; gap: 1rem; cursor: pointer;
  font: 600 .95rem/1.15 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--parchment);
}
.trailer .ring {
  position: relative; width: 68px; height: 68px; border-radius: 50%; flex: none;
  border: 1px solid rgba(245, 232, 209, .55); background: rgba(10, 8, 6, .35);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .35s, border-color .35s, scale .5s cubic-bezier(.16, 1, .3, 1);
}
.trailer .ring::before { content: ""; position: absolute; left: 53%; top: 50%; translate: -50% -50%; border: 9px solid transparent; border-left: 14px solid currentColor; border-right: 0; transition: color .35s; }
.trailer .ring::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid var(--ember); animation: pulse 2.8s cubic-bezier(.2, .6, .2, 1) 2.4s infinite; opacity: 0; }
@keyframes pulse { 0% { opacity: .8; scale: 1; } 100% { opacity: 0; scale: 1.55; } }
.trailer:hover .ring, .trailer:focus-visible .ring { background: var(--ember); border-color: var(--ember); scale: 1.08; color: var(--umber); }
.trailer:focus-visible { outline: 2px solid var(--ember); outline-offset: 6px; border-radius: 40px; }
.hero-right .signup-form { margin-top: clamp(1.4rem, 4svh, 2.2rem); }
.hero-right .form-msg { margin-top: .6rem; }

/* social rail */
.rail { grid-column: 4; align-self: start; list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; justify-items: center; }
.rail li { animation: rise .8s ease-out calc(1.3s + var(--n, 0) * 80ms) backwards; }
.rail li:nth-child(2) { --n: 1; } .rail li:nth-child(3) { --n: 2; } .rail li:nth-child(4) { --n: 3; }
.rail a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--parchment-2); transition: color .2s, background .2s; }
.rail a:hover, .rail a:focus-visible { color: var(--ember); background: rgba(242, 196, 107, .1); }
.rail svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rail .tip::after { left: auto; right: calc(100% + 10px); bottom: auto; top: 50%; translate: 4px -50%; width: max-content; }
.rail .tip:hover::after, .rail .tip:focus-visible::after { translate: 0 -50%; }

/* the character stands in the card, between the two columns; a transparent looping clip; hero.js picks the format the browser can show with alpha */
.hero .breakout {
  position: absolute; z-index: 3; left: 47%; translate: -50% 0;
  bottom: clamp(8px, 1.6svh, 20px); width: clamp(150px, 14vw, 250px);
  height: auto; max-height: 80%; /* stands on the bottom edge; height follows the clip's ratio */ object-fit: contain; object-position: 50% 100%;
  -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent);
  animation: rise 1.4s cubic-bezier(.16, 1, .3, 1) .6s backwards;
}
.breakout.ph { place-content: start center; padding-top: 18%; background-color: rgba(20, 12, 8, .35); }

/* gameplay tiles hanging off the card's bottom edge */
.hero-tiles {
  position: absolute; z-index: 4; right: calc(var(--pad) + clamp(16px, 2.4vw, 40px)); bottom: 0;
  list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(12px, 1.4vw, 22px);
}
.hero-tiles li { width: var(--tw); animation: tile-in 1s cubic-bezier(.16, 1, .3, 1) calc(1.1s + var(--i) * 110ms) backwards; }
@keyframes tile-in { from { opacity: 0; translate: 0 40px; } }
.hero-tiles a {
  --mx: 50%; --my: 50%;
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: clamp(10px, 1vw, 16px); text-decoration: none;
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .85), 0 0 0 1px rgba(160, 120, 64, .3);
  transition: translate .5s cubic-bezier(.16, 1, .3, 1), box-shadow .4s;
}
.hero-tiles img, .hero-tiles .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; border: 0; border-radius: 0; transition: scale .8s cubic-bezier(.16, 1, .3, 1), filter .5s; filter: saturate(.8) brightness(.8); }
.hero-tiles a::before { /* bottom shade + pointer spotlight */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; transition: opacity .4s;
  background: radial-gradient(circle 160px at var(--mx) var(--my), rgba(242, 196, 107, .22), transparent 70%), linear-gradient(to top, rgba(10, 8, 6, .85), transparent 60%);
}
.hero-tiles span:not(.ph) {
  position: absolute; z-index: 2; right: .9rem; bottom: .7rem;
  font: 600 clamp(1.05rem, 1.5vw, 1.5rem)/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--parchment);
  text-shadow: 0 2px 14px rgba(10, 8, 6, .9); transition: color .3s, letter-spacing .5s cubic-bezier(.16, 1, .3, 1);
}
.hero-tiles a:hover, .hero-tiles a:focus-visible { translate: 0 -8px; box-shadow: 0 34px 60px -18px rgba(0, 0, 0, .9), 0 0 0 1px var(--ember); }
.hero-tiles a:hover img, .hero-tiles a:focus-visible img { scale: 1.07; filter: saturate(1) brightness(1); }
.hero-tiles a:hover span:not(.ph), .hero-tiles a:focus-visible span:not(.ph) { color: var(--ember); letter-spacing: .12em; }
.hero-tiles .tip::after { left: 10px; right: 10px; top: 10px; bottom: auto; width: auto; max-width: none; z-index: 3; }

@keyframes rise { from { opacity: 0; translate: 0 14px; } }

/* desktop: same restraint as the phone layout. One scene, logo + quiet index on the left, one message on the right.
   The tiles and tagline repeat the gameplay section right below; the character placeholder hides until a real cutout <img> replaces it. */
@media (min-width: 1001px) {
  .hero { --hang: 0px; padding-bottom: var(--pad); }
  .hero-tiles, .tagline, .hero .breakout.ph { display: none; }
  .hero-nav { gap: .55rem; }
  .hero-nav a { font-size: clamp(.9rem, 1.05vw, 1.1rem); letter-spacing: .18em; }
  .hero-nav a:hover, .hero-nav a:focus-visible { letter-spacing: .21em; }
}

/* tablet and phone: the card stacks, tiles become a swipeable row */
@media (max-width: 1000px) {
  .hero { --tw: min(64vw, 300px); height: auto; min-height: 100svh; padding-top: var(--pad); }
  .card { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; text-align: center; min-height: calc(100svh - var(--pad) - var(--hang)); }
  .hero-left { margin: 0; align-items: center; gap: 1.2rem; }
  .logo { margin: 0; width: min(64vw, 300px); }
  /* fewer things over the scene: the nav moves into the hamburger, tagline and tiles go (the gameplay section follows right below) */
  .hero-nav, .tagline, .hero-tiles, .hero-foot, .rail { display: none; }
  .hero .breakout { position: relative; left: auto; bottom: auto; translate: none; flex: 1 1 0; min-height: 110px; max-height: 40svh; width: 100%; margin: -1rem 0; } /* fills the gap between logo and premise, whatever the screen height */
  .hero { --hang: 0px; padding-bottom: var(--pad); }
  .hero-right { justify-items: center; }
  .premise { max-width: 22ch; font-size: clamp(1.2rem, 4.6vw, 1.6rem); }
  .trailer { margin-top: 1.4rem; }
  .scene { --lr: 46vw; width: max(200%, 120svh); top: 50%; }
  .hero-scrim { /* stacked layout: text runs top to bottom over the scene, so shade vertically */
    background:
      linear-gradient(to bottom, rgba(10, 8, 6, .88), rgba(10, 8, 6, .5) 32%, rgba(10, 8, 6, .55) 50%, rgba(10, 8, 6, .85) 72%, rgba(10, 8, 6, .95)),
      radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, .5));
  }
  .trailer { text-shadow: 0 1px 12px rgba(10, 8, 6, .95); }

  /* top bar is always there on mobile for the hamburger; it fills in once you scroll past the hero or open the menu */
  .top { translate: 0 0; opacity: 1; visibility: visible; background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; transition: background .3s, border-color .3s; }
  .top.on, .top.open { background: rgba(10, 8, 6, .94); border-color: rgba(160, 120, 64, .18); }
  .top .mark { opacity: 0; pointer-events: none; transition: opacity .3s; }
  .top.on .mark, .top.open .mark { opacity: 1; pointer-events: auto; }
  .top nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    padding: .25rem var(--gutter) 1rem; background: rgba(10, 8, 6, .97); border-bottom: 1px solid rgba(160, 120, 64, .18);
  }
  .top.open nav { display: flex; }
  .top nav a { padding: .85rem 0; font: 600 1.05rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--parchment); }
  .menu-btn { display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -10px -8px 0; padding: 0; background: none; border: 0; color: var(--parchment); cursor: pointer; }
  .menu-btn span { position: relative; width: 22px; height: 1.5px; background: currentColor; box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor; transition: rotate .3s, box-shadow .2s; }
  .menu-btn span::after { content: ""; position: absolute; inset: 0; background: currentColor; opacity: 0; rotate: 90deg; }
  .top.open .menu-btn span { rotate: 45deg; box-shadow: none; }
  .top.open .menu-btn span::after { opacity: 1; }
}

/* ---------- the loop ---------- */
.play { padding: clamp(80px, 14vh, 160px) var(--gutter); }
.play h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.22; letter-spacing: .035em; max-width: 22ch; }
.play-lead { margin-top: 1.2rem; max-width: 36rem; color: var(--parchment-2); }
.tiles { list-style: none; margin: clamp(36px, 7vh, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 44px); counter-reset: step; }
.tiles h3 { margin: 1.1rem 0 0; font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: .03em; }
.tiles h3::before { counter-increment: step; content: counter(step, upper-roman) "\2002"; color: var(--ember); }
.tiles iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 4px; background: var(--soot); }
.tiles p { margin-top: .4rem; color: var(--parchment-2); font-size: 1rem; max-width: 30rem; }
@media (max-width: 820px) { .tiles { grid-template-columns: 1fr; } }

/* ---------- the first Gravebreak (scroll-scrubbed) ---------- */
.emerge { position: relative; height: 340svh; background: var(--void); --b1: 0; --b2: 0; --b3: 0; }
.emerge-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.emerge-stage canvas, .emerge-poster { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.emerge-poster { object-fit: cover; transition: opacity .6s; }
.emerge.live .emerge-poster { opacity: 0; }
.emerge-copy { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; text-align: center; padding: 0 var(--gutter); }
.emerge-copy::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10, 8, 6, .7), transparent 28%, transparent 62%, rgba(10, 8, 6, .85)); }
.eb { position: absolute; margin: 0; text-wrap: balance; text-shadow: 0 2px 28px rgba(10, 8, 6, .95); will-change: opacity, transform; } /* big blurred shadow: paint once, fade on the compositor */
.eb1 { top: 14%; opacity: var(--b1); translate: 0 calc((1 - var(--b1)) * 12px); font-family: var(--serif); font-size: clamp(1.05rem, 2.4vw, 1.5rem); color: var(--parchment-2); max-width: 24ch; }
.eb2 { top: 12%; opacity: var(--b2); scale: calc(.94 + var(--b2) * .06); font-size: clamp(2.2rem, 7.5vw, 5rem); color: var(--parchment); letter-spacing: .04em; }
.eb3 { bottom: clamp(36px, 9svh, 84px); opacity: var(--b3); translate: 0 calc((1 - var(--b3)) * 12px); font-family: var(--display); font-weight: 600; letter-spacing: .24em; text-transform: uppercase; font-size: clamp(.72rem, 1.6vw, .95rem); color: #F0D2AE; }
@media (prefers-reduced-motion: reduce) {
  .emerge { height: auto; }
  .emerge-stage { position: relative; height: 100svh; }
  .emerge-poster { opacity: 1 !important; }
}

/* ---------- restoration ---------- */
.restore { position: relative; }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--void); }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) brightness(1.15); }
/* These change opacity every scroll frame from JS. Own layers mean the filtered and masked images are painted once and only re-composited. */
.layer, .warmth, .plate { will-change: opacity; }
.warmth {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 68% 50%, rgba(242, 168, 75, .42), rgba(122, 58, 16, .18) 60%, transparent);
  opacity: 0; /* main.js sets it per scroll frame */
}
.stage::after { /* reading scrim, strongest on the text side */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to right, rgba(10, 8, 6, .82), rgba(10, 8, 6, .3) 50%, transparent), linear-gradient(to top, var(--void), transparent 18%);
}
.plate { position: absolute; right: var(--gutter); top: 50%; width: min(60vw, 960px); aspect-ratio: 2 / 1; translate: 0 -50%; opacity: 0; z-index: 1;
  -webkit-mask-image: radial-gradient(ellipse 58% 62% at 50% 50%, #000 45%, transparent 100%);
          mask-image: radial-gradient(ellipse 58% 62% at 50% 50%, #000 45%, transparent 100%);
}
.plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-overview { aspect-ratio: 1000 / 400; }
.p-overview img { object-position: 50% 10%; } /* keep the soulwell arch in frame */
.p-crypt { display: grid; place-items: center; }
.crypt-fig { height: 100%; --hairline-plate: var(--void); --hairline-hi: var(--ember); --hairline-edge: #8a6a42; --hairline-mid: #5a4630; --hairline-lo: #3a2c1e; --hairline-stroke: 1.2; }
.p-crypt .crypt-3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.p-crypt.live .crypt-fig { display: none; }
.caption { position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(24px, 5vh, 48px); font-size: .9rem; color: var(--parchment-3); text-align: right; }
.caption span { display: none; }
.restore[data-step="1"] .c1, .restore[data-step="2"] .c2, .restore[data-step="3"] .c3 { display: inline; }
.beats { position: relative; z-index: 3; margin-top: -100svh; pointer-events: none; }
.beat {
  min-height: 90svh; display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter); max-width: calc(34rem + var(--gutter) * 2);
}
.beat h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); line-height: 1.22; letter-spacing: .035em; }
.beat p { margin-top: 1.1rem; color: var(--parchment-2); max-width: 30rem; }
@media (max-width: 820px) {
  /* The stage becomes a pinned picture; beats scroll beneath its lower edge. */
  .stage { height: 44svh; margin-top: 0; z-index: 2; }
  .stage::after { background: linear-gradient(to top, var(--void) 0, transparent 34%); }
  .layer { object-position: 56% 62%; }
  .plate, .p-overview { inset: 0; width: 100%; height: 100%; aspect-ratio: auto; translate: none; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
  .plate img { object-position: 50% 52%; }
  .p-overview img { object-position: 50% 64%; }
  .caption { display: none; }
  .beats { margin-top: 0; z-index: 1; }
  .beat { min-height: 72svh; justify-content: flex-start; padding-top: 7svh; padding-bottom: 4svh; background: none; max-width: none; }
  .beat h2 { font-size: clamp(1.55rem, 6.4vw, 2rem); }
  .beat p { max-width: 34rem; }
}

/* ---------- crew ---------- */
.crew { padding: clamp(60px, 12vh, 140px) var(--gutter); background: var(--soot); }
.crew h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.22; letter-spacing: .035em; max-width: 20ch; }
.crew-body { margin-top: clamp(36px, 7vh, 80px); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); align-items: center; }
.roster { display: grid; gap: 1.2rem; }
.roster button {
  all: unset; box-sizing: border-box; cursor: pointer; display: block; padding: .3rem 0 .3rem 1.2rem;
  border-left: 2px solid transparent; transition: border-color .25s, opacity .25s; opacity: .72;
}
.roster button[aria-selected="true"] { border-color: var(--ember); opacity: 1; }
.roster button:hover { opacity: 1; }
.roster button:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; }
.roster .more {
  display: block; box-sizing: border-box; padding: .3rem 0 .3rem 1.2rem; border-left: 2px solid transparent;
  font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: .04em;
  color: inherit; text-decoration: none; opacity: .72; transition: opacity .25s;
}
.roster .more:hover { opacity: 1; }
.roster .more:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; }
.roster .n { display: block; font-family: var(--display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: .04em; }
.roster .r { display: block; margin-top: .25rem; color: var(--parchment-2); max-width: 26rem; }
.portrait { position: sticky; top: 90px; }
/* Source art is 600px square with the scene centered in it; cap at native size so it stays sharp. */
.portrait img { display: block; width: 100%; max-width: 600px; height: auto; aspect-ratio: 1 / 1; margin-inline: auto; object-fit: contain; border-radius: 2px; }
.crew-note { margin-top: clamp(32px, 6vh, 64px); color: var(--parchment-3); font-size: .95rem; }
@media (max-width: 820px) { .crew-body { grid-template-columns: 1fr; } .portrait { position: static; order: -1; } }

/* ---------- faq ---------- */
.faq { padding: clamp(72px, 14vh, 160px) var(--gutter); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 96px); }
.updates p { margin-top: .8rem; color: var(--parchment-2); }
.updates .signup-form { margin-top: 1.6rem; }
.faq h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.22; letter-spacing: .035em; }
.qa details { border-bottom: 1px solid rgba(160, 120, 64, .3); padding: 1.1rem 0; }
.qa details:first-child { border-top: 1px solid rgba(160, 120, 64, .3); }
.qa summary { cursor: pointer; font-family: var(--display); font-weight: 600; letter-spacing: .03em; font-size: 1.15rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--ember); font-family: var(--serif); }
.qa details[open] summary::after { content: "\2212"; }
.qa details p { margin-top: .7rem; color: var(--parchment-2); max-width: 36rem; }
@media (max-width: 820px) { .faq { grid-template-columns: 1fr; } }

/* ---------- signup ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.signup-form { display: flex; width: min(100%, 25rem); border: 1px solid rgba(160, 120, 64, .6); border-radius: 4px; background: rgba(20, 12, 8, .85); transition: border-color .2s, box-shadow .2s; }
.signup-form:focus-within { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(242, 196, 107, .2); }
.signup-form input { all: unset; box-sizing: border-box; flex: 1; min-width: 0; padding: .75rem 1rem; font: 400 1rem/1.4 var(--serif); color: var(--parchment); text-align: left; }
.signup-form input::placeholder { color: var(--parchment-3); }
.signup-form button { all: unset; cursor: pointer; padding: .75rem 1.2rem; background: var(--ember); color: var(--umber); font: 600 .9rem/1.4 var(--display); letter-spacing: .06em; border-radius: 0 3px 3px 0; transition: background .2s; }
.signup-form button:hover { background: #FFD98A; }
.signup-form button:focus-visible { outline: 2px solid var(--parchment); outline-offset: 2px; }
.form-msg { font-size: .92rem; color: var(--ember); }
.form-msg:empty { display: none; }

/* ---------- placeholders for missing assets (remove each when supplied) ---------- */
.ph {
  display: grid; place-content: center; gap: .2rem; text-align: center; aspect-ratio: 16 / 9; cursor: help;
  border: 1px dashed rgba(242, 196, 107, .4); border-radius: 4px; color: var(--parchment-3); font-size: .95rem;
  background: repeating-linear-gradient(135deg, rgba(242, 196, 107, .045) 0 10px, transparent 10px 20px), var(--soot);
}
.ph b { font: 600 .75rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--ember); }
.portrait .ph { aspect-ratio: 900 / 440; }
.ph.chip { display: inline-block; aspect-ratio: auto; padding: .35rem .8rem; font-size: .88rem; }
.tip { position: relative; }
.tip::after {
  content: attr(data-tip); position: absolute; z-index: 30; left: 0; bottom: calc(100% + 10px); translate: 0 4px;
  width: max-content; max-width: min(320px, 82vw); padding: .75rem .9rem; white-space: pre-line; text-align: left;
  background: #1E140D; border: 1px solid var(--bronze); border-radius: 4px; box-shadow: 0 12px 32px rgba(0, 0, 0, .55);
  font: 400 .88rem/1.5 var(--serif); letter-spacing: 0; text-transform: none; color: var(--parchment);
  opacity: 0; pointer-events: none; transition: opacity .15s, translate .15s;
}
.tip:hover::after, .tip:focus-visible::after, .tip:focus-within::after { opacity: 1; translate: 0 0; }
.tiles .tip::after, .portrait .tip::after { left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; } /* inside the box */

footer .links { list-style: none; margin: .4rem 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
footer { padding: 56px var(--gutter) 72px; display: grid; gap: .5rem; color: var(--parchment-3); font-size: .95rem; background: var(--void); }
footer .mark { color: var(--parchment); }

/* ---------- scroll reveals: CSS scroll-driven, so they run on the compositor and track the finger exactly ----------
   Content is visible by default; browsers without animation-timeline just show it. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .play h2, .play-lead, .tiles li, .beat h2, .beat p, .crew h2, .roster, .portrait, .updates, .qa details, footer > * {
      animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 70%;
    }
    .tiles li:nth-child(2), .qa details:nth-child(2) { animation-range: entry 8% entry 78%; }
    .tiles li:nth-child(3), .qa details:nth-child(3) { animation-range: entry 16% entry 86%; }
    @keyframes reveal { from { opacity: 0; translate: 0 32px; } }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .scene, .logo, .hero-nav a, .hero-foot, .hero-right, .arrow, .rail li, .breakout, .hero-tiles li { animation: none; }
  .trailer .ring::after { display: none; }
}

/* No text selection or image dragging; form fields stay usable. */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }
img { -webkit-user-drag: none; }
