/* ───────────────────────────────────────────────────────────────────────────
   magi page — NERV COMMAND-CENTER reskin, v3 (page-scoped: linked only
   from magi.html, after style.css; no other page is touched).

   Palette sourced from the desktop theme files:
   - unit01 (EVA Unit-01): purple #9d6ff0, neon green #9be564
     (~/.config/hypr/themes/unit01/{palette,colors.css})
   - NERV alert blend (docs/logo/README.md, nerv theme): orange #ff8c1a,
     saturated red #e5322d / #ff2b2b — the mAGI brand tittle colors.
   Chrome rules from hyprland.lua / eva-theme: rounding 0, hard 2–3px
   borders, square panels, IosevkaTerm mono, accent-bg selections.
   All HTML is untouched: every tag, number, hex chip, REC dot, cursor
   and telemetry readout below is a CSS pseudo-element or restyle.
   ─────────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #000000;
  --bg-alt: #060309;
  --panel: #050505;
  --panel-edge: #3a2a5e;
  --ink: #f2ecff;
  --ink-dim: #c9bde4;
  --ink-faint: #8f86a3;
  --accent: #9d6ff0;
  --accent-dim: rgba(157, 111, 240, 0.16);
  --eva-green: #9be564;
  --eva-green-dim: rgba(155, 229, 100, 0.12);
  --eva-orange: #ff8c1a;
  --eva-red: #ff2b2b;
  --eva-red-deep: #e5322d;
  --red: #ff2b2b;
  --amber: #ff8c1a;
  --mono: "IosevkaTerm Nerd Font Mono", "SF Mono", ui-monospace,
    "JetBrains Mono", Menlo, Consolas, monospace;
  --display: Impact, "Arial Narrow", "Franklin Gothic Medium",
    "Haettenschweiler", "Oswald", "Arial Black", sans-serif;
  --hazard: repeating-linear-gradient(-45deg,
    var(--eva-orange) 0 14px, #0a0a0a 14px 28px);
  --radius: 0px;
}

html {
  background: #000;
}

body {
  background: #000;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 16px;
}

/* ── CRT: scanlines + vignette over everything (click-through) ─────────── */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  background: repeating-linear-gradient(0deg,
    rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1999;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55) 100%),
    radial-gradient(800px 300px at 50% -60px, rgba(229, 50, 45, 0.08), transparent 70%);
}

::selection {
  background: var(--eva-orange);
  color: #000;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--eva-green);
  text-decoration: underline;
}

code {
  background: var(--accent-dim);
  color: #d3bfff;
}

@keyframes eva-blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes eva-sweep {
  0% { top: -8px; }
  100% { top: 100%; }
}

/* ── nav: black bar, hazard underlay, orange brand ─────────────────────── */

.nav {
  background: rgba(0, 0, 0, 0.94);
  border-bottom: 2px solid var(--eva-orange);
  position: sticky;
}

.nav::after {
  content: "";
  display: block;
  height: 5px;
  background: var(--hazard);
}

.nav__brand {
  color: var(--ink);
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 19px;
}

.nav__logo {
  color: var(--eva-orange);
  filter: drop-shadow(0 0 6px rgba(255, 140, 26, 0.8));
}

.nav__links {
  font-family: var(--mono);
}

.nav__links a {
  color: var(--ink-dim);
  text-transform: uppercase;
  font-size: 12.5px;
  letter-spacing: 0.08em;
}

.nav__links a:hover {
  color: var(--eva-green);
  text-shadow: 0 0 8px rgba(155, 229, 100, 0.7);
}

.nav__links .nav__gh {
  color: #000;
  background: var(--eva-orange);
  padding: 4px 12px;
  font-weight: 700;
}

.nav__links .nav__gh:hover {
  background: var(--eva-green);
  color: #000;
  text-shadow: none;
}

/* ── hero: title card + sweep line + telemetry ─────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--panel-edge);
  padding: 88px 0 0;
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(155, 229, 100, 0.55);
  box-shadow: 0 0 18px 2px rgba(155, 229, 100, 0.35);
  animation: eva-sweep 9s linear infinite;
  pointer-events: none;
}

.hero::after {
  content: "";
  display: block;
  height: 10px;
  margin-top: 64px;
  background: var(--hazard);
}

.hero__kicker {
  color: var(--eva-orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero__kicker a {
  color: var(--eva-orange);
}

.hero__kicker a:hover {
  color: var(--eva-green);
}

.hero__kicker::after {
  content: " ▚ INT.LINK 027 ▚ SYNC 99.98% ▚ PWR NOMINAL";
  color: var(--eva-green);
}

.hero__status {
  color: #000;
  background: var(--eva-red-deep);
  border: 1px solid var(--eva-red);
  padding: 1px 10px;
  font-weight: 700;
  animation: eva-blink 1.4s steps(1) infinite;
}

.hero__title {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.015em;
  font-weight: 400;
  border-left: 10px solid var(--eva-red-deep);
  padding-left: 20px;
  text-shadow: 4px 4px 0 rgba(229, 50, 45, 0.35);
}

.hero__title em {
  color: var(--eva-orange);
  text-shadow: 4px 4px 0 rgba(229, 50, 45, 0.55),
    0 0 30px rgba(255, 140, 26, 0.5);
}

.hero__lead {
  color: var(--eva-green);
  text-shadow: 0 0 12px rgba(155, 229, 100, 0.45);
}

.hero__lead::after {
  content: "▊";
  margin-left: 6px;
  animation: eva-blink 1.1s steps(1) infinite;
}

.hero__sub {
  color: var(--ink-dim);
}

.hero__sub strong {
  color: var(--eva-orange);
}

.hero__actions {
  align-items: stretch;
}

.cmd {
  background: #000;
  border: 2px solid var(--eva-green);
  box-shadow: 0 0 0 1px #000, 0 0 26px rgba(155, 229, 100, 0.22),
    inset 0 0 34px rgba(155, 229, 100, 0.06);
  border-radius: 0;
}

.cmd__prompt {
  color: var(--eva-green);
  text-shadow: 0 0 10px rgba(155, 229, 100, 0.8);
}

.cmd code {
  background: none;
  color: var(--eva-green);
}

.cmd code::after {
  content: " ▊";
  animation: eva-blink 1.1s steps(1) infinite;
}

.cmd__copy {
  border: 1px solid var(--panel-edge);
  color: var(--ink-faint);
  border-radius: 0;
  text-transform: uppercase;
}

.cmd__copy:hover {
  color: #000;
  background: var(--eva-green);
  border-color: var(--eva-green);
}

.btn {
  background: var(--eva-orange);
  border: 2px solid var(--eva-orange);
  color: #000;
  border-radius: 0;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  box-shadow: 5px 5px 0 var(--accent);
}

.btn:hover {
  background: var(--eva-green);
  border-color: var(--eva-green);
  color: #000;
  text-decoration: none;
  filter: none;
  box-shadow: 5px 5px 0 var(--eva-green), 0 0 22px rgba(155, 229, 100, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--eva-green);
  border: 2px solid color-mix(in srgb, var(--eva-green) 65%, transparent);
  box-shadow: none;
}

.btn--ghost:hover {
  border-color: var(--eva-green);
  color: #000;
  background: var(--eva-green);
  box-shadow: 5px 5px 0 var(--accent);
}

.hero__facts {
  color: var(--ink-dim);
  font-size: 14px;
}

.hero__facts li::before {
  content: ">>";
  color: var(--eva-green);
  text-shadow: 0 0 8px rgba(155, 229, 100, 0.7);
}

/* ── sections: numbered title cards, alt bands go full dark ───────────── */

.section {
  border-bottom: 1px solid var(--panel-edge);
  padding: 72px 0;
}

.section--alt {
  background:
    repeating-linear-gradient(0deg, rgba(157, 111, 240, 0.05) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(90deg, rgba(157, 111, 240, 0.05) 0 1px, transparent 1px 52px),
    var(--bg-alt);
  border-top: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
  border-bottom: 3px solid color-mix(in srgb, var(--accent) 65%, transparent);
}

.section__head h2 {
  font-family: var(--display);
  text-transform: uppercase;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-shadow: 3px 3px 0 rgba(157, 111, 240, 0.4);
}

.section__head h2 em {
  color: var(--eva-green);
  text-shadow: 3px 3px 0 rgba(155, 229, 100, 0.25),
    0 0 24px rgba(155, 229, 100, 0.35);
}

.section__head p {
  color: var(--ink-dim);
}

#orchestrator .section__head h2::before {
  content: "PHASE 01 // ";
  color: var(--eva-orange);
  text-shadow: none;
}

#bus .section__head h2::before {
  content: "PHASE 02 // ";
  color: var(--eva-orange);
  text-shadow: none;
}

#bus .section__head h2::after {
  content: " ● LIVE";
  color: var(--eva-red);
  font-size: 0.55em;
  vertical-align: middle;
  animation: eva-blink 1.4s steps(1) infinite;
}

#reflex .section__head h2::before {
  content: "PHASE 03 // ";
  color: var(--eva-orange);
  text-shadow: none;
}

#desktop .section__head h2::before {
  content: "PHASE 04 // ";
  color: var(--eva-orange);
  text-shadow: none;
}

#install .section__head h2::before {
  content: "PHASE 05 // ";
  color: var(--eva-orange);
  text-shadow: none;
}

/* ── demo feed: surveillance frame, REC dot, feed tag ──────────────────── */

.demo {
  position: relative;
  margin: 0;
}

.demo::before {
  content: "◉ FEED 02 // MAGI-OVERVIEW";
  position: absolute;
  top: -15px;
  left: 12px;
  z-index: 2;
  background: var(--eva-orange);
  color: #000;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 12px;
}

.demo::after {
  content: "● REC";
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 2;
  color: var(--eva-red);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(255, 43, 43, 0.9);
  animation: eva-blink 1.2s steps(1) infinite;
}

.demo video,
.demo img {
  border: 2px solid var(--eva-green);
  box-shadow: 0 0 28px rgba(155, 229, 100, 0.14);
  background: #000;
}

.demo figcaption {
  color: var(--ink-faint);
}

/* ── panels: hard 2px borders, corner-tag headers, hex MAGI chips ──────── */

.panel {
  position: relative;
  background: var(--panel);
  border: 2px solid var(--panel-edge);
  border-radius: 0;
  border-top: 2px solid var(--accent);
  padding-top: 34px;
  transition: border-color 120ms ease-in-out, box-shadow 120ms ease-in-out;
}

.panel::before {
  content: "DATA";
  position: absolute;
  top: -15px;
  left: 12px;
  background: var(--accent);
  color: #000;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 12px;
}

.panel:hover {
  border-color: var(--eva-orange);
  border-top-color: var(--eva-orange);
  box-shadow: 0 0 26px rgba(255, 140, 26, 0.22);
}

/* the orchestrator trio: three-hex MAGI motif */
#orchestrator .grid--3 .panel:nth-child(1)::before {
  content: "MELCHIOR-1";
  background: var(--accent);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  padding: 3px 20px 3px 16px;
}

#orchestrator .grid--3 .panel:nth-child(2)::before {
  content: "BALTHASAR-2";
  background: var(--eva-green);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  padding: 3px 20px 3px 16px;
}

#orchestrator .grid--3 .panel:nth-child(3)::before {
  content: "CASPER-3";
  background: var(--eva-orange);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  padding: 3px 20px 3px 16px;
}

.pair .panel:first-child::before {
  content: "OPTICS // AGENT BROWSER";
  background: var(--eva-green);
}

.pair .panel:last-child::before {
  content: "AUDIO // LOCAL VOICE";
  background: var(--eva-orange);
}

.panel__tag {
  color: var(--ink-faint);
  border: 1px solid var(--panel-edge);
  border-radius: 0;
  text-transform: uppercase;
}

.panel__tag--accent {
  color: var(--eva-green);
  border-color: color-mix(in srgb, var(--eva-green) 60%, transparent);
  background: var(--eva-green-dim);
}

.panel h3 {
  color: var(--ink);
}

.panel h3 code {
  color: var(--eva-green);
  background: rgba(155, 229, 100, 0.1);
}

.panel p,
.panel--min p {
  color: var(--ink-dim);
}

.panel p strong,
.panel p em {
  color: var(--eva-orange);
}

/* ── filecards: terminal windows, hazard-ticked title bars ─────────────── */

.filecard {
  background: #000;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 0;
  box-shadow: inset 0 0 40px rgba(157, 111, 240, 0.05);
}

.section--alt .filecard,
.panel .filecard {
  background: #000;
}

.filecard figcaption {
  background: #0d0a14;
  border-bottom: 2px solid var(--accent);
  color: var(--eva-green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filecard figcaption::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 10px;
  margin-right: 10px;
  background: var(--hazard);
  vertical-align: baseline;
}

.filecard pre {
  color: #d9d2ea;
  text-shadow: 0 0 6px rgba(217, 210, 234, 0.25);
}

.tok-dim {
  color: var(--ink-faint);
  text-shadow: none;
}

.tok-h {
  color: #fff;
}

.tok-add,
.tok-ok {
  color: var(--eva-green);
  text-shadow: 0 0 8px rgba(155, 229, 100, 0.6);
}

.tok-del {
  color: var(--eva-red);
  text-shadow: 0 0 8px rgba(255, 43, 43, 0.6);
}

.tok-mod {
  color: var(--eva-orange);
  text-shadow: 0 0 8px rgba(255, 140, 26, 0.6);
}

/* ── pair / checklist / proof: alert + verified readouts ───────────────── */

.pair__plus {
  color: var(--eva-red);
  text-shadow: 0 0 12px rgba(255, 43, 43, 0.7);
}

.pair__caption {
  color: var(--ink-dim);
}

.pair__caption em {
  color: var(--eva-orange);
}

.checklist li {
  color: var(--ink-dim);
}

.checklist li::before {
  content: ">>";
  color: var(--eva-green);
  text-shadow: 0 0 8px rgba(155, 229, 100, 0.7);
}

.checklist li code {
  color: var(--eva-green);
  background: rgba(155, 229, 100, 0.1);
}

.checklist strong {
  color: var(--ink);
  text-transform: uppercase;
  font-size: 0.92em;
  letter-spacing: 0.05em;
}

.agents__note p {
  color: var(--ink-dim);
}

.agents__note em,
.agents__note strong {
  color: var(--eva-orange);
}

.agents__proof {
  border-left: 3px solid var(--eva-green);
  background: linear-gradient(90deg, rgba(155, 229, 100, 0.07), transparent 70%);
  padding: 10px 0 10px 16px;
}

/* ── footer: hazard crown, alert license tag ───────────────────────────── */

.footer {
  color: var(--ink-faint);
  border-top: none;
  padding-top: 0;
}

.footer::before {
  content: "";
  display: block;
  height: 10px;
  margin-bottom: 36px;
  background: var(--hazard);
}

.footer strong {
  color: var(--ink);
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.footer__license {
  color: #000;
  background: var(--eva-red-deep);
  padding: 2px 10px;
  font-weight: 700;
}

.footer__links a {
  text-transform: uppercase;
  font-size: 12.5px;
  letter-spacing: 0.08em;
}

/* ── keyboard focus stays visible on black ─────────────────────────────── */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--eva-green);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero__lead::after,
  .hero__status,
  .cmd code::after,
  .demo::after,
  #bus .section__head h2::after {
    animation: none;
  }
}
