:root {
  --gold: #d4a84b;
  --gold-2: #f0d78c;
  --warm: #f3e6c8;
  --text: #eef2ff;
  --muted: #aab6d4;
  --ink: #0b0a08;
  --paper: #14110c;
  --line: rgba(243, 230, 200, 0.14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--sans); }
html { scroll-behavior: smooth; }
img, video { max-width: 100%; display: block; }
a { color: var(--gold); }
button, input, select, textarea { font: inherit; }

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  opacity: .09;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.55'/></svg>");
}

/* —— topbar —— */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(0,0,0,.72), rgba(0,0,0,.4) 70%, transparent);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.page .topbar { position: sticky; background: rgba(11,10,8,.78); }
.brand {
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: 12px;
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0,0,0,.65);
}
.brand em { font-style: normal; color: var(--gold); letter-spacing: .18em; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: flex-end; }
.topbar nav a {
  color: rgba(255,255,255,.9);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.topbar nav a:hover, .topbar nav a.on { color: var(--gold-2); }

/* —— cinema land —— */
.cinema { position: relative; min-height: 100svh; overflow: hidden; background: #000; }
.cinema .stage { position: absolute; inset: 0; }
.cinema .stage img,
.cinema .stage video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.cinema .stage video { z-index: 1; }
.cinema .stage img { z-index: 2; opacity: 0; transition: opacity .7s ease; }
.cinema .stage img.on { opacity: 1; }
.cinema.land .stage img { opacity: 0; }
.scrim {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.38) 44%, transparent 70%),
    linear-gradient(transparent 38%, rgba(0,0,0,.92) 100%);
}
.billboard {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  padding: clamp(20px, 5vh, 48px) clamp(18px, 4vw, 48px) clamp(28px, 7vh, 64px);
  max-width: 720px;
  transition: opacity .4s;
}
.billboard.hidden { opacity: 0; pointer-events: none; }
.eyebrow {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 10px; font-weight: 600;
}
.billboard h1, .hero-copy h1, .page-hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 7vw, 3.7rem);
  line-height: 1.06;
  margin: 0 0 14px;
  color: var(--warm);
  text-shadow: 0 4px 40px rgba(0,0,0,.65);
}
.billboard h1 em, .hero-copy h1 em { font-style: italic; color: var(--gold); }
.lede, .billboard p {
  margin: 0 0 22px;
  font-size: clamp(15px, 2.2vw, 17px);
  line-height: 1.5;
  color: rgba(238,242,255,.92);
  max-width: 36em;
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
}
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--gold); color: #1a1408;
  font-weight: 700; font-size: 16px;
  padding: 14px 28px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  text-decoration: none;
}
.btn:hover { filter: brightness(1.06); }
.btn-ghost {
  appearance: none; cursor: pointer;
  background: rgba(255,255,255,.12); color: var(--text);
  border: 1px solid rgba(255,255,255,.25);
  font-weight: 600; font-size: 15px;
  padding: 13px 20px; border-radius: 6px;
  backdrop-filter: blur(8px);
  text-decoration: none;
}
.btn-ghost:hover { background: rgba(255,255,255,.18); }

.playhead {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 16px 18px max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0,0,0,.94) 35%);
  display: none;
}
.playhead.on { display: block; }
.captions {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  line-height: 1.35;
  color: var(--warm);
  max-width: 42em;
  margin: 0 0 12px;
  text-shadow: 0 2px 18px rgba(0,0,0,.7);
  min-height: 2.6em;
}
.scrub { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.scrub .time {
  font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 2.6em;
}
.bar {
  flex: 1; height: 8px; background: #243041; border-radius: 99px; overflow: hidden; cursor: pointer;
}
.bar > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
}
.controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.controls button, .controls a {
  appearance: none; border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.45); color: var(--text);
  padding: 10px 14px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; text-decoration: none;
}
.controls button.primary, .controls a.primary {
  background: var(--gold); border-color: var(--gold); color: #1a1408;
}
.endcard {
  position: absolute; inset: 0; z-index: 8;
  display: none; place-items: center; text-align: center;
  background: radial-gradient(ellipse 50% 45% at 50% 40%, rgba(212,168,75,.2), rgba(0,0,0,.9) 70%);
  padding: 24px;
}
.endcard.on { display: grid; }
.endcard h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--warm); margin: 0 0 10px;
}
.endcard p { color: var(--muted); margin: 0 0 20px; max-width: 30em; }

/* —— house chapters —— */
.house { background: var(--ink); }
.chapter {
  position: relative;
  min-height: 88svh;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: stretch;
}
.chapter .still {
  min-height: 48svh;
  background: #000 center/cover no-repeat;
}
.chapter .copy {
  padding: clamp(28px, 5vw, 64px);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
.chapter .num {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 10px;
}
.chapter h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--warm); margin: 0 0 14px; line-height: 1.1;
}
.chapter p { color: rgba(238,242,255,.86); line-height: 1.55; max-width: 38em; margin: 0 0 14px; }
.chapter ul { margin: 0 0 18px; padding: 0; list-style: none; }
.chapter li {
  position: relative; padding: 8px 0 8px 28px;
  color: var(--muted); line-height: 1.45;
  border-bottom: 1px solid rgba(243,230,200,.08);
}
.chapter li::before {
  content: "";
  position: absolute; left: 0; top: 16px;
  width: 10px; height: 1px; background: var(--gold);
}
.flip .still { order: 2; }
@media (max-width: 860px) {
  .chapter, .flip { grid-template-columns: 1fr; }
  .flip .still { order: 0; }
  .topbar nav { display: none; }
  .topbar { justify-content: space-between; }
  .menu-btn { display: inline-flex !important; }
}

.menu-btn {
  display: none;
  appearance: none; border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.4); color: var(--warm);
  padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 13px;
}
.drawer {
  display: none; position: fixed; inset: 0; z-index: 30;
  background: rgba(0,0,0,.72);
}
.drawer.on { display: grid; place-items: start end; }
.drawer nav {
  margin: max(56px, env(safe-area-inset-top)) 16px 0 0;
  background: #16130e; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; min-width: 200px;
  display: flex; flex-direction: column; gap: 4px;
}
.drawer a {
  color: var(--warm); text-decoration: none; font-weight: 600;
  padding: 10px 12px; border-radius: 8px;
}
.drawer a:hover { background: rgba(212,168,75,.12); }

/* —— page —— */
.page-hero {
  position: relative; min-height: 52svh;
  display: grid; align-items: end;
  background: #000 center/cover no-repeat;
}
.page-hero .scrim { background: linear-gradient(transparent 20%, rgba(0,0,0,.88) 100%); }
.hero-copy {
  position: relative; z-index: 2;
  padding: 48px clamp(18px, 4vw, 48px) 36px;
  max-width: 760px;
}
.wrap { width: min(980px, calc(100% - 36px)); margin: 0 auto; padding: 36px 0 80px; }
.wrap h2 {
  font-family: var(--serif); font-weight: 500; color: var(--warm);
  font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 12px;
}
.wrap p { color: rgba(238,242,255,.86); line-height: 1.55; max-width: 42em; }
.grid-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0;
}
@media (max-width: 800px) { .grid-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.card .pic { height: 160px; background: #000 center/cover no-repeat; }
.card .body { padding: 18px; }
.card h3 {
  font-family: var(--serif); color: var(--warm); font-weight: 500;
  margin: 0 0 8px; font-size: 1.25rem;
}
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.empty {
  border: 1px dashed rgba(212,168,75,.35);
  border-radius: 12px;
  padding: 22px;
  color: var(--muted);
  background: rgba(212,168,75,.05);
}
.empty strong { color: var(--warm); font-weight: 600; }

.steps { margin: 18px 0 28px; padding: 0; list-style: none; }
.steps li {
  position: relative; padding: 10px 0 10px 28px;
  color: var(--muted); line-height: 1.45;
  border-bottom: 1px solid rgba(243,230,200,.08);
}
.steps li::before {
  content: "";
  position: absolute; left: 0; top: 18px;
  width: 10px; height: 1px; background: var(--gold);
}

/* —— form —— */
form.ask {
  display: grid; gap: 12px;
  margin: 22px 0 0;
  max-width: 560px;
}
form.ask label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
form.ask input, form.ask select, form.ask textarea {
  background: #0e0c09;
  border: 1px solid rgba(243,230,200,.2);
  color: var(--warm);
  padding: 12px 14px;
  border-radius: 8px;
}
form.ask textarea { min-height: 110px; resize: vertical; }
form.ask .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.note { font-size: 13px; color: var(--muted); }
.ok {
  display: none;
  border: 1px solid rgba(61,214,140,.4);
  background: rgba(61,214,140,.08);
  color: var(--warm);
  padding: 16px 18px;
  border-radius: 10px;
  max-width: 560px;
}
.ok.on { display: block; }
.err { color: #ffb4b4; font-size: 14px; display: none; }
.err.on { display: block; }

.foot {
  padding: 28px 20px max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: rgba(170,182,212,.5);
  font-size: 12px;
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  justify-content: space-between;
}
.foot a { color: rgba(212,168,75,.7); text-decoration: none; }
