:root {
  --bg: #000; --panel: #0d0d0f; --line: #23232a; --text: #ececec; --muted: #9a9aa2;
  --gold: #FFD400; --gold-2: #c9a24a; --teal: #58e6ff; --teal-soft: #9FE8FF; --red: #ff4b3e; --amber: #ffb347;
  --mono: "Courier New", Courier, ui-monospace, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--sans); overflow-x: hidden; }
a { color: var(--teal-soft); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 72px 16px; position: relative; }
h1, h2, h3 { font-family: var(--mono); letter-spacing: .02em; line-height: 1.15; }
h2 { color: var(--gold); font-size: clamp(1.6rem, 4.5vw, 2.6rem); margin: .5rem 0 1rem; text-shadow: 0 0 22px rgba(255, 212, 0, .25); }
h2 small { font-size: .5em; color: var(--muted); text-shadow: none; }
.lede { max-width: 720px; color: #d6d6da; }

/* film grain + scanlines */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07; mix-blend-mode: overlay;
  background-image: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 3px); }

/* ---------- stamps ---------- */
.stamp { display: inline-block; font: 700 .78rem var(--mono); color: #000; background: var(--gold); padding: 5px 12px;
  letter-spacing: .14em; transform: rotate(-2deg); box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--gold); }
.stamp.red { background: var(--red); color: #fff; box-shadow: 0 0 0 2px #000, 0 0 0 3px var(--red); }
/* hidden-until-scrolled only when JS is running with motion on (no JS or reduced motion = everything visible) */
.motion .slam { opacity: 0; transform: scale(2.4) rotate(-12deg); }
.motion .slam.in { animation: slam .45s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes slam { to { opacity: 1; transform: scale(1) rotate(-2deg); } }

/* ---------- reveal on scroll ---------- */
.motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.motion .reveal.in { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100svh; min-height: 560px; display: grid; place-items: end center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, #0c1a22 0%, #000 70%); }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-fallback { position: absolute; top: 18%; width: min(340px, 70%); opacity: 0; transition: opacity .6s; }
.no-webgl .hero-fallback { opacity: 1; }
.hero-copy { position: relative; z-index: 2; text-align: center; padding: 0 16px 13vh; }
.kicker { font: 700 .8rem var(--mono); letter-spacing: .25em; color: var(--teal-soft); margin: 0 0 12px; }
.kicker .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-right: 8px;
  box-shadow: 0 0 10px var(--red); animation: blink 1.4s infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: .2; } }
.neon { font-size: clamp(1.7rem, 6.2vw, 4.2rem); color: #fff6c9; margin: 0; position: relative;
  text-shadow: 0 0 6px #ffd400, 0 0 18px #ffb300, 0 0 42px rgba(255, 170, 0, .7), 0 0 80px rgba(255, 140, 0, .35);
  animation: flicker 6s infinite; }
@keyframes flicker { 0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; } 20%, 63% { opacity: .55; } }
.tag { font: 700 clamp(1.1rem, 3vw, 1.5rem) var(--mono); margin: 14px 0 26px; color: #e8e8e8; }
.tag b { color: var(--teal); text-shadow: 0 0 14px rgba(88, 230, 255, .6); }
.social { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.social a { font: 700 .95rem var(--mono); color: var(--text); text-decoration: none; padding: 11px 18px; border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(0, 0, 0, .45); backdrop-filter: blur(6px); transition: .2s; }
.social a:hover { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 18px rgba(255, 212, 0, .35); }
.scroll-cue { position: absolute; bottom: 18px; z-index: 2; color: var(--muted); text-decoration: none; animation: bob 2s infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- notice ---------- */
.notice { position: relative; background: linear-gradient(135deg, #1b1500, #0b0900); border: 2px solid var(--gold); border-radius: 6px;
  padding: 28px 24px; max-width: 820px; margin: 0 auto; box-shadow: 0 0 60px rgba(255, 212, 0, .12), inset 0 0 40px rgba(255, 212, 0, .05); }
.notice h2 { margin-top: 14px; }
.warn { color: var(--red); font-weight: 700; }
.ca { margin-top: 18px; border: 1px dashed var(--gold); background: #000; padding: 14px; font-family: var(--mono); }
.ca span { display: block; font-size: .72rem; letter-spacing: .2em; color: var(--muted); }
.ca code { font-size: 1.1rem; color: var(--gold); font-weight: 700; overflow-wrap: anywhere; }

/* ---------- reel ---------- */
.reel { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 26px; }
.clip { margin: 0; position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 9 / 13; background: #111; }
.clip video, .agent-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.clip figcaption { position: absolute; inset: auto 0 0 0; padding: 60px 16px 16px; font-size: .95rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .92)); }
.clip figcaption b { display: block; font-family: var(--mono); color: var(--gold); letter-spacing: .08em; }

/* ---------- agents (3D tilt) ---------- */
.agents { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); perspective: 1000px; margin-top: 26px; }
.tilt { transform-style: preserve-3d; transition: transform .15s ease-out, box-shadow .3s; will-change: transform; }
.agent { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.agent:hover { box-shadow: 0 20px 60px rgba(0, 0, 0, .8), 0 0 30px rgba(88, 230, 255, .15); }
.agent.villain:hover { box-shadow: 0 20px 60px rgba(0, 0, 0, .8), 0 0 30px rgba(255, 75, 62, .25); }
.agent-media { aspect-ratio: 4 / 5; overflow: hidden; transform: translateZ(30px); }
.agent-body { padding: 16px 18px 20px; transform: translateZ(45px); }
.file { font: 700 .72rem var(--mono); letter-spacing: .18em; color: var(--muted); margin: 0; }
.agent h3 { color: var(--gold); margin: 4px 0 8px; font-size: 1.3rem; }
.villain h3 { color: var(--red); }
.agent p { margin: 0 0 8px; color: #d2d2d6; }
.quote { font-family: var(--mono); color: var(--teal-soft) !important; }

/* ---------- dossier ---------- */
.dossier { background: #f1e6c8; color: #1d1a12; border-radius: 4px; padding: 30px 26px 22px; position: relative; transform: rotate(-.6deg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .9), 0 0 0 1px #d8c79c inset;
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .025) 0 1px, transparent 1px 28px); }
.dossier h2 { color: #1d1a12; text-shadow: none; }
.dossier-head p { max-width: 760px; }
.charter { padding-left: 1.4rem; font-size: 1.02rem; }
.charter li { margin: 0 0 12px; }
.charter b { font-family: var(--mono); background: #1d1a12; color: var(--gold); padding: 0 6px; }

/* ---------- facts ---------- */
.facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 22px; }
.fact { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 6px; padding: 18px; }
.fact .big { display: block; font: 700 1.5rem var(--mono); color: var(--gold); }
.fact span:last-child { color: #c9c9cf; font-size: .95rem; }

/* ---------- tools ---------- */
.tools { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 22px; perspective: 800px; }
.tool { display: block; text-decoration: none; background: linear-gradient(160deg, #0f1a1e, #070707); border: 1px solid #1d3a44;
  border-radius: 8px; padding: 18px; color: var(--text); }
.tool b { display: block; font-family: var(--mono); color: var(--teal); font-size: 1.1rem; }
.tool span { color: #bfc9cc; font-size: .92rem; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; text-align: center; }
footer .wrap { padding: 48px 16px 70px; }
.foot-logo { width: 150px; height: auto; opacity: .9; }
.never { color: var(--text); font-weight: 700; }
.sig { font-family: var(--mono); color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  html:not(.motion) video { cursor: pointer; }
  html:not(.motion) *, html:not(.motion) *::before, html:not(.motion) *::after { animation: none !important; transition: none !important; }
}
