/* ══════════════════════════════════════════════════════════════
   IOA — intel.observer — main stylesheet
   Tokens are declared in the critical block in <head>.
   ══════════════════════════════════════════════════════════════ */

::selection { background: var(--green); color: var(--bg); }

a { color: var(--green); text-decoration: none; }
a:hover { color: #7dffc0; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Stamped metadata labels ─────────────────────────────────── */
.stamp {
  display: flex; gap: 1.5em; flex-wrap: wrap;
  font-size: 10px; letter-spacing: .22em; color: var(--dim);
  text-transform: uppercase;
}

/* ── Chromatic aberration on display type ────────────────────── */
.chroma {
  text-shadow:
    .018em 0 0 rgba(255, 70, 70, .38),
    -.018em 0 0 rgba(60, 255, 200, .30);
}

/* ── Scanline overlay + shimmer band ─────────────────────────── */
.scanlines {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, .014) 0px,
    rgba(255, 255, 255, .014) 1px,
    transparent 1px,
    transparent 3px
  );
}
.motion .scanlines::after {
  content: ""; position: absolute; left: 0; right: 0; height: 18vh;
  background: linear-gradient(to bottom, transparent, rgba(56, 255, 156, .022), transparent);
  animation: shimmer 9s linear infinite;
}
@keyframes shimmer {
  from { top: -20vh; }
  to   { top: 120vh; }
}

/* ── Cursor reticle (fine pointers, motion on, JS-enabled) ───── */
.reticle { display: none; }
@media (pointer: fine) {
  .js.motion .reticle {
    display: block; position: fixed; z-index: 95; pointer-events: none;
    left: 0; top: 0; opacity: 0; transition: opacity .3s;
  }
  .js.motion .reticle.live { opacity: 1; }
}
.ret-h, .ret-v { position: absolute; background: rgba(56, 255, 156, .14); }
.ret-h { width: 44px; height: 1px; left: -22px; top: 0; }
.ret-v { width: 1px; height: 44px; left: 0; top: -22px; }
.ret-ring {
  position: absolute; width: 26px; height: 26px; left: -13px; top: -13px;
  border: 1px solid rgba(56, 255, 156, .28); border-radius: 50%;
}
.reticle.lock .ret-ring { border-color: rgba(255, 181, 69, .75); width: 34px; height: 34px; left: -17px; top: -17px; }
.reticle.lock .ret-h, .reticle.lock .ret-v { background: rgba(255, 181, 69, .4); }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .8rem 1.4rem;
  background: rgba(5, 7, 11, .82); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  font-size: 11px; letter-spacing: .18em;
}
.nav-mark { color: var(--ink); font-weight: 600; white-space: nowrap; }
.nav-sep { color: var(--green-dim); margin: 0 .4em; }
.nav-sub { color: var(--dim); font-weight: 400; }
.nav-links { display: flex; gap: 1.6em; }
.nav-links a { color: var(--dim); position: relative; padding: .2em 0; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--green); }
.nav-links a:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--green);
}
.nav-right { display: flex; align-items: center; gap: 1.2em; white-space: nowrap; }
.snd {
  background: none; border: 1px solid var(--line); color: var(--dim);
  font: inherit; letter-spacing: inherit; padding: .25em .7em; cursor: pointer;
}
.snd[aria-pressed="true"] { color: var(--green); border-color: var(--green-dim); }
.zulu { color: var(--dim); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-sub { display: none; }
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 6rem 1.5rem 4rem; position: relative;
  background:
    radial-gradient(ellipse 80% 55% at 50% 42%, rgba(56, 255, 156, .045), transparent 70%),
    var(--bg);
}
.hero-meta { justify-content: center; margin-bottom: 3.2rem; }
.wordmark {
  font-family: var(--grot); font-weight: 700;
  font-size: clamp(5.5rem, 22vw, 15rem); line-height: .9;
  letter-spacing: .06em; color: #e8f2ee; margin-left: .06em; /* optically recenter tracking */
}
.agency-line {
  margin-top: 1.1rem; font-size: clamp(11px, 2.4vw, 15px);
  letter-spacing: .52em; color: var(--ink); text-transform: uppercase;
  margin-left: .52em;
}
.tagline {
  margin-top: 2.6rem; font-size: clamp(13px, 2.2vw, 17px);
  letter-spacing: .3em; color: var(--green); margin-left: .3em;
  min-height: 1.6em;
}
.scroll-cue {
  position: absolute; bottom: 4.5vh; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .3em;
  font-size: 10px; letter-spacing: .3em; color: var(--dim);
}
.scroll-cue:hover { color: var(--green); }
.motion .cue-chev { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* ── Sections ────────────────────────────────────────────────── */
.sec {
  max-width: 1080px; margin: 0 auto; padding: 8rem 1.5rem 4rem;
}
.sec-head {
  display: flex; align-items: baseline; gap: 1.4rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 1rem; margin-bottom: 3rem;
  position: relative;
}
.sec-no { font-size: 11px; letter-spacing: .3em; color: var(--amber); }
.sec-title {
  font-family: var(--grot); font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2.4rem); letter-spacing: .12em; color: #e8f2ee;
}
.sec-stamp { margin-left: auto; }

/* HUD snap-in: sections acquire like a target when scrolled into view */
.js.motion .sec-head { opacity: 0; transform: translateY(14px); }
.js.motion .sec.in .sec-head {
  opacity: 1; transform: none;
  transition: opacity .35s steps(4), transform .35s cubic-bezier(.2, .9, .2, 1);
}
.js.motion .sec.in .sec-head::before,
.js.motion .sec.in .sec-head::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--green); opacity: 0;
  animation: bracket .5s steps(3) forwards;
}
.js.motion .sec.in .sec-head::before { left: -20px; top: -8px; border-right: 0; border-bottom: 0; }
.js.motion .sec.in .sec-head::after { right: -20px; bottom: 4px; border-left: 0; border-top: 0; animation-delay: .08s; }
@keyframes bracket {
  0% { opacity: 0; transform: scale(1.6); }
  60% { opacity: 1; }
  100% { opacity: .55; transform: scale(1); }
}

/* ── Mandate: declassifying brief ────────────────────────────── */
.brief { max-width: 620px; }
.brief p {
  position: relative; overflow: hidden;
  font-size: clamp(15px, 2.4vw, 19px); line-height: 1.7;
  color: #dce8e4; margin-bottom: 1.4rem; letter-spacing: .02em;
}
.redact-bar {
  position: absolute; inset: .12em 0; background: #10151d;
  outline: 1px solid #1c2530;
}
.js.motion .redact-bar { transform: translateX(0); }
.js.motion .in .redact-bar {
  transition: transform .7s cubic-bezier(.7, 0, .2, 1);
  transform: translateX(103%);
}
.js.motion .in .redact:nth-child(2) .redact-bar { transition-delay: .25s; }
.js.motion .in .redact:nth-child(3) .redact-bar { transition-delay: .5s; }
/* no-JS / reduced motion: bars gone, text readable */
html:not(.motion) .redact-bar, html:not(.js) .redact-bar { display: none; }

.triad {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-top: 3.5rem;
}
.triad-item { background: var(--bg-2); padding: 1.6rem 1.4rem; }
.triad-key {
  display: block; font-size: 11px; letter-spacing: .28em;
  color: var(--green); margin-bottom: .9em;
}
.triad-item p { color: var(--dim); font-size: 13px; }

/* ── Operations directory: dossier cards ─────────────────────── */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.4rem;
}
.card {
  position: relative; display: block; padding: 1.8rem 1.6rem 1.5rem;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--ink); min-height: 230px;
}
.card-div {
  font-size: 10px; letter-spacing: .3em; color: var(--amber);
  display: block; margin-bottom: 1.1em;
}
.card-name {
  font-family: var(--grot); font-weight: 700; font-size: 1.05rem;
  letter-spacing: .1em; color: #e8f2ee; margin-bottom: .8em; min-height: 2.4em;
}
.card-desc { font-size: 12.5px; color: var(--dim); margin-bottom: 1.6em; min-height: 3em; }
.card-status { font-size: 10.5px; letter-spacing: .24em; display: block; }
.card-status.ok { color: var(--green); }
.card-status.ok::before { content: "●"; margin-right: .6em; font-size: 8px; vertical-align: 1px; }
.motion .card-status.ok::before { animation: blip 2.2s steps(2) infinite; }
@keyframes blip { 50% { opacity: .25; } }
.card-status.red { color: var(--red); }
.card-link {
  display: block; margin-top: 1em; font-size: 11px; letter-spacing: .18em;
  color: var(--green); opacity: .75;
}

/* target-lock corners on the live card */
.card-corners i {
  position: absolute; width: 12px; height: 12px;
  border: 1px solid var(--green); opacity: 0; transition: all .18s steps(3);
}
.card-corners i:nth-child(1) { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.card-corners i:nth-child(2) { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.card-corners i:nth-child(3) { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.card-corners i:nth-child(4) { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.card-live:hover, .card-live:focus-visible {
  border-color: var(--green-dim);
  background: linear-gradient(rgba(56, 255, 156, .03), rgba(56, 255, 156, .03)), var(--bg-2);
}
.card-live:hover .card-corners i, .card-live:focus-visible .card-corners i { opacity: 1; }
.card-live:hover .card-corners i:nth-child(1), .card-live:focus-visible .card-corners i:nth-child(1) { top: 6px; left: 6px; }
.card-live:hover .card-corners i:nth-child(2), .card-live:focus-visible .card-corners i:nth-child(2) { top: 6px; right: 6px; }
.card-live:hover .card-corners i:nth-child(3), .card-live:focus-visible .card-corners i:nth-child(3) { bottom: 6px; left: 6px; }
.card-live:hover .card-corners i:nth-child(4), .card-live:focus-visible .card-corners i:nth-child(4) { bottom: 6px; right: 6px; }
.card-live:hover .card-link { opacity: 1; }

/* redacted cards */
.bar {
  display: inline-block; height: .85em; background: #0c0f15;
  outline: 1px solid #1a212c; vertical-align: middle; margin: .12em 0;
}
.bar-w45 { width: 45%; } .bar-w55 { width: 55%; } .bar-w60 { width: 60%; }
.bar-w70 { width: 70%; } .bar-w80 { width: 80%; } .bar-w90 { width: 90%; }
.card-desc .bar { display: block; }
.card-redacted { cursor: not-allowed; }
.denied {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 13px; letter-spacing: .4em; color: var(--red);
  background: rgba(5, 7, 11, .88); opacity: 0; pointer-events: none;
  border: 1px solid rgba(255, 77, 77, .35); text-indent: .4em;
}
.motion .card-redacted:hover .denied,
.motion .card-redacted:focus-visible .denied {
  animation: denyflicker .45s steps(1) forwards;
}
html:not(.motion) .card-redacted:hover .denied,
html:not(.motion) .card-redacted:focus-visible .denied { opacity: 1; }
@keyframes denyflicker {
  0% { opacity: 0; } 8% { opacity: 1; } 16% { opacity: 0; }
  28% { opacity: 1; } 38% { opacity: .2; } 52% { opacity: 1; }
  100% { opacity: 1; }
}

/* ── Globe ───────────────────────────────────────────────────── */
.sec-globe { max-width: none; padding-left: 0; padding-right: 0; }
.sec-globe .sec-head { max-width: 1080px; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
.globe-wrap {
  position: relative; width: 100%; height: min(78vh, 720px); min-height: 380px;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(56, 255, 156, .04), transparent 70%);
}
#globe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.globe-caption {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .4em;
  pointer-events: none; text-align: center;
}
.cap-main { font-size: 12px; letter-spacing: .5em; color: var(--green); text-indent: .5em; }
.cap-sub { font-size: 10px; letter-spacing: .24em; color: var(--dim); text-indent: .24em; }

/* ── Contact terminal ────────────────────────────────────────── */
.term {
  max-width: 680px; border: 1px solid var(--line); background: #04060a;
  box-shadow: 0 0 60px rgba(56, 255, 156, .05);
}
.term-bar {
  display: flex; align-items: center; gap: .5em; padding: .55em .9em;
  border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.term-dot { width: 9px; height: 9px; border-radius: 50%; background: #1c2530; }
.term-title { margin-left: .8em; font-size: 10px; letter-spacing: .2em; color: var(--dim); }
.term-body { padding: 1.4rem 1.2rem 1.6rem; font-size: 13px; }
.term-line { margin-bottom: .55em; letter-spacing: .04em; }
.prompt { color: var(--green-dim); margin-right: .6em; }
.motion .caret { animation: caret 1s steps(1) infinite; color: var(--green); }
@keyframes caret { 50% { opacity: 0; } }
.term-log { color: var(--dim); white-space: pre-wrap; }
.term-log .ok { color: var(--green); }
.ok-line { color: var(--green); letter-spacing: .2em; }
.contact-mail { letter-spacing: .12em; border-bottom: 1px solid var(--green-dim); }
.fp { color: var(--dim); font-size: 11px; letter-spacing: .08em; }
.handshake {
  margin-top: 1.2em; background: none; border: 1px solid var(--green-dim);
  color: var(--green); font: inherit; font-size: 12px; letter-spacing: .22em;
  padding: .7em 1.4em; cursor: pointer;
}
.handshake:hover { background: rgba(56, 255, 156, .07); }
.handshake:disabled { opacity: .4; cursor: wait; }
/* JS gates the address behind the handshake; without JS everything is visible */
.js .term-result.gated { display: none; }
.js .handshake { display: inline-block; }
html:not(.js) .handshake { display: none; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer { margin-top: 6rem; border-top: 1px solid var(--line); }
.foot-main {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .8em 1em;
  padding: 2.2rem 1.5rem .6rem; font-size: 11px; letter-spacing: .2em;
  color: var(--dim); text-align: center;
}
.foot-sep { color: #223; }
.foot-note {
  text-align: center; font-size: 10px; letter-spacing: .12em;
  color: #3d4a53; padding: 0 1.5rem 2rem;
}
.classif {
  background: var(--green); color: #04240f; text-align: center;
  font-size: 11px; font-weight: 600; letter-spacing: .34em;
  padding: .55em 1em; text-indent: .34em;
}

/* ── Glitch flicker (brief, surgical — applied by JS, never loops) ── */
.glitch {
  animation: glitch .32s steps(2) 1;
}
@keyframes glitch {
  0%   { transform: translate(0); text-shadow: .02em 0 0 rgba(255, 70, 70, .8), -.02em 0 0 rgba(60, 255, 200, .8); }
  25%  { transform: translate(-2px, 1px); }
  50%  { transform: translate(2px, -1px); text-shadow: -.03em 0 0 rgba(255, 70, 70, .8), .03em 0 0 rgba(60, 255, 200, .8); }
  100% { transform: translate(0); text-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
