/* ---------- Reset & tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Fira Code', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, dl, dd, dt, h1, h2, p { margin: 0; padding: 0; }

:root {
  --ink: #06090a;
  --panel: #0d1512;
  --panel-2: #0a1d14;
  --green: #3dffa0;
  --green-dim: #1f7a52;
  --purple: #2a1f42;
  --paper: #e9e6da;
  --paper-dim: #a9a79c;
  --stamp-red: #c9432f;
  --line: rgba(233, 230, 218, 0.12);
}

.section-title {
  font-family: 'Archivo Black', 'Fira Code', sans-serif;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.08;
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.9rem;
  font-weight: 600;
}

/* ---------- Scanline overlay ---------- */
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 200;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.018) 0px,
    rgba(255,255,255,0.018) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.6rem;
  background: rgba(6,9,10,0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__logo {
  font-family: 'Archivo Black', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--paper);
  display: flex; align-items: center; gap: 0.6rem;
}
.nav__cursor { color: var(--green); font-weight: 700; animation: blink 1.1s step-end infinite; }
.nav__pill {
  font-family: 'Fira Code', monospace;
  font-size: 0.7rem;
  border: 1px solid var(--green-dim);
  color: var(--green);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.nav__links { display: flex; gap: 1.8rem; }
.nav__links a {
  font-size: 0.85rem; color: var(--paper-dim); letter-spacing: 0.03em;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--green); }
.nav__burger { display: none; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__burger span { width: 22px; height: 2px; background: var(--paper); display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn--small { padding: 0.5rem 0.9rem; font-size: 0.78rem; }
.btn--big { padding: 0.85rem 1.5rem; font-size: 0.95rem; }
.btn--green {
  background: var(--green);
  color: #06120b;
  box-shadow: 0 0 0 0 rgba(61,255,160,0.5);
}
.btn--green:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(61,255,160,0.25); }
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--paper);
}
.btn--ghost:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }
.icon-x { width: 16px; height: 16px; }

/* ---------- Stamp badge (with --tilt pattern) ---------- */
.stamp {
  --tilt: -6deg;
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--stamp-red);
  border: 3px solid var(--stamp-red);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transform: rotate(var(--tilt, 0deg));
  opacity: 0.85;
  mix-blend-mode: screen;
  width: fit-content;
}
.stamp--closed { --tilt: -4deg; margin: 0 auto 1rem; }

/* ---------- Reveal utility (tilt-safe) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px) rotate(var(--tilt, 0deg));
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(var(--tilt, 0deg));
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 7.5rem 1.8rem 3.5rem;
  overflow: hidden;
  scroll-margin-top: 84px;
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,9,10,0.65) 0%, rgba(6,9,10,0.25) 35%, rgba(6,9,10,0.92) 100%);
}
.hero__file {
  position: relative; z-index: 2;
  max-width: 640px;
}
.stamp-tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--green);
  border: 1px solid var(--green-dim);
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  margin-bottom: 1.1rem;
}
.hero__title {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: 1.1rem;
}
.hero__sub {
  font-size: 1rem;
  color: var(--paper-dim);
  max-width: 46ch;
  margin-bottom: 1.8rem;
}
.hero__cta { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero__char {
  position: absolute;
  right: 4vw; bottom: 0;
  z-index: 1;
  width: min(38vw, 480px);
  max-height: 78svh;
  width: auto; height: auto;
  max-width: min(38vw, 480px);
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
}
.stamp--armed {
  position: absolute; top: 6.5rem; right: 5vw; z-index: 3;
}

/* ---------- Log ticker bar ---------- */
.logbar {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
  padding: 0.6rem 0;
}
.logbar__track {
  display: inline-flex;
  gap: 3rem;
  animation: scrollLeft 26s linear infinite;
  font-size: 0.78rem;
  color: var(--green-dim);
  letter-spacing: 0.04em;
}
.logbar__track span { color: var(--green); }
@media (prefers-reduced-motion: reduce) {
  .logbar__track { animation: none; }
}

/* ---------- Terminal section ---------- */
.terminal {
  position: relative;
  padding: 6rem 1.8rem 5rem;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  scroll-margin-top: 84px;
}
.terminal__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.terminal__scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,9,10,0.92) 0%, rgba(6,9,10,0.75) 45%, rgba(6,9,10,0.35) 100%); }
.terminal__char {
  position: absolute;
  left: 2vw; bottom: 0;
  max-width: min(34vw, 420px);
  max-height: 62svh;
  width: auto; height: auto;
  z-index: 1;
  filter: drop-shadow(0 16px 30px rgba(0,0,0,0.55));
}
.terminal__panel {
  position: relative; z-index: 2;
  margin-left: auto;
  max-width: 620px;
  width: 100%;
}
.term-window {
  margin-top: 1.6rem;
  background: #05100a;
  border: 1px solid var(--green-dim);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.term-window__bar {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  background: #0a1a12;
  border-bottom: 1px solid var(--line);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.term-dot--r { background: #ff5f56; }
.term-dot--y { background: #ffbd2e; }
.term-dot--g { background: #27c93f; }
.term-window__title { margin-left: 0.6rem; font-size: 0.72rem; color: var(--paper-dim); }
.term-window__body {
  padding: 1.1rem 1.2rem 1.4rem;
  font-size: 0.85rem;
  color: var(--green);
  min-height: 210px;
  white-space: pre-wrap;
}
.term-window__body .term-line--dim { color: var(--paper-dim); }
.term-cursor { display: inline-block; width: 8px; height: 1em; background: var(--green); vertical-align: text-bottom; animation: blink 1s step-end infinite; }

/* ---------- Dossier ---------- */
.dossier {
  padding: 6rem 1.8rem;
  scroll-margin-top: 84px;
}
.dossier__head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.dossier__card {
  --tilt: -1deg;
  max-width: 860px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2rem;
  display: flex;
  gap: 2.2rem;
  align-items: center;
}
.dossier__photo {
  width: 190px; flex-shrink: 0;
}
.dossier__facts dl { display: flex; flex-direction: column; gap: 0.7rem; }
.redact-row { display: flex; gap: 1rem; align-items: baseline; font-size: 0.92rem; }
.redact-row dt { color: var(--paper-dim); width: 110px; flex-shrink: 0; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.08em; }
.redact {
  position: relative;
  color: var(--paper);
  letter-spacing: 0.05em;
  transition: color 0.4s ease;
}
.redact.is-declassified { color: var(--green); }

/* ---------- Evidence / corkboard ---------- */
.evidence {
  padding: 6rem 1.8rem 7rem;
  background: var(--panel-2);
  scroll-margin-top: 84px;
}
.evidence__head { max-width: 640px; margin: 0 auto 3.5rem; text-align: center; }
.board {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto;
  gap: 2rem 1.5rem;
  align-items: start;
}
.pin {
  --tilt: -3deg;
  position: relative;
  width: 230px;
  background: #efe9da;
  padding: 0.7rem 0.7rem 1.6rem;
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
}
.pin img { filter: none; width: 100%; height: 260px; object-fit: cover; }
.pin--a { --tilt: -4deg; grid-column: 1 / 2; justify-self: start; margin-top: 1.5rem; }
.pin--b { --tilt: 3deg; grid-column: 3 / 4; justify-self: end; margin-top: 4.5rem; }
.pin__nail {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a7a, var(--stamp-red));
  box-shadow: 0 3px 6px rgba(0,0,0,0.5);
}
.pin figcaption {
  font-family: 'Fira Code', monospace;
  font-size: 0.72rem;
  color: #2a2620;
  text-align: center;
  margin-top: 0.6rem;
  letter-spacing: 0.03em;
}
.board__note {
  --tilt: 2deg;
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  align-self: center;
  justify-self: center;
  font-family: 'Archivo Black', sans-serif;
  font-size: 1rem;
  color: var(--paper);
  line-height: 1.3;
  text-transform: uppercase;
  border-left: 3px solid var(--stamp-red);
  padding-left: 1rem;
}
.board__note span {
  display: block; margin-top: 0.6rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.68rem; text-transform: none;
  color: var(--paper-dim); font-weight: 400;
}
.board__string {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: -1;
  display: none;
}

/* ---------- Watch interstitial ---------- */
.watch {
  position: relative;
  min-height: 60svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--purple);
  overflow: hidden;
  padding: 3rem 1.8rem;
  text-align: center;
}
.watch__char {
  max-width: min(40vw, 380px);
  max-height: 46svh;
  width: auto; height: auto;
  margin-bottom: 1.4rem;
  filter: drop-shadow(0 14px 30px rgba(0,0,0,0.5));
}
.watch__line {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  text-transform: uppercase;
  color: var(--paper);
  line-height: 1.1;
}

/* ---------- Outro ---------- */
.outro {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 1.8rem;
  text-align: center;
  scroll-margin-top: 84px;
}
.outro__bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.outro__scrim { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(6,9,10,0.55) 0%, rgba(6,9,10,0.92) 78%); }
.outro__char {
  position: absolute;
  left: 6vw; bottom: 0;
  max-width: min(20vw, 220px);
  max-height: 50svh;
  width: auto; height: auto;
  z-index: 1;
  filter: drop-shadow(0 14px 26px rgba(0,0,0,0.6));
}
.outro__panel {
  position: relative; z-index: 2;
  max-width: 560px;
  margin: 0 auto;
}
.outro__title {
  font-family: 'Archivo Black', sans-serif;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  text-transform: uppercase;
  color: var(--paper);
  line-height: 1.08;
  margin-bottom: 1rem;
}
.outro__sub { color: var(--paper-dim); margin-bottom: 1.8rem; }
.outro__links { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer {
  padding: 2rem 1.8rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--paper-dim);
}

/* ---------- Keyframes ---------- */
@keyframes blink { 50% { opacity: 0; } }
@keyframes scrollLeft { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .board { grid-template-columns: 1fr; justify-items: center; }
  .pin--a, .pin--b, .board__note { grid-column: 1 / 2; margin-top: 0; justify-self: center; }
  .dossier__card { flex-direction: column; text-align: center; }
  .redact-row { justify-content: center; }
  .terminal__char { display: none; }
  .terminal__panel { margin: 0 auto; }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__links.is-open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: rgba(6,9,10,0.97); padding: 1.2rem 1.8rem; gap: 1rem; border-bottom: 1px solid var(--line); }

  .hero { flex-direction: column; align-items: center; text-align: center; padding-top: 8rem; }
  .hero__file { margin: 0 auto; }
  .hero__cta { justify-content: center; }
  .hero__char { position: static; margin: 1.6rem auto 0; max-width: min(60vw, 280px); max-height: 40svh; }
  .stamp--armed { position: static; margin: 1rem auto 0; }

  .terminal { min-height: auto; padding: 6.5rem 1.4rem 3.5rem; }

  .dossier__photo { width: 140px; }
  .redact-row { flex-direction: column; align-items: center; gap: 0.2rem; text-align: center; }
  .redact-row dt { width: auto; }

  .outro__char { display: none; }
  .outro__panel { background: rgba(6,9,10,0.5); backdrop-filter: blur(8px); border-radius: 16px; padding: 1.8rem 1.4rem; }
}
