/* =========================================================
   Murder Book: site styles
   Palette pulled from in-game UI: slate, casebook paper, ink, red.
   ========================================================= */

:root {
  --ink: #0f1416;
  --ink-2: #172024;
  --slate: #34444a;
  --slate-2: #26343a;
  --slate-3: #5d7278;
  --mist: #9fb3b6;
  --paper: #e6ecea;
  --paper-2: #cfdad9;
  --cream: #f8f7f2;
  --red: #d9434a;          /* accent on dark / large text */
  --red-ink: #b3323a;      /* accent on paper at body size */
  --red-soft: #ec6a70;     /* accent on dark at body size */

  --font-type: "Courier Prime", "Courier New", Courier, monospace;
  --font-stamp: "Special Elite", "Courier Prime", "Courier New", monospace;

  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
  --nav-h: 64px;

  --ease-out: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-type);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
dl, dd { margin: 0; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--cream); color: var(--ink); padding: .6rem 1rem; font-family: var(--font-stamp);
}
.skip-link:focus { top: 1rem; }
.svg-defs { position: absolute; width: 0; height: 0; }

/* Film grain over the whole page */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none;
  opacity: .045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.hl { color: var(--red-ink); }
.section--slate .hl, .section--ink .hl { color: var(--red-soft); }

/* ---------- Typography ---------- */
h2 {
  font-family: var(--font-stamp);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin-bottom: .6em;
  text-wrap: balance;
}
h3 { font-family: var(--font-stamp); font-size: 1.35rem; line-height: 1.2; }

.lead { font-size: 1.25rem; line-height: 1.5; }
.lead--light { color: var(--paper-2); }

.file-label, .eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font-stamp);
  font-size: .8rem; letter-spacing: .22em; text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.file-label {
  padding: .35em .8em .25em;
  color: var(--cream); background: var(--ink);
  transform: rotate(-1.2deg);
}
.file-label--light { background: var(--red); color: var(--cream); }

/* ---------- Buttons & chips ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7em 1.4em .6em;
  font-family: var(--font-stamp); font-size: 1rem; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 0; background: none;
  transition: transform .2s var(--ease-out), background-color .2s, color .2s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border: 2.5px solid currentColor; filter: url(#rough);
}
.btn:hover { transform: translateY(-2px) rotate(-.6deg); }
.btn--red { color: var(--cream); }
.btn--red::before { background: var(--red); border-color: var(--ink); }
.btn--red:hover::before { background: #e5525a; }
.btn--ghost { color: var(--paper); }
.btn--ghost:hover { color: var(--cream); }

.badges { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.badges li {
  font-family: var(--font-stamp); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .35em .75em .25em; color: var(--ink); background: var(--paper);
}
.badges li:nth-child(2) { transform: rotate(1.5deg); }
.badges li:nth-child(3) { transform: rotate(-1deg); background: var(--red); color: var(--cream); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.chips li {
  font-family: var(--font-stamp); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  padding: .35em .7em .25em; background: var(--ink); color: var(--paper);
}
.chips li.is-active { background: var(--red); color: var(--cream); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  transition: background-color .35s, box-shadow .35s, transform .35s;
}
.nav.is-solid { background: rgba(15, 20, 22, .92); box-shadow: 0 1px 0 rgba(159, 179, 182, .15); backdrop-filter: blur(8px); }
.nav__inner {
  height: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.nav__brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand-logo { width: auto; max-width: none; }
.nav__brand .brand-logo { height: 38px; }
.nav__subtitle {
  font-family: var(--font-stamp); font-size: .68rem; line-height: 1.2; letter-spacing: .18em; text-transform: uppercase;
  color: var(--mist); max-width: 9.5em; padding-left: .75rem; border-left: 1px solid rgba(159, 179, 182, .3);
}
@media (max-width: 1100px) and (min-width: 901px) { .nav__subtitle { display: none; } }
.nav__links { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.6rem); }
.nav__links a {
  font-family: var(--font-stamp); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--paper-2); text-decoration: none; padding: .4em 0; position: relative;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out);
}
.nav__links a:hover, .nav__links a.is-current { color: var(--cream); }
.nav__links a:hover::after, .nav__links a.is-current::after { transform: scaleX(1); }
.nav__links .nav__cta { padding: .45em .9em .35em; background: var(--red); color: var(--cream); }
.nav__links .nav__cta::after { display: none; }

.nav__toggle { display: none; }

@media (max-width: 900px) {
  .nav__toggle {
    display: grid; place-items: center; width: 48px; height: 48px; margin-right: -10px;
    background: none; border: 0; color: var(--cream); cursor: pointer;
  }
  .nav__bars, .nav__bars::before, .nav__bars::after {
    display: block; width: 24px; height: 2px; background: currentColor; transition: transform .25s, opacity .25s;
  }
  .nav__bars { position: relative; }
  .nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
  .nav__bars::before { top: -7px; } .nav__bars::after { top: 7px; }
  .nav.is-open .nav__bars { background: transparent; }
  .nav.is-open .nav__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.5rem; background: var(--ink);
    border-bottom: 1px solid rgba(159, 179, 182, .15);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open { background: var(--ink); }
  .nav.is-open .nav__links { transform: none; opacity: 1; visibility: visible; }
  .nav__links a { padding: .9em 0; font-size: .95rem; border-bottom: 1px solid rgba(159, 179, 182, .1); }
  .nav__links a::after { display: none; }
  .nav__links .nav__cta { margin-top: 1rem; text-align: center; }
}

/* ---------- Hero: scroll word reveal ---------- */
/* Hero timeline. Words are scroll-driven (--p, 0→1, set in main.js); the ending is time-driven:
   0–0.48 words light up with scroll · at 0.52 .is-revealed plays the title scene over 1s (60 frames)
   · 0.52–1 the finished scene holds perfectly still while the page keeps scrolling */
.hero { position: relative; height: 300vh; background: var(--ink); color: var(--cream); }
.hero__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; align-items: center;
  background: radial-gradient(ellipse 60% 70% at 50% 0%, #1f2b30 0%, var(--ink) 70%);
}
.hero__backdrop { /* lamp haze behind the seated detective */
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(ellipse 42% 80% at 50% 0%, #6a7d83 0%, #435359 32%, #253338 62%, var(--ink) 100%);
}
.hero__silhouette-wrap { /* detective seen from behind, from the game's Idle animation */
  position: absolute; left: 50%; bottom: 0; height: min(82%, 100vw); aspect-ratio: 1100 / 1234;
  transform: translateX(-50%) translateY(calc(var(--p, 0) * 3%)) scale(calc(1 + var(--p, 0) * .06));
  transform-origin: 50% 100%;
  filter: drop-shadow(0 0 40px rgba(15, 20, 22, .6));
}
.hero__silhouette { width: 100%; height: 100%; max-width: none; object-fit: contain; object-position: center bottom; }
.hero__stage::after { /* CRT scanlines + VHS colour bands over everything in the stage */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .22) 0 1px, transparent 1px 3px),
    linear-gradient(to bottom, transparent 18%, rgba(159, 179, 182, .05) 22%, transparent 27%);
  transition: opacity 1s ease-in-out; /* scanlines fade out completely so the title art stays sharp */
}
.hero.is-revealed .hero__stage::after { opacity: 0; }

/* Payoff: the title scene rebuilt from layers so the suspect's chair sits in front of the logo */
.hero__cover {
  position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden;
  opacity: 0; transition: opacity 1s ease-in-out;
}
.hero.is-revealed .hero__cover { opacity: 1; }
.title-scene {
  position: absolute; left: 50%; top: 50%;
  width: max(100vw, 177.78vh); aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%) scale(1.1);
  transform-origin: 50% 45%;
  transition: transform 1s cubic-bezier(.22, .61, .36, 1);
}
.hero.is-revealed .title-scene { transform: translate(-50%, -50%) scale(1); }
.title-scene img { position: absolute; max-width: none; }
.title-scene__bg { inset: 0; width: 100%; height: 100%; }
.title-scene__logo { /* rises from behind the chair as the scene settles */
  /* logo and underline sit fully above the chair's backrest (chair top ≈ 41% of the scene) */
  left: 50%; top: 12%; width: 36%; height: auto;
  transform: translate(-50%, 12%);
  transition: transform 1s cubic-bezier(.22, .61, .36, 1);
  filter: drop-shadow(0 6px 18px rgba(15, 20, 22, .35));
}
.hero.is-revealed .title-scene__logo { transform: translate(-50%, 0); }
.title-scene__chair { left: 37.76%; top: 39.81%; width: 23.7%; height: auto; }
.hero__cover::after { /* dark shading so the art never overpowers the text */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(15, 20, 22, .7) 0%, rgba(15, 20, 22, 0) 16%),
    linear-gradient(to bottom, rgba(15, 20, 22, 0) 50%, rgba(15, 20, 22, .82) 70%, rgba(15, 20, 22, .96) 100%),
    radial-gradient(ellipse 70% 90% at 50% 38%, rgba(15, 20, 22, 0) 45%, rgba(15, 20, 22, .75) 100%);
}
@media (max-aspect-ratio: 1/1) {
  .title-scene { width: 235vw; top: calc(var(--nav-h) - 4vw); transform: translateX(-50%) scale(1.1); }
  .hero.is-revealed .title-scene { transform: translateX(-50%) scale(1); }
  .hero__cover::after {
    background:
      linear-gradient(to bottom, rgba(15, 20, 22, .6) 0%, rgba(15, 20, 22, 0) 12%),
      linear-gradient(to bottom, rgba(15, 20, 22, 0) 42%, rgba(15, 20, 22, .9) 60%, var(--ink) 72%),
      linear-gradient(to right, rgba(15, 20, 22, .55), rgba(15, 20, 22, 0) 22%, rgba(15, 20, 22, 0) 78%, rgba(15, 20, 22, .55));
  }
}
.hero__inner {
  position: relative; z-index: 2; width: 100%; max-width: var(--container); margin-inline: auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: calc(var(--nav-h) + 1rem) var(--gutter) 2rem;
  transition: opacity .6s ease-in-out, transform 1s cubic-bezier(.22, .61, .36, 1);
}
.hero.is-revealed .hero__inner { opacity: 0; transform: translateY(-60px); }
.eyebrow--rec { color: var(--mist); margin-bottom: 1.75rem; white-space: nowrap; }
@media (max-width: 480px) { .eyebrow--rec { font-size: .66rem; letter-spacing: .1em; } }
.rec-dot {
  width: .7em; height: .7em; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 12px rgba(217, 67, 74, .9); animation: rec 1.4s steps(1) infinite;
}
@keyframes rec { 50% { opacity: .15; } }

.hero__statement {
  font-family: var(--font-type);
  font-size: clamp(1.6rem, 3.7vw, 3.1rem);
  line-height: 1.28;
  letter-spacing: -.02em;
  max-width: 26ch;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(11, 17, 19, .6);
}
.hero__statement .word {
  display: inline-block;
  opacity: .14;
  transition: color .5s, text-shadow .5s;
  will-change: opacity;
}
.hero__statement em { font-style: normal; }
.hero__statement .word--accent.is-lit { color: var(--red); text-shadow: 0 0 24px rgba(217, 67, 74, .35); }

/* Payoff sits over the cover art, where the in-game menu would be */
.hero__payoff {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: clamp(2.5rem, 9vh, 6rem);
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding-inline: var(--gutter);
  opacity: 0; transform: translateY(24px); visibility: hidden;
  transition: opacity .6s var(--ease-out) .4s, transform .6s var(--ease-out) .4s, visibility 0s linear 1s;
}
.hero__payoff::before { /* dark pool so CTAs read over the art */
  content: ""; position: absolute; inset: -40% -10% -60%; z-index: -1;
  background: radial-gradient(ellipse 50% 50% at 50% 60%, rgba(15, 20, 22, .85), transparent 75%);
}
.hero__wordmark { display: none; }
.hero__subtitle {
  margin: 0; font-family: var(--font-stamp); font-size: clamp(.95rem, 1.6vw, 1.25rem);
  letter-spacing: .32em; text-transform: uppercase; color: var(--cream);
  text-shadow: 0 2px 0 var(--ink);
}
.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.hero.is-revealed .hero__payoff { opacity: 1; transform: none; visibility: visible; transition-delay: .4s, .4s, 0s; }

/* Scroll guidance: stays visible through the intro and shows how far along it is */
.hero__hud {
  position: absolute; z-index: 4; left: 50%; bottom: clamp(1rem, 3vh, 1.75rem); transform: translateX(-50%);
  display: flex; align-items: center; gap: .9rem; padding: .6rem 1.1rem;
  background: rgba(15, 20, 22, .72); border: 1px solid rgba(159, 179, 182, .25); border-radius: 999px;
  backdrop-filter: blur(6px); white-space: nowrap;
  transition: opacity .4s, visibility .4s, transform .4s var(--ease-out);
}
.hero__hud-label {
  font-family: var(--font-stamp); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--paper);
}
.hero__hud-arrow { display: inline-block; margin-left: .35em; color: var(--red-soft); animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
.hero__hud-track { width: clamp(56px, 10vw, 120px); height: 3px; background: rgba(159, 179, 182, .25); border-radius: 3px; overflow: hidden; }
.hero__hud-fill {
  display: block; height: 100%; background: var(--red);
  transform-origin: left; transform: scaleX(clamp(0, calc(var(--p, 0) / .52), 1));
}
.hero.is-revealed .hero__hud { opacity: 0; visibility: hidden; transform: translate(-50%, 10px); }
@media (max-width: 420px) {
  .hero__hud { gap: .6rem; padding-inline: .9rem; }
  .hero__hud-label { font-size: .64rem; letter-spacing: .12em; }
}
/* No-JS / reduced motion: show everything, no tall scroll track */
.no-reveal .hero { height: auto; }
.no-reveal .hero__stage { position: relative; min-height: 100svh; height: auto; flex-direction: column; justify-content: center; padding-bottom: 3rem; }
.no-reveal .hero__cover { opacity: .22; }
.no-reveal .hero__inner { opacity: 1; transform: none; filter: none; }
.no-reveal .hero__statement .word { opacity: 1; }
.no-reveal .hero__statement .word--accent { color: var(--red); }
.no-reveal .hero__payoff { position: relative; bottom: auto; opacity: 1; transform: none; visibility: visible; }
.no-reveal .hero__wordmark { display: block; width: clamp(160px, 22vw, 240px); }
.no-reveal .hero__hud { display: none; }

/* Cream wordmark, masked from the official logo so the colour is exact */
.wordmark {
  display: block; aspect-ratio: 662 / 269; background: var(--cream);
  -webkit-mask: url("../assets/img/icon.png") center / contain no-repeat;
          mask: url("../assets/img/icon.png") center / contain no-repeat;
}

/* ---------- Sections ---------- */
.section { position: relative; padding-block: clamp(4.5rem, 10vw, 8rem); }
.section--paper { background: var(--paper); color: var(--ink); }
.section--slate { background: var(--slate-2); color: var(--paper); }
.section--ink { background: var(--ink); color: var(--paper); }
.section--slate h2, .section--ink h2 { color: var(--cream); }

/* torn paper edge at the top of paper sections */
.section--paper::before, .section--slate::before {
  content: ""; position: absolute; left: 0; right: 0; top: -13px; height: 14px;
  background: inherit;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'><path d='M0 14V8l6-3 7 4 8-6 6 5 9-4 5 3 8-5 7 6 6-4 9 3 6-5 8 6 5-3 7 4 8-5 5 2V14z'/></svg>") center / 360px 14px repeat-x;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'><path d='M0 14V8l6-3 7 4 8-6 6 5 9-4 5 3 8-5 7 6 6-4 9 3 6-5 8 6 5-3 7 4 8-5 5 2V14z'/></svg>") center / 360px 14px repeat-x;
}

.section__head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split--reverse .split__text { order: 2; }
.split--top { align-items: start; }
.split__text > p:last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__text { order: 0; }
}

/* Polaroid-ish evidence photo */
.polaroid {
  background: var(--cream); padding: .8rem .8rem 3rem; position: relative;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 20px 50px -20px rgba(15, 20, 22, .55);
  transform: rotate(1.4deg);
}
.polaroid--tilt { transform: rotate(-1.6deg); }
.polaroid::before { /* tape */
  content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 28px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(207, 218, 217, .75); box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.polaroid figcaption {
  position: absolute; left: 1rem; right: 1rem; bottom: .8rem;
  font-family: var(--font-stamp); font-size: .9rem; color: var(--slate);
}

/* Interrogation room, layered from the game's own scene assets */
.scene { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #26343a; }
.scene img { position: absolute; max-width: none; }
.scene__bg, .scene__table, .scene__props { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene__figure { left: 50%; top: 8%; width: 38%; height: auto; transform: translateX(-50%); }
.factstrip {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.factstrip > div { padding: 1.1rem 1.25rem; }
.factstrip > div + div { border-left: 1px dashed rgba(15, 20, 22, .35); }
.factstrip dt { font-family: var(--font-stamp); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--slate-3); }
.factstrip dd { font-weight: 700; }
@media (max-width: 760px) {
  .factstrip { grid-template-columns: 1fr 1fr; }
  .factstrip > div:nth-child(3) { border-left: 0; }
  .factstrip > div:nth-child(n+3) { border-top: 1px dashed rgba(15, 20, 22, .35); }
}

/* ---------- Steps ---------- */
.steps { display: grid; gap: clamp(3rem, 7vw, 6rem); counter-reset: step; }
.step { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.step:nth-child(even) .step__media { order: 2; }
.step__media {
  position: relative; border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--ink);
  background: var(--ink);
}
.step__media img { width: 100%; }
.step__num {
  display: block; font-family: var(--font-stamp); font-size: clamp(3rem, 7vw, 5rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--mist); margin-bottom: .75rem;
}
.step h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .6rem; color: var(--cream); }
.step p { color: var(--paper-2); }
.step q { color: var(--cream); quotes: "\201C" "\201D"; }
.note {
  margin: 1rem 0 0; padding: 1rem 1.2rem; background: var(--cream); color: var(--ink);
  border-left: 4px solid var(--red); font-size: .95rem;
}
.note p { color: var(--ink); margin: 0 0 .4rem; }
.note cite { font-family: var(--font-stamp); font-style: normal; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-3); }
@media (max-width: 860px) {
  .step { grid-template-columns: 1fr; }
  .step:nth-child(even) .step__media { order: 0; }
  .step__media { box-shadow: 6px 6px 0 var(--ink); }
}

/* ---------- Casebook tabs ---------- */
.casebook {
  display: grid; grid-template-columns: minmax(260px, .9fr) 1.2fr;
  background: var(--paper-2); color: var(--ink);
  padding: clamp(1rem, 3vw, 2rem); gap: clamp(1rem, 3vw, 2rem);
  border-radius: 10px; position: relative;
  box-shadow: inset 0 0 0 10px rgba(52, 68, 74, .25), 0 30px 80px -30px rgba(0,0,0,.8);
}
.casebook::after { /* spine */
  content: ""; position: absolute; top: 1.5rem; bottom: 1.5rem; left: calc(clamp(1rem, 3vw, 2rem) + 45%);
  width: 2px; background: rgba(52, 68, 74, .25);
}
.casebook__list { display: grid; gap: .4rem; align-content: start; }
.casebook__list button {
  display: flex; align-items: center; gap: .8rem; width: 100%;
  padding: .3rem .8rem .3rem .3rem; text-align: left; cursor: pointer;
  font-family: var(--font-stamp); font-size: 1rem; letter-spacing: .02em;
  color: var(--ink); background: var(--cream); border: 2px solid var(--ink);
  transition: background-color .2s, color .2s, transform .2s var(--ease-out);
}
.casebook__list button img { width: 52px; height: auto; flex: none; }
.casebook__list button:hover { transform: translateX(4px); }
.casebook__list button[aria-selected="true"] { background: var(--ink); color: var(--cream); transform: translateX(8px); }

.casebook__page {
  background: var(--cream); padding: clamp(1.5rem, 4vw, 2.75rem); align-self: start;
  position: relative; min-height: 100%;
}
.casebook__page h3 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); text-transform: uppercase; letter-spacing: .02em;
  display: inline-block; margin-bottom: 1.25rem; padding-bottom: .2rem;
  border-bottom: 4px solid var(--red);
}
.casebook__page p { font-size: 1.1rem; }
.casebook__why { color: var(--slate); }
.casebook__page .hl { color: var(--red-ink); }
.casebook__source {
  font-family: var(--font-stamp); font-size: .72rem !important; letter-spacing: .15em; text-transform: uppercase; color: var(--slate-3);
  margin: 0;
}
[role="tabpanel"] { animation: pageIn .35s var(--ease-out); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } }

.more-tells { margin-top: 1.5rem; color: var(--mist); font-style: italic; }

@media (max-width: 860px) {
  .casebook { grid-template-columns: 1fr; }
  .casebook::after { display: none; }
  .casebook__list { grid-template-columns: repeat(2, 1fr); }
  .casebook__list button { font-size: .85rem; gap: .5rem; }
  .casebook__list button img { width: 40px; }
  .casebook__list button[aria-selected="true"], .casebook__list button:hover { transform: none; }
}

/* ---------- Ticks ---------- */
.ticks { display: grid; gap: .6rem; margin-top: 1.5rem; }
.ticks li { position: relative; padding-left: 2rem; }
.ticks li::before {
  content: "✕"; position: absolute; left: 0; top: -.05em;
  font-family: var(--font-stamp); font-size: 1.2rem; color: var(--red-ink);
}

/* ---------- Devices ---------- */
.devices { position: relative; padding: 0 0 12% 0; }
.device--desktop {
  border: 10px solid var(--ink); border-bottom-width: 14px; border-radius: 10px; background: var(--ink);
  box-shadow: 0 30px 60px -25px rgba(0,0,0,.7);
}
.device--phone {
  position: absolute; right: -2%; bottom: 0; width: 30%;
  border: 7px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--ink);
  box-shadow: -12px 20px 50px -15px rgba(0,0,0,.75);
  transform: rotate(3deg);
}
.stats { display: grid; grid-template-columns: repeat(3, auto); gap: 1.5rem; margin-top: 2rem; justify-content: start; }
.stats dt { font-family: var(--font-stamp); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1; color: var(--cream); }
.stats dd { font-size: .85rem; color: var(--mist); margin-top: .35rem; }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr 1fr; } }

/* ---------- Gallery: evidence locker ---------- */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 3vw, 2.5rem) clamp(.75rem, 2.5vw, 2rem);
  padding: clamp(1.5rem, 4vw, 3rem);
  background:
    radial-gradient(ellipse 60% 70% at 50% 40%, rgba(159, 179, 182, .12), transparent 70%),
    var(--slate-2);
  border: 2px solid rgba(159, 179, 182, .15);
}
.gallery__item:nth-child(4n+1) { --r: -4deg; }
.gallery__item:nth-child(4n+2) { --r: 3deg; }
.gallery__item:nth-child(4n+3) { --r: -2deg; }
.gallery__item:nth-child(4n)   { --r: 5deg; }
.gallery__item:nth-child(even) { margin-top: 1.25rem; }
.gallery button {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in;
  transform: rotate(var(--r, 0deg)); transition: transform .35s var(--ease-out), filter .35s;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .45));
}
.gallery button::before { /* pin */
  content: ""; position: absolute; z-index: 2; top: 4%; left: 50%; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: var(--red); box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .3), 0 2px 3px rgba(0, 0, 0, .5);
}
.gallery button:hover, .gallery button:focus-visible {
  transform: rotate(0deg) scale(1.06); filter: drop-shadow(0 20px 22px rgba(0, 0, 0, .55));
}
.gallery img { width: 100%; height: auto; image-rendering: auto; }
.gallery__tag {
  position: absolute; right: 8%; bottom: 7%; font-family: var(--font-stamp); font-size: .8rem; letter-spacing: .1em;
  color: var(--ink); background: var(--cream); border: 1.5px solid var(--ink); padding: .05em .4em; transform: rotate(-6deg);
}
@media (max-width: 760px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery__item:nth-child(even) { margin-top: .75rem; }
}
.lightbox {
  width: min(94vw, 1400px); max-height: 92vh; padding: 0; border: 0; background: transparent; overflow: visible;
}
.lightbox::backdrop { background: rgba(8, 11, 12, .92); }
.lightbox img { max-height: 88vh; width: auto; min-width: min(80vw, 700px); margin-inline: auto; }
.lightbox__close {
  position: absolute; top: -3rem; right: 0; width: 44px; height: 44px;
  font-size: 2rem; line-height: 1; color: var(--cream); background: none; border: 0; cursor: pointer;
}

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.card {
  position: relative; background: var(--cream); padding: 1.75rem 1.5rem 1.5rem;
  border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
}
.card:nth-child(odd) { transform: rotate(-.6deg); }
.card:nth-child(even) { transform: rotate(.5deg); }
.card__tag {
  display: inline-block; margin-bottom: 1rem;
  font-family: var(--font-stamp); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--red-ink); border: 1.5px solid currentColor; padding: .25em .6em .15em; transform: rotate(-2deg);
}
.card h3 { margin-bottom: .6rem; }
.card p { font-size: .98rem; margin: 0; }
@media (max-width: 1000px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Studio ---------- */
.studio-logo { display: grid; place-items: center; padding: 1rem; }
.studio-logo img { width: min(100%, 380px); transform: rotate(-3deg); filter: drop-shadow(8px 10px 0 rgba(0,0,0,.35)); }
.partners { margin-top: 1.5rem; font-weight: 700; color: var(--cream); }
.partners span { display: block; font-weight: 400; font-family: var(--font-stamp); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mist); margin-bottom: .3rem; }

.record {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-block: clamp(3rem, 6vw, 4.5rem);
  background: rgba(159, 179, 182, .25); border: 1px solid rgba(159, 179, 182, .25);
}
.record li { background: var(--slate-2); padding: 1.5rem; }
.record h3 { color: var(--cream); margin-bottom: .4rem; }
.record p { color: var(--mist); margin: 0; font-size: .95rem; }
@media (max-width: 760px) { .record { grid-template-columns: 1fr; } }

.subhead { font-size: .8rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mist); margin-bottom: 1.25rem; }
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.team li {
  display: grid; gap: .2rem; padding: 1rem 1.2rem;
  background: var(--paper); color: var(--ink); border-left: 5px solid var(--red);
}
.team__name { font-family: var(--font-stamp); font-size: 1.15rem; }
.team__role { font-size: .88rem; color: var(--slate); }
@media (max-width: 860px) { .team { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .team { grid-template-columns: 1fr; } }

/* ---------- EU support ---------- */
.support { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.support__logo {
  background: #fff; padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
}
.support__logo img { width: 100%; }
.support__logo .havc { width: min(62%, 320px); margin-top: 2rem; }
.disclaimer { margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid #d5dcdc; font-size: .8rem; line-height: 1.55; color: #3d4a4f; }

.stamp {
  display: inline-grid; justify-items: center; margin-top: 1.5rem; padding: 1rem 1.6rem .9rem;
  color: var(--red-ink); border: 3px double currentColor; border-radius: 6px;
  font-family: var(--font-stamp); text-transform: uppercase; transform: rotate(-4deg);
  mix-blend-mode: multiply;
}
.stamp__top, .stamp__coords { font-size: .65rem; letter-spacing: .25em; }
.stamp__city { font-size: 2rem; line-height: 1.05; letter-spacing: .08em; }
.stamp__country { font-size: .9rem; letter-spacing: .3em; }
@media (max-width: 860px) { .support { grid-template-columns: 1fr; } }

/* ---------- Press ---------- */
.press { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; }
.press h3 { margin-bottom: 1.25rem; }
.dossier {
  background: var(--paper); color: var(--ink); padding: clamp(1.5rem, 4vw, 2.5rem); position: relative;
}
.dossier::before { /* folder tab */
  content: "CASE FILE · MB-001"; position: absolute; top: -1.9rem; left: 0;
  padding: .45rem 1rem .3rem; background: var(--paper); color: var(--slate-3);
  font-family: var(--font-stamp); font-size: .65rem; letter-spacing: .2em;
  border-radius: 6px 6px 0 0;
}
.factsheet > div {
  display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: .7rem 0;
  border-bottom: 1px dashed rgba(15, 20, 22, .3);
}
.factsheet > div:last-child { border-bottom: 0; }
.factsheet dt { font-family: var(--font-stamp); font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--slate-3); padding-top: .2em; }
.factsheet dd { font-weight: 700; }
.press__side { display: grid; gap: 1.5rem; align-content: start; }
.contact, .downloads { border: 1px solid rgba(159, 179, 182, .25); padding: clamp(1.25rem, 3vw, 2rem); }
.contact h3, .downloads h3 { color: var(--cream); }
.contact__row {
  display: grid; gap: .15rem; padding: 1rem 1.1rem; margin-bottom: .6rem; text-decoration: none;
  background: var(--ink-2); border-left: 4px solid var(--red); transition: background-color .2s, transform .2s var(--ease-out);
}
.contact__row:hover { background: var(--slate-2); transform: translateX(4px); }
.contact__kind { font-family: var(--font-stamp); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--mist); }
.contact__action { color: var(--cream); font-weight: 700; }
.contact__email { margin: 1rem 0 0; color: var(--mist); font-size: .95rem; }
.downloads ul { display: grid; gap: .1rem; margin-bottom: 1.25rem; }
.downloads li a {
  display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; text-decoration: none; color: var(--paper);
  border-bottom: 1px dashed rgba(159, 179, 182, .2);
}
.downloads li a::after { content: "↓"; color: var(--red-soft); }
.downloads li a:hover { color: var(--cream); }
.link-out { color: var(--red-soft); font-weight: 700; text-underline-offset: 3px; }
@media (max-width: 860px) {
  .press { grid-template-columns: 1fr; }
  .factsheet > div { grid-template-columns: 1fr; gap: .1rem; }
}

/* ---------- For fans of ---------- */
.fans { margin-top: 1.25rem; font-weight: 700; }
.fans span {
  display: block; margin-bottom: .2rem; font-weight: 400;
  font-family: var(--font-stamp); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--slate-3);
}

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 900px; }
.faq { display: grid; gap: .75rem; }
.faq details { background: var(--ink-2); border: 1px solid rgba(159, 179, 182, .2); border-left: 4px solid var(--red); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer; list-style: none;
  padding: 1.1rem 1.25rem; font-family: var(--font-stamp); font-size: clamp(1.02rem, 1.8vw, 1.2rem); color: var(--cream);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.5rem; line-height: 1; color: var(--red-soft); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { background: rgba(159, 179, 182, .06); }
.faq details p { margin: 0; padding: 0 1.25rem 1.25rem; color: var(--paper-2); }

/* ---------- Coverage ---------- */
.coverage { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.coverage li:first-child { grid-column: 1 / -1; }
.coverage__item {
  display: flex; flex-direction: column; gap: .55rem; height: 100%;
  padding: clamp(1.25rem, 3vw, 1.75rem); text-decoration: none; color: var(--ink);
  background: var(--cream); border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ink);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.coverage__item:hover, .coverage__item:focus-visible { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.coverage__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem;
  font-family: var(--font-stamp); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--slate-3);
}
.coverage__type { padding: .2em .6em .1em; background: var(--ink); color: var(--cream); letter-spacing: .12em; }
.coverage li:first-child .coverage__type { background: var(--red-ink); }
.coverage__title { font-family: var(--font-stamp); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.25; }
.coverage li:first-child .coverage__title { font-size: clamp(1.4rem, 2.8vw, 2rem); }
.coverage__text { font-size: .95rem; color: var(--slate); }
.coverage__cta { margin-top: auto; padding-top: .4rem; font-weight: 700; color: var(--red-ink); }
@media (max-width: 760px) { .coverage { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { background: #0a0e0f; color: var(--mist); padding-block: 3.5rem 2rem; border-top: 1px solid rgba(159, 179, 182, .12); }
.footer__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 2.5rem; align-items: center; }
.footer__funders { justify-self: center; }
.footer__brand { max-width: 360px; }
@media (min-width: 861px) { .footer .footer__funders { flex-wrap: nowrap; } }
.footer__lockup { display: flex; align-items: center; gap: 1rem; margin-bottom: .9rem; }
.footer__lockup .brand-logo { height: 58px; }
.footer__brand p { margin: 0; font-size: .92rem; }
.footer__brand a { color: var(--paper); }
.footer__brand .footer__subtitle {
  font-family: var(--font-stamp); font-size: .78rem; line-height: 1.3; letter-spacing: .2em; text-transform: uppercase;
  color: var(--paper); max-width: 9.5em; padding-left: 1rem; border-left: 1px solid rgba(159, 179, 182, .3);
}
.footer__funders {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.5rem;
  background: #fff; padding: .9rem 1.2rem; border-radius: var(--radius);
}
.footer__funders img { height: 52px; width: auto; flex: none; }
.footer__funders img + img { height: 34px; }
.footer__links { display: flex; flex-direction: column; align-items: flex-end; gap: .7rem; }
.footer__links a { color: var(--paper); text-decoration: none; font-family: var(--font-stamp); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.footer__links a:hover { color: var(--red-soft); }
.footer__legal { margin-top: 2.5rem; font-size: .78rem; color: var(--slate-3); }
@media (max-width: 860px) {
  .footer__inner { grid-template-columns: 1fr; justify-items: start; }
  .footer__links { align-items: flex-start; flex-direction: row; flex-wrap: wrap; gap: 1.25rem; }
  .footer__funders { justify-content: flex-start; }
  .footer__funders img { height: 44px; max-width: 100%; }
  .footer__funders img + img { height: 30px; }
}

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity .8s var(--ease-out), translate .8s var(--ease-out); }
.js .reveal.is-in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .rec-dot, .hero__hud-arrow { animation: none; }
  .js .reveal { opacity: 1; translate: none; transition: none; }
  [role="tabpanel"] { animation: none; }
}
