/* ==========================================================================
   Containment Loss — shared stylesheet
   Two themes: industrial (default, yellow) and breach (red), switched by
   body[data-page="breach"]. Behavior hooks live in data-* attributes;
   presentation lives here.
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset, OFL) ----------
   Served from /assets/fonts instead of Google Fonts: no third-party IP
   leak, tighter CSP (no fonts.googleapis / fonts.gstatic), one less
   network dependency. font-display: swap keeps text visible during load. */
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/chakrapetch-600.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/chakrapetch-700.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 300; font-display: swap; src: url('assets/fonts/spacegrotesk-300.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/spacegrotesk-400.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/spacegrotesk-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/spacegrotesk-700.woff2') format('woff2'); }
@font-face { font-family: 'Inconsolata'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/inconsolata-400.woff2') format('woff2'); }
@font-face { font-family: 'Inconsolata'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/inconsolata-700.woff2') format('woff2'); }

/* ---------- Design tokens ---------- */
:root {
  --font-display: 'Chakra Petch', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'Inconsolata', monospace;

  --bg: #070809;
  --bg-rgb: 7, 8, 9;
  --panel: #0a0c0f;
  --panel-2: #0b0d10;
  --hairline: #1b1e23;
  --edge: #1e2228;
  --edge-2: #23262c;

  --ink: #c7ccd1;
  --ink-2: #cfd4d9;
  --bright: #e6e9ec;
  --copy: #aeb4ba;
  --copy-soft: #99a0a7;
  --muted: #9aa0a6;
  --faint: #7d838a;
  --dim: #7c828a;          /* text-safe: >=4.5:1 on panels (card nums, tags, kickers) */
  --legal: #8f8f98;

  --accent: #FFD300;
  --accent-rgb: 255, 211, 0;
  --on-accent: #0A0A0A;
  --hot: #FFD300;          /* emphasis text; diverges from --accent on breach */
  --num: var(--dim);       /* card index numbers */
  --marker: var(--dim);    /* status-bar tick marks */

  --nav-bg: rgba(8, 9, 11, 0.82);
  --nav-line: rgba(255, 255, 255, 0.07);
  --frame-line: rgba(255, 211, 0, 0.18);
  --frame-line-in: rgba(255, 211, 0, 0.16);
  --legal-line: rgba(43, 43, 43, 0.6);
  --scan-opacity: 0.06;
  --hero-filter: brightness(0.5) contrast(1.05) saturate(0.92);

  /* Motion tokens — one shared deceleration curve, one small duration scale. */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-hover: 0.2s;   /* hover feedback: color, glow, lift */
  --dur-panel: 0.28s;  /* panels: modal, override dial */
}

body[data-page="breach"] {
  --bg: #080606;
  --bg-rgb: 8, 6, 6;
  --panel: #0c0808;
  --panel-2: #0d0808;
  --hairline: #241a1a;
  --edge: #241a1a;
  --edge-2: #2c2020;

  --ink: #cbc2c2;
  --ink-soft: #bdb2b2;
  --bright: #e2dada;
  --copy: #9a8e8e;
  --copy-2: #a9a0a0;
  --copy-soft: #8a7e7e;
  --muted: #b29a9a;
  --faint: #8a7777;
  --dim: #8f7b7b;
  --legal: #9c8d8d;

  --accent: #C62828;
  --accent-rgb: 198, 40, 40;
  --on-accent: #fff;
  --hot: #e85454;
  --num: var(--hot);
  --marker: var(--accent);
  --ghost-line: #3a2a2a;

  --nav-bg: rgba(10, 6, 6, 0.85);
  --nav-line: rgba(198, 40, 40, 0.28);
  --frame-line: rgba(198, 40, 40, 0.28);
  --frame-line-in: rgba(198, 40, 40, 0.22);
  --legal-line: rgba(58, 42, 42, 0.6);
  --scan-opacity: 0.07;
  --hero-filter: brightness(0.46) contrast(1.08) saturate(0.95);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  transition: opacity 0.08s linear; /* CRT flicker (app.js) */
}

::selection { background: var(--accent); color: var(--on-accent); }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--edge-2); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

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

.hot { color: var(--hot); }

/* Visually hidden, still announced by assistive tech. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
header.wrap { position: relative; z-index: 10; padding-top: 26px; }
main.wrap { position: relative; z-index: 10; }

/* ---------- Animations ---------- */
@keyframes scan { 0% { transform: translateY(-60px); } 100% { transform: translateY(560px); } }
@keyframes scan-page { 0% { transform: translateY(-100px); } 100% { transform: translateY(100vh); } }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0.2; } }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes glitch {
  0%, 92%, 100% { transform: translate(0, 0); }
  93% { transform: translate(-2px, 1px); }
  95% { transform: translate(2px, -1px); }
  97% { transform: translate(-1px, 0); }
}
@keyframes markglitch {
  0%, 100% { transform: translate(0, 0); opacity: 1; }
  25% { transform: translate(-1.5px, 1px); opacity: 0.65; }
  50% { transform: translate(1.5px, -1px); opacity: 1; }
  75% { transform: translate(-1px, -1px); opacity: 0.8; }
}

/* ---------- Fixed background FX ---------- */
.backdrop {
  position: fixed;
  inset: -3%;
  width: 106vw;
  height: 106vh;
  background: center / cover no-repeat;
  opacity: 0.1;
  z-index: 0;
  pointer-events: none;
}
/* Backdrop sits at opacity 0.1 under a vignette — 1280w is ample at any viewport. */
body[data-page="home"] .backdrop { background-image: url('assets/Ironclad-1280.webp'); filter: grayscale(0.3); }
body[data-page="breach"] .backdrop { background-image: url('assets/kraken-1280.webp'); filter: grayscale(0.2) brightness(0.8); }

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(0, 0, 0, 0.4) 3px);
  opacity: var(--scan-opacity);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.7) 100%);
}
body[data-page="breach"] .vignette {
  background: radial-gradient(ellipse at center, transparent 42%, rgba(40, 5, 5, 0.55) 100%);
}

/* ---------- Corner brackets ---------- */
.tick {
  position: absolute;
  width: var(--tick-size, 28px);
  height: var(--tick-size, 28px);
  border: 0 solid var(--tick-color, var(--accent));
  pointer-events: none;
}
.tick--tl { left: var(--tick-inset, 15px); top: var(--tick-inset, 15px); border-left-width: 2px; border-top-width: 2px; }
.tick--tr { right: var(--tick-inset, 15px); top: var(--tick-inset, 15px); border-right-width: 2px; border-top-width: 2px; }
.tick--bl { left: var(--tick-inset, 15px); bottom: var(--tick-inset, 15px); border-left-width: 2px; border-bottom-width: 2px; }
.tick--br { right: var(--tick-inset, 15px); bottom: var(--tick-inset, 15px); border-right-width: 2px; border-bottom-width: 2px; }

/* ---------- Top navigation ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 14px 36px;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--nav-line);
}

.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand__mark { width: 30px; height: 30px; }
/* Breadcrumb: the mark destabilizes on hover — "containment loss" made literal,
   a quiet tell for the curious that something here isn't fully contained. */
body[data-page="home"] .brand:hover .brand__mark { animation: markglitch 0.42s steps(2) 1; }
body[data-page="breach"] .brand__mark { width: 34px; height: 34px; filter: drop-shadow(0 0 9px rgba(198, 40, 40, 0.6)); }
.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}
.brand__chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: #fff;
  background: var(--accent);
  padding: 3px 8px;
  margin-left: 4px;
}

.navlinks { display: flex; align-items: center; gap: 30px; }
.navlink {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur-hover) var(--ease-out);
}
.navlink:hover, .navlink:focus-visible { color: var(--hot); }
.navlink--cta {
  color: var(--on-accent);
  background: var(--accent);
  padding: 9px 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
  transition: box-shadow var(--dur-hover) var(--ease-out), filter var(--dur-hover) var(--ease-out), transform var(--dur-hover) var(--ease-out);
}
.navlink--cta:hover, .navlink--cta:focus-visible {
  color: var(--on-accent);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.5);
  filter: brightness(1.08);
}
.navlink--cta:active { transform: translateY(1px); }
.navlink--ghost {
  color: var(--ink);
  border: 1px solid var(--ghost-line, var(--edge-2));
  padding: 8px 16px;
  letter-spacing: 0.14em;
  transition: border-color var(--dur-hover) var(--ease-out), color var(--dur-hover) var(--ease-out);
}
.navlink--ghost:hover, .navlink--ghost:focus-visible { border-color: var(--accent); color: var(--hot); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  border: 1px solid var(--frame-line);
  --tick-size: 28px;
  --tick-inset: 15px;
}
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--hero-filter);
}
.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(var(--bg-rgb), 0.6) 0%,
    rgba(var(--bg-rgb), 0.08) 32%,
    rgba(var(--bg-rgb), 0.55) 64%,
    rgba(var(--bg-rgb), 0.96) 100%);
}
body[data-page="breach"] .hero__shade {
  background: linear-gradient(180deg,
    rgba(var(--bg-rgb), 0.62) 0%,
    rgba(var(--bg-rgb), 0.1) 32%,
    rgba(var(--bg-rgb), 0.6) 64%,
    rgba(var(--bg-rgb), 0.97) 100%);
}
.hero__lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(0, 0, 0, 0.18) 3px);
  opacity: 0.45;
  pointer-events: none;
}
body[data-page="breach"] .hero__lines {
  background: repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(0, 0, 0, 0.2) 3px);
  opacity: 0.5;
}
.hero__beam {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 70px;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.45), transparent);
  opacity: 0.22;
  animation: scan 7.5s linear infinite;
  pointer-events: none;
}
body[data-page="breach"] .hero__beam {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.5), transparent);
  opacity: 0.25;
  animation-duration: 6s;
}
.hero__inset {
  position: absolute;
  inset: 20px;
  border: 1px solid var(--frame-line-in);
  pointer-events: none;
}

.hud {
  position: absolute;
  top: 38px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  line-height: 2;
}
.hud--left { left: 38px; }
.hud--right { right: 38px; text-align: right; }
.hud__dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 2.4s ease-in-out infinite;
}
body[data-page="breach"] .hud__dot { animation-duration: 1.6s; }

.hero__caption { position: absolute; left: 40px; bottom: 46px; right: 40px; }
.hero__kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--hot);
  margin-bottom: 12px;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 74px;
  line-height: 0.92;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.8);
}
body[data-page="breach"] .hero__title {
  text-shadow: 0 0 30px rgba(198, 40, 40, 0.4), 0 4px 28px rgba(0, 0, 0, 0.8);
  animation: glitch 5s steps(1) infinite;
}
.hero__scrollcue {
  position: absolute;
  right: 40px;
  bottom: 52px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-align: center;
  animation: floaty 2.6s ease-in-out infinite;
}
.hero__scrollcue-arrow { margin-top: 6px; font-size: 16px; color: var(--accent); }

.statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 14px 24px;
  border: 1px solid var(--hairline);
  border-top: none;
  background: var(--panel-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--faint);
  text-transform: uppercase;
}
.statusbar .mark { color: var(--marker); }
.statusbar__live { color: var(--hot); animation: blink 1.6s steps(1) infinite; }
body[data-page="breach"] .statusbar__live { animation-duration: 1.4s; }

/* ---------- Sections ---------- */
.sect { padding: 54px 0; }
.sect--intro { padding: 70px 0 20px; }
.sect--last { padding-bottom: 30px; }

.sect__head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.sect__kicker { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.2em; color: var(--hot); }
.sect__rule { flex: 1; height: 1px; background: var(--hairline); }
.sect__tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; color: var(--dim); }

.intro__body { max-width: 860px; }
body[data-page="breach"] .intro__body { max-width: 880px; }
.intro__lede { font-size: 21px; line-height: 1.6; color: var(--ink); margin: 0 0 22px; font-weight: 300; }
.intro__slogan {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--hot);
  margin: 0 0 22px;
}
.intro__sub { font-size: 18px; line-height: 1.65; color: var(--muted); margin: 0; font-weight: 300; }

/* Breach intro variants */
.intro__lede--breach { font-size: 19px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 18px; font-weight: 300; }
.intro__lede--breach .hot { font-weight: 500; }
.intro__sub--breach { font-size: 17px; line-height: 1.7; color: var(--copy); margin: 0 0 18px; font-weight: 300; }
.intro__statement {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 8px;
}
.intro__statement--hot { font-size: 22px; color: var(--hot); margin: 0; }

/* ---------- Pads (framed content blocks) ---------- */
.pad {
  position: relative;
  border: 1px solid var(--edge);
  background: var(--panel);
  padding: 40px 44px;
  --tick-size: 16px;
  --tick-inset: 0px;
}
.pad--tight { padding: 38px 40px; }
.pad--flag { border-left: 3px solid var(--accent); }
.pad--recruit { padding: 42px 44px; background: var(--panel-2); }

.pad p.body-copy { font-size: 17px; line-height: 1.75; color: var(--copy); margin: 0 0 20px; font-weight: 300; }
.pad p.body-copy--end { margin-bottom: 24px; }
.pad--tight p.body-copy { font-size: 16px; margin-bottom: 20px; }
.pad--tight p.body-copy:last-child { margin-bottom: 0; }

.pad__quote {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--bright);
  margin: 0;
  font-weight: 500;
  border-left: 3px solid var(--accent);
  padding-left: 20px;
}
.pad__highlight {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--hot);
  margin: 0 0 20px;
}

/* ---------- Grids & cards ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-2--split { grid-template-columns: 1.5fr 1fr; align-items: stretch; }

.card {
  position: relative;
  border: 1px solid var(--edge-2);
  background: var(--panel);
  transition: transform var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-out), box-shadow var(--dur-hover) var(--ease-out);
  --tick-size: 16px;
  --tick-inset: 0px;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.card--media { overflow: hidden; }
.card--flat { padding: 28px 26px; }
.card .tick { opacity: 0.6; }

.card__media { position: relative; height: 150px; overflow: hidden; border-bottom: 1px solid var(--hairline); }
.card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: brightness(0.52) saturate(0.75) contrast(1.05);
}
.card__media img.focus-45 { object-position: center 45%; }
.card__media img.focus-65 { object-position: center 65%; }
.card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 15, 0.15) 30%, rgba(10, 12, 15, 0.9) 100%);
}
.card__body { padding: 22px 26px 26px; }

.card__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 12px; }
.card--flat .card__head { margin-bottom: 14px; }
.card__num { font-family: var(--font-mono); font-size: 13px; color: var(--num); }
.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}
.card p { font-size: 15px; line-height: 1.65; color: var(--copy-soft); margin: 0; }

/* ---------- Doctrine band (full-bleed) ---------- */
.band {
  position: relative;
  box-sizing: border-box;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 30px;
  padding: 72px 28px;
  background: #0a0b0d;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.band__stripe {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  background: repeating-linear-gradient(45deg,
    rgba(var(--accent-rgb), 0.45) 0, rgba(var(--accent-rgb), 0.45) 14px,
    transparent 14px, transparent 28px);
}
.band__inner { max-width: 1124px; margin: 0 auto; }
.band__kicker { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.28em; color: var(--dim); margin-bottom: 18px; }
.band__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 46px);
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  max-width: 940px;
}
.band__title .hot { color: var(--accent); }

/* ---------- Figure (image panel with caption) ---------- */
.figure { position: relative; overflow: hidden; border: 1px solid var(--edge); min-height: 360px; }
.figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.66) saturate(0.85);
}
.figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(var(--bg-rgb), 0.85) 100%);
}
.figure__caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--ink-2);
  text-transform: uppercase;
}

/* ---------- Breach: the Code articles ---------- */
.code__banner {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--hot);
  text-align: center;
  border-bottom: 1px dashed var(--ghost-line, var(--edge-2));
  padding-bottom: 16px;
  margin-bottom: 30px;
}
.articles { display: flex; flex-direction: column; gap: 22px; }
.article { display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: start; }
.article__num { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--accent); }
.article p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--copy-2, var(--copy)); }
/* 700, not 600: these are body-font (Space Grotesk), which ships 300/400/500/700.
   A 600 request here silently resolved up to 700 anyway — say what we render. */
.article strong { color: var(--bright); font-weight: 700; }

/* ---------- Breach: ecology ---------- */
.ecology__lede { font-family: var(--font-body); font-size: 18px; line-height: 1.7; color: var(--bright); margin: 0 0 20px; font-weight: 500; }
.ecology__statement {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--hot);
  margin: 0 0 20px;
}
.ecology__copy { font-size: 16px; line-height: 1.75; color: var(--copy); margin: 0 0 18px; font-weight: 300; }
.ecology__close { font-size: 18px; line-height: 1.6; color: var(--bright); margin: 0 0 10px; font-weight: 700; }
.ecology__coda { font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin: 0; font-weight: 400; font-style: italic; }

/* ---------- Recruitment / joining ---------- */
.recruit__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 16px;
  line-height: 1.08;
}
.recruit__copy { font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0 0 14px; max-width: 760px; font-weight: 300; }
.recruit__copy--end { margin-bottom: 28px; }
body[data-page="breach"] .recruit__copy { color: var(--copy); margin-bottom: 16px; max-width: 780px; }
body[data-page="breach"] .recruit__copy--end { margin-bottom: 28px; }
.recruit__ask { font-size: 17px; line-height: 1.7; color: var(--bright); margin: 0 0 16px; max-width: 780px; font-weight: 500; }

.roster {
  border: 1px solid var(--edge-2);
  background: rgba(0, 0, 0, 0.35);
  margin-bottom: 30px;
  font-family: var(--font-mono);
}
/* Three columns so a reader can self-select on the work, not just the title.
   Role and status hold their width; focus takes the slack. */
.roster__head,
.roster__row {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 4px 22px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--hairline);
}
.roster__head {
  padding-top: 11px;
  padding-bottom: 11px;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--dim);
  background: rgba(0, 0, 0, 0.3);
}
.roster__head span:last-child { justify-self: end; }
.roster__role { font-size: 13px; letter-spacing: 0.14em; color: var(--ink-2); font-weight: 700; }
.roster__focus { font-size: 12.5px; letter-spacing: 0.04em; color: var(--muted); }
.roster__status { font-size: 12px; letter-spacing: 0.22em; color: var(--accent); justify-self: end; }

/* Narrow: role + status share a line, focus drops beneath the role. */
@media (max-width: 640px) {
  .roster__head { display: none; }
  .roster__row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 16px;
  }
  /* Explicit placement — auto-flow would push STATUS onto its own row. */
  .roster__role   { grid-area: 1 / 1 / 2 / 2; }
  .roster__status { grid-area: 1 / 2 / 2 / 3; }
  .roster__focus  { grid-area: 2 / 1 / 3 / -1; }
}
.roster__note { padding: 12px 20px; font-size: 12.5px; letter-spacing: 0.06em; color: var(--faint); }

/* Intake — what happens after the button, answered before it's pressed.
   Reuses the 01/02/03 numbering the rest of the page already runs on. */
.intake {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-bottom: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}
.intake__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--dim);
  margin-bottom: 9px;
}
.intake__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bright);
  margin: 0 0 8px;
}
.intake__copy {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: 0;
  font-weight: 300;
}

@media (max-width: 860px) {
  .intake { grid-template-columns: 1fr; gap: 22px; }
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 18px 38px;
  transition: box-shadow var(--dur-hover) var(--ease-out), filter var(--dur-hover) var(--ease-out), transform var(--dur-hover) var(--ease-out);
  --tick-size: 11px;
  --tick-inset: 0px;
  --tick-color: currentColor;
}
.btn:hover, .btn:focus-visible {
  box-shadow: 0 0 34px rgba(var(--accent-rgb), 0.55);
  filter: brightness(1.08);
}
.btn:active { transform: translateY(1px); }
.btn--compact { gap: 12px; font-size: 16px; padding: 16px 36px; --tick-size: 10px; }

/* Destination hint under the Apply CTA — names the external RSI portal so the
   org slug in the URL doesn't read as a wrong redirect at click time. */
.cta-note {
  display: block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 10;
  padding-top: 30px;
  padding-bottom: 64px;
  text-align: center;
}
.footer__rule { height: 1px; background: var(--hairline); margin-bottom: 30px; }
body[data-page="breach"] .footer__rule {
  height: 5px;
  background: repeating-linear-gradient(45deg,
    rgba(var(--accent-rgb), 0.4), rgba(var(--accent-rgb), 0.4) 14px,
    rgba(var(--bg-rgb), 0.3) 14px, rgba(var(--bg-rgb), 0.3) 28px);
}
.footer__legal {
  display: inline-block;
  max-width: 880px;
  padding: 16px 28px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--legal-line);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--legal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
.footer__aux { margin-top: 22px; }

/* Hidden system-diagnostics trigger (konami gate) */
.sysdiag {
  width: 26px;
  height: 26px;
  background: transparent;
  border: none;
  position: relative;
  opacity: 0.22;
  cursor: pointer;
  transition: opacity var(--dur-panel) var(--ease-out);
}
.sysdiag:hover, .sysdiag:focus-visible { opacity: 1; }
.sysdiag span { position: absolute; top: 50%; left: 50%; background: var(--dim); transform: translate(-50%, -50%); }
.sysdiag__v { width: 2px; height: 16px; }
.sysdiag__h { width: 16px; height: 2px; }

/* Breach footer: return-to-main X */
.sysreturn {
  display: inline-block;
  width: 26px;
  height: 26px;
  position: relative;
  opacity: 0.25;
  transition: opacity var(--dur-panel) var(--ease-out);
}
.sysreturn:hover, .sysreturn:focus-visible { opacity: 1; }
.sysreturn span { position: absolute; top: 50%; left: 50%; width: 18px; height: 2px; background: var(--dim); }
.sysreturn span:first-child { transform: translate(-50%, -50%) rotate(45deg); }
.sysreturn span:last-child { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- Konami override modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 5, 6, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--dur-panel) var(--ease-out), visibility 0s linear var(--dur-panel);
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity var(--dur-panel) var(--ease-out);
}
.modal__box {
  position: relative;
  width: 90%;
  max-width: 440px;
  background: linear-gradient(180deg, #0d0f12, #0a0b0d);
  border: 1px solid rgba(255, 211, 0, 0.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.85);
  --tick-size: 22px;
  --tick-inset: 10px;
  /* Rest slightly small + low; the panel powers up to full size as it fades in. */
  transform: scale(0.96) translateY(6px);
  transition: transform var(--dur-panel) var(--ease-out);
}
.modal.is-open .modal__box { transform: none; }
.modal__inner { padding: 34px 28px 38px; text-align: center; }
.modal__title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--accent);
  border-bottom: 1px dashed rgba(255, 211, 0, 0.35);
  padding-bottom: 12px;
  margin-bottom: 28px;
}
.modal__close {
  position: absolute;
  top: 8px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--legal);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  transition: color var(--dur-hover) var(--ease-out);
}
.modal__close:hover, .modal__close:focus-visible { color: var(--accent); }

.override-wrap { display: flex; justify-content: center; margin-bottom: 30px; }
.override {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #2a2d33, #121418);
  border: 2px solid #2b2f36;
  color: transparent;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: not-allowed;
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.6), 0 6px 16px rgba(0, 0, 0, 0.7);
  transition: background var(--dur-panel) var(--ease-out), border-color var(--dur-panel) var(--ease-out), color var(--dur-panel) var(--ease-out), box-shadow var(--dur-panel) var(--ease-out);
}
.override.is-ready {
  background: radial-gradient(circle at 35% 28%, #e04b4b, #8b1c1c);
  border-color: #C62828;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  box-shadow: 0 0 30px rgba(198, 40, 40, 0.6), inset 0 4px 10px rgba(0, 0, 0, 0.4);
}
.override.is-error { color: #ff5555; border-color: #ff3333; }

.keypad { display: flex; justify-content: center; align-items: center; gap: 34px; }
.dpad { position: relative; width: 108px; height: 108px; }
.dpad button {
  position: absolute;
  width: 36px;
  height: 36px;
  background: #1a1d22;
  border: 1px solid #2b2f36;
  cursor: pointer;
  padding: 0;
}
.dpad__up { top: 0; left: 36px; border-radius: 4px 4px 0 0; }
.dpad__left { top: 36px; left: 0; border-radius: 4px 0 0 4px; }
.dpad__right { top: 36px; right: 0; border-radius: 0 4px 4px 0; }
.dpad__down { bottom: 0; left: 36px; border-radius: 0 0 4px 4px; }
.dpad__hub { position: absolute; top: 36px; left: 36px; width: 36px; height: 36px; background: #15171b; border: 1px solid #2b2f36; }

.ab { display: flex; gap: 12px; align-items: center; }
.ab button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid #2b2f36;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
}
.ab__b { background: radial-gradient(circle at 32% 28%, #34383f, #16181c); color: #cfd4d9; }
.ab__a { background: radial-gradient(circle at 32% 28%, #7a1f1f, #3a0d0d); border-color: #5a1414; color: #ffd9d9; }

/* Keypad buttons flash and press in briefly when hit (class toggled by app.js). */
.dpad button, .ab button { transition: transform 0.1s var(--ease-out), border-color 0.1s var(--ease-out); }
.keypad .is-hit { border-color: #FFD300; transform: scale(0.92); }
.keypad .is-hit-alt { border-color: #C62828; transform: scale(0.92); }

/* ---------- Lost (404) page ---------- */
body[data-page="lost"] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  --tick-size: 40px;
  --tick-inset: 28px;
  --tick-color: rgba(255, 211, 0, 0.55);
}
.lost__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.34) saturate(0.8);
}
.lost__shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(7, 8, 9, 0.4) 0%, rgba(7, 8, 9, 0.92) 100%);
}
.lost__lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 2px, rgba(0, 0, 0, 0.3) 3px);
  opacity: 0.08;
  pointer-events: none;
}
.lost__beam {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 211, 0, 0.35), transparent);
  opacity: 0.16;
  animation: scan-page 5s linear infinite;
  pointer-events: none;
}
.lost__telemetry {
  position: absolute;
  top: 42px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--faint);
  text-transform: uppercase;
}
.lost__telemetry--left { left: 46px; }
.lost__telemetry--right { right: 46px; color: var(--accent); animation: blink 1.4s steps(1) infinite; }
.lost__panel { position: relative; z-index: 5; text-align: center; padding: 0 24px; }
.lost__logo {
  width: 84px;
  height: 84px;
  margin: 0 auto 28px;
  opacity: 0.85;
  filter: drop-shadow(0 0 24px rgba(255, 211, 0, 0.4));
}
.lost__code { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.4em; color: var(--accent); margin-bottom: 18px; }
.lost__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 90px;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
  animation: glitch 4s steps(1) infinite;
}
.lost__copy {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 460px;
  margin: 24px auto 36px;
}
.lost__foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 42px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--dim);
  text-transform: uppercase;
}

/* ---------- Scroll reveal (progressive enhancement, applied by app.js) ---------- */
.reveal-pending {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal-pending.is-revealed { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-2, .grid-2--split { grid-template-columns: 1fr; }
  .hero__title { font-size: 54px; }
}

@media (max-width: 640px) {
  /* Brand keeps row 1; the links drop to a horizontally scrollable strip on
     row 2 so wayfinding survives instead of collapsing to just "Apply". */
  .topnav { padding: 12px 20px; flex-wrap: wrap; row-gap: 12px; }
  .brand__name { white-space: nowrap; font-size: 15px; }
  .navlinks {
    order: 2;
    width: 100%;
    gap: 22px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .navlinks::-webkit-scrollbar { display: none; }
  .navlink { white-space: nowrap; flex: 0 0 auto; }
  .hero { height: 430px; }
  .hero__title { font-size: 38px; }
  .hud { display: none; }
  .pad, .pad--tight, .pad--recruit { padding: 26px 20px; }
  .lost__title { font-size: 54px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
