/* ============================================================
   METAL GEAR SOLID — MASTER COLLECTION VERSION
   Classified Tactical Briefing // design system
   ============================================================ */

/* ---------- fonts ---------- */
@font-face {
  font-family: 'Oswald';
  src: url('../fonts/oswald-var-latin.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Share Tech Mono';
  src: url('../fonts/share-tech-mono-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bg: #04070a;
  --bg-2: #070b0e;
  --panel: #0a1210;
  --panel-2: #0d1714;
  --line: rgba(122, 255, 168, 0.16);
  --line-strong: rgba(122, 255, 168, 0.38);
  --phos: #4dff88;
  --phos-dim: #2e9e58;
  --phos-bright: #b8ffd2;
  --amber: #ffb000;
  --red: #ff3b30;
  --ink: #d3ecdc;
  --ink-dim: #83a68f;
  --ink-faint: #57705f;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --hud-h: 44px;
  --maxw: 1240px;
  --ease-snap: cubic-bezier(0.22, 1, 0.36, 1);
}

/* alert palette */
body[data-alert="alert"] {
  --line: rgba(255, 90, 70, 0.22);
  --line-strong: rgba(255, 90, 70, 0.5);
  --phos: #ff5040;
  --phos-dim: #b02a20;
  --phos-bright: #ffc4b8;
  --ink: #f6dcd6;
  --ink-dim: #b08880;
  --ink-faint: #7a564f;
  --panel: #140c0b;
  --panel-2: #1a0e0c;
}

/* stealth camo palette */
body[data-alert="ghost"] {
  --phos: #9fd8ff;
  --phos-dim: #4d7ea3;
  --phos-bright: #e2f3ff;
  --line: rgba(159, 216, 255, 0.18);
  --line-strong: rgba(159, 216, 255, 0.4);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html:focus-within { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s;
}
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: var(--phos); }
::selection { background: var(--phos); color: #021007; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ============================================================
   CRT FX LAYERS
   ============================================================ */
.fx { position: fixed; inset: 0; pointer-events: none; }
.fx--scanlines {
  z-index: 90;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 2px,
    rgba(0, 0, 0, 0.16) 3px, rgba(0, 0, 0, 0.16) 4px
  );
  mix-blend-mode: multiply;
}
.fx--scanlines::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to right,
    transparent 0px, transparent 3px,
    rgba(80, 255, 150, 0.012) 4px
  );
}
.fx--vignette {
  z-index: 91;
  background:
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}
.fx--alertflash {
  z-index: 92;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 40, 20, 0.28), transparent 70%);
  opacity: 0;
  transition: opacity 0.18s;
}
body[data-alert="alert"] .fx--alertflash { animation: alertflash 1.1s steps(2, jump-none) infinite; }
@keyframes alertflash { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* ============================================================
   BOOT OVERLAY
   ============================================================ */
.boot {
  position: fixed; inset: 0; z-index: 200;
  background: #020403;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}
.boot.is-done { opacity: 0; visibility: hidden; }
.boot__screen { width: min(680px, 92vw); }
.boot__log {
  font-family: var(--font-mono);
  color: var(--phos);
  font-size: clamp(11px, 1.6vw, 14px);
  line-height: 1.9;
  min-height: 15em;
  white-space: pre-wrap;
  text-shadow: 0 0 8px rgba(77, 255, 136, 0.5);
}
.boot__log .ok { color: var(--phos-bright); }
.boot__log .warn { color: var(--amber); }
.boot__actions { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.boot__hint { color: var(--ink-faint); font-size: 11px; letter-spacing: 0.18em; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  --btn-bg: transparent;
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.14em;
  color: var(--phos);
  background: var(--btn-bg);
  border: 1px solid var(--line-strong);
  padding: 10px 20px;
  text-decoration: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: color 0.15s, background 0.15s, border-color 0.15s, transform 0.1s;
  overflow: hidden;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(77, 255, 136, 0.25) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.45s var(--ease-snap);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateX(110%); }
.btn:hover { color: var(--phos-bright); border-color: var(--phos); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary { background: rgba(77, 255, 136, 0.09); }
.btn--ghost { color: var(--ink-dim); }
.btn--ghost:hover { color: var(--phos); }
.btn--big { padding: 14px 26px; font-size: 15px; }
.btn--huge { padding: 18px 34px; font-size: clamp(15px, 2.4vw, 20px); letter-spacing: 0.2em; }
.btn__icon { font-size: 0.8em; }

/* ============================================================
   HUD TOP BAR
   ============================================================ */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  height: var(--hud-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: linear-gradient(to bottom, rgba(4, 8, 6, 0.94), rgba(4, 8, 6, 0.75));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
  font-size: 11px;
  letter-spacing: 0.14em;
}
.hud__left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hud__sig { color: var(--phos); animation: blink-sig 1.6s steps(2) infinite; }
@keyframes blink-sig { 50% { opacity: 0.25; } }
.hud__brand { color: var(--ink); white-space: nowrap; }
.hud__brand em { color: var(--ink-dim); font-style: normal; }
.hud__classification {
  position: absolute; left: 50%; transform: translateX(-50%);
  pointer-events: none;
}
.hud__tape {
  display: inline-block;
  padding: 3px 18px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, #151009 10px 20px);
  color: #ffe9b0;
  font-weight: bold;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-shadow: 0 1px 0 #000;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%);
}
.hud__right { display: flex; align-items: center; gap: 14px; }
.hud__codec {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong);
  padding: 4px 10px;
  color: var(--phos);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: background 0.15s, color 0.15s;
}
.hud__codec:hover, .hud__codec:focus-visible { background: rgba(77, 255, 136, 0.12); color: var(--phos-bright); }
.hud__codec-label { font-size: 9px; color: var(--ink-dim); }
.hud__codec-freq { font-size: 13px; text-shadow: 0 0 8px rgba(77, 255, 136, 0.6); }
.hud__clock { color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.hud__state {
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  color: var(--phos);
  font-weight: bold;
}
.hud__state[data-state="alert"] {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  animation: blink-sig 0.5s steps(2) infinite;
}
.hud__state[data-state="ghost"] { color: var(--phos-bright); }

/* ============================================================
   RADAR WIDGET
   ============================================================ */
.radar {
  position: fixed; left: 18px; bottom: 18px; z-index: 110;
  width: 132px; height: 132px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 22, 14, 0.9) 0%, rgba(5, 10, 7, 0.95) 100%);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(77, 255, 136, 0.06);
}
.radar canvas { border-radius: 50%; }
.radar__label {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--phos-dim);
  font-size: 8px; letter-spacing: 0.3em;
  padding: 1px 8px;
}

/* ============================================================
   INFILTRATION PROGRESS
   ============================================================ */
.infil {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 110;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.infil__track {
  width: 4px; height: 180px;
  background: rgba(122, 255, 168, 0.1);
  border: 1px solid var(--line);
}
.infil__bar {
  width: 100%; height: 0%;
  background: linear-gradient(to top, var(--phos-dim), var(--phos));
  box-shadow: 0 0 10px rgba(77, 255, 136, 0.5);
  transition: height 0.15s linear;
}
.infil__pct { font-size: 10px; color: var(--phos); font-variant-numeric: tabular-nums; }
.infil__tag { font-size: 8px; letter-spacing: 0.3em; color: var(--ink-faint); writing-mode: vertical-rl; }

/* ============================================================
   ALERT FAB
   ============================================================ */
.alertfab {
  position: fixed; right: 20px; bottom: 20px; z-index: 115;
  width: 64px; height: 64px;
  border: 2px solid var(--line-strong);
  background: rgba(6, 12, 8, 0.9);
  color: var(--phos);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transition: transform 0.15s, background 0.2s;
}
.alertfab__mark {
  font-family: var(--font-display);
  font-size: 30px; font-weight: 700;
  text-shadow: 0 0 12px currentColor;
}
.alertfab:hover { transform: scale(1.08); background: rgba(77, 255, 136, 0.14); }
.alertfab:active { transform: scale(0.96); }
body[data-alert="alert"] .alertfab {
  background: var(--red);
  color: #fff;
  border-color: #ff8070;
  animation: fab-pulse 0.8s ease-in-out infinite;
}
@keyframes fab-pulse { 50% { transform: scale(1.1); box-shadow: 0 0 30px rgba(255, 60, 40, 0.7); } }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--hud-h) + 40px) 24px 80px;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.55) contrast(1.15) brightness(0.75);
}
.hero__grade {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(4, 8, 6, 0.72) 0%, rgba(4, 10, 6, 0.45) 45%, rgba(3, 6, 4, 0.96) 100%),
    radial-gradient(ellipse at 30% 45%, rgba(30, 120, 60, 0.22), transparent 60%);
  mix-blend-mode: normal;
}
.hero__grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(122, 255, 168, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 255, 168, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 60%, black 30%, transparent 78%);
}
.hero__content { position: relative; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.hero__kicker {
  color: var(--phos);
  letter-spacing: 0.55em;
  font-size: clamp(10px, 1.5vw, 14px);
  margin-bottom: 12px;
  text-shadow: 0 0 14px rgba(77, 255, 136, 0.7);
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 11vw, 148px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: #f2fff6;
  text-shadow: 0 0 34px rgba(77, 255, 136, 0.35), 2px 2px 0 rgba(20, 60, 34, 0.8);
  text-transform: uppercase;
}
.hero__title-line { display: block; position: relative; }
.hero__title-line--solid { color: var(--phos); }
/* glitch layers */
.hero__title-line::before, .hero__title-line::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  opacity: 0;
  pointer-events: none;
}
.hero__title-line::before { color: #39f; transform: translate(-3px, 0); }
.hero__title-line::after { color: #f33; transform: translate(3px, 0); }
.hero.is-in .hero__title-line::before { animation: glitch-a 0.5s steps(3) 0.15s 2; }
.hero.is-in .hero__title-line::after { animation: glitch-b 0.5s steps(3) 0.25s 2; }
@keyframes glitch-a {
  0% { opacity: 0.8; clip-path: inset(12% 0 64% 0); }
  50% { opacity: 0.8; clip-path: inset(58% 0 8% 0); }
  100% { opacity: 0; }
}
@keyframes glitch-b {
  0% { opacity: 0.8; clip-path: inset(66% 0 6% 0); }
  50% { opacity: 0.8; clip-path: inset(8% 0 70% 0); }
  100% { opacity: 0; }
}
.hero__sub { display: flex; align-items: center; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.hero__mclogo {
  width: clamp(190px, 24vw, 250px); height: auto;
  border: 1px solid var(--line);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.55);
}
.hero__version { color: var(--ink-dim); letter-spacing: 0.3em; font-size: 12px; }
.hero__chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  list-style: none;
  margin-top: 26px;
}
.hero__chips li {
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
  padding: 5px 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  background: rgba(4, 10, 6, 0.6);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.hero__chips .chip--positive { color: var(--phos); border-color: var(--phos-dim); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__file { margin-top: 30px; color: var(--ink-faint); font-size: 11px; letter-spacing: 0.22em; }
.hero__scrolldown {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink-faint);
  font-size: 9px; letter-spacing: 0.4em;
}
.hero__scrolldown i {
  width: 1px; height: 42px;
  background: linear-gradient(to bottom, var(--phos), transparent);
  animation: drop 1.8s var(--ease-snap) infinite;
}
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 110px 24px 40px;
}
.section__head {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 40px;
}
.section__num {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  color: var(--phos-dim);
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-transform: uppercase;
}
.section__stamp {
  margin-left: auto;
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 10px;
  letter-spacing: 0.28em;
  padding: 4px 12px;
  transform: rotate(2deg);
}
.section__lead { max-width: 720px; color: var(--ink-dim); margin-bottom: 34px; }
.section__lead b { color: var(--phos); }

/* framed media with corner ticks */
.frame {
  position: relative;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  padding: 6px;
}
.frame::before, .frame::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid var(--phos);
  z-index: 2;
}
.frame::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.frame::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.frame figcaption {
  padding: 8px 4px 2px;
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: 0.24em;
}
.frame video, .frame img { width: 100%; height: auto; }

/* ============================================================
   01 BRIEFING
   ============================================================ */
.briefing__layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  align-items: start;
}
.terminal {
  min-height: 3.2em;
  color: var(--phos);
  font-size: clamp(14px, 1.8vw, 17px);
  text-shadow: 0 0 10px rgba(77, 255, 136, 0.45);
  margin-bottom: 22px;
}
.terminal::after { content: '█'; animation: blink-sig 0.9s steps(2) infinite; }
.briefing__lead { font-size: clamp(16px, 2.2vw, 20px); color: var(--ink); margin-bottom: 16px; }
.briefing__lead strong { color: var(--phos-bright); }
.briefing__body { color: var(--ink-dim); margin-bottom: 30px; }
.briefing__body em { color: var(--amber); font-style: normal; border-bottom: 1px dashed var(--amber); }
.briefing__facts {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.briefing__facts li {
  border: 1px solid var(--line);
  border-top: 2px solid var(--phos-dim);
  background: var(--panel);
  padding: 12px 10px;
  text-align: center;
}
.briefing__facts b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 30px);
  color: var(--phos);
}
.briefing__facts span { font-size: 9px; letter-spacing: 0.18em; color: var(--ink-dim); }
.briefing__media { position: relative; }
.briefing__media video { filter: saturate(0.6) contrast(1.1) brightness(0.9); }
.frame__playhint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px;
  border: 1px solid var(--phos);
  background: rgba(4, 10, 6, 0.72);
  color: var(--phos);
  font-size: 22px;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  transition: transform 0.15s, background 0.15s;
}
.frame__playhint:hover { transform: translate(-50%, -50%) scale(1.1); background: rgba(77, 255, 136, 0.2); }
.frame__playhint.is-hidden { display: none; }
.briefing__ink { margin-top: 26px; max-width: 340px; }
.briefing__ink img { filter: brightness(0.92); }

/* VR missions strip */
.vrstrip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.vrstrip__cell img { aspect-ratio: 16/10; object-fit: cover; filter: saturate(0.8); }

/* ============================================================
   02 DOSSIER
   ============================================================ */
.dossier__tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: -1px;
  position: relative; z-index: 2;
}
.filetab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-width: 168px;
  padding: 12px 18px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom-color: transparent;
  color: var(--ink-dim);
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
  transition: background 0.18s, color 0.18s, transform 0.18s;
  text-align: left;
}
.filetab:hover { color: var(--phos); transform: translateY(-3px); }
.filetab.is-active {
  background: var(--panel-2);
  color: var(--phos);
  border-color: var(--line-strong);
  border-bottom-color: var(--panel-2);
  box-shadow: 0 -6px 18px rgba(77, 255, 136, 0.07);
}
.filetab__no { font-size: 9px; letter-spacing: 0.3em; color: var(--ink-faint); }
.filetab__name { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: 0.06em; }
.filetab__yr { font-size: 10px; color: var(--amber); }
.casefile {
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  padding: clamp(18px, 3vw, 34px);
  animation: file-in 0.4s var(--ease-snap);
}
@keyframes file-in { from { opacity: 0; transform: translateY(14px); } }
.casefile__head {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 14px; margin-bottom: 24px;
}
.casefile__head h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 700; letter-spacing: 0.05em;
  color: var(--phos-bright);
}
.casefile__meta { color: var(--ink-dim); font-size: 11px; letter-spacing: 0.18em; }
.casefile__meta .hl { color: var(--amber); }
.casefile__body {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 30px;
}
.casefile__art img { border: 1px solid var(--line); }
.casefile__intel p { color: var(--ink-dim); margin-bottom: 20px; }
.casefile__intel p b { color: var(--ink); }
.casefile__specs { list-style: none; margin-bottom: 24px; }
.casefile__specs li {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 7px 2px;
  font-size: 12px;
}
.casefile__specs span { color: var(--ink-faint); letter-spacing: 0.2em; }
.casefile__specs b { color: var(--phos); font-weight: normal; text-align: right; }
.casefile__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.casefile__gallery--wide { grid-template-columns: repeat(3, 1fr); }
.thumb {
  position: relative;
  border: 1px solid var(--line);
  padding: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  transition: border-color 0.15s, transform 0.15s;
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.7) brightness(0.85);
  transition: filter 0.2s, transform 0.3s var(--ease-snap);
}
.thumb::after {
  content: '⛶ ENLARGE';
  position: absolute; inset: auto 0 0 0;
  background: rgba(3, 8, 5, 0.85);
  color: var(--phos);
  font-size: 8px; letter-spacing: 0.3em;
  padding: 3px 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.thumb:hover, .thumb:focus-visible { border-color: var(--phos); transform: translateY(-2px); }
.thumb:hover img, .thumb:focus-visible img { filter: saturate(1) brightness(1); transform: scale(1.05); }
.thumb:hover::after, .thumb:focus-visible::after { opacity: 1; }
.dossier__signal {
  margin-top: 34px;
  display: grid;
  grid-template-columns: minmax(260px, 480px) 1fr;
  gap: 24px;
  align-items: center;
}
.signal video { filter: saturate(0.7) contrast(1.1); }
.dossier__note { color: var(--ink-faint); font-size: 12px; letter-spacing: 0.08em; max-width: 420px; }

/* ============================================================
   03 DOCUMENTS
   ============================================================ */
.docs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.doc {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 12px;
  transition: border-color 0.2s, transform 0.2s;
}
.doc:hover, .doc:focus-visible, .doc.is-open { border-color: var(--line-strong); transform: translateY(-4px); }
.doc__img { position: relative; overflow: hidden; margin-bottom: 12px; }
.doc__img img { filter: saturate(0.75); transition: filter 0.25s, transform 0.3s var(--ease-snap); }
.doc:hover .doc__img img, .doc:focus-visible .doc__img img, .doc.is-open .doc__img img { filter: saturate(1); transform: scale(1.04); }
.doc__redact {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(4, 8, 5, 0.88) 0 22%, transparent 22% 26%, rgba(4, 8, 5, 0.88) 26% 55%, transparent 55% 59%, rgba(4, 8, 5, 0.88) 59% 100%);
  transition: opacity 0.35s, transform 0.35s var(--ease-snap);
}
.doc__redact::after {
  content: 'TOP SECRET — HOVER TO DECLASSIFY';
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-4deg);
  border: 2px solid var(--red);
  color: var(--red);
  font-size: 9px; letter-spacing: 0.2em;
  padding: 4px 8px;
  white-space: nowrap;
  background: rgba(5, 2, 2, 0.75);
}
.doc:hover .doc__redact, .doc:focus-visible .doc__redact, .doc.is-open .doc__redact { opacity: 0; transform: translateY(-8%); }
.doc h3 {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 8px;
  min-height: 2.6em;
}
.doc p { color: var(--ink-dim); font-size: 12px; margin-bottom: 10px; min-height: 4.4em; }
.doc__tag {
  display: inline-block;
  border: 1px solid var(--line);
  color: var(--phos-dim);
  font-size: 9px; letter-spacing: 0.26em;
  padding: 3px 8px;
}

/* ============================================================
   04 INTEL BOARD (achievements)
   ============================================================ */
.board__controls { display: flex; gap: 8px; margin-left: auto; }
.btnswitch {
  border: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 10px; letter-spacing: 0.2em;
  padding: 6px 12px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.btnswitch:hover { color: var(--phos); }
.btnswitch.is-on {
  color: #031007;
  background: var(--phos);
  border-color: var(--phos);
  font-weight: bold;
}
.board__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.intel {
  position: relative;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 12px 10px 10px;
  text-align: center;
  transition: transform 0.18s var(--ease-snap), border-color 0.18s, box-shadow 0.18s;
  animation: intel-in 0.35s var(--ease-snap) both;
}
@keyframes intel-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
.intel:hover, .intel:focus-within {
  transform: translateY(-4px);
  border-color: var(--phos);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), 0 0 14px rgba(77, 255, 136, 0.12);
  z-index: 2;
}
.intel__icon {
  width: 64px; height: 64px;
  margin: 0 auto 8px;
  border: 1px solid var(--line-strong);
  object-fit: cover;
  image-rendering: auto;
  filter: saturate(0.85);
}
.intel:hover .intel__icon { filter: saturate(1.1); }
.intel__name {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 600; letter-spacing: 0.03em;
  color: var(--ink);
  min-height: 2.5em;
  display: block;
}
.intel__desc { display: block; font-size: 9px; color: var(--ink-faint); min-height: 3em; letter-spacing: 0.04em; }
.intel__rate { margin-top: 8px; }
.intel__rate-bar { height: 3px; background: rgba(122, 255, 168, 0.12); margin-bottom: 4px; }
.intel__rate-fill { height: 100%; background: var(--phos); box-shadow: 0 0 6px rgba(77, 255, 136, 0.55); }
.intel--rare .intel__rate-fill { background: var(--amber); box-shadow: 0 0 6px rgba(255, 176, 0, 0.55); }
.intel__rate-num { font-size: 10px; color: var(--phos); font-variant-numeric: tabular-nums; }
.intel--rare .intel__rate-num { color: var(--amber); }
.intel__skull {
  position: absolute; top: 5px; right: 6px;
  color: var(--amber);
  font-size: 9px; letter-spacing: 0.1em;
  opacity: 0.85;
}

/* ============================================================
   05 EXTRACTION REPORT
   ============================================================ */
.report__layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: center;
}
.report__verdict { text-align: center; }
.stamp {
  display: inline-block;
  border: 5px double var(--phos);
  color: var(--phos);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0.12em;
  padding: 18px 26px;
  transform: rotate(-7deg);
  text-shadow: 0 0 18px rgba(77, 255, 136, 0.4);
  box-shadow: inset 0 0 26px rgba(77, 255, 136, 0.08);
}
.stamp.slam { animation: stamp-slam 0.5s var(--ease-snap); }
@keyframes stamp-slam {
  0% { transform: rotate(-7deg) scale(2.4); opacity: 0; }
  60% { transform: rotate(-7deg) scale(0.94); opacity: 1; }
  100% { transform: rotate(-7deg) scale(1); }
}
.report__caption { margin-top: 18px; color: var(--ink-faint); font-size: 10px; letter-spacing: 0.3em; }
.report__stats { display: grid; gap: 26px; }
.meter__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.meter__head span { color: var(--ink-dim); font-size: 11px; letter-spacing: 0.22em; }
.meter__head b {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 26px);
  color: var(--phos);
  font-weight: 600;
}
.meter__track {
  height: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 12, 7, 0.8);
  padding: 2px;
}
.meter__fill {
  height: 100%;
  width: 0;
  background: repeating-linear-gradient(-45deg, var(--phos) 0 8px, var(--phos-dim) 8px 16px);
  box-shadow: 0 0 14px rgba(77, 255, 136, 0.35);
  transition: width 1.2s var(--ease-snap);
}
.meter__fill--alt { background: repeating-linear-gradient(-45deg, var(--amber) 0 8px, #8a6200 8px 16px); }
.meter.is-in .meter__fill { width: var(--val); }
.meter__sub { margin-top: 6px; color: var(--ink-faint); font-size: 10px; letter-spacing: 0.2em; }

/* ============================================================
   06 MISSION SPECS
   ============================================================ */
.specs__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.specchip {
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
  padding: 6px 14px;
  font-size: 11px; letter-spacing: 0.16em;
  background: var(--panel);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.specs__toggle { display: flex; gap: 8px; margin-bottom: 18px; }
.specs__panels { position: relative; }
.spectable {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  animation: file-in 0.35s var(--ease-snap);
}
.spectable th, .spectable td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spectable th {
  width: 200px;
  color: var(--phos-dim);
  font-weight: normal;
  font-size: 11px; letter-spacing: 0.24em;
  border-right: 1px dashed var(--line);
}
.spectable td { color: var(--ink); font-size: 13px; }
.spectable tr:last-child th, .spectable tr:last-child td { border-bottom: 0; }
.spectable tr:hover th, .spectable tr:hover td { background: rgba(77, 255, 136, 0.04); }

/* ============================================================
   07 COMMS
   ============================================================ */
.commstable {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
}
.commstable th, .commstable td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.commstable thead th {
  color: var(--phos-dim);
  font-size: 10px; letter-spacing: 0.3em;
  font-weight: normal;
  border-bottom: 1px solid var(--line-strong);
}
.commstable tbody th {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600; letter-spacing: 0.08em;
  color: var(--ink);
  font-size: 15px;
}
.commstable td { color: var(--phos); font-size: 15px; }
.commstable td.hot { color: var(--phos-bright); text-shadow: 0 0 10px rgba(77, 255, 136, 0.6); font-weight: bold; }
.commstable td.cold { color: var(--ink-faint); }
.commstable tbody tr:hover { background: rgba(77, 255, 136, 0.04); }
.comms__note { margin-top: 16px; color: var(--ink-dim); font-size: 12px; }
.comms__note b { color: var(--phos); }

/* ============================================================
   08 OPERATION (CTA)
   ============================================================ */
.operation {
  position: relative;
  max-width: none;
  padding: 130px 24px 120px;
  overflow: hidden;
  text-align: center;
}
.operation__art {
  position: absolute; inset: 0;
  background: url('../img/snake-phosphor.webp') center 20% / min(900px, 96vw) no-repeat;
  opacity: 0.34;
  mask-image: linear-gradient(to bottom, transparent, black 22%, black 70%, transparent);
}
.operation__content { position: relative; max-width: 860px; margin: 0 auto; }
.operation__kicker { color: var(--amber); letter-spacing: 0.5em; font-size: 11px; margin-bottom: 16px; }
.operation__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 88px);
  font-weight: 700;
  color: var(--phos-bright);
  letter-spacing: 0.04em;
  text-shadow: 0 0 30px rgba(77, 255, 136, 0.35);
  margin-bottom: 22px;
}
.operation__lead { color: var(--ink-dim); max-width: 620px; margin: 0 auto 36px; }
.operation__cta { margin-bottom: 22px; }
.operation__platforms { margin-top: 16px; color: var(--ink-faint); font-size: 11px; letter-spacing: 0.34em; }
.mature {
  max-width: 560px;
  margin: 46px auto 0;
  border: 1px solid var(--amber);
  background: rgba(20, 14, 2, 0.5);
  padding: 16px 20px;
  text-align: left;
}
.mature b { color: var(--amber); letter-spacing: 0.24em; font-size: 11px; display: block; margin-bottom: 6px; }
.mature p { color: var(--ink-dim); font-size: 12px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 40px 24px 120px;
  text-align: center;
  background: var(--bg-2);
}
.footer__tape {
  display: inline-block;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 9px; letter-spacing: 0.4em;
  padding: 5px 16px;
  margin-bottom: 24px;
}
.footer__line { color: var(--ink-dim); font-size: 12px; margin-bottom: 12px; }
.footer__line b { color: var(--ink); }
.footer__legal { color: var(--ink-faint); font-size: 10px; max-width: 640px; margin: 0 auto 14px; line-height: 1.8; }
.footer__legal a { color: var(--phos-dim); }
.footer__freq { color: var(--ink-faint); font-size: 10px; letter-spacing: 0.3em; }

/* ============================================================
   VIDEO MODAL
   ============================================================ */
.vmodal { position: fixed; inset: 0; z-index: 160; display: flex; align-items: center; justify-content: center; }
.vmodal[hidden] { display: none; }
.vmodal__backdrop { position: absolute; inset: 0; background: rgba(1, 4, 2, 0.88); backdrop-filter: blur(4px); }
.vmodal__console {
  position: relative;
  width: min(860px, 94vw);
  border: 1px solid var(--line-strong);
  background: #02060a;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(77, 255, 136, 0.08);
  animation: file-in 0.3s var(--ease-snap);
}
.vmodal__head {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}
.vmodal__title { color: var(--phos); font-size: 11px; letter-spacing: 0.26em; }
.vmodal__close { color: var(--ink-dim); font-size: 16px; padding: 4px 8px; }
.vmodal__close:hover { color: var(--red); }
.vmodal__stage { position: relative; background: #000; }
.vmodal__stage video { width: 100%; aspect-ratio: 16 / 9; }
.vmodal__scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,0.14) 3px 4px);
}
.vmodal__controls {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.vmodal__controls button {
  border: 1px solid var(--line-strong);
  color: var(--phos);
  padding: 5px 12px;
  font-size: 11px; letter-spacing: 0.12em;
  transition: background 0.15s;
}
.vmodal__controls button:hover { background: rgba(77, 255, 136, 0.12); }
.vmodal__time { font-size: 11px; color: var(--ink-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vmodal__controls input[type="range"] {
  flex: 1;
  appearance: none; -webkit-appearance: none;
  height: 4px;
  background: rgba(122, 255, 168, 0.18);
  outline-offset: 4px;
}
.vmodal__controls input[type="range"]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--phos);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  cursor: pointer;
}
.vmodal__controls input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border: 0; border-radius: 0;
  background: var(--phos);
  cursor: pointer;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox { position: fixed; inset: 0; z-index: 160; display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(1, 4, 2, 0.92); backdrop-filter: blur(5px); }
.lightbox__stage {
  position: relative;
  max-width: min(1100px, 92vw);
  border: 1px solid var(--line-strong);
  background: #010302;
  padding: 8px;
  animation: file-in 0.25s var(--ease-snap);
}
.lightbox__stage img { max-height: 76vh; width: auto; max-width: 100%; margin: 0 auto; }
.lightbox__cap {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 6px 4px;
  color: var(--ink-dim);
  font-size: 11px; letter-spacing: 0.12em;
}
.lightbox__count { color: var(--phos); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 72px;
  border: 1px solid var(--line-strong);
  background: rgba(4, 10, 6, 0.8);
  color: var(--phos);
  font-size: 18px;
  transition: background 0.15s;
  z-index: 2;
}
.lightbox__nav:hover { background: rgba(77, 255, 136, 0.16); }
.lightbox__nav--prev { left: max(12px, 3vw); }
.lightbox__nav--next { right: max(12px, 3vw); }
.lightbox__close {
  position: absolute; top: 18px; right: 20px;
  color: var(--ink-dim);
  font-size: 22px;
  padding: 8px 12px;
  z-index: 2;
}
.lightbox__close:hover { color: var(--red); }

/* ============================================================
   CODEC OVERLAY
   ============================================================ */
.codec { position: fixed; inset: 0; z-index: 170; display: flex; align-items: center; justify-content: center; background: rgba(1, 5, 2, 0.94); }
.codec[hidden] { display: none; }
.codec__screen {
  width: min(760px, 94vw);
  border: 2px solid var(--line-strong);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(30, 90, 45, 0.25), transparent 60%),
    #04100a;
  padding: 26px clamp(18px, 4vw, 40px) 30px;
  box-shadow: 0 0 60px rgba(77, 255, 136, 0.12), inset 0 0 80px rgba(20, 80, 40, 0.12);
  animation: codec-in 0.4s var(--ease-snap);
}
@keyframes codec-in { from { opacity: 0; transform: scale(1.04); filter: brightness(3); } }
.codec__top { display: flex; align-items: baseline; gap: 18px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.codec__label { color: var(--ink-dim); letter-spacing: 0.4em; font-size: 11px; }
.codec__freq-big {
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 52px);
  font-weight: 700;
  color: var(--phos);
  text-shadow: 0 0 22px rgba(77, 255, 136, 0.65);
  font-variant-numeric: tabular-nums;
}
.codec__close { margin-left: auto; color: var(--ink-dim); font-size: 18px; padding: 6px 10px; }
.codec__close:hover { color: var(--red); }
.codec__faces { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 22px 0; }
.codec__face { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.codec__face canvas { border: 1px solid var(--line); background: #02120a; }
.codec__face span { font-size: 9px; letter-spacing: 0.34em; color: var(--ink-dim); }
.codec__face.is-speaking canvas { border-color: var(--phos); box-shadow: 0 0 16px rgba(77, 255, 136, 0.35); }
.codec__mid { flex: 1; display: flex; justify-content: center; }
.codec__text {
  min-height: 5.2em;
  color: var(--phos-bright);
  font-size: clamp(14px, 2vw, 17px);
  line-height: 1.75;
  text-shadow: 0 0 10px rgba(77, 255, 136, 0.35);
}
.codec__hint { margin-top: 14px; color: var(--ink-faint); font-size: 9px; letter-spacing: 0.3em; text-align: center; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(140%);
  z-index: 180;
  border: 1px solid var(--line-strong);
  background: rgba(4, 10, 6, 0.94);
  color: var(--phos);
  font-size: 12px; letter-spacing: 0.18em;
  padding: 12px 22px;
  transition: transform 0.3s var(--ease-snap);
  pointer-events: none;
  max-width: 92vw;
  text-align: center;
}
.toast.is-show { transform: translateX(-50%) translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
  .board__grid { grid-template-columns: repeat(4, 1fr); }
  .docs__grid { grid-template-columns: repeat(2, 1fr); }
  .radar { width: 104px; height: 104px; left: 12px; bottom: 12px; }
  .radar canvas { width: 104px; height: 104px; }
}
@media (max-width: 860px) {
  .briefing__layout { grid-template-columns: 1fr; }
  .casefile__body { grid-template-columns: 1fr; }
  .casefile__art { max-width: 420px; }
  .report__layout { grid-template-columns: 1fr; gap: 34px; }
  .dossier__signal { grid-template-columns: 1fr; }
  .hud__brand em { display: none; }
  .hud__clock { display: none; }
  .infil { display: none; }
}
@media (max-width: 620px) {
  .board__grid { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 84px 16px 30px; }
  .section__stamp { display: none; }
  .hero { padding-left: 16px; padding-right: 16px; }
  .hero__cta .btn { flex: 1 1 100%; justify-content: center; }
  .radar { display: none; }
  .alertfab { width: 54px; height: 54px; right: 14px; bottom: 14px; }
  .filetab { min-width: 0; flex: 1 1 30%; padding: 10px 12px 8px; }
  .filetab__name { font-size: 13px; }
  .codec__faces { gap: 8px; }
  .lightbox__nav { width: 42px; height: 58px; }
}
@media (max-width: 460px) {
  .board__grid { grid-template-columns: repeat(2, 1fr); }
  .docs__grid { grid-template-columns: 1fr; }
  .briefing__facts { grid-template-columns: repeat(2, 1fr); }
  .hud__classification { display: none; }
  .casefile__gallery, .casefile__gallery--wide { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .hero__video { display: none; }
  .hero__media { background: url('../img/hero-poster.webp') center / cover; }
  body[data-alert="alert"] .fx--alertflash { animation: none; opacity: 0.25; }
}
