/* Layout: a film. One fixed stage of light, captions as subtitles, scroll is the projector. */
:root {
  --night: #050506;
  --bone: #EDE7DC;
  --ash: #8E8A83;
  --ember: #E8573D;
  --azure: #5AAEF0;
  --gold: #CBA76A;
  --crema: #DDA466;
  --bar: #000000;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --voice: "Newsreader", Georgia, "Times New Roman", serif;
  --hud: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
html { background: var(--night); }
body { background: var(--night); color: var(--bone); font-family: var(--voice); overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bar); }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.fallback #stage { display: none; }
.fallback body, .fallback .tint { background: radial-gradient(60% 50% at 50% 45%, #1a1512 0%, var(--night) 70%); }

.grain { position: fixed; inset: -50%; z-index: 3; pointer-events: none; opacity: 0.11; mix-blend-mode: overlay; animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-4%)} 60%{transform:translate(-4%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
.vignette { position: fixed; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(0,0,0,0.75) 100%); }

.bar { position: fixed; left: 0; right: 0; height: clamp(14px, 5.5vh, 60px); background: var(--bar); z-index: 4; pointer-events: none; transition: height 1.2s cubic-bezier(.2,.7,.1,1); }
.bar.top { top: 0; }
.bar.bottom { bottom: 0; }
.opened .bar { height: clamp(10px, 3.2vh, 34px); }

.hud { position: fixed; z-index: 5; font-family: var(--hud); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ash); }
.hud.tl { top: calc(clamp(14px, 5.5vh, 60px) + env(safe-area-inset-top, 0px) + 14px); left: max(20px, env(safe-area-inset-left, 0px) + 16px); color: var(--bone); letter-spacing: 0.42em; }
.hud.tr { top: calc(clamp(14px, 5.5vh, 60px) + env(safe-area-inset-top, 0px) + 6px); right: max(16px, env(safe-area-inset-right, 0px) + 12px); display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: calc(100vw - 120px); }
.hud.tr a, .hud.tr button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ash); background: transparent; border: 1px solid rgba(237,231,220,0.2); padding: 10px 14px; min-height: 40px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.hud.tr a:hover, .hud.tr button:hover { color: var(--bone); }
.hud.tl a { color: inherit; text-decoration: none; font-family: var(--display); font-size: 18px; letter-spacing: 0.32em; }
.hud.bl { bottom: calc(clamp(14px, 5.5vh, 60px) + env(safe-area-inset-bottom, 0px) + 14px); left: max(20px, env(safe-area-inset-left, 0px) + 16px); font-variant-numeric: tabular-nums; }
.hud.br { bottom: calc(clamp(14px, 5.5vh, 60px) + env(safe-area-inset-bottom, 0px) + 14px); right: max(20px, env(safe-area-inset-right, 0px) + 16px); display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.reel { width: 120px; height: 1px; background: rgba(237,231,220,0.18); position: relative; }
.reel i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--bone); }
#sound { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ash); background: transparent; border: 1px solid rgba(237,231,220,0.2); padding: 10px 14px; min-height: 40px; cursor: pointer; }
#sound[aria-pressed="true"] { color: var(--bone); border-color: rgba(237,231,220,0.55); }
#sound:focus-visible, a:focus-visible, button:focus-visible { outline: 1px solid var(--bone); outline-offset: 4px; }

.screen { position: fixed; inset: 0; z-index: 4; pointer-events: none; display: grid; place-items: center; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.cue { grid-area: 1 / 1; max-width: 980px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; opacity: 0; transform: translateY(14px); will-change: opacity, transform; }
.cue.low { align-self: end; margin-bottom: calc(clamp(14px, 5.5vh, 60px) + 13vh); }
.eyebrow { font-family: var(--hud); font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--ash); margin: 0; }
.line { margin: 0; font-family: var(--voice); font-style: italic; font-weight: 300; font-size: clamp(28px, 4.6vw, 64px); line-height: 1.12; text-wrap: balance; text-shadow: 0 2px 30px rgba(0,0,0,0.8); }
.small { margin: 0; font-family: var(--voice); font-size: clamp(16px, 1.6vw, 20px); color: var(--ash); max-width: 46ch; line-height: 1.55; text-wrap: balance; }
.name { font-family: var(--display); font-weight: 400; font-size: clamp(64px, 15vw, 220px); letter-spacing: 0.14em; line-height: 0.9; margin-right: -0.14em; text-shadow: 0 0 60px rgba(0,0,0,0.6); }
.name.ares { color: var(--ember); }
.name.iris { color: var(--azure); }
.name.demetra { color: var(--crema); font-size: clamp(48px, 12vw, 190px); }
.trio { display: flex; flex-wrap: nowrap; justify-content: center; align-items: baseline; gap: 0.7em; font-family: var(--display); font-size: clamp(20px, 3.6vw, 52px); letter-spacing: 0.34em; line-height: 1; white-space: nowrap; }
.trio span { margin-right: -0.34em; }
.trio .dot { color: var(--ash); letter-spacing: 0; margin-right: 0; }
.trio .ares { color: var(--ember); } .trio .iris { color: var(--azure); } .trio .demetra { color: var(--crema); }
.hint { font-family: var(--hud); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ash); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hint span { width: 1px; height: 44px; background: linear-gradient(var(--bone), transparent); animation: drip 2.4s ease-in-out infinite; }
@keyframes drip { 0%{transform:scaleY(0);transform-origin:top} 45%{transform:scaleY(1);transform-origin:top} 55%{transform:scaleY(1);transform-origin:bottom} 100%{transform:scaleY(0);transform-origin:bottom} }

.track { position: relative; z-index: 1; height: 1150vh; }

.end { position: relative; z-index: 6; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 56px; padding-block: 18vh 16vh; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: linear-gradient(transparent, rgba(5,5,6,0.65) 30%, rgba(5,5,6,0.85)); }
.end h2 { margin: 0; font-family: var(--voice); font-style: italic; font-weight: 300; font-size: clamp(34px, 5vw, 72px); line-height: 1.1; max-width: 18ch; text-wrap: balance; }
.contact { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.addr { font-family: var(--hud); font-size: clamp(15px, 1.6vw, 19px); letter-spacing: 0.08em; user-select: all; }
.copy { font-family: var(--hud); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--bone); background: transparent; border: 1px solid rgba(237,231,220,0.35); padding: 12px 18px; min-height: 44px; cursor: pointer; }
.credits { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px 48px; width: min(900px, 100%); font-family: var(--hud); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ash); }
.credits div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.credits a { text-decoration: none; display: flex; flex-direction: column; gap: 8px; padding: 18px 0; border-top: 1px solid rgba(237,231,220,0.14); }
.credits a:hover b { letter-spacing: 0.3em; }
.credits b { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: 0.22em; text-transform: none; transition: letter-spacing 0.4s; }
.credits b.studio { color: var(--bone); }
.credits b.ares { color: var(--ember); } .credits b.iris { color: var(--azure); } .credits b.demetra { color: var(--crema); }
.again { font-family: var(--hud); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ash); text-decoration: none; padding: 12px; }
.again:hover { color: var(--bone); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 640px) {
  .hud.tr { max-width: calc(100vw - 90px); }
  .trio { font-size: clamp(16px, 5.2vw, 22px); letter-spacing: 0.22em; gap: 0.5em; }
  .trio span { margin-right: -0.22em; }
  .hud.bl { display: none; }
  .reel { width: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .hint span { animation: none; }
  .bar { transition: none; }
}
