:root {
  --night: #06070c;
  --night-2: #0d1020;
  --gold: #d9b26a;
  --gold-soft: rgba(217, 178, 106, .55);
  --cream: #f3ecdc;
  --blush: #efc3b3;
  --text: #ece5d6;
  --muted: #a39b8a;
  --serif: "Cormorant Garamond", Georgia, serif;
  --label: "Oswald", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--night);
  color: var(--text);
  font-family: var(--serif);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kicker {
  font-family: var(--label); font-weight: 300; letter-spacing: .32em;
  text-transform: uppercase; font-size: 11px; color: var(--gold); margin: 0;
}

/* ---------- Gate ---------- */
#gate {
  position: fixed; inset: 0; z-index: 30; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: max(5vh, 20px) 16px max(3.5vh, 16px);
  background: var(--night);
  transition: background 1.6s ease;
}
#gate.done { pointer-events: none; }
.gate-scene {
  position: absolute; inset: 0;
  transition: transform 2.6s cubic-bezier(.5, 0, .2, 1), opacity 2.2s ease, filter 2.2s ease;
}
.gate-pan { position: absolute; inset: 0; animation: gate-drift 34s ease-in-out infinite alternate; }
.gate-pan img, .gate-pan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.gate-bloom { opacity: 0; transition: opacity .5s ease; }
.gate-bloom.on { opacity: 1; }
.gate-open { opacity: 0; transition: opacity 3.2s ease; }
.gate-open.on { opacity: 1; }
.gate-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(6, 7, 12, .78) 0%, rgba(6, 7, 12, .3) 14%, rgba(6, 7, 12, 0) 26%),
    linear-gradient(to bottom, rgba(6, 7, 12, .6) 0%, rgba(6, 7, 12, 0) 22%),
    radial-gradient(ellipse at 50% 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .45) 100%);
  transition: opacity 1.4s ease;
}

.gate-head { position: relative; text-align: center; transition: opacity .9s ease, transform .9s ease; }
.gate-head .kicker { text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.gate-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; }
#gateForm {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: opacity .9s ease, transform .9s ease;
}
.gate-title {
  margin: 4px 0 0; font-weight: 400; font-size: clamp(26px, 4.4vw, 50px); text-shadow: 0 2px 18px rgba(0,0,0,.55);
  letter-spacing: .14em; text-transform: uppercase; color: var(--cream); text-align: center;
}
#gateForm input {
  width: min(64vw, 280px); padding: 8px 4px; text-align: center;
  background: transparent; border: 0; border-bottom: 1px solid var(--gold-soft);
  color: var(--cream); font-family: var(--serif); font-size: 22px; letter-spacing: .12em;
  outline: none;
}
#gateForm input::placeholder { color: rgba(236, 229, 214, .5); font-style: italic; letter-spacing: .04em; }
#gateForm input:focus { border-bottom-color: var(--gold); }
#gateForm button {
  font-family: var(--label); font-weight: 300; letter-spacing: .4em; text-transform: uppercase;
  font-size: 11px; color: var(--gold); background: rgba(6, 7, 12, .35); border: 1px solid var(--gold-soft);
  padding: 9px 22px 9px 26px; border-radius: 999px; cursor: pointer;
}
#gateForm button:hover, #gateForm button:focus-visible { background: rgba(217, 178, 106, .16); outline: none; }
.hint { min-height: 1.2em; margin: 0; font-style: italic; color: var(--text); font-size: 16px; }
#gate.shake #gateForm { animation: shake .5s ease; }

#gate.opening #gateForm { opacity: 0; transform: translateY(16px); pointer-events: none; }
#gate.opening .gate-head { opacity: 0; transform: translateY(-12px); }
#gate.opening .gate-shade { opacity: 0; }
#gate.bloom .gate-scene { transform: scale(1.3); opacity: 0; filter: blur(12px) brightness(1.5); }
#gate.bloom { background: rgba(6, 7, 12, 0); }
.flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 55%, rgba(255, 240, 210, .85), rgba(255, 214, 150, .25) 35%, rgba(255, 214, 150, 0) 70%);
}
#gate.bloom .flash { animation: flash 2.4s ease forwards; }

/* ---------- Theater ---------- */
#theater {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 12px 16px;
  opacity: 0; transform: scale(1.06); filter: blur(14px);
  transition: opacity 2.4s ease, transform 3s cubic-bezier(.2, .7, .2, 1), filter 2.4s ease;
}
#theater.on { opacity: 1; transform: none; filter: none; }

.marquee { text-align: center; }
.marquee h1 {
  margin: 2px 0 0; font-weight: 400; font-size: clamp(26px, 4.2vh, 44px);
  letter-spacing: .14em; text-transform: uppercase; color: var(--cream);
}

#stage {
  position: relative; flex: none;
  width: min(100%, calc((100vh - 190px) * 16 / 9));
  aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 3px; outline: 1px solid rgba(217, 178, 106, .18);
}
.set-wrap { position: absolute; inset: 0; animation: drift 40s ease-in-out infinite alternate; }
#stage .set {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.06) saturate(.92) brightness(.92);
}
/* Live-action loops cut from the set photo, laid back exactly where they came from */
.set-anim {
  position: absolute; display: block; object-fit: fill; pointer-events: none;
  filter: contrast(1.06) saturate(.92) brightness(.92);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 72%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 72%, transparent 100%);
}
.set-anim.dakina { left: 5%; top: 13.3333%; width: 18.75%; height: 44.4444%; }
.beams {
  position: absolute; inset: 0; pointer-events: none;
  background: url("img/set-dorm.jpg") center / cover;
  mix-blend-mode: screen; opacity: 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 30%, transparent 62%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 30%, transparent 62%);
  animation: beams 9s ease-in-out infinite;
}
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 48%, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
}
.grain {
  position: absolute; inset: -50%; pointer-events: none; opacity: .07;
  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)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}

/* The lotus room projected on the scrim */
.scrim-proj {
  position: absolute; left: 30.2%; top: 16.5%; width: 36.4%; height: 31%;
  overflow: hidden; pointer-events: none; opacity: 0;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 5%, #000 84%, transparent 100%), linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 5%, #000 84%, transparent 100%), linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-composite: intersect;
  transition: opacity 3s ease 1.2s;
}
.scrim-proj img {
  position: absolute; left: -5%; top: -14%; width: 110%; height: auto; display: block;
  filter: saturate(.85) brightness(.92) contrast(1.04) sepia(.06);
  transition: filter .5s ease;
}
#theater.on .scrim-proj { opacity: .95; }
.scrim-proj.lit { opacity: 1 !important; transition-delay: 0s; transition-duration: .5s; }
.scrim-proj.lit img { filter: saturate(.95) brightness(1.08) contrast(1.04); }

/* Hotspots */
.spot {
  position: absolute; padding: 0; border: 0; background: none; cursor: pointer;
  color: inherit; font: inherit;
}
.spot::before {
  content: ""; position: absolute; inset: -18%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 222, 165, .5) 0%, rgba(255, 220, 160, .18) 45%, rgba(255, 220, 160, 0) 70%);
  mix-blend-mode: screen;
  animation: pulse 3.6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  transition: opacity .4s ease, transform .4s ease;
}
.spot:hover::before, .spot:focus-visible::before, .spot.lit::before {
  animation: none; opacity: 1; transform: scale(1.12);
  background: radial-gradient(ellipse at center, rgba(255, 232, 190, .55) 0%, rgba(255, 220, 160, .22) 45%, rgba(255, 220, 160, 0) 70%);
}
/* Nicole: a warm halo that always shows and breathes, brighter than the other spots. */
.spot.glow::before {
  inset: -30% -55%;
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 236, 196, .8) 0%, rgba(255, 214, 150, .38) 38%, rgba(255, 210, 140, 0) 70%);
  animation: glow-breathe 4.2s ease-in-out infinite;
}
.spot.glow:hover::before, .spot.glow:focus-visible::before, .spot.glow.lit::before {
  animation: none; opacity: 1; transform: scale(1.1);
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 242, 212, .95) 0%, rgba(255, 220, 160, .45) 38%, rgba(255, 210, 140, 0) 70%);
}
@keyframes glow-breathe { 0%, 100% { opacity: .75; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.06); } }
.spot:focus-visible { outline: none; }
.spot .tag {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 6px);
  white-space: nowrap; pointer-events: none; opacity: 0;
  padding: 6px 12px 7px; border-radius: 2px;
  background: rgba(6, 7, 12, .78); outline: 1px solid rgba(217, 178, 106, .45);
  text-align: center; transition: opacity .3s ease, transform .3s ease;
}
.spot.tag-below .tag { bottom: auto; top: calc(100% + 8px); }
.spot .tag b { display: block; font-weight: 500; font-size: clamp(14px, 1.5vw, 20px); color: var(--cream); letter-spacing: .04em; }
.spot .tag i { display: block; font-style: normal; font-family: var(--label); font-weight: 300; font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.spot:hover .tag, .spot:focus-visible .tag, .spot.lit .tag { opacity: 1; transform: translate(-50%, 0); }
.spot.tag-left .tag { left: 0; transform: translate(0, 6px); }
.spot.tag-right .tag { left: auto; right: 0; transform: translate(0, 6px); }
.spot.tag-left:hover .tag, .spot.tag-left:focus-visible .tag, .spot.tag-left.lit .tag,
.spot.tag-right:hover .tag, .spot.tag-right:focus-visible .tag, .spot.tag-right.lit .tag { transform: none; }

/* Cut-out figures (Smith, Emunah): toned to the set's light, soft like the
   photo, with a contact shadow, a faint reflection in the glossy floor, and a glow
   that hugs the body so they read as clickable. */
.fig {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block;
  --grade: brightness(.7) contrast(1.03) saturate(.78) sepia(.12) blur(.45px);
  filter: var(--grade) drop-shadow(0 0 5px rgba(255, 222, 165, .28));
  animation: fig-glow 3.6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.fig { object-fit: contain; object-position: 50% 100%; }
.spot[data-spot="emunah"] .fig { --grade: brightness(.95) contrast(1.06) saturate(1.05) sepia(.03) blur(.35px); }
.fig-refl {
  top: 100%; opacity: .14; animation: none; transform: scaleY(-1);
  filter: brightness(.6) saturate(.7) blur(1.6px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 30%);
  mask-image: linear-gradient(to top, #000 0%, transparent 30%);
  pointer-events: none;
}
.fig.fig-refl { object-position: 50% 0; }
.fig-shadow {
  position: absolute; left: 12%; right: 12%; bottom: -2%; height: 5%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .35) 40%, rgba(0, 0, 0, 0) 72%);
  filter: blur(1px);
}
.figure-spot::before { display: none; }
.spot:hover .main, .spot:focus-visible .main, .spot.lit .main {
  animation: none;
  filter: brightness(.92) contrast(1.03) saturate(.9) blur(.3px) drop-shadow(0 0 9px rgba(255, 226, 170, .75));
}
@keyframes fig-glow {
  0%, 100% { filter: var(--grade) drop-shadow(0 0 4px rgba(255, 222, 165, .18)); }
  50% { filter: var(--grade) drop-shadow(0 0 8px rgba(255, 222, 165, .5)); }
}

/* DVD-style menu */
.menu {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px;
  max-width: 1100px;
}
.menu button {
  position: relative; background: none; border: 0; cursor: pointer;
  font-family: var(--label); font-weight: 300; font-size: 12px;
  letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  padding: 8px 14px 8px 30px; transition: color .25s ease;
}
.menu button::before {
  content: ""; position: absolute; left: 10px; top: 50%; width: 12px; height: 12px;
  transform: translateY(-50%) scale(.4); opacity: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -14 24 16'><path d='M0 0C-3-4-3-9 0-13C3-9 3-4 0 0Z' fill='%23d9b26a'/><path d='M0 0C-5-2-9-6-10-10C-5-9-2-5 0 0Z' fill='%23d9b26a' opacity='.7'/><path d='M0 0C5-2 9-6 10-10C5-9 2-5 0 0Z' fill='%23d9b26a' opacity='.7'/></svg>") center / contain no-repeat;
  transition: opacity .25s ease, transform .25s ease;
}
.menu button:hover, .menu button:focus-visible, .menu button.lit { color: var(--cream); outline: none; }
.menu button:hover::before, .menu button:focus-visible::before, .menu button.lit::before { opacity: 1; transform: translateY(-50%) scale(1); }

.fineprint { margin: 0; line-height: 1.8; font-family: var(--label); font-weight: 300; font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: rgba(163, 155, 138, .6); text-align: center; }

/* ---------- Video pages ---------- */
#theater.away { opacity: 0; transform: scale(1.18); filter: blur(10px); pointer-events: none;
  transition: opacity .7s ease, transform .9s cubic-bezier(.5, 0, .3, 1), filter .7s ease; }
#theater.paged { transition: opacity .7s ease, transform .9s cubic-bezier(.2, .7, .2, 1), filter .7s ease; }
#page {
  position: fixed; inset: 0; z-index: 35; overflow-y: auto; overflow-x: hidden;
  background: var(--night); opacity: 0; transition: opacity .6s ease .15s;
  -webkit-overflow-scrolling: touch;
}
#page.show { opacity: 1; }
#page[hidden] { display: none; }
.page-backdrop {
  position: fixed; inset: -60px; pointer-events: none;
  background: url("img/stage-full.jpg") 50% 50% / 280% auto no-repeat;
  filter: blur(26px) brightness(.34) saturate(.85);
}
.page-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 220, 160, .08), rgba(6, 7, 12, .55) 70%);
}
.page-bar {
  position: sticky; top: 0; z-index: 2;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 14px 20px; background: linear-gradient(rgba(6, 7, 12, .88), rgba(6, 7, 12, 0));
}
.page-back {
  justify-self: start; font-family: var(--label); font-weight: 300; font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold-soft); border-radius: 999px; padding: 9px 16px; text-decoration: none; white-space: nowrap;
  background: rgba(6, 7, 12, .4);
}
.page-back:hover, .page-back:focus-visible { background: rgba(217, 178, 106, .16); color: var(--cream); outline: none; }
.page-brand { font-family: var(--serif); font-size: 15px; letter-spacing: .3em; text-transform: uppercase; color: rgba(243, 236, 220, .7); white-space: nowrap; }
.page-nav { justify-self: end; display: flex; gap: 18px; }
.page-nav a { font-family: var(--label); font-weight: 300; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); text-decoration: none; white-space: pre; }
.page-nav a:hover, .page-nav a:focus-visible { color: var(--cream); outline: none; }
.page-main { position: relative; max-width: 1180px; margin: 0 auto; padding: 4px 16px 40px; }
.page-title { text-align: center; margin: 8px 0 22px; }
.page-title h1 {
  margin: 4px 0 0; font-weight: 400; font-size: clamp(40px, 6.5vw, 78px); line-height: 1.02;
  letter-spacing: .14em; text-transform: uppercase; color: var(--cream);
}
.page-label { margin: 8px 0 0; font-style: italic; font-size: clamp(18px, 2vw, 24px); color: var(--gold); }
.page-media { margin: 0 auto; }
.player {
  position: relative; aspect-ratio: 16 / 9; width: min(100%, calc((100vh - 250px) * 16 / 9)); min-width: min(100%, 560px);
  margin: 0 auto; background: #000; outline: 1px solid rgba(217, 178, 106, .3);
}
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.page-media.doc { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.page-download {
  font-family: var(--label); font-weight: 300; font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--gold-soft); border-radius: 999px; padding: 9px 18px; text-decoration: none;
}
.page-download:hover, .page-download:focus-visible { background: rgba(217, 178, 106, .16); outline: none; }
.pages { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; padding: 6px 0 10px; }
.pages img { display: block; width: min(100%, 860px); height: auto; outline: 1px solid rgba(217, 178, 106, .25); }
.page-media .soon-card { position: relative; aspect-ratio: 16 / 9; width: min(100%, 900px); margin: 0 auto; outline: 1px solid rgba(217, 178, 106, .25); }
.page-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px 48px; max-width: 980px; margin: 36px auto 0; }
.page-notes:empty { display: none; }
.page-notes:has(> .note:only-child) { max-width: 680px; }
.note-head { margin: 0 0 10px; font-family: var(--label); font-weight: 300; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.note-title { margin: 0 0 6px; font-size: 22px; color: var(--cream); }
.note-text { margin: 0; font-size: 19px; line-height: 1.55; color: var(--text); }
.note-song { margin: 12px 0 0; font-family: var(--label); font-weight: 300; font-size: 12px; letter-spacing: .16em; color: var(--gold); }
.note-quote { margin: 18px 0 0; padding-left: 16px; border-left: 1px solid var(--gold-soft); }
.note-quote p { margin: 0; font-style: italic; font-size: 24px; color: var(--cream); }
.note-quote cite { display: block; margin-top: 4px; font-style: normal; font-family: var(--label); font-weight: 300; font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.define-word { margin: 0 0 6px; font-size: 30px; color: var(--cream); }
.define-word i { font-size: 18px; color: var(--gold); }
.note-cite { margin: 10px 0 0; font-family: var(--label); font-weight: 300; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.note-source { grid-column: 1 / -1; margin: 0; text-align: center; font-family: var(--label); font-weight: 300; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: rgba(163, 155, 138, .55); }
#page .fineprint { margin-top: 40px; }
.soon-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding: 24px;
  background: radial-gradient(ellipse at 50% 45%, #171c33 0%, #07080d 75%);
}
.soon-card .lotus-wrap { width: 120px; opacity: .8; }
.soon-card p { margin: 0; }
.soon-card .big { font-size: clamp(26px, 4vw, 44px); color: var(--cream); font-style: italic; }
.soon-card .small { color: var(--muted); font-size: 17px; }
@media (max-width: 700px) {
  .page-bar { grid-template-columns: 1fr auto; }
  .page-brand { display: none; }
  .page-nav { gap: 12px; }
  .player { min-width: 0; }
}

/* ---------- Motion ---------- */
@keyframes gate-drift { from { transform: scale(1.02); } to { transform: scale(1.07) translateY(-.8%); } }
@keyframes breathe { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes flash { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
@keyframes drift { from { transform: scale(1.0) translate(0, 0); } to { transform: scale(1.045) translate(-.6%, -.4%); } }
@keyframes beams { 0%, 100% { opacity: .05; } 35% { opacity: .22; } 50% { opacity: .12; } 70% { opacity: .26; } }
@keyframes pulse { 0%, 100% { opacity: .35; transform: scale(.95); } 50% { opacity: .9; transform: scale(1.05); } }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

@media (hover: none) {
  .spot .tag { display: none; }
}
@media (max-width: 700px) {
  .menu button { font-size: 11px; letter-spacing: .2em; padding: 8px 10px 8px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation-duration: .01s !important; animation-iteration-count: 1 !important; }
}
