/* Archival Pulse — case-file styles. No external JS, no tracking. */
:root {
  --charcoal: #151412;
  --charcoal-2: #1f1d1a;
  --paper: #E3DDCF;
  --paper-dim: #b9b2a3;
  --ink: #1b1a17;
  --red: #9A312D;
  --red-light: #c4524c;
  --rule: rgba(227, 221, 207, 0.18);
  --max: 1040px;
  --font-head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --font-body: "IBM Plex Sans Condensed", "Arial Narrow", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--paper); text-decoration-color: var(--red-light); text-underline-offset: 3px; }
a:hover, a:focus-visible { color: #fff; text-decoration-color: #fff; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--red-light); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--paper); color: var(--ink); padding: .5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand img { width: 38px; height: 38px; display: block; }
.brand span {
  font-family: var(--font-head); font-weight: 600; font-size: 1.35rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--paper);
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; color: var(--paper-dim);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--paper); border-bottom: 2px solid var(--red); }

/* ---------- Labels / stamps ---------- */
.label {
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--paper-dim);
}
.stamp {
  display: inline-block; font-family: var(--font-mono); font-size: .75rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--red-light);
  border: 2px solid var(--red); padding: .2rem .6rem; transform: rotate(-2deg);
}

/* ---------- Hero ---------- */
.hero { padding: 4.5rem 0 3.5rem; border-bottom: 1px solid var(--rule); }
.hero h1 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.6rem, 8vw, 5rem); line-height: 1.02; letter-spacing: .02em;
  margin: 1rem 0 1.25rem;
}
.hero h1 .accent { color: var(--red-light); }
.hero .lede { font-size: clamp(1.1rem, 2.4vw, 1.35rem); max-width: 40rem; color: var(--paper); margin: 0 0 2rem; }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn {
  display: inline-block; font-family: var(--font-mono); font-size: .85rem; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; padding: .75rem 1.2rem;
  border: 2px solid var(--paper); color: var(--paper);
}
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn:hover, .btn:focus-visible { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* ---------- Sections ---------- */
section { padding: 3.5rem 0; }
section + section { border-top: 1px solid var(--rule); }
h2 {
  font-family: var(--font-head); font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; margin: .4rem 0 1rem;
}
h3 { font-family: var(--font-head); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; font-size: 1.25rem; margin: 0 0 .5rem; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* Paper "case file" cards */
.card {
  background: var(--paper); color: var(--ink); padding: 1.5rem 1.4rem 1.4rem;
  position: relative; border-top: 6px solid var(--red);
  box-shadow: 0 1px 0 rgba(0,0,0,.4), 6px 6px 0 rgba(0,0,0,.35);
}
.card .label { color: #6b6457; display: block; margin-bottom: .5rem; }
.card a { color: var(--ink); text-decoration-color: var(--red); }
.card a:hover { color: var(--red); }
.card p { margin: 0; }

.channels { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.channels a {
  display: flex; flex-direction: column; align-items: flex-start; gap: .2rem;
  padding: 1rem 1.2rem; border: 1px solid var(--rule); text-decoration: none; background: var(--charcoal-2);
}
.channels a:hover, .channels a:focus-visible { border-color: var(--red-light); }
.channels .name { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .06em; font-size: 1.15rem; }
.channels .handle { font-family: var(--font-mono); font-size: .8rem; color: var(--paper-dim); }

.principles { margin: 0; padding: 0; list-style: none; counter-reset: p; }
.principles li { counter-increment: p; padding: .9rem 0 .9rem 3.2rem; position: relative; border-bottom: 1px dashed var(--rule); }
.principles li::before {
  content: counter(p, decimal-leading-zero); position: absolute; left: 0; top: .95rem;
  font-family: var(--font-mono); color: var(--red-light); font-size: .9rem;
}
.principles strong { font-family: var(--font-head); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Document (legal) pages ---------- */
.doc { padding: 3rem 0 4rem; }
.doc-sheet {
  background: var(--paper); color: var(--ink); max-width: 820px; margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.25rem); border-top: 8px solid var(--red);
  box-shadow: 8px 8px 0 rgba(0,0,0,.35);
}
.doc-sheet h1 {
  font-family: var(--font-head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; margin: .75rem 0 .5rem; letter-spacing: .02em;
}
.doc-sheet h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; padding-top: 1rem; border-top: 1px solid rgba(27,26,23,.18); }
.doc-sheet .label { color: #6b6457; }
.doc-sheet a { color: var(--ink); text-decoration-color: var(--red); word-break: break-word; }
.doc-sheet a:hover { color: var(--red); }
.doc-sheet ul { padding-left: 1.25rem; }
.doc-sheet li { margin: .35rem 0; }
.doc-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: 1.5rem; }
.summary-box { border-left: 4px solid var(--red); background: rgba(154,49,45,.07); padding: 1rem 1.2rem; margin: 1.5rem 0; }
.summary-box p { margin: 0; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 6rem 0; }
.notfound h1 { font-family: var(--font-head); font-size: clamp(4rem, 18vw, 9rem); margin: 1rem 0 0; line-height: 1; color: var(--red-light); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 2rem 0; font-size: .95rem; color: var(--paper-dim); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer a { color: var(--paper-dim); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.site-footer a:hover { color: var(--paper); }
.site-footer small { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .06em; }

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .hero { padding: 3rem 0 2.5rem; }
  section { padding: 2.5rem 0; }
  .site-header .wrap { justify-content: center; }
  .site-nav ul { justify-content: center; gap: 1rem; }
  .site-footer .wrap { flex-direction: column; text-align: center; }
  .site-footer ul { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---------- Utilities ---------- */
.intro { max-width: 44rem; }
.grid-spaced { margin-top: 2rem; }
.btn-row-center { justify-content: center; margin-top: 1.5rem; }
