/* ==========================================================================
   EMBER SUMMIT — cinematic system
   dark fire film · WebGL ember · director's cuts · slate · grain
   ========================================================================== */

:root {
  --ember: #ff5a1f;
  --ember2: #ff9e4f;
  --gold: #ffcf5c;
  --flame-a: #ffd24a;
  --flame-b: #ff7a1f;
  --flame-c: #e23b12;
  --blood: #c8321e;
  --font-d: "Cormorant Garamond", "Times New Roman", serif;
  --font-b: "Inter", sans-serif;
  --font-m: "JetBrains Mono", monospace;
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);
  --ease2: cubic-bezier(0.16, 1, 0.3, 1);
  --whip: cubic-bezier(0.2, 0.85, 0.32, 1.14);
}

body.bg-dark {
  --bg: #050302;
  --bg2: #0d0705;
  --ink: #f4e9dc;
  --dim: rgba(244, 233, 220, 0.55);
  --line: rgba(255, 90, 31, 0.3);
  --border: rgba(244, 233, 220, 0.12);
  --glass: rgba(16, 8, 5, 0.5);
  --glass2: rgba(24, 12, 7, 0.72);
  --redact: rgba(244, 233, 220, 0.5);
  --redact-lg: rgba(244, 233, 220, 0.3);
  --paper: #f6ecd9;
  --paper-ink: #241610;
  --paper-dim: rgba(36, 22, 16, 0.6);
  --input: rgba(244, 233, 220, 0.04);
  --placeholder: #6d5a4b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  --vig-c: rgba(0, 0, 0, 0.5);
}

body.theme-light {
  --bg: #f3e7d8;
  --bg2: #ecdcC7;
  --ink: #241610;
  --dim: rgba(36, 22, 16, 0.6);
  --line: rgba(200, 50, 30, 0.35);
  --border: rgba(36, 22, 16, 0.16);
  --glass: rgba(255, 252, 246, 0.6);
  --glass2: rgba(255, 252, 246, 0.85);
  --redact: rgba(36, 22, 16, 0.5);
  --redact-lg: rgba(36, 22, 16, 0.28);
  --paper: #fff9ee;
  --paper-ink: #241610;
  --paper-dim: rgba(36, 22, 16, 0.6);
  --input: rgba(36, 22, 16, 0.05);
  --placeholder: #9c8772;
  --shadow: 0 24px 80px rgba(60, 30, 10, 0.18);
  --vig-c: rgba(36, 22, 16, 0.22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-weight: 300;
  overflow-x: hidden;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}
::selection { background: var(--ember); color: #160a04; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }

/* scrollbar */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--flame-c), var(--ember)); border-radius: 9px; }

/* ==================================================================
   ATMOSPHERE
   ================================================================== */

.vignette {
  position: fixed;
  inset: 0;
  z-index: 31;
  pointer-events: none;
  box-shadow: inset 0 0 24vmin rgba(0, 0, 0, 0.55);
}
.noise {
  position: fixed;
  inset: -60px;
  z-index: 32;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-24px, 18px); }
  40% { transform: translate(16px, -30px); }
  60% { transform: translate(-12px, -14px); }
  80% { transform: translate(26px, 22px); }
  100% { transform: translate(0, 0); }
}
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 33;
  pointer-events: none;
  opacity: 0.05;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 2px, rgba(0, 0, 0, 0.35) 3px);
}

/* reel tape */
.reel-tape {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 26px;
  padding: 30px 0;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--glass);
  writing-mode: vertical-rl;
  font-family: var(--font-m);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--dim);
  text-align: center;
  pointer-events: none;
}
.reel-tape::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
  animation: dotpulse 2s ease-in-out infinite;
}
@keyframes dotpulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ==================================================================
   FILM EQUIPMENT — shutter gate / iris / scene chip / flash
   ================================================================== */

.film-gate {
  position: fixed;
  inset: 0;
  z-index: 41;
  display: flex;
  visibility: hidden;
  pointer-events: none;
}
.film-gate.on, .film-gate.out { visibility: visible; }
.film-gate .fg {
  flex: 1;
  background: linear-gradient(180deg, #120a06 0%, #050302 100%);
  transform: scaleY(0);
  transform-origin: top;
}
.film-gate.on .fg {
  animation: fg-in 0.5s var(--ease2) both;
  animation-delay: calc(var(--i) * 0.045s);
}
.film-gate.out .fg {
  animation: fg-out 0.55s var(--ease2) both;
  animation-delay: calc(var(--i) * 0.045s);
}
@keyframes fg-in {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes fg-out {
  from { transform: scaleY(1); }
  to { transform: scaleY(0); }
}

.iris {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  background: #050302;
  clip-path: circle(0% at 50% 50%);
  display: none;
}
.iris.open, .iris.close { display: block; }
.iris.open { animation: iris-out 0.8s var(--ease2) both; }
.iris.close { animation: iris-in 0.8s var(--ease2) both; }
@keyframes iris-in {
  from { clip-path: circle(0% at 50% 50%); }
  to { clip-path: circle(150% at 50% 50%); }
}
@keyframes iris-out {
  from { clip-path: circle(150% at 50% 50%); }
  to { clip-path: circle(0% at 50% 50%); }
}

.slate {
  position: fixed;
  left: 50%;
  bottom: 7vh;
  z-index: 41;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  background: rgba(8, 4, 2, 0.82);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ember);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 18px);
  transition: opacity 0.3s var(--ease), transform 0.45s var(--ease2);
}
.slate.show { opacity: 1; transform: translate(-50%, 0); }
.slate::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  width: 20px;
  height: 30px;
  margin-top: -15px;
  background: repeating-linear-gradient(135deg, #1a0d06 0 7px, #f4e9dc 7px 14px);
  border: 1px solid rgba(244, 233, 220, 0.25);
  transform: rotate(36deg);
  transform-origin: right center;
  opacity: 0;
}
.slate.show::before { opacity: 1; animation: clap 0.42s var(--ease2) both; }
@keyframes clap {
  from { transform: rotate(36deg); }
  55% { transform: rotate(4deg); }
  to { transform: rotate(0deg); }
}
.slate-sc { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.25em; color: var(--dim); }
.slate-sc b { color: var(--ember2); }
.slate-sc-title { font-family: var(--font-d); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.08em; color: var(--ink); }
.slate-dir { font-family: var(--font-m); font-style: normal; font-size: 9px; letter-spacing: 0.3em; color: rgba(244, 233, 220, 0.45); }

.flash {
  position: fixed;
  inset: 0;
  z-index: 68;
  pointer-events: none;
  background: #ffdfa0;
  opacity: 0;
}
.flash.on { animation: flashfade 0.14s linear both; }
.flash.on.chroma {
  background: linear-gradient(100deg, transparent 0%, rgba(226, 59, 18, 0.5) 44%, rgba(255, 122, 31, 0.8) 50%, rgba(226, 59, 18, 0.5) 56%, transparent 100%);
  animation: flashchroma 0.55s ease-out both;
}
@keyframes flashchroma {
  0% { opacity: 1; transform: translateX(-115%); }
  100% { opacity: 0; transform: translateX(115%); }
}
@keyframes flashfade {
  0% { opacity: 0; }
  25% { opacity: 0.55; }
  100% { opacity: 0; }
}

/* ==================================================================
   SCENE CUTSCENES — one-time per-scene openers
   ================================================================== */

.cut {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(130% 110% at 50% 0%, #120a06 0%, #050302 62%);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), transform 0.55s var(--ease2), visibility 0.4s;
}
.cut.on { opacity: 1; visibility: visible; }
.cut.leave { opacity: 0; transform: scale(1.045); visibility: hidden; }
.cut-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 0 6vw;
  text-align: center;
}
.cut-kicker {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.55em;
  color: var(--gold);
  opacity: 0;
  animation: cutfade 0.5s var(--ease2) 0.1s both;
}
@keyframes cutfade {
  from { opacity: 0; transform: translateY(12px); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.cut-title {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
}
.cut.on .cut-title:not(.split) { animation: title-rise 0.7s var(--ease2) 0.28s both; }
.cut.on .split .spc-l {
  animation: flameshift 5s ease-in-out infinite, cut-l 0.7s var(--ease2) both;
  animation-delay: 0s, calc(var(--i) * 0.045s + 0.3s);
}
@keyframes cut-l {
  from { opacity: 0; transform: translateY(0.5em) scale(1.1); filter: blur(10px); }
  70% { opacity: 1; }
  to { opacity: 1; transform: none; filter: blur(0); }
}
.cut.on .cut-inner { animation: cut-dolly 0.85s var(--ease2) 0.05s both; }
@keyframes cut-dolly {
  from { transform: scale(0.965); filter: blur(9px); opacity: 0.4; }
  to { transform: scale(1); filter: blur(0); opacity: 1; }
}
@keyframes title-rise {
  from { opacity: 0; transform: translateY(0.45em); filter: blur(9px); letter-spacing: 0.16em; }
  65% { opacity: 1; transform: translateY(-0.02em); filter: blur(0); }
  to { opacity: 1; transform: none; letter-spacing: 0.04em; }
}
.cut-line {
  width: min(340px, 56vw);
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold), var(--ember), transparent);
  box-shadow: 0 0 18px rgba(255, 122, 31, 0.6);
  transform: scaleX(0);
  animation: cutline 0.8s var(--ease2) 0.65s both;
}
@keyframes cutrise {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}
@keyframes cutline {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.cut-token {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}
.cut-tok {
  font-family: var(--font-m);
  font-size: clamp(0.95rem, 3vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--glass);
  padding: 12px 20px;
  opacity: 0;
  animation: tokstamp 0.5s var(--ease2) both;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
@keyframes tokstamp {
  0% { opacity: 0; transform: scale(1.7) rotate(7deg); filter: blur(7px); }
  55% { opacity: 1; transform: scale(0.95) rotate(-1deg); filter: blur(0); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.cut-tok.omg { color: var(--blood); border-color: var(--blood); box-shadow: 0 0 24px rgba(200, 50, 30, 0.35); }
.cut-tok.alpha { color: var(--ember2); border-color: var(--ember); }
.cut-tok.beta { color: var(--gold); border-color: rgba(255, 207, 92, 0.4); }
.cut-tok.gamma { color: var(--dim); }
.cut-type {
  font-family: var(--font-m);
  font-size: clamp(1rem, 3.4vw, 1.6rem);
  letter-spacing: 0.3em;
  color: var(--gold);
}
.cut-type::after { content: "▌"; color: var(--ember); animation: dotpulse 0.8s steps(2) infinite; }
.cut-signal { display: flex; align-items: flex-end; gap: 8px; height: 64px; }
.cut-signal span {
  width: 6px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--gold), var(--ember));
  animation: sig 1.1s ease-in-out infinite;
}
@keyframes sig {
  0%, 100% { height: 12px; opacity: 0.45; }
  50% { height: 60px; opacity: 1; }
}
.cut-scan {
  position: relative;
  display: inline-block;
  font-family: var(--font-m);
  font-size: clamp(0.9rem, 2.8vw, 1.25rem);
  letter-spacing: 0.35em;
  color: var(--dim);
  overflow: hidden;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--glass);
}
.cut-scan::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(180deg, transparent 40%, rgba(255, 158, 79, 0.5) 50%, transparent 60%);
  animation: scan 1.3s linear infinite;
}
@keyframes scan {
  from { transform: translateY(-100%); }
  to { transform: translateY(100%); }
}
.cut-slate {
  position: absolute;
  right: 4vw;
  bottom: 6vh;
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 90, 31, 0.35);
  background: rgba(10, 5, 3, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.cut-slate.on { display: flex; animation: chip-in 0.4s var(--ease2) both; }
@keyframes chip-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.cut-st { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.28em; color: #eee; }
.cut-st b { color: var(--ember2); }
.cut-st-title { font-family: var(--font-d); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.05em; color: var(--ink); }
.cut-st-sub { font-family: var(--font-m); font-style: normal; font-size: 9px; letter-spacing: 0.3em; color: rgba(244, 233, 220, 0.5); }

/* ==================================================================
   PRELOADER
   ================================================================== */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #050302;
  transition: transform 0.7s var(--ease2), opacity 0.7s var(--ease);
}
.preloader.out { transform: translateY(-100%); opacity: 0; }
.pre-brand {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.55em;
  color: rgba(244, 233, 220, 0.5);
  animation: prebrand 1.6s ease both;
}
@keyframes prebrand {
  from { opacity: 0; letter-spacing: 1.1em; }
  to { opacity: 1; letter-spacing: 0.55em; }
}
.pre-title {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(4rem, 16vw, 11rem);
  color: rgba(255, 122, 31, 0.14);
  letter-spacing: 0.08em;
  line-height: 1;
  animation: prezoom 2.6s ease-in-out infinite alternate;
}
@keyframes prezoom {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}
.pre-sub {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: rgba(244, 233, 220, 0.4);
}
.pre-track {
  width: min(340px, 60vw);
  height: 2px;
  background: rgba(244, 233, 220, 0.12);
  overflow: hidden;
}
.pre-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--flame-c), var(--ember), var(--gold));
  box-shadow: 0 0 14px rgba(255, 122, 31, 0.8);
}
.pre-skip {
  position: absolute;
  left: 50%;
  bottom: 5vh;
  transform: translateX(-50%);
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: rgba(244, 233, 220, 0.3);
  animation: dotpulse 1.6s ease-in-out infinite;
}
.pre-film {
  position: absolute;
  left: 50%;
  bottom: 15vh;
  width: min(380px, 64vw);
  height: 26px;
  transform: translateX(-50%);
  opacity: 0.45;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(244, 233, 220, 0.25) 6px 24px),
    linear-gradient(180deg, rgba(244, 233, 220, 0.3) 0 1px, transparent 1px 25px, rgba(244, 233, 220, 0.3) 25px 26px);
  animation: sprocket 1.1s linear infinite;
}
@keyframes sprocket {
  from { background-position: 0 0, 0 0; }
  to { background-position: 24px 0, 0 0; }
}

/* ==================================================================
   INTRO FILM — letterbox · chrome · master-clock cuts
   ================================================================== */

.intro {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.intro.show { opacity: 1; visibility: visible; }
.intro.gone { opacity: 0; visibility: hidden; }

/* letterbox bars */
.int-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 8vh;
  background: var(--bg);
  z-index: 3;
}
.int-bar { border-bottom: 1px solid rgba(255, 207, 92, 0.4); }
.int-bar-b {
  bottom: 0;
  border-bottom: 0;
  border-top: 1px solid rgba(255, 207, 92, 0.4);
}

/* top chrome — brand / REC / timecode */
.int-chrome {
  position: absolute;
  top: 8vh;
  left: 0;
  right: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3vw;
  font-family: var(--font-m);
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--dim);
  z-index: 3;
}
.int-rec { display: inline-flex; align-items: center; gap: 8px; color: var(--dim); }
.int-rec i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 9px var(--ember);
  animation: dotpulse 1s ease-in-out infinite;
}
.int-tc { font-variant-numeric: tabular-nums; letter-spacing: 0.14em; }

/* bottom chrome — shot / playbar / tagline */
.int-bot {
  position: absolute;
  bottom: 8vh;
  left: 0;
  right: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 3vw;
  font-family: var(--font-m);
  font-size: 9px;
  letter-spacing: 0.32em;
  color: var(--dim);
  z-index: 3;
}
.int-shot { color: rgba(255, 207, 92, 0.85); }
.int-tagline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.int-prog {
  flex: 1;
  max-width: 320px;
  height: 2px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.int-prog::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--p, 0%);
  background: linear-gradient(90deg, var(--flame-c), var(--ember), var(--gold));
  box-shadow: 0 0 10px rgba(255, 122, 31, 0.7);
  transition: width 0.35s linear;
}
.int-prog i {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--line);
  pointer-events: none;
}

/* stage + frames */
.int-stage {
  position: absolute;
  inset: 8vh 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.int-stage.int-cam { animation: int-cam-punch 0.34s var(--whip); }
@keyframes int-cam-punch {
  0% { transform: scale(1); }
  38% { transform: scale(1.022) rotate(0.35deg); }
  100% { transform: scale(1); }
}

/* ember atmosphere + vignette */
.int-ember {
  position: absolute;
  inset: 8vh 0;
  z-index: 1;
  width: 100%;
  height: calc(100% - 16vh);
  pointer-events: none;
}
.int-vig {
  position: absolute;
  inset: 8vh 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 52%, var(--vig-c) 100%);
}
.int-frame {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3.5vh, 34px);
  padding: 0 6vw;
  text-align: center;
}

/* entrances — whip pans */
.int-in-top { animation: int-in-top 0.42s var(--whip) both; }
@keyframes int-in-top {
  from { transform: translateY(-44%) rotate(-1.2deg); opacity: 0; }
  70% { transform: translateY(1%) rotate(0deg); opacity: 1; }
  to { transform: none; opacity: 1; }
}
.int-in-bottom { animation: int-in-bottom 0.42s var(--whip) both; }
@keyframes int-in-bottom {
  from { transform: translateY(44%) rotate(1.2deg); opacity: 0; }
  70% { transform: translateY(-1%) rotate(0deg); opacity: 1; }
  to { transform: none; opacity: 1; }
}
.int-in-left { animation: int-in-left 0.42s var(--whip) both; }
@keyframes int-in-left {
  from { transform: translateX(-56%) rotate(1.4deg); opacity: 0; }
  70% { transform: translateX(3%) rotate(0deg); opacity: 1; }
  to { transform: none; opacity: 1; }
}
.int-in-right { animation: int-in-right 0.42s var(--whip) both; }
@keyframes int-in-right {
  from { transform: translateX(56%) rotate(-1.4deg); opacity: 0; }
  70% { transform: translateX(-3%) rotate(0deg); opacity: 1; }
  to { transform: none; opacity: 1; }
}
.int-in-zoom { animation: int-in-zoom 0.42s var(--whip) both; }
@keyframes int-in-zoom {
  from { transform: scale(0.86); opacity: 0; }
  70% { transform: scale(1.015); opacity: 1; }
  to { transform: scale(1); opacity: 1; }
}
.int-in-punch { animation: int-in-punch 0.42s var(--whip) both; }
@keyframes int-in-punch {
  from { transform: scale(1.3); opacity: 0; }
  60% { transform: scale(0.955); opacity: 1; }
  to { transform: scale(1); opacity: 1; }
}

/* exits */
.int-out-top { animation: int-out-top 0.3s ease-in both; }
@keyframes int-out-top { to { transform: translateY(-44%) rotate(-1.2deg); opacity: 0; } }
.int-out-bottom { animation: int-out-bottom 0.3s ease-in both; }
@keyframes int-out-bottom { to { transform: translateY(44%) rotate(1.2deg); opacity: 0; } }
.int-out-left { animation: int-out-left 0.3s ease-in both; }
@keyframes int-out-left { to { transform: translateX(-56%) rotate(-1.4deg); opacity: 0; } }
.int-out-right { animation: int-out-right 0.3s ease-in both; }
@keyframes int-out-right { to { transform: translateX(56%) rotate(1.4deg); opacity: 0; } }
.int-out-zoom { animation: int-out-zoom 0.3s ease-in both; }
@keyframes int-out-zoom { to { transform: scale(1.12); opacity: 0; } }

/* cut effects */
.int-fx {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.int-fx.flash { background: #fff; animation: int-fx-flash 0.16s ease-out both; }
@keyframes int-fx-flash { from { opacity: 1; } to { opacity: 0; } }
.int-fx.chroma {
  background: linear-gradient(100deg, transparent 0%, rgba(226, 59, 18, 0.5) 44%, rgba(255, 122, 31, 0.75) 50%, rgba(226, 59, 18, 0.5) 56%, transparent 100%);
  animation: int-fx-chroma 0.5s ease-out both;
}
@keyframes int-fx-chroma {
  0% { opacity: 1; transform: translateX(-115%); }
  100% { opacity: 0; transform: translateX(115%); }
}
.int-fx.sweep {
  background: linear-gradient(90deg, transparent, rgba(255, 207, 92, 0.28), transparent);
  animation: int-fx-sweep 0.55s ease-out both;
}
@keyframes int-fx-sweep {
  0% { clip-path: inset(0 100% 0 0); }
  60% { clip-path: inset(0 0 0 0); opacity: 1; }
  100% { clip-path: inset(0 0 0 0); opacity: 0; }
}
.int-fx.dip { background: var(--bg); animation: int-fx-dip 0.7s ease-out both; }
@keyframes int-fx-dip {
  0% { opacity: 0; }
  45% { opacity: 1; }
  100% { opacity: 0; }
}

/* cut content — studio card */
.int-studio {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 6.5rem);
  line-height: 1.05;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  color: var(--ink);
}
.int-studio .int-st-mark {
  color: var(--ember);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  animation: none;
}

/* cut content — presents */
.int-presents {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 26px);
  font-family: var(--font-m);
  font-size: clamp(0.8rem, 2.4vw, 1.1rem);
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  color: var(--dim);
}
.int-presents::before,
.int-presents::after {
  content: "";
  width: clamp(40px, 9vw, 100px);
  height: 1px;
}
.int-presents::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.int-presents::after { background: linear-gradient(90deg, var(--gold), transparent); }

/* cut content — countdown */
.int-cd {
  position: relative;
  width: 100%;
  height: clamp(10rem, 32vh, 17rem);
}
.cd-n {
  position: absolute;
  left: 50%;
  top: 50%;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(6rem, 26vw, 16rem);
  line-height: 1;
  color: var(--ember);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.15);
}
.cd-n.pop { animation: cd-pop 0.62s var(--whip) both; }
@keyframes cd-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.15); }
  40% { opacity: 1; transform: translate(-50%, -50%) scale(1.14); }
  65% { opacity: 1; transform: translate(-50%, -50%) scale(0.95); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

/* cut content — single word slam */
.int-word {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2.6rem, 10vw, 7rem);
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  background: linear-gradient(120deg, var(--flame-c) 0%, var(--ember) 45%, var(--gold) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: int-word-slam 0.6s var(--whip) both;
}
@keyframes int-word-slam {
  0% { opacity: 0; transform: scale(1.4); }
  60% { opacity: 1; transform: scale(0.96); }
  100% { opacity: 1; transform: scale(1); }
}

/* cut content — typed lines */
.int-kick {
  font-family: var(--font-m);
  font-size: clamp(1rem, 3vw, 1.5rem);
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  min-height: 1.4em;
}
.int-tag {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 3rem);
  letter-spacing: 0.05em;
  color: var(--ink);
  min-height: 1.3em;
}
.int-kick::after,
.int-tag::after {
  content: "▌";
  color: var(--ember);
  animation: int-caret 0.9s steps(2) infinite;
}
@keyframes int-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* cut content — title slam */
.int-title {
  display: flex;
  align-items: baseline;
  gap: 0.16em;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(3.2rem, 15vw, 11rem);
  line-height: 1.02;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  color: var(--ink);
  white-space: nowrap;
  animation: int-title-slam 0.72s var(--whip) both;
}
.int-title .it-mun {
  color: var(--gold);
  font-size: 0.6em;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  animation: int-mun-punch 0.6s var(--whip) 0.22s both;
}
@keyframes int-title-slam {
  0% { opacity: 0; transform: scale(1.3); filter: blur(10px); }
  55% { opacity: 1; transform: scale(0.985); filter: blur(0); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes int-mun-punch {
  0% { opacity: 0; transform: translateY(0.5em) scale(0.6); }
  60% { opacity: 1; transform: translateY(0) scale(1.06); }
  100% { opacity: 1; transform: none; }
}
.int-rule {
  width: min(340px, 50vw);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
}
.int-rule.draw { animation: int-rule-draw 0.85s var(--ease2) 0.1s both; }
@keyframes int-rule-draw { to { transform: scaleX(1); } }
.int-sub {
  font-family: var(--font-m);
  font-size: clamp(0.6rem, 1.8vw, 0.8rem);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--dim);
  opacity: 0;
  animation: int-fade 1.1s var(--ease2) 0.5s both;
}
@keyframes int-fade {
  from { opacity: 0; filter: blur(5px); }
  to { opacity: 1; filter: blur(0); }
}

/* cut content — end card */
.int-meta {
  font-family: var(--font-m);
  font-size: clamp(0.6rem, 1.8vw, 0.8rem);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--dim);
}
.int-go {
  font-family: var(--font-m);
  font-size: clamp(0.7rem, 2vw, 0.9rem);
  letter-spacing: 0.45em;
  color: var(--gold);
  opacity: 0;
}
.int-go.on { opacity: 1; animation: int-go-blink 0.8s steps(2) infinite; }
@keyframes int-go-blink { 50% { opacity: 0.12; } }

/* grain */
.int-grain {
  position: absolute;
  inset: -60px;
  z-index: 5;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}

.intro-skip {
  position: absolute;
  right: 3vw;
  top: calc(8vh + 40px);
  z-index: 6;
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--dim);
  padding: 10px 16px;
  border: 1px solid var(--border);
  opacity: 0;
  transition: opacity 0.4s var(--ease), color 0.3s, border-color 0.3s;
}
.intro-skip.show { opacity: 1; }
.intro-skip:hover { color: var(--gold); border-color: var(--gold); }

/* ==================================================================
   NAV
   ================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 4vw, 56px);
  background: rgba(5, 3, 2, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
body.theme-light .nav { background: rgba(255, 252, 246, 0.55); }
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.35em;
}
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 14px var(--ember), 0 0 34px rgba(255, 90, 31, 0.6);
  animation: dotpulse 2.2s ease-in-out infinite;
}
.nav-links { display: flex; gap: clamp(10px, 1.6vw, 26px); }
.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-m);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--dim);
  padding: 8px 2px;
  transition: color 0.3s var(--ease);
}
.nav-links a .nl-n { color: var(--ember); font-size: 9px; opacity: 0.7; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--ember), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease2);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.is-active::after { transform: scaleX(1); }
.nav-tools { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--dim);
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.icon-btn:hover { color: var(--gold); border-color: var(--ember); box-shadow: 0 0 18px rgba(255, 90, 31, 0.25); }
#themeBtn { font-size: 14px; }
body.theme-light #themeBtn .theme-moon { display: none; }
body:not(.theme-light) #themeBtn .theme-sun { display: none; }
#soundBtn.snd-on { color: var(--gold); border-color: var(--ember); }
.menu-btn { display: none; flex-direction: column; gap: 4px; align-items: center; }
.menu-btn span { width: 16px; height: 1.5px; background: var(--ink); transition: transform 0.3s, opacity 0.3s; }
.menu-btn.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ==================================================================
   FULLSCREEN MENU
   ================================================================== */

.menu {
  position: fixed;
  inset: 0;
  z-index: 19;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 40px;
  padding: 12vh 8vw;
  background: rgba(5, 3, 2, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}
body.theme-light .menu { background: rgba(243, 231, 216, 0.97); }
.menu.open { opacity: 1; visibility: visible; }
.menu-head {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--ember);
}
.menu-links { display: flex; flex-direction: column; gap: 6px; }
.menu-links a {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: baseline;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 6vw, 3.2rem);
  font-weight: 700;
  color: var(--ink);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s var(--ease2), transform 0.6s var(--ease2), color 0.3s, padding-left 0.3s var(--ease2);
}
.menu.open .menu-links a { opacity: 1; transform: translateY(0); transition-delay: var(--d, 0s); }
.menu-links a i { font-family: var(--font-m); font-style: normal; font-size: 13px; color: var(--ember); }
.menu-links a em { font-family: var(--font-m); font-style: normal; font-size: 11px; letter-spacing: 0.25em; color: var(--dim); align-self: center; }
.menu-links a:hover { color: var(--ember); padding-left: 12px; }
.menu-foot {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--dim);
}
.menu-ig {
  display: inline-block;
  margin: 4px 0 28px;
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--dim);
  transition: color 0.3s;
}
.menu-ig:hover { color: var(--ember); }

/* ==================================================================
   PAGES / SCENES
   ================================================================== */

.pages { position: relative; }
.page {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 11vh 6vw 9vh;
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease2), filter 0.7s var(--ease);
  z-index: 5;
}
.page.is-active { opacity: 1; visibility: visible; }
.page.is-active.go { animation: page-punch 0.6s var(--whip) both; }
@keyframes page-punch {
  0% { transform: scale(0.99); }
  55% { transform: scale(1.004); }
  100% { transform: scale(1); }
}
.page.leaving { transform: translateY(-2%) scale(0.985); filter: blur(6px); opacity: 0; }
.page.entering { transform: translateY(3%) scale(1.015); filter: blur(6px); }
.page-in {
  width: 100%;
  max-width: 1060px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: 6vh;
}
.page-in .quote { max-width: 720px; }

.kicker {
  font-family: var(--font-m);
  font-size: clamp(10px, 1.6vw, 12px);
  letter-spacing: 0.42em;
  color: var(--ember2);
  text-transform: uppercase;
  transition: text-shadow 0.3s;
}
.kicker:hover { animation: glitch 0.3s steps(2) infinite; }

/* text reveal — keyframe-based, fail-open (visible by default) */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(34px); }
  to { opacity: 1; transform: none; }
}
.page.is-active.go .choreo {
  animation: rise-in 0.85s var(--ease2) both;
  animation-delay: var(--d, 0s);
}
.page.is-active.go [data-split]:not(.split) {
  animation: rise-in 0.85s var(--ease2) both;
}
.split { white-space: pre-wrap; }
.split .spc-l {
  display: inline-block;
  background: linear-gradient(100deg, var(--flame-a) 0%, var(--flame-b) 40%, var(--flame-c) 80%, var(--flame-b) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: flameshift 5s ease-in-out infinite;
}
.page.is-active.go .split .spc-l {
  animation: flameshift 5s ease-in-out infinite, sp-rise 0.7s var(--ease2) both;
  animation-delay: 0s, calc(var(--i) * 0.032s + 0.05s);
}
@keyframes sp-rise {
  from { opacity: 0; transform: translateY(0.55em) rotate(2deg); filter: blur(8px); }
  60% { opacity: 1; filter: blur(0); }
  to { opacity: 1; transform: none; }
}
.page.is-active.go .grid-cards > *,
.page.is-active.go .paper .it-row {
  animation: rise-in 0.6s var(--ease2) both;
}
.page.is-active.go .form,
.page.is-active.go .form-success {
  animation: rise-in 0.85s var(--ease2) both;
}

.flame {
  background: linear-gradient(100deg, var(--flame-a) 0%, var(--flame-b) 40%, var(--flame-c) 80%, var(--flame-b) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: flameshift 5s ease-in-out infinite;
}
@keyframes flameshift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-title {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(4.4rem, 17vw, 12rem);
  line-height: 1.02;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
}
.hero-mun {
  display: block;
  font-size: 0.78em;
  letter-spacing: 0.3em;
  margin-top: 0.02em;
}
.hero-mun .spc-l {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--gold);
  animation: none;
}
.hero-tag {
  font-family: var(--font-d);
  font-size: clamp(1.3rem, 4vw, 2.4rem);
  color: var(--ink);
}
.hero-tag::after { content: "▌"; color: var(--ember); animation: dotpulse 0.8s steps(2) infinite; }
.hero-sub { max-width: 560px; font-size: 1.02rem; line-height: 1.8; color: var(--dim); }

.stat-row { display: flex; gap: clamp(28px, 5vw, 64px); flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--ember); padding-left: 16px; }
.stat b {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2rem, 4.6vw, 3rem);
  background: linear-gradient(180deg, var(--gold), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.3em; color: var(--dim); }

/* CTA */
.cta {
  align-self: flex-start;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 17px 30px;
  background: linear-gradient(100deg, var(--flame-c), var(--ember) 55%, var(--flame-b));
  color: #160a04;
  font-family: var(--font-m);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3em;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: 0 12px 40px rgba(255, 90, 31, 0.35);
  transition: transform 0.3s var(--ease2), box-shadow 0.3s, filter 0.3s;
}
.cta:hover { filter: brightness(1.12); box-shadow: 0 16px 54px rgba(255, 90, 31, 0.55); transform: translateY(-2px); }
.cta-arrow { transition: transform 0.3s var(--ease2); }
.cta:hover .cta-arrow { transform: translateX(6px); }

/* quote */
.quote {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 24px;
  border-left: 2px solid var(--ember);
}
.quote-text {
  font-family: var(--font-d);
  font-size: clamp(1.05rem, 2.6vw, 1.4rem);
  line-height: 1.7;
  color: var(--ink);
}
.quote-text em { color: var(--ember2); font-style: italic; }
.quote-mark { font-family: var(--font-d); font-size: 2.4rem; color: var(--ember); line-height: 0.4; }
.quote-attr { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.3em; color: var(--dim); }

/* section titles */
h2.flame {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2.2rem, 6.4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
}
.sec-line {
  width: min(220px, 46vw);
  height: 2px;
  background: linear-gradient(90deg, var(--ember), var(--gold), transparent);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
}
.page.is-active.go .sec-line { animation: secline 0.8s var(--ease2) 0.15s both; }
@keyframes secline {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; transform: scaleX(1); }
}
.page-desc { max-width: 560px; font-size: 1rem; line-height: 1.8; color: var(--dim); }

/* ==================================================================
   CARDS
   ================================================================== */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.com-card, .sec-card, .bf-card, .chan-card {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.com-card {
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 26px 34px;
  background-color: var(--glass);
  background-image: linear-gradient(115deg, transparent 30%, rgba(255, 158, 79, 0.09) 50%, transparent 70%);
  background-size: 240% 100%;
  background-position: 130% 0;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.35s var(--ease2), border-color 0.35s, box-shadow 0.35s, background-color 0.35s, background-position 0.8s var(--ease);
}
.com-card::before, .com-card::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ember);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.com-card::before { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.com-card::after { bottom: 10px; right: 10px; border-left: none; border-top: none; }
.com-card:hover {
  transform: translateY(-6px);
  border-color: var(--ember);
  background-color: var(--glass2);
  background-position: -30% 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 30px rgba(255, 90, 31, 0.12);
}
.com-card:hover::before, .com-card:hover::after { opacity: 1; }
.com-card b {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: 0.03em;
}
.com-card b small { font-size: 0.55em; color: var(--ember2); letter-spacing: 0.2em; vertical-align: middle; }
.com-card span { font-size: 0.85rem; color: var(--dim); line-height: 1.6; }
.com-card em { font-family: var(--font-m); font-style: normal; font-size: 10px; letter-spacing: 0.25em; color: var(--ember2); margin-top: auto; }
.com-card .cc {
  position: absolute;
  top: 14px;
  right: 14px;
  font-family: var(--font-m);
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(255, 90, 31, 0.55);
  border: 1px solid rgba(255, 90, 31, 0.3);
  padding: 4px 8px;
  background: rgba(255, 90, 31, 0.06);
}
.com-card:hover .cc { color: var(--gold); border-color: var(--gold); }
.com-card b { padding-right: 64px; }
.com-card.denied { animation: denied 0.4s var(--ease); }
@keyframes denied {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(3px); }
}

/* secretariat */
.sec-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  background-color: var(--glass);
  background-image: linear-gradient(115deg, transparent 30%, rgba(255, 158, 79, 0.09) 50%, transparent 70%);
  background-size: 240% 100%;
  background-position: 130% 0;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.35s var(--ease2), border-color 0.35s, box-shadow 0.35s, background-position 0.8s var(--ease);
}
.sec-card:hover { transform: translateY(-6px); border-color: var(--ember); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); background-position: -30% 0; }
.sec-ava {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  border: 1px solid var(--line);
  background: radial-gradient(80% 80% at 50% 30%, rgba(255, 158, 79, 0.16), transparent 70%);
  box-shadow: 0 0 18px rgba(255, 90, 31, 0.15);
  margin-bottom: 4px;
}
.sec-name { font-family: var(--font-m); font-size: 12px; letter-spacing: 0.3em; }
.sec-card b { font-family: var(--font-d); font-weight: 700; font-size: 1.18rem; line-height: 1.4; }
.sec-card .clearance { margin-top: auto; padding-top: 12px; }
.clearance { font-family: var(--font-m); font-style: normal; font-size: 9.5px; letter-spacing: 0.28em; }
.c-omega { color: var(--blood); }
.c-alpha { color: var(--ember2); }
.c-beta { color: var(--gold); }
.c-gamma { color: var(--dim); }
.sec-note {
  display: inline-block;
  margin-top: 22px;
  padding: 10px 18px;
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--gold);
  border: 1px solid rgba(255, 207, 92, 0.35);
  background: rgba(255, 207, 92, 0.05);
  border-radius: 2px;
}

/* briefing */
.bf-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  background-color: var(--glass);
  background-image: linear-gradient(115deg, transparent 30%, rgba(255, 158, 79, 0.09) 50%, transparent 70%);
  background-size: 240% 100%;
  background-position: 130% 0;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.35s var(--ease2), border-color 0.35s, box-shadow 0.35s, background-position 0.8s var(--ease);
}
.bf-card:hover { transform: translateY(-6px); border-color: var(--ember); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); background-position: -30% 0; }
.bf-card em { font-family: var(--font-m); font-style: normal; font-size: 10px; letter-spacing: 0.3em; color: var(--ember2); }
.bf-card b { font-family: var(--font-d); font-weight: 700; font-size: 1.12rem; }
.bf-card p { font-size: 0.86rem; line-height: 1.7; color: var(--dim); }
.bf-card .bf-tag {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--font-m);
  font-style: normal;
  font-size: 8.5px;
  letter-spacing: 0.32em;
}
.bf-tag.t-omega { color: var(--blood); }
.bf-tag.t-alpha { color: var(--ember2); }
.bf-tag.t-beta { color: var(--gold); }
.bf-tag.t-gamma { color: var(--dim); }
.bf-card .bf-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  vertical-align: 1px;
}

/* redaction */
.redact, .redact-lg {
  letter-spacing: 0.1em;
  color: var(--redact);
  user-select: none;
}
.redact { background: var(--redact-lg); border-radius: 2px; }
.redact:hover, .redact-lg:hover { animation: glitch 0.28s steps(2) infinite; }

/* glitch (kickers + redacted intel) */
@keyframes glitch {
  0% { transform: translate(0, 0); text-shadow: none; }
  25% { transform: translate(-1.5px, 1px); text-shadow: 2px 0 var(--ember), -2px 0 var(--gold); }
  50% { transform: translate(1.5px, -1px); text-shadow: -2px 0 var(--ember), 2px 0 var(--gold); }
  75% { transform: translate(-1px, -1px); text-shadow: 1px 0 var(--gold), -1px 0 var(--ember); }
  100% { transform: translate(0, 0); text-shadow: none; }
}

/* ==================================================================
   DIRECT CHANNELS (contact)
   ================================================================== */

.chan-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  max-width: 640px;
}
.chan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background-color: var(--glass);
  background-image: linear-gradient(115deg, transparent 30%, rgba(255, 158, 79, 0.09) 50%, transparent 70%);
  background-size: 240% 100%;
  background-position: 130% 0;
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.35s var(--ease2), border-color 0.35s, box-shadow 0.35s, background-position 0.8s var(--ease);
}
.chan-card:hover { transform: translateY(-4px); border-color: var(--ember); box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4); background-position: -30% 0; }
.chan-card em { font-family: var(--font-m); font-style: normal; font-size: 10px; letter-spacing: 0.3em; color: var(--ember2); }
.chan-card b { font-family: var(--font-m); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.05em; word-break: break-all; }
.chan-card i { font-family: var(--font-m); font-style: normal; font-size: 9px; letter-spacing: 0.28em; color: var(--dim); }

/* cursor spotlight on cards (desktop only) */
@media (hover: hover) and (pointer: fine) {
  .com-card, .sec-card, .bf-card, .chan-card {
    background-image:
      radial-gradient(300px circle at calc(var(--mx, 0.5) * 100%) calc(var(--my, 0.5) * 100%), rgba(255, 158, 79, 0.13), transparent 65%),
      linear-gradient(115deg, transparent 30%, rgba(255, 158, 79, 0.09) 50%, transparent 70%);
    background-size: auto, 240% 100%;
    background-position: calc(var(--mx, 0.5) * 100%) calc(var(--my, 0.5) * 100%), 130% 0;
  }
  .com-card:hover, .sec-card:hover, .bf-card:hover, .chan-card:hover {
    background-position: calc(var(--mx, 0.5) * 100%) calc(var(--my, 0.5) * 100%), -30% 0;
  }
}

/* ==================================================================
   PAPER (itinerary)
   ================================================================== */

.paper {
  position: relative;
  max-width: 760px;
  padding: 30px 30px 18px;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: var(--shadow), 0 2px 0 rgba(255, 255, 255, 0.06) inset;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}
.paper-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(36, 22, 16, 0.2);
}
.paper-emblem {
  font-size: 1.2rem;
  color: var(--ember);
}
.paper-title {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--paper-dim);
}
.paper-sign {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 0 8px;
  border-top: 1px solid rgba(36, 22, 16, 0.2);
  font-family: var(--font-m);
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--paper-dim);
}
.paper-finger {
  font-size: 1.1rem;
  color: var(--blood);
  transform: rotate(-8deg);
}
.paper-seal {
  position: absolute;
  top: 22px;
  right: 26px;
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--blood);
  border: 2px solid var(--blood);
  padding: 6px 10px;
  transform: rotate(6deg);
  opacity: 0.75;
  border-radius: 3px;
}
.it-row {
  display: grid;
  grid-template-columns: 84px 1fr auto auto;
  gap: 14px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px dashed rgba(36, 22, 16, 0.25);
}
.it-row:last-of-type { border-bottom: none; }
.it-day { font-family: var(--font-m); font-size: 11px; letter-spacing: 0.2em; color: var(--ember); font-weight: 700; }
.it-row b { font-family: var(--font-d); font-weight: 700; font-size: 1.1rem; }
.it-row em { font-family: var(--font-m); font-style: normal; font-size: 10px; letter-spacing: 0.18em; color: var(--paper-dim); }
.it-row i { font-family: var(--font-m); font-style: normal; font-size: 10px; letter-spacing: 0.2em; color: rgba(36, 22, 16, 0.4); }
.it-note {
  padding: 14px 0 6px;
  font-family: var(--font-m);
  font-size: 9.5px;
  letter-spacing: 0.3em;
  color: var(--paper-dim);
}
.it-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 42px 0 34px;
  text-align: center;
}
.it-soon em {
  font-family: var(--font-m);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--paper-dim);
}
.it-soon b {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  background: linear-gradient(120deg, var(--blood) 0%, var(--ember) 55%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: int-word-slam 0.7s var(--whip) both;
}
.it-soon span {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: rgba(36, 22, 16, 0.55);
}

/* ==================================================================
   FORMS
   ================================================================== */

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 460px;
  counter-reset: field;
}
.form label {
  font-family: var(--font-m);
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--dim);
  margin-top: 10px;
  counter-increment: field;
}
.form label::before {
  content: "0" counter(field) " // ";
  color: var(--ember);
}
.form label:first-child { counter-reset: field 0; }
.form input, .form textarea {
  font-family: var(--font-b);
  font-size: 1rem;
  color: var(--ink);
  background: var(--input);
  border: 1px solid var(--border);
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  resize: vertical;
}
.form input:focus, .form textarea:focus {
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.15);
  background: var(--glass);
}
.form input::placeholder, .form textarea::placeholder { color: var(--placeholder); }
.btn-submit {
  align-self: flex-start;
  margin-top: 16px;
  padding: 16px 30px;
  background: linear-gradient(100deg, var(--flame-c), var(--ember) 55%, var(--flame-b));
  color: #160a04;
  font-family: var(--font-m);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3em;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: 0 12px 40px rgba(255, 90, 31, 0.35);
  transition: filter 0.3s, transform 0.3s var(--ease2), box-shadow 0.3s;
}
.btn-submit:hover:not(:disabled) { filter: brightness(1.12); transform: translateY(-2px); box-shadow: 0 16px 54px rgba(255, 90, 31, 0.55); }
.btn-submit:disabled { filter: grayscale(0.5) brightness(0.7); cursor: wait; }
.form-status {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--ember2);
}
.form-success { max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.stamp {
  align-self: flex-start;
  font-family: var(--font-m);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--ember);
  border: 3px solid var(--ember);
  padding: 10px 16px;
  transform: rotate(-4deg);
  box-shadow: 0 0 24px rgba(255, 90, 31, 0.25);
}
.form-success p { font-size: 0.95rem; line-height: 1.8; color: var(--dim); }
.reg-closed { max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.reg-closed p { font-size: 0.95rem; line-height: 1.8; color: var(--dim); }
.reg-closed a { color: var(--ember); border-bottom: 1px solid var(--line); }

/* ==================================================================
   FOOTER
   ================================================================== */

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 18;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px clamp(20px, 4vw, 56px);
  background: linear-gradient(to top, rgba(5, 3, 2, 0.85), transparent);
  font-family: var(--font-m);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: var(--dim);
  pointer-events: none;
}
body.theme-light .site-footer { background: linear-gradient(to top, rgba(243, 231, 216, 0.9), transparent); }
.sys-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
  animation: dotpulse 2.4s ease-in-out infinite;
}
.footer-audio { color: rgba(255, 90, 31, 0.75); }
.footer-tc { color: rgba(255, 90, 31, 0.6); }
.footer-copy { margin-left: auto; }
.footer-brand { color: rgba(255, 207, 92, 0.6); }

/* ==================================================================
   CREDITS TICKER
   ================================================================== */

.marquee {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 42px;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.55;
  border-top: 1px solid var(--border);
  background: linear-gradient(to top, var(--bg2), transparent);
  padding: 9px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-track span {
  font-family: var(--font-m);
  font-size: 9px;
  letter-spacing: 0.42em;
  color: var(--dim);
  white-space: nowrap;
  padding-right: 44px;
  animation: tickglitch 9s linear infinite;
}
@keyframes tickglitch {
  0%, 86%, 100% { filter: none; }
  88% { filter: hue-rotate(-35deg) saturate(4) brightness(1.7); }
  90% { filter: none; }
  92% { filter: hue-rotate(35deg) saturate(2.4) brightness(0.75); }
  94% { filter: none; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ==================================================================
   CURSOR
   ================================================================== */

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: var(--gold);
  box-shadow: 0 0 12px var(--ember);
}
.cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1.5px solid rgba(255, 90, 31, 0.7);
  transition: transform 0.25s var(--ease2), opacity 0.3s;
}
.cursor-ring.big { transform: scale(1.8); }
body.cursor-on .cursor-dot, body.cursor-on .cursor-ring { opacity: 1; }
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* boot diagnostics */
.boot-log {
  position: fixed;
  right: 8px;
  bottom: 34px;
  z-index: 99;
  font-family: var(--font-m);
  font-size: 9px;
  letter-spacing: 0.12em;
  color: rgba(255, 158, 79, 0.55);
  background: rgba(5, 3, 2, 0.7);
  border: 1px solid rgba(255, 90, 31, 0.25);
  border-radius: 4px;
  padding: 5px 8px;
  pointer-events: none;
  white-space: nowrap;
}

/* ==================================================================
   RESPONSIVE
   ================================================================== */

@media (max-width: 1020px) {
  .reel-tape { display: none; }
  .nav-links { display: none; }
  .menu-btn { display: flex; }
}
@media (max-width: 820px) {
  .page { padding: 12vh 6vw 12vh; }
  .paper-seal { top: 14px; right: 14px; }
  .it-row { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }
  .it-row em, .it-row i { margin-left: 0; }
  .footer-copy { display: none; }
  .footer-tc { display: none; }
  .marquee { bottom: 30px; }
  .stat-row { gap: 22px; }
}
@media (max-width: 520px) {
  .grid-cards { grid-template-columns: 1fr; }
  .nav { padding: 12px 16px; }
  .site-footer { padding: 10px 16px; flex-wrap: wrap; }
  .footer-audio { display: none; }
  .marquee { display: none; }
}

/* ==================================================================
   REDUCED MOTION
   ================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .noise { animation: none; }
}

/* ==================================================================
   FAILSAFE — content is visible by default; only auto-dismiss the
   cover screens if JS dies mid-flight. Never a blank screen.
   ================================================================== */

.preloader { animation: fail-hide 0.01s linear 4.5s forwards; }
.intro { animation: fail-hide 0.01s linear 9s forwards; }
@keyframes fail-hide {
  to { visibility: hidden; }
}
