/* =========================================================
   GHOSTS OF PYRO — style
   Palette pulled from the emblem: ash black, bone white, blood red
   ========================================================= */
:root {
  --bg: #070506;
  --bg-2: #0e0a0b;
  --panel: rgba(20, 12, 13, .72);
  --line: rgba(255, 255, 255, .08);
  --bone: #e9e4df;
  --ash: #9a9390;
  --dim: #5d5655;
  --red: #d4202c;
  --red-2: #ff3b3b;
  --ember: #ff6a2b;
  --glow: rgba(212, 32, 44, .55);
  --font-display: "Saira Stencil One", "Rajdhani", sans-serif;
  --font-body: "Rajdhani", system-ui, sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--red); color: #fff; }

.mono { font-family: var(--font-mono); letter-spacing: .08em; }
.red { color: var(--red-2); text-shadow: 0 0 24px var(--glow); }
.outline { -webkit-text-stroke: 1.5px var(--bone); color: transparent; }
.small { font-size: 12px; }
.center { text-align: center; }
.container { width: min(1240px, 100%); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 2; }

/* ---------- global FX ---------- */
.fx-scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.fx-noise {
  position: fixed; inset: -50%; pointer-events: none; z-index: 91; opacity: .06;
  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='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: noise 1s steps(6) infinite;
}
@keyframes noise {
  0% { transform: translate(0,0) } 20% { transform: translate(-5%,3%) } 40% { transform: translate(3%,-6%) }
  60% { transform: translate(-7%,1%) } 80% { transform: translate(4%,5%) } 100% { transform: translate(0,0) }
}
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 120;
  background: linear-gradient(90deg, var(--red), var(--ember));
  box-shadow: 0 0 12px var(--glow);
}

/* ---------- cursor ---------- */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 200; opacity: 0; }
.cursor {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid rgba(255,59,59,.6); border-radius: 50%;
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), border-color .3s, background .3s;
}
.cursor span::before, .cursor span::after {
  content: ""; position: absolute; background: var(--red-2);
}
.cursor span::before { left: 50%; top: -6px; width: 1px; height: 6px; box-shadow: 0 44px 0 var(--red-2); }
.cursor span::after { top: 50%; left: -6px; height: 1px; width: 6px; box-shadow: 44px 0 0 var(--red-2); }
.cursor-dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; background: var(--red-2); border-radius: 50%; box-shadow: 0 0 8px var(--red-2); }
.cursor.hover { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(212,32,44,.1); border-color: var(--red-2); }
.cursor.hover span { display: none; }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button { cursor: none; }
  body.has-cursor .cursor, body.has-cursor .cursor-dot { opacity: 1; }
}

/* ---------- boot ---------- */
#boot {
  position: fixed; inset: 0; z-index: 300; background: #000;
  display: grid; place-items: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
#boot.done { opacity: 0; visibility: hidden; }
.boot-inner { width: min(420px, 86vw); text-align: center; }
.boot-emblem { position: relative; width: 150px; height: 150px; margin: 0 auto 28px; }
.boot-emblem img { position: absolute; inset: 18px; width: calc(100% - 36px); border-radius: 50%; animation: bootPulse 1.6s ease-in-out infinite; }
.boot-ring { position: absolute; inset: 0; width: 100%; animation: spin 3s linear infinite; }
.boot-ring circle { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 60 30 10 30; }
.boot-ring .r2 { stroke: rgba(255,255,255,.25); stroke-dasharray: 4 8; stroke-width: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bootPulse { 50% { filter: drop-shadow(0 0 22px var(--red)) brightness(1.2); } }
.boot-log {
  font-family: var(--font-mono); font-size: 12px; color: var(--ash); text-align: left;
  height: 92px; overflow: hidden; white-space: pre-wrap; line-height: 1.5;
}
.boot-log .ok { color: var(--red-2); }
.boot-bar { height: 2px; background: rgba(255,255,255,.08); margin-top: 14px; overflow: hidden; }
.boot-bar span { display: block; height: 100%; width: 0; background: var(--red-2); box-shadow: 0 0 10px var(--red-2); transition: width .15s; }
.boot-pct { margin-top: 10px; color: var(--red-2); font-size: 13px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 18px var(--gutter);
  transition: background .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7,5,6,.78); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  padding-top: 10px; padding-bottom: 10px; border-color: var(--line);
}
.nav-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 20px; letter-spacing: .06em; line-height: 1; }
.nav-brand img { width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(212,32,44,.5), 0 0 18px rgba(212,32,44,.35); }
.nav-brand small { display: block; font-size: 10px; color: var(--red-2); margin-top: 4px; }
.nav-brand b { color: var(--bone); font-weight: 400; }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a {
  position: relative; padding: 8px 14px; font-weight: 600; font-size: 15px;
  text-transform: uppercase; letter-spacing: .14em; color: var(--ash); transition: color .3s;
}
.nav-links a::before {
  content: attr(data-num); position: absolute; top: -2px; left: 4px;
  font-family: var(--font-mono); font-size: 9px; color: var(--red); opacity: 0; transition: opacity .3s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 1px;
  background: var(--red-2); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
  box-shadow: 0 0 8px var(--red-2);
}
.nav-links a:hover, .nav-links a.active { color: var(--bone); }
.nav-links a:hover::before, .nav-links a.active::before { opacity: 1; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-toggle { display: none; width: 40px; height: 40px; position: relative; }
.nav-toggle span { position: absolute; left: 8px; right: 8px; height: 2px; background: var(--bone); transition: transform .3s, top .3s; }
.nav-toggle span:first-child { top: 14px; } .nav-toggle span:last-child { top: 24px; }
.nav.open .nav-toggle span:first-child { top: 19px; transform: rotate(45deg); }
.nav.open .nav-toggle span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  --c: var(--red);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; font-size: 15px;
  color: #fff; background: var(--c);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
  transition: transform .3s var(--ease), box-shadow .3s; overflow: hidden; isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover::before { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 40px -8px var(--glow); }
.btn-ghost { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--red-2), 0 10px 40px -10px var(--glow); color: #fff; }
.btn-sm { padding: 10px 20px; font-size: 13px; }
.btn-lg { padding: 18px 44px; font-size: 17px; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; min-height: 640px; display: grid; place-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-slides, .hero-video { position: absolute; inset: 0; }
.hero-slides div {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.12); transition: opacity 2s ease, transform 9s linear;
}
.hero-slides div.on { opacity: 1; transform: scale(1); }
.hero-video { opacity: 0; transition: opacity 2s ease; pointer-events: none; overflow: hidden; }
.hero-video.ready { opacity: 1; }
.hero-video iframe, .hero-video video {
  position: absolute; top: 50%; left: 50%; border: 0;
  width: 100vw; height: 56.25vw; min-height: 100vh; min-width: 177.78vh;
  transform: translate(-50%, -50%) scale(1.15);
}
.hero-video video { object-fit: cover; width: 100%; height: 100%; min-width: 0; min-height: 0; transform: translate(-50%,-50%); }
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(7,5,6,.25) 0%, rgba(7,5,6,.75) 65%, rgba(7,5,6,.97) 100%),
    linear-gradient(to bottom, rgba(7,5,6,.6) 0%, transparent 25%, transparent 70%, var(--bg) 100%),
    linear-gradient(0deg, rgba(120,10,15,.25), rgba(120,10,15,.25));
}
.embers { position: absolute; inset: 0; z-index: 1; pointer-events: none; width: 100%; height: 100%; }

.hero-content { position: relative; z-index: 3; text-align: center; padding: 80px var(--gutter) 0; }
.hero-emblem { position: relative; width: clamp(170px, 24vw, 280px); aspect-ratio: 1; margin: 0 auto 22px; will-change: transform; }
.hero-emblem img {
  position: absolute; inset: 9%; width: 82%; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(212,32,44,.4), 0 0 60px rgba(212,32,44,.35), 0 30px 80px rgba(0,0,0,.8);
  animation: float 6s ease-in-out infinite;
}
.emblem-glow { position: absolute; inset: -20%; border-radius: 50%; background: radial-gradient(circle, rgba(212,32,44,.45), transparent 60%); filter: blur(20px); animation: breathe 4s ease-in-out infinite; }
.emblem-orbit { position: absolute; inset: -6%; width: 112%; }
.emblem-orbit circle { fill: none; stroke-width: 1.2; transform-origin: 200px 200px; }
.emblem-orbit .o1 { stroke: rgba(212,32,44,.7); stroke-dasharray: 2 10 40 10; animation: spin 24s linear infinite; }
.emblem-orbit .o2 { stroke: rgba(255,255,255,.18); stroke-dasharray: 120 40; animation: spin 16s linear infinite reverse; }
.emblem-orbit .o3 { stroke: rgba(255,106,43,.35); stroke-dasharray: 1 6; animation: spin 40s linear infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes breathe { 50% { opacity: .55; transform: scale(1.08); } }

.eyebrow { display: inline-flex; align-items: center; gap: 14px; font-size: 13px; color: var(--ash); text-transform: uppercase; }
.eyebrow .dash { width: 36px; height: 1px; background: var(--red-2); box-shadow: 0 0 6px var(--red-2); }

.hero-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 10vw, 148px); line-height: .95; letter-spacing: .04em;
  margin: 12px 0 10px; position: relative;
  background: linear-gradient(180deg, #fff 0%, #cfc6c2 55%, #7d7270 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 30px rgba(0,0,0,.8));
}
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
  -webkit-text-fill-color: currentColor; opacity: 0;
}
.glitch::before { color: var(--red-2); animation: glitchA 5s infinite steps(1); }
.glitch::after { color: #3cf; animation: glitchB 5s infinite steps(1); }
@keyframes glitchA {
  0%, 91%, 100% { opacity: 0; transform: none; clip-path: none; }
  92% { opacity: .8; transform: translate(-6px, 2px); clip-path: inset(10% 0 60% 0); }
  94% { opacity: .8; transform: translate(5px, -2px); clip-path: inset(55% 0 20% 0); }
  96% { opacity: .8; transform: translate(-3px, 0); clip-path: inset(30% 0 45% 0); }
}
@keyframes glitchB {
  0%, 92%, 100% { opacity: 0; transform: none; clip-path: none; }
  93% { opacity: .6; transform: translate(6px, -1px); clip-path: inset(70% 0 5% 0); }
  95% { opacity: .6; transform: translate(-5px, 2px); clip-path: inset(15% 0 70% 0); }
}
.hero-tag { font-family: var(--font-mono); font-size: clamp(15px, 2vw, 22px); letter-spacing: .4em; text-transform: uppercase; color: var(--ash); }
.hero-tag em { font-style: normal; color: var(--red-2); text-shadow: 0 0 18px var(--glow); }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* HUD */
.hud { position: absolute; inset: clamp(70px, 9vh, 96px) var(--gutter) 28px; z-index: 2; pointer-events: none; }
.hud-corner { position: absolute; width: 34px; height: 34px; border-color: rgba(212,32,44,.7); border-style: solid; border-width: 0; }
.hud-corner.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.hud-corner.tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.hud-corner.bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.hud-corner.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }
.hud-read { position: absolute; font-size: 11px; color: rgba(233,228,223,.6); line-height: 1.8; }
.hud-read b { color: var(--bone); font-weight: 400; }
.hud-tl { top: 18px; left: 22px; } .hud-tr { top: 18px; right: 22px; text-align: right; }
.hud-bl { bottom: 18px; left: 22px; } .hud-br { bottom: 18px; right: 22px; text-align: right; }
.blink { animation: blink 1.2s steps(1) infinite; color: var(--red-2); }
@keyframes blink { 50% { opacity: 0; } }
.hud-signal { display: inline-flex; gap: 3px; align-items: flex-end; height: 14px; }
.hud-signal i { width: 3px; background: var(--red-2); animation: sig 1.4s ease-in-out infinite; }
.hud-signal i:nth-child(1){height:30%;animation-delay:0s}.hud-signal i:nth-child(2){height:50%;animation-delay:.1s}
.hud-signal i:nth-child(3){height:70%;animation-delay:.2s}.hud-signal i:nth-child(4){height:85%;animation-delay:.3s}.hud-signal i:nth-child(5){height:100%;animation-delay:.4s}
@keyframes sig { 50% { opacity: .25; } }

.scroll-hint { position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; color: var(--ash); }
.scroll-hint i { width: 1px; height: 46px; background: linear-gradient(var(--red-2), transparent); position: relative; overflow: hidden; }
.scroll-hint i::after { content: ""; position: absolute; left: 0; top: -20px; width: 1px; height: 20px; background: #fff; animation: drip 1.8s var(--ease) infinite; }
@keyframes drip { to { top: 100%; } }

/* video toggle (top nav) */
.video-toggle { position: relative; display: inline-flex; align-items: center; gap: 9px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #fff; padding: 8px 14px; border: 1px solid rgba(255,59,59,.7); background: rgba(212,32,44,.22); box-shadow: 0 0 18px -4px var(--glow), inset 0 0 12px rgba(212,32,44,.25); transition: color .3s, border-color .3s, background .3s, box-shadow .3s; white-space: nowrap; }
.video-toggle:hover { background: rgba(212,32,44,.4); box-shadow: 0 0 26px -2px var(--glow); }
.vt-svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.vt-slash { opacity: 0; transition: opacity .3s; }
.vt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red-2); box-shadow: 0 0 10px var(--red-2); animation: blink 1.4s steps(1) infinite; }
.video-toggle.off { color: var(--ash); border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.05); box-shadow: none; }
.video-toggle.off:hover { color: #fff; border-color: var(--red); background: rgba(212,32,44,.15); }
.video-toggle.off .vt-slash { opacity: 1; }
.video-toggle.off .vt-dot { background: var(--dim); box-shadow: none; animation: none; }

/* ---------- ticker ---------- */
.ticker { position: relative; z-index: 3; overflow: hidden; border-block: 1px solid rgba(212,32,44,.35); background: linear-gradient(90deg, #120708, #1d0a0c, #120708); padding: 16px 0; transform: skewY(-1.5deg); margin: -10px 0 0; }
.ticker-track { display: flex; gap: 40px; width: max-content; animation: ticker 40s linear infinite; font-family: var(--font-display); font-size: clamp(18px, 2.4vw, 28px); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.ticker-track b { color: var(--red-2); font-weight: 400; }
.ticker-track span:nth-child(4n+3) { -webkit-text-stroke: 1px var(--bone); color: transparent; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { position: relative; padding: clamp(90px, 13vw, 170px) 0; overflow: hidden; }
.section-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 820px; }
.section-head.center { margin-inline: auto; text-align: center; }
.sec-num { display: inline-block; font-size: 13px; color: var(--red-2); margin-bottom: 16px; padding-left: 26px; position: relative; }
.sec-num::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 1px; background: var(--red-2); }
.center .sec-num { padding-left: 0; } .center .sec-num::before { display: none; }
.sec-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 6vw, 78px); line-height: 1.02; letter-spacing: .01em; }
.sec-sub { color: var(--ash); font-size: 19px; margin-top: 18px; max-width: 640px; }
.center .sec-sub { margin-inline: auto; }

/* reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- about ---------- */
.about::before { content: ""; position: absolute; right: -20%; top: 10%; width: 60vw; height: 60vw; background: radial-gradient(circle, rgba(212,32,44,.12), transparent 60%); pointer-events: none; }
.about-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.about-text p { color: var(--ash); margin-bottom: 18px; }
.about-text b { color: var(--bone); }
.about-text .lead { font-size: clamp(21px, 2.2vw, 26px); color: var(--bone); line-height: 1.45; font-weight: 500; border-left: 2px solid var(--red-2); padding-left: 20px; }
.tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 7px 14px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--ash); transition: border-color .3s, color .3s; }
.tag:hover { border-color: var(--bone); color: var(--bone); }
.tag-red { border-color: rgba(212,32,44,.6); color: var(--red-2); }

.frame { position: relative; transform-style: preserve-3d; }
.frame img { width: 100%; aspect-ratio: 16/10; object-fit: cover; filter: saturate(1.1) contrast(1.05); box-shadow: 0 40px 80px -20px rgba(0,0,0,.9); }
.frame-scan { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 0%, rgba(255,59,59,.18) 50%, transparent 52%); background-size: 100% 200%; animation: scan 4s linear infinite; mix-blend-mode: screen; pointer-events: none; }
@keyframes scan { from { background-position: 0 -100%; } to { background-position: 0 100%; } }
.frame-label { position: absolute; left: 14px; bottom: -28px; font-size: 11px; color: var(--dim); }
.fc { position: absolute; width: 18px; height: 18px; border: 0 solid var(--red-2); pointer-events: none; z-index: 2; transition: transform .4s var(--ease); }
.fc.tl { top: -8px; left: -8px; border-top-width: 2px; border-left-width: 2px; }
.fc.tr { top: -8px; right: -8px; border-top-width: 2px; border-right-width: 2px; }
.fc.bl { bottom: -8px; left: -8px; border-bottom-width: 2px; border-left-width: 2px; }
.fc.br { bottom: -8px; right: -8px; border-bottom-width: 2px; border-right-width: 2px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(70px, 9vw, 120px); border: 1px solid var(--line); background: rgba(255,255,255,.015); }
.stat { padding: 34px 24px; text-align: center; position: relative; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num { font-family: var(--font-display); font-size: clamp(46px, 6vw, 80px); line-height: 1; background: linear-gradient(180deg, #fff, #8a7f7c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat:last-child .stat-num { background: linear-gradient(180deg, var(--red-2), #7a0d14); -webkit-background-clip: text; background-clip: text; }
.stat-label { margin-top: 8px; font-size: 12px; color: var(--ash); text-transform: uppercase; }

/* ---------- code ---------- */
.code { background: var(--bg-2); }
.code-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .18; filter: grayscale(.3); will-change: transform; }
.code::after { content: ""; position: absolute; inset: 0; background: linear-gradient(var(--bg), transparent 30%, transparent 70%, var(--bg)); pointer-events: none; }
.oaths { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.oath {
  position: relative; padding: 34px 22px 30px; text-align: center;
  background: linear-gradient(180deg, rgba(30,14,16,.85), rgba(12,8,9,.9));
  border: 1px solid var(--line); transform-style: preserve-3d;
  transition: border-color .4s, box-shadow .4s;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.oath::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(212,32,44,.28), transparent 55%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.oath:hover { border-color: rgba(212,32,44,.6); box-shadow: 0 30px 60px -20px var(--glow); }
.oath:hover::before { opacity: 1; }
.oath-num { position: absolute; top: 12px; left: 16px; font-size: 12px; color: var(--red-2); }
.oath-icon { width: 64px; height: 64px; margin: 6px auto 20px; transform: translateZ(40px); }
.oath-icon path, .oath-icon circle { fill: none; stroke: var(--bone); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; transition: stroke .4s; }
.oath-icon .thin { stroke-width: 1; opacity: .6; }
.oath-icon .fill { fill: var(--red-2); stroke: none; }
.oath:hover .oath-icon path:not(.thin), .oath:hover .oath-icon circle:not(.fill) { stroke: var(--red-2); filter: drop-shadow(0 0 6px var(--red-2)); }
.oath h3 { font-family: var(--font-display); font-weight: 400; font-size: 24px; letter-spacing: .06em; text-transform: uppercase; transform: translateZ(30px); }
.oath p { color: var(--ash); font-size: 16px; line-height: 1.5; margin-top: 10px; transform: translateZ(20px); }

/* ---------- ops ---------- */
.ops-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.op { position: relative; border: 1px solid var(--line); background: var(--panel); transform-style: preserve-3d; transition: border-color .4s, box-shadow .4s; }
.op:hover { border-color: rgba(212,32,44,.55); box-shadow: 0 40px 80px -30px var(--glow); }
.op-img { height: 280px; background-size: cover; background-position: center; position: relative; overflow: hidden; transition: background-size .8s var(--ease); }
.op-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(14,8,9,.95)); }
.op:hover .op-img { filter: saturate(1.25); }
.op-body { padding: 0 32px 34px; margin-top: -60px; position: relative; z-index: 1; transform: translateZ(30px); }
.op-tag { font-size: 11px; color: var(--red-2); }
.op h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.1; margin: 6px 0 12px; }
.op p { color: var(--ash); }
.op-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 12px; color: var(--bone); text-transform: uppercase; }
.op-list li::before { content: "▸ "; color: var(--red-2); }

/* ---------- roster ---------- */
.roster { background: radial-gradient(ellipse at 50% 0%, rgba(212,32,44,.1), transparent 60%), var(--bg); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 36px; }
.filter { padding: 9px 18px; border: 1px solid var(--line); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: 14px; color: var(--ash); transition: all .3s; }
.filter span { color: var(--dim); margin-left: 6px; font-size: 12px; }
.filter:hover { color: var(--bone); border-color: rgba(255,255,255,.3); }
.filter.active { color: #fff; border-color: var(--red); background: rgba(212,32,44,.15); box-shadow: inset 0 0 20px rgba(212,32,44,.2); }
.filter.active span { color: var(--red-2); }

.tier-label { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; margin: 18px 0 2px; font-family: var(--font-mono); font-size: 12px; color: var(--ash); letter-spacing: .2em; text-transform: uppercase; }
.tier-label::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(212,32,44,.5), transparent); }
.tier-label b { color: var(--red-2); font-weight: 400; }

.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.member {
  position: relative; display: flex; gap: 18px; align-items: center; padding: 20px;
  background: linear-gradient(135deg, rgba(28,14,16,.9), rgba(10,7,8,.92));
  border: 1px solid var(--line); overflow: hidden;
  transition: transform .5s var(--ease), border-color .4s, box-shadow .4s, opacity .8s var(--ease);
  transform-style: preserve-3d;
}
.member.hide { display: none; }
.member::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 40%, rgba(255,59,59,.12) 50%, transparent 60%); transform: translateX(-100%); transition: transform .9s var(--ease); pointer-events: none; }
.member:hover { border-color: rgba(212,32,44,.6); box-shadow: 0 20px 50px -20px var(--glow); }
.member:hover::before { transform: translateX(100%); }
.member .fc { width: 10px; height: 10px; opacity: 0; }
.member .fc.tl { top: 6px; left: 6px; } .member .fc.br { bottom: 6px; right: 6px; }
.member:hover .fc { opacity: 1; }
.m-avatar { position: relative; flex: none; width: 78px; height: 78px; }
.m-avatar img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4) contrast(1.1); transition: filter .4s; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.member:hover .m-avatar img { filter: none; }
.m-avatar::after { content: ""; position: absolute; inset: -4px; border: 1px solid rgba(212,32,44,.4); clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); pointer-events: none; }
.m-ghost { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #2a1517, #0c0708); clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.m-ghost svg { width: 62%; opacity: .75; }
.m-info { min-width: 0; flex: 1; }
.m-name { font-weight: 700; font-size: 21px; letter-spacing: .03em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-handle { font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.m-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.m-stars { display: flex; gap: 3px; }
.m-stars i { width: 11px; height: 11px; background: rgba(255,255,255,.1); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.m-stars i.on { background: var(--red-2); box-shadow: 0 0 6px var(--red-2); }
.m-rank { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; color: var(--ash); }
.m-role { position: absolute; top: 10px; right: 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; padding: 2px 7px; border: 1px solid rgba(212,32,44,.55); color: var(--red-2); background: rgba(212,32,44,.08); }
.member.chief { border-color: rgba(212,32,44,.35); background: linear-gradient(135deg, rgba(60,14,18,.9), rgba(14,7,8,.95)); }

/* ---------- gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 15vw; gap: 8px; padding: 0 8px; }
.g-item { position: relative; overflow: hidden; cursor: zoom-in; background: #111; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; filter: grayscale(.35) brightness(.85); }
.g-item:hover img { transform: scale(1.08); filter: none; }
.g-item::after { content: attr(data-label); position: absolute; left: 12px; bottom: 10px; font-family: var(--font-mono); font-size: 11px; color: #fff; letter-spacing: .14em; opacity: 0; transform: translateY(8px); transition: all .4s var(--ease); text-shadow: 0 1px 4px #000; }
.g-item::before { content: ""; position: absolute; inset: 0; z-index: 1; box-shadow: inset 0 0 0 0 var(--red-2); transition: box-shadow .4s; pointer-events: none; }
.g-item:hover::after { opacity: 1; transform: none; }
.g-item:hover::before { box-shadow: inset 0 0 0 2px var(--red-2); }
.g-item.w2 { grid-column: span 2; } .g-item.w3 { grid-column: span 3; } .g-item.w4 { grid-column: span 4; } .g-item.h2 { grid-row: span 2; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 250; background: rgba(0,0,0,.94); display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s; backdrop-filter: blur(6px); }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 92vw; max-height: 86vh; box-shadow: 0 0 0 1px rgba(212,32,44,.4), 0 30px 80px #000; transform: scale(.94); transition: transform .5s var(--ease); }
.lightbox.open img { transform: none; }
.lb-close { position: absolute; top: 20px; right: 24px; font-size: 26px; color: var(--ash); }
.lb-close:hover { color: var(--red-2); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 64px; color: var(--ash); padding: 20px; line-height: 1; }
.lb-nav:hover { color: var(--red-2); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--ash); }

/* ---------- trailer ---------- */
.trailer-frame { position: relative; aspect-ratio: 16/9; max-width: 1080px; margin: 0 auto; background: #000; box-shadow: 0 50px 100px -30px rgba(0,0,0,.9), 0 0 0 1px var(--line); }
.trailer-poster { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.55) saturate(1.1); transition: filter .6s, transform 1.2s var(--ease); }
.trailer-frame:hover .trailer-poster { filter: brightness(.7) saturate(1.3); }
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }
.play { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.play svg { width: clamp(80px, 10vw, 120px); transition: transform .5s var(--ease); filter: drop-shadow(0 0 24px var(--glow)); }
.play circle { fill: rgba(212,32,44,.15); stroke: var(--red-2); stroke-width: 1.5; stroke-dasharray: 260 30; transform-origin: 50px 50px; animation: spin 10s linear infinite; }
.play path { fill: #fff; }
.play:hover svg { transform: scale(1.12); }
.play span { font-size: 13px; color: var(--bone); }

/* ---------- join ---------- */
.join { text-align: center; padding: clamp(110px, 16vw, 220px) 0; }
.join-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .3; filter: blur(2px) saturate(1.2); transform: scale(1.1); }
.join::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(7,5,6,.4), var(--bg) 75%); }
.join-emblem { width: 120px; margin: 0 auto 26px; border-radius: 50%; box-shadow: 0 0 60px var(--glow); animation: float 6s ease-in-out infinite; }
.join .hero-actions { margin-top: 40px; }
.join-sid { margin-top: 28px; font-size: 12px; color: var(--dim); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 50px 0 40px; background: #050304; position: relative; z-index: 2; }
.footer-inner { display: grid; gap: 22px; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { width: 54px; border-radius: 50%; }
.footer-brand b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 22px; letter-spacing: .06em; }
.footer-brand span { font-size: 12px; color: var(--red-2); }
.disclaimer { font-size: 14px; color: var(--dim); max-width: 820px; line-height: 1.6; }
.footer .small { color: var(--dim); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .oaths { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 22vw; }
  .g-item.w4, .g-item.w3 { grid-column: span 2; }
}
@media (max-width: 900px) {
  .nav-links {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    background: rgba(5,3,4,.97); opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
  }
  .nav-links a { font-size: 24px; }
  .nav.open .nav-links { opacity: 1; visibility: visible; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-cta { display: none; }
  .about-grid, .ops-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .hud-tr, .hud-br { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .nav-brand span { font-size: 16px; }
  .oaths { grid-template-columns: 1fr 1fr; }
  .oath:last-child { grid-column: span 2; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 42vw; }
  .g-item.w2, .g-item.w3, .g-item.w4 { grid-column: span 2; }
  .g-item.h2 { grid-row: span 1; }
  .hud-read { display: none; }
  .hero-tag { letter-spacing: .2em; }
  .op-body { padding: 0 20px 26px; }
  .roster-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
