/* Burntwood Martyr — "Swiss Industrial Print" system.
   Newsprint substrate, heavy black type, one hazard-red accent,
   hard 90-degree corners throughout. Pure CSS, no dependencies. */

:root {
  --paper: #f2f1ec;
  --ink: #111111;
  --ink-soft: #4a4a46;
  --red: #d5271f;
  --rule: #111111;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --heavy: "Arial Black", "Franklin Gothic Bold", Haettenschweiler, Impact, var(--sans);
  /* one ragged tear line, reused wherever paper gets "ripped" — edit once,
     every torn edge on the site follows. Irregular on purpose: real spacing,
     real depth variance, not a repeating zig-zag. */
  --torn-edge: 100% 90%, 96% 100%, 93% 86%, 90% 98%, 87% 92%, 84% 100%,
    80% 88%, 77% 95%, 74% 84%, 70% 100%, 67% 90%, 64% 97%, 60% 82%,
    57% 94%, 54% 100%, 50% 88%, 47% 96%, 44% 79%, 41% 92%, 38% 100%,
    34% 86%, 31% 95%, 27% 90%, 24% 100%, 20% 84%, 17% 96%, 13% 88%,
    9% 100%, 5% 90%, 0 97%;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  /* subtle fixed grain, CSS-only, no image request */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

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

img, video { max-width: 100%; display: block; }

hr {
  border: none;
  border-top: 3px solid var(--rule);
  margin: 2rem 0;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ---- Masthead ---- */
header {
  border-bottom: 8px double var(--rule);
  background: var(--paper);
}
header nav {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
}
header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}
header nav a {
  text-decoration: none;
  color: var(--ink);
}
header nav > ul:first-child a {
  font-family: var(--heavy);
  font-weight: 900;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
header nav > ul:last-child a {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  padding: 0.3rem 0.7rem;
}
header nav > ul:last-child a:hover {
  background: var(--ink);
  color: var(--paper);
}

/* ---- Typography ---- */
h1, h2, h3 {
  font-family: var(--heavy);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-wrap: balance;
  margin: 0 0 1rem;
}
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.75rem); }
article h1 { margin-top: 0.5rem; }
p { text-wrap: pretty; }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
  margin: 1.5rem 0 0.5rem;
}
.eyebrow::before { content: "[ "; }
.eyebrow::after { content: " ]"; }

/* ---- Hero / banner ---- */
.banner {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  filter: grayscale(0.55) contrast(1.15) saturate(0.8);
  border-bottom: 3px solid var(--rule);
  display: block;
}
.hero-frame .banner { border-bottom: none; }
.hero { text-align: center; padding-top: 1.5rem; }

.hero-frame {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--rule);
  clip-path: polygon(0 0, 100% 0, var(--torn-edge));
}
.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--red) 1px, transparent 1.6px);
  background-size: 5px 5px;
  opacity: 0.16;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.reg-mark {
  position: absolute;
  top: 0.6rem;
  width: 1.1rem;
  height: 1.1rem;
  border: 1.5px solid var(--paper);
  border-radius: 50%;
  opacity: 0.85;
}
.reg-mark::before, .reg-mark::after {
  content: "";
  position: absolute;
  background: var(--paper);
}
.reg-mark::before { top: 50%; left: -0.35rem; right: -0.35rem; height: 1.5px; transform: translateY(-50%); }
.reg-mark::after { left: 50%; top: -0.35rem; bottom: -0.35rem; width: 1.5px; transform: translateX(-50%); }
.reg-mark--tl { left: 0.6rem; }
.reg-mark--tr { right: 0.6rem; }

.stamp {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  border: 2px solid var(--paper);
  padding: 0.25rem 0.55rem;
  transform: rotate(8deg);
}

.masthead {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.6rem 1rem 1.4rem;
  background: linear-gradient(to top, rgba(17,17,17,0.88), rgba(17,17,17,0));
  color: var(--paper);
  font-family: var(--heavy);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  font-size: clamp(1.75rem, 1.1rem + 4vw, 3.5rem);
  line-height: 1;
}
.hero .tagline {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 1rem 0 0;
}
.hero .tagline::before, .hero .tagline::after { content: "// "; color: var(--red); }

/* ---- Case files (year groups) ---- */
.torn-strip {
  height: 14px;
  margin: 0.75rem 0 0;
  background: var(--rule);
  clip-path: polygon(0 0, 100% 0, var(--torn-edge));
}
details {
  padding: 1.25rem 0;
}
details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
details summary::-webkit-details-marker { display: none; }
details summary h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}
details summary h2::before { content: "CASE FILE \2014 "; color: var(--red); }
details summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.3rem;
  line-height: 1;
}
details[open] summary::after { content: "\2212"; }

details p { margin: 0.6rem 0; padding-left: 0.1rem; }
details p a { text-decoration: none; border-bottom: 2px solid var(--red); }
details p a:hover { background: var(--red); color: var(--paper); border-color: var(--ink); }

/* ---- Pull quote ---- */
article blockquote {
  margin: 2rem 0;
  padding: 0;
  font-family: var(--heavy);
  font-weight: 900;
  font-style: normal;
  font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.1rem);
  line-height: 1.15;
  color: var(--red);
  letter-spacing: -0.01em;
}
article blockquote p { display: inline; margin: 0; }
article blockquote::before { content: "\201C"; color: var(--ink); }
article blockquote::after { content: "\201D"; color: var(--ink); }

/* ---- Poem / quoted excerpt ---- */
.poem {
  border-left: 4px solid var(--red);
  padding: 0.25rem 0 0.25rem 1.25rem;
  margin: 1.5rem 0;
}
.poem p { font-style: italic; line-height: 1.8; margin: 0 0 1rem; }

figure.center { text-align: center; margin: 1.75rem 0; }
figure.center img, figure.center video { margin: 0 auto; border: 2px solid var(--rule); }
figcaption {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
}

/* ---- Page transitions ----
   Primary: native cross-document View Transitions (Chrome/Edge only as of
   writing — no Firefox/Safari support). CSS-only, no-op elsewhere.
   Fallback: a plain on-load animation on <main>, which every browser runs
   because it's just a normal CSS animation, not a cross-document transition.
   @supports gates it out of browsers that already got the View Transition
   so the two don't stack. */
@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: none;
}
::view-transition-new(root) {
  animation: martyr-stamp-in 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes martyr-stamp-in {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

@supports not (view-transition-name: none) {
  main { animation: martyr-page-in 550ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}
@keyframes martyr-page-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(root) { animation: none; }
  main { animation: none; }
}

/* ---- Footer ---- */
footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 3px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
