/* ==========================================================================
   stopnikkitorres.com — "THE FILE"
   X-Files / classified-investigation aesthetic
   Pitch black · phosphor green · redaction red · scanlines · flashlight haze
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800;900&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ink:        #050607;   /* page background            */
  --ink-2:      #07090b;   /* alt section                */
  --surface:    #0b0f11;   /* cards                      */
  --surface-2:  #0f1519;   /* raised                     */
  --line:       rgba(74,222,128,.16);
  --line-2:     rgba(74,222,128,.34);

  --text:       #d5ded6;
  --muted:      #7f8d84;
  --faint:      #5a6862;

  --green:      #4ade80;   /* phosphor accent            */
  --green-2:    #34c66c;
  --green-dim:  #1f6e3f;
  --glow:       rgba(74,222,128,.55);

  --red:        #e0223a;   /* classified / danger        */
  --red-deep:   #a1121f;
  --amber:      #d8b25a;   /* document highlight         */
  --ok:         #4ade80;

  --maxw: 1120px;
  --sans:  'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono:  'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --shadow: 0 1px 0 rgba(74,222,128,.04), 0 22px 46px -22px rgba(0,0,0,.85);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px; line-height: 1.65;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  counter-reset: sec -1;
  position: relative;
}

/* film grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* CRT scanlines */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,.25) 3px, rgba(0,0,0,0) 4px);
  mix-blend-mode: multiply;
}
body > * { position: relative; z-index: 2; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: #bfffd6; text-shadow: 0 0 10px var(--glow); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Masthead / nav ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(5,6,7,.86);
  backdrop-filter: saturate(120%) blur(10px);
  -webkit-backdrop-filter: saturate(120%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--green), transparent); opacity: .45;
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 62px; }
.brand {
  font-family: var(--mono); font-weight: 600; letter-spacing: .04em;
  font-size: .98rem; text-transform: uppercase; color: #fff;
}
.brand span { color: var(--green); text-shadow: 0 0 10px var(--glow); }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); padding: 3px 0;
  border-bottom: 1px solid transparent; transition: color .18s, border-color .18s;
}
.nav a:hover { color: var(--green); border-bottom-color: var(--green); text-shadow: none; }

@media (max-width: 780px) {
  .topbar { position: static; }
  .topbar .wrap { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; }
  .nav { gap: 12px 18px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; text-align: center; overflow: hidden;
  padding: 104px 28px 84px;
  background:
    radial-gradient(680px 520px at 50% -6%, rgba(74,222,128,.16), transparent 62%),
    radial-gradient(1200px 700px at 50% 120%, rgba(74,222,128,.06), transparent 60%),
    #040506;
  border-bottom: 1px solid var(--line-2);
}
/* flashlight beam */
.hero::before {
  content: ""; position: absolute; top: -20%; left: 50%; width: 60%; height: 130%;
  transform: translateX(-50%) rotate(0deg);
  background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(200,255,215,.10), transparent 70%);
  pointer-events: none;
}
.hero .kicker {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--green); margin: 0 0 24px;
  text-shadow: 0 0 14px var(--glow);
}
.hero .kicker::before { content: "▚ "; color: var(--red); }
.hero h1 {
  font-family: var(--sans); font-weight: 800; letter-spacing: .01em;
  font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 1.0;
  margin: 0 auto 24px; max-width: 15ch; text-transform: uppercase; color: #f2f7f2;
  text-shadow: 0 0 34px rgba(74,222,128,.25);
}
.hero h1 em { color: var(--green); font-style: normal; text-shadow: 0 0 26px var(--glow); }
.hero p.lede {
  font-family: var(--serif); font-size: clamp(1.08rem, 2.1vw, 1.4rem);
  line-height: 1.62; color: #b6c2ba; max-width: 60ch; margin: 0 auto 32px;
}
.hero p.lede strong { color: #eaf2ea; font-weight: 500; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  display: inline-block; padding: 14px 26px; border-radius: 2px;
  background: rgba(74,222,128,.08); color: var(--green); border: 1px solid var(--green-dim);
  transition: transform .12s ease, background .18s, box-shadow .18s, border-color .18s;
}
.btn:hover { background: rgba(74,222,128,.16); border-color: var(--green); transform: translateY(-2px); box-shadow: 0 0 26px -6px var(--glow); color: #d6ffe3; }
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn.ghost:hover { border-color: var(--muted); box-shadow: none; color: #fff; }

/* ---------- Sections ---------- */
section { counter-increment: sec; padding: 80px 0; border-bottom: 1px solid var(--line); }
section:nth-of-type(even) { background: var(--ink-2); }

.eyebrow {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--green); margin: 0 0 14px;
  display: flex; align-items: center; gap: 12px; text-shadow: 0 0 12px var(--glow);
}
.eyebrow::before {
  content: "FILE " counter(sec, decimal-leading-zero);
  font-weight: 600; color: var(--red); text-shadow: none;
  padding-right: 12px; border-right: 1px solid var(--line-2);
}
h2.section-title {
  font-family: var(--sans); font-weight: 800; letter-spacing: -.01em;
  font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.06; color: #f2f7f2; margin: 0 0 14px;
}
.section-sub {
  font-family: var(--serif); font-size: 1.12rem; line-height: 1.7;
  color: #aab6ac; max-width: 68ch; margin: 0 0 30px;
}
.section-sub strong { color: #eaf2ea; font-weight: 500; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 26px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid > * { min-width: 0; }
@media (max-width: 860px) { .grid.two, .grid.three { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line); border-radius: 4px; padding: 26px 24px;
  box-shadow: var(--shadow); position: relative; transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card::before { content: ""; position: absolute; top: 0; left: 24px; width: 34px; height: 2px; background: var(--green); opacity: .7; box-shadow: 0 0 10px var(--glow); }
.card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 0 30px -14px var(--glow), var(--shadow); }
.card h3 { font-family: var(--sans); font-weight: 700; font-size: 1.16rem; color: #f2f7f2; margin: 6px 0 10px; }
.card p { font-family: var(--serif); color: #b3bfb5; margin: 0 0 10px; font-size: 1.02rem; }
.card p:last-child { margin-bottom: 0; }
.card p strong { color: #eaf2ea; font-weight: 500; }

/* ---------- Figures / evidence ---------- */
figure {
  margin: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; overflow: hidden; box-shadow: var(--shadow);
}
figure img { width: 100%; }
figure figcaption {
  font-family: var(--mono); font-size: .74rem; line-height: 1.5; color: var(--muted);
  padding: 12px 14px; background: rgba(0,0,0,.35); border-top: 1px solid var(--line);
}
figure figcaption strong { color: var(--green); font-weight: 500; }

.evidence-frame { max-width: 420px; margin: 0 auto; }
.evidence-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; margin-top: 12px; }
.evidence-grid figure { margin: 0; background: #05080a; }
.evidence-grid figure img { max-height: 460px; width: auto; max-width: 100%; margin: 0 auto; background: #03060a; }
@media (max-width: 720px) { .evidence-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .evidence-grid { grid-template-columns: 1fr; } }

/* ---------- Stat ---------- */
.statline { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.bigstat {
  flex: 1 1 200px; background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line); border-radius: 4px; padding: 22px 24px;
  font-family: var(--sans); font-weight: 900; font-size: clamp(2.6rem, 5vw, 3.6rem);
  line-height: 1; color: var(--green); letter-spacing: -.02em; text-shadow: 0 0 24px var(--glow);
}
.bigstat small {
  display: block; margin-top: 12px; font-family: var(--mono); font-weight: 500;
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-shadow: none;
}

/* ---------- Vote list ---------- */
ul.votes { list-style: none; padding: 0; margin: 0; }
ul.votes li {
  padding: 18px 20px; margin-bottom: 12px; border-radius: 4px;
  background: linear-gradient(180deg, var(--surface), var(--ink-2));
  border: 1px solid var(--line); border-left: 3px solid var(--red);
  transition: border-color .2s, transform .2s;
}
ul.votes li:hover { border-left-color: var(--green); transform: translateX(2px); }
ul.votes .bill { font-family: var(--sans); font-weight: 700; color: #f2f7f2; font-size: 1.04rem; }
ul.votes .desc { font-family: var(--serif); color: var(--muted); font-size: 1rem; display: block; margin-top: 4px; }
.vote-flag { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.vote-flag .fi { color: var(--faint); }
.vote-flag .her { background: var(--red); color: #fff; padding: 4px 10px; border-radius: 2px; font-weight: 500; }
.vote-flag .sep { color: var(--line-2); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline:before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.timeline li { position: relative; padding: 0 0 26px 34px; }
.timeline li:before {
  content: ""; position: absolute; left: 2px; top: 5px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 4px var(--ink), 0 0 14px var(--glow);
}
.timeline .date { font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.timeline .event { font-family: var(--serif); color: #b3bfb5; font-size: 1.05rem; margin-top: 2px; }
.timeline .event strong { color: #eaf2ea; font-weight: 500; }
.timeline .event em { color: var(--amber); font-style: italic; }

/* ---------- Callouts ---------- */
.callout { border-radius: 4px; padding: 18px 20px; margin: 20px 0; font-family: var(--serif); font-size: 1.04rem; border: 1px solid var(--line); }
.callout.fact { background: rgba(74,222,128,.06); border-color: rgba(74,222,128,.28); color: #cdeed8; }
.callout.status { background: rgba(224,34,58,.06); border-color: rgba(224,34,58,.3); color: #f0cdd2; }
.callout .tag {
  display: inline-block; font-family: var(--mono); font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; font-size: .66rem; margin-right: 10px; padding: 3px 9px; border-radius: 2px; vertical-align: middle;
}
.callout.fact .tag { background: var(--green); color: #04140a; }
.callout.status .tag { background: var(--red); color: #fff; }

/* ---------- Badges (evidence classification tags) ---------- */
.badge {
  display: inline-block; font-family: var(--mono); font-size: .64rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em; padding: 5px 11px; border-radius: 2px;
  margin-bottom: 14px; border: 1px solid var(--line-2);
}
.badge.opinion { color: var(--muted); background: rgba(255,255,255,.03); }
.badge.pending { color: var(--amber); background: rgba(216,178,90,.08); border-color: rgba(216,178,90,.3); }
.badge.record  { color: var(--green); background: rgba(74,222,128,.08); border-color: rgba(74,222,128,.3); }

/* ---------- Pull quote ---------- */
blockquote.pull {
  margin: 0; padding: 8px 0 8px 26px; border-left: 2px solid var(--green);
  font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.4; color: #e3ece4;
}
blockquote.pull cite { display: block; margin-top: 14px; font-family: var(--mono); font-style: normal; font-size: .74rem; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }

/* ---------- Sources ---------- */
#sources { background: #030405; }
#sources ol { list-style: none; counter-reset: src; padding: 0; margin: 0; max-width: 900px; }
#sources li { counter-increment: src; position: relative; padding: 14px 0 14px 52px; border-bottom: 1px solid var(--line); font-family: var(--serif); color: #b0bcb2; font-size: 1rem; }
#sources li::before { content: "EX-" counter(src, decimal-leading-zero); position: absolute; left: 0; top: 15px; font-family: var(--mono); font-size: .72rem; color: var(--red); font-weight: 600; letter-spacing: .04em; }
#sources a { font-family: var(--mono); font-size: .82rem; color: var(--green); word-break: break-word; }
#sources a:hover { color: #d6ffe3; }

/* ---------- Footer ---------- */
footer.site { background: #020303; padding: 44px 28px; border-top: 1px solid var(--line-2); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; font-family: var(--mono); font-size: .78rem; color: var(--faint); }
footer.site strong { color: var(--text); font-weight: 500; }
footer.site .disclaimer { max-width: 66ch; line-height: 1.7; }

/* ==========================================================================
   X-FILES INTERACTION LAYER
   ========================================================================== */

/* Boot / "accessing case file" title card */
.xf-boot {
  position: fixed; inset: 0; z-index: 2000; background: #000;
  display: flex; align-items: center; justify-content: center; text-align: center;
  transition: opacity .8s ease; padding: 24px;
}
.xf-boot.done { opacity: 0; pointer-events: none; }
.xf-boot .line {
  font-family: var(--mono); color: var(--green); font-size: clamp(.8rem, 2.4vw, 1.05rem);
  letter-spacing: .18em; text-transform: uppercase; margin: 0 0 22px; min-height: 1.3em;
  text-shadow: 0 0 14px var(--glow);
}
.xf-boot .big {
  font-family: var(--sans); font-weight: 800; color: #f2f7f2; text-transform: uppercase;
  font-size: clamp(1.6rem, 6vw, 3.4rem); letter-spacing: .04em; min-height: 1.1em;
  text-shadow: 0 0 30px rgba(74,222,128,.3);
}
.xf-boot .big .cur, .xf-boot .line .cur { color: var(--green); animation: xf-blink 1s steps(1) infinite; }
@keyframes xf-blink { 50% { opacity: 0; } }

/* Surveillance HUD */
.xf-hud {
  position: fixed; z-index: 55; bottom: 14px; left: 16px;
  display: flex; gap: 14px; align-items: center;
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); background: rgba(3,4,5,.6); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 2px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
.xf-hud .rec { color: var(--red); display: inline-flex; align-items: center; gap: 6px; }
.xf-hud .rec i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: xf-rec 1.4s ease-in-out infinite; }
.xf-hud .conf { color: var(--green); }
@keyframes xf-rec { 50% { opacity: .25; } }
@media (max-width: 620px) { .xf-hud .conf { display: none; } .xf-hud { font-size: .6rem; } }

/* Giant faint watermark X */
.xf-watermark {
  position: fixed; z-index: 0; right: -4vw; top: 42%; transform: translateY(-50%);
  font-family: var(--sans); font-weight: 900; font-size: 62vh; line-height: 1;
  color: rgba(74,222,128,.03); pointer-events: none; user-select: none;
}

/* Scroll "decode" reveal — content is ALWAYS visible by default; the fade
   only plays as an entrance animation when .in is added, so a JS failure
   can never hide content. */
.reveal.in { animation: xf-decode .6s ease; }
@keyframes xf-decode { from { transform: translateY(18px); } to { transform: none; } }

/* Typewriter caret for stamps */
.type-caret::after { content: "▋"; margin-left: 2px; color: var(--green); animation: xf-blink 1s steps(1) infinite; }

/* Redaction bars — reveal the truth on hover / focus / tap */
.redact {
  background: #11181c; color: transparent; border-radius: 1px; padding: 0 .3em;
  box-shadow: inset 0 0 0 1px rgba(74,222,128,.3); cursor: help;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  text-shadow: none; -webkit-user-select: none; user-select: none;
}
.redact::selection { background: transparent; }
.redact:hover, .redact:focus, .redact.revealed {
  background: transparent; color: var(--green); box-shadow: none;
  text-shadow: 0 0 12px var(--glow); user-select: text;
}

/* ---------- Motion / a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .reveal.in { animation: none !important; }
  .xf-boot { display: none !important; }
  .redact { background: transparent; color: var(--green); box-shadow: none; }
}
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
