:root {
  --paper: #f1ebde;
  --paper-dark: #e1d6c5;
  --ink: #171512;
  --muted: #6d6255;
  --red: #9e1f19;
  --red-dark: #6f1512;
  --line: rgba(23, 21, 18, 0.24);
  --shadow: rgba(48, 36, 20, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(158,31,25,.08), transparent 24rem),
    linear-gradient(135deg, rgba(255,255,255,.35), transparent 32%),
    var(--paper);
  line-height: 1.5;
}

.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image:
    repeating-radial-gradient(circle at 17% 31%, rgba(0,0,0,.08) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.025) 0 1px, transparent 1px 7px);
  z-index: 10;
}

a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(241, 235, 222, 0.82);
  backdrop-filter: blur(12px);
}

.brand, .nav a, .section-label, .case-topline, footer, .tags span, .status-grid b, figcaption, .stamp, .num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.brand { font-weight: 900; }
.nav { display: flex; gap: clamp(12px, 3vw, 32px); font-size: 12px; }
.nav a { color: var(--muted); transition: color .2s ease; }
.nav a:hover { color: var(--red); }

main { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.hero { min-height: calc(100vh - 70px); padding: 70px 0; }
.case-card {
  position: relative;
  padding: clamp(24px, 5vw, 54px);
  border: 2px solid var(--ink);
  background: rgba(245, 239, 227, .86);
  box-shadow: 12px 12px 0 rgba(23,21,18,.12);
}
.case-card::after {
  content: "CONFIDENTIAL";
  position: absolute;
  right: -24px;
  top: 22px;
  rotate: 7deg;
  border: 3px solid var(--red);
  color: var(--red);
  font: 800 18px/1 ui-monospace, monospace;
  padding: 8px 12px;
  opacity: .72;
}
.case-topline { display: flex; justify-content: space-between; color: var(--red); font-size: 13px; font-weight: 800; }
h1 {
  margin: 22px 0 20px;
  font-size: clamp(52px, 11vw, 128px);
  line-height: .86;
  letter-spacing: -.07em;
  text-transform: uppercase;
}
.lead { max-width: 660px; font-size: clamp(19px, 2.1vw, 28px); margin: 0 0 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tags span { border: 1px solid var(--ink); padding: 7px 9px; font-size: 11px; background: var(--paper-dark); }
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
.status-grid div { background: var(--paper); padding: 12px; min-height: 76px; }
.status-grid b { display: block; color: var(--red); font-size: 10px; margin-bottom: 8px; }
.status-grid span { font-size: 14px; }

.portrait-wrap {
  position: relative;
  margin: 0;
  padding: 18px 18px 12px;
  background: #fffaf2;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px var(--shadow), 7px 7px 0 rgba(158,31,25,.16);
  transform: rotate(1.5deg);
}
.portrait-wrap::before, .portrait-wrap::after {
  content: "";
  position: absolute;
  width: 88px;
  height: 28px;
  background: rgba(210, 195, 160, .58);
  border: 1px solid rgba(80, 63, 40, .18);
}
.portrait-wrap::before { top: -16px; left: 40px; rotate: -8deg; }
.portrait-wrap::after { bottom: 30px; right: -26px; rotate: -11deg; }
.portrait-wrap img { width: 100%; display: block; filter: contrast(1.08) grayscale(1); }
.stamp { position: absolute; top: 24px; right: 24px; color: var(--red); font-weight: 900; font-size: 12px; border: 2px solid var(--red); padding: 7px 9px; rotate: -6deg; z-index: 1; }
figcaption { margin-top: 12px; color: var(--muted); font-size: 10px; }

section:not(.hero) { padding: 72px 0; border-top: 1px solid var(--line); }
.section-label { color: var(--red); font-size: 13px; font-weight: 900; margin-bottom: 18px; }
.dossier, .protocol, .survived, .contact { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; }
.copy-block h2, .contact-card h2 { margin: 0 0 18px; font-size: clamp(34px, 5vw, 72px); line-height: .92; letter-spacing: -.05em; text-transform: uppercase; }
.copy-block p { max-width: 760px; font-size: 20px; color: #28231d; }

.tool-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--ink); }
.tool-list article { padding: 24px; min-height: 250px; border-right: 1px solid var(--ink); background: rgba(255, 250, 242, .38); }
.tool-list article:last-child { border-right: 0; }
.num { display: inline-block; color: var(--red); font-weight: 900; margin-bottom: 52px; }
.tool-list h3 { margin: 0 0 14px; font-size: 24px; line-height: 1; text-transform: uppercase; }
.tool-list p { color: var(--muted); margin: 0; }

.protocol ol { list-style: none; margin: 0; padding: 0; counter-reset: protocol; border-top: 2px solid var(--ink); }
.protocol li { counter-increment: protocol; position: relative; padding: 20px 0 20px 72px; border-bottom: 1px solid var(--line); font-size: clamp(20px, 3vw, 34px); letter-spacing: -.035em; }
.protocol li::before { content: "0" counter(protocol); position: absolute; left: 0; color: var(--red); font-family: ui-monospace, monospace; font-size: 16px; letter-spacing: .1em; top: 31px; }
.protocol li span { font-weight: 900; text-transform: uppercase; }

.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.folder { min-height: 190px; padding: 20px; border: 2px solid var(--ink); background: #fff8ea; display: flex; flex-direction: column; justify-content: space-between; transition: transform .18s ease, box-shadow .18s ease; }
.folder:hover { transform: translate(-4px, -4px) rotate(-1deg); box-shadow: 8px 8px 0 rgba(23,21,18,.18); }
.folder span { font-size: 30px; font-weight: 900; letter-spacing: -.05em; text-transform: uppercase; }
.folder small { color: var(--muted); font-family: ui-monospace, monospace; text-transform: uppercase; letter-spacing: .1em; }
.folder.red { background: var(--red); color: #fff8ea; }
.folder.red small { color: rgba(255,248,234,.76); }
.folder.dark { background: var(--ink); color: #fff8ea; }
.folder.dark small { color: rgba(255,248,234,.65); }

.survived ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.survived li { border: 1px dashed var(--ink); padding: 18px; font-size: 24px; font-weight: 800; text-transform: uppercase; background: rgba(255,255,255,.22); }

.contact-card { border: 2px solid var(--ink); padding: clamp(22px, 5vw, 46px); background: var(--ink); color: #fff8ea; box-shadow: 10px 10px 0 rgba(158,31,25,.24); }
.contact-card p { color: rgba(255,248,234,.72); font-size: 20px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.contact-links a { border: 1px solid rgba(255,248,234,.6); padding: 12px 14px; font-family: ui-monospace, monospace; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; }
.contact-links a:hover { background: var(--red); border-color: var(--red); }

footer { display: flex; justify-content: space-between; gap: 20px; width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 34px 0 46px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .12s; }

@media (max-width: 900px) {
  .nav { display: none; }
  .section-grid, .dossier, .protocol, .survived, .contact { grid-template-columns: 1fr; }
  .hero { padding-top: 42px; }
  .case-card::after { right: 14px; top: -18px; font-size: 13px; }
  .status-grid { grid-template-columns: 1fr; }
  .tool-list, .archive-grid, .survived ul { grid-template-columns: 1fr; }
  .tool-list article { border-right: 0; border-bottom: 1px solid var(--ink); min-height: auto; }
  .tool-list article:last-child { border-bottom: 0; }
  footer { flex-direction: column; }
}
