/* ==========================================================================
   FORECLOSURE FORENSICS — 2026 revival
   "The Evidence Room" — institutional legal/forensic document aesthetic.

   Palette  : ink navy · bone paper · document cream · notice red · slate
   Type     : Fraunces (display) · IBM Plex Sans (body) · IBM Plex Mono (utility)
   Motif    : ruled legal paper, stamped margin notes, case-file index grid,
              red rubber-stamp overlays. Trust through precision.
   Mobile-first to 360px. No build step. A11y-forward, GPU-safe motion.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* palette (exact, per design brief) */
  --navy:       #0E1B2C;   /* primary dark — ink */
  --navy-2:     #16283E;   /* raised surface on navy */
  --paper:      #F5F1E8;   /* bone paper — primary light */
  --cream:      #EDE7DA;   /* document cream — section alt */
  --red:        #B3261E;   /* notice red — stamp / action, used sparingly */
  --red-deep:   #8F1D16;   /* hover / pressed */
  --slate:      #5A6A7A;   /* secondary text on light */
  --slate-2:    #6E7E8C;   /* tertiary / muted */
  --line:       #D8D0BE;   /* hairline rule */

  /* derived */
  --ink:        #0E1B2C;                 /* primary text on light */
  --ink-2:      #3A4551;                 /* body text on light */
  --muted:      #4A5866;                 /* secondary text on light — AA on paper AND cream */
  --line-soft:  rgba(14, 27, 44, 0.13);
  --line-faint: rgba(14, 27, 44, 0.07);
  --paper-on-navy: rgba(245, 241, 232, 0.86);
  --paper-dim:   rgba(245, 241, 232, 0.62);

  /* type */
  --serif: "Fraunces", "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Menlo", monospace;

  /* rhythm */
  --pad-section: clamp(4rem, 9vw, 7.5rem);
  --container: 1180px;

  /* motion */
  --ease-out: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 640ms;

  --shadow-doc: 0 1px 2px rgba(14,27,44,.05), 0 22px 55px -30px rgba(14,27,44,.28);
  --shadow-stamp: 0 8px 24px -12px rgba(179, 38, 30, 0.55);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 500; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
address { font-style: normal; }
::selection { background: rgba(179, 38, 30, 0.18); }

/* subtle paper grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 3. Accessibility ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--line);
  background: var(--navy);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: 1rem; }
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 4. Layout primitives ---------- */
section[id] { scroll-margin-top: 5.5rem; }
.container { width: min(var(--container), 100% - 2.5rem); margin-inline: auto; }
.container-narrow { width: min(820px, 100% - 2.5rem); }

.section { padding-block: var(--pad-section); position: relative; }
.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  letter-spacing: -0.015em;
  margin-block: 0.9rem 1.1rem;
}
.section-title em { font-style: italic; color: var(--red-deep); }
.section-lede { font-size: clamp(1rem, 1.5vw, 1.1rem); color: var(--muted); max-width: 62ch; }

/* eyebrow — mono case reference, not a pill */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow-rule {
  display: inline-block;
  width: 2.4rem;
  height: 1px;
  background: var(--red);
  flex: none;
}
.eyebrow-on-dark { color: rgba(245, 241, 232, 0.8); }
.eyebrow-rule-on-dark { background: rgba(245, 241, 232, 0.55); }

/* ---------- 5. Rubber stamp (signature element) ---------- */
.stamp {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 3px;
  padding: 0.32rem 0.7rem;
  line-height: 1;
  transform: rotate(-5deg);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}
/* worn-ink halftone over the stamp face */
.stamp::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 1px;
  pointer-events: none;
  background-image: radial-gradient(rgba(245, 241, 232, 0.55) 0.5px, transparent 0.9px);
  background-size: 3.5px 3.5px;
  opacity: 0.55;
  mix-blend-mode: overlay;
}
.stamp-sm { font-size: 0.68rem; padding: 0.26rem 0.55rem; border-width: 1.5px; }
.stamp-lg {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  padding: 0.5rem 1.2rem;
  border-width: 3px;
  transform: rotate(-7deg);
  box-shadow: var(--shadow-stamp);
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem 0.8rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  flex: none;
  border: 1px solid currentColor;
  opacity: 0.9;
  transition: transform var(--dur) var(--ease-spring), background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.btn-solid { background: var(--red); color: var(--paper); }
.btn-solid:hover { background: var(--red-deep); }
.btn-solid:hover .btn-arrow { transform: translateX(3px); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: var(--navy); color: var(--paper); }
.btn-ghost:hover .btn-arrow { transform: translateX(3px); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- 7. Filing masthead (top bar) ---------- */
.masthead {
  background: var(--navy);
  color: rgba(245, 241, 232, 0.78);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.masthead-inner {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  padding: 0.5rem 0;
}
.masthead-sep { color: var(--red); }
.masthead-spacer { flex: 1; }
.masthead-file { color: rgba(245, 241, 232, 0.55); }
.masthead-file .masthead-sep { color: rgba(245, 241, 232, 0.3); }

/* ---------- 8. Navigation — sticky case-file bar ---------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 232, 0.92);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.nav {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.nav-mark {
  display: inline-flex;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
}
.nav-mark svg { width: 100%; height: 100%; }
.nav-brand-text {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--navy);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color var(--dur) var(--ease-out);
}
.nav-code {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--red);
  transform: translateY(-1px);
}
.nav-link:hover { color: var(--navy); }
.nav-link:hover .nav-code { color: var(--red-deep); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem 0.55rem 1.1rem;
  background: var(--red);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.nav-cta-label {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  opacity: 0.9;
  border-right: 1px solid rgba(245, 241, 232, 0.35);
  padding-right: 0.6rem;
}
.nav-cta:hover { background: var(--red-deep); }

/* burger */
.nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
}
.nav-burger span {
  width: 18px;
  height: 1.5px;
  background: var(--navy);
  transition: transform var(--dur) var(--ease-spring), opacity var(--dur) var(--ease-out);
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* mobile overlay — must be display:flex when open (JS toggles .is-open) */
@media (max-width: 899px) {
  .nav-links {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 0 clamp(2rem, 10vw, 5rem);
    background: var(--navy);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease-out), visibility 0s linear var(--dur);
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transition: opacity var(--dur) var(--ease-out); }
  .nav-link {
    font-size: 1.7rem;
    font-family: var(--serif);
    color: var(--paper);
    opacity: 0;
    transform: translateY(1.2rem);
    transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring);
  }
  .nav-links.is-open .nav-link { opacity: 1; transform: translateY(0); }
  .nav-links.is-open .nav-link:nth-child(1) { transition-delay: 70ms; }
  .nav-links.is-open .nav-link:nth-child(2) { transition-delay: 120ms; }
  .nav-links.is-open .nav-link:nth-child(3) { transition-delay: 170ms; }
  .nav-links.is-open .nav-link:nth-child(4) { transition-delay: 220ms; }
  .nav-links.is-open .nav-link:nth-child(5) { transition-delay: 270ms; }
  .nav-links.is-open .nav-link:nth-child(6) { transition-delay: 320ms; }
  .nav-code { color: rgba(245, 241, 232, 0.55); font-size: 0.72rem; }
  .nav-cta { margin-top: 0.5rem; font-size: 0.9rem; }
  .nav-burger { position: relative; z-index: 2; }
  .nav-burger[aria-expanded="true"] { border-color: transparent; }
  .nav-burger[aria-expanded="true"] span { background: var(--paper); }
}
@media (min-width: 900px) {
  .nav-burger { display: none; }
}

/* ---------- 9. Hero — the stamped document ---------- */
.hero {
  position: relative;
  overflow: clip;
  padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(4rem, 8vw, 7rem);
  background:
    linear-gradient(rgba(14,27,44,0.028) 1px, transparent 1px) 0 0 / 100% 2rem,
    var(--paper);
}
.watermark {
  position: absolute;
  top: 1.5rem;
  right: -1rem;
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(6rem, 22vw, 17rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: rgba(14, 27, 44, 0.045);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}
.hero-inner {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
.hero-copy,
.hero-doc { min-width: 0; }
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 8vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.98;
  margin-block: 1.3rem 1.5rem;
  max-width: 14ch;
}
.hero-title .mark {
  font-style: italic;
  color: var(--red-deep);
  position: relative;
  white-space: nowrap;
}
.hero-title .mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.02em;
  height: 0.16em;
  background: rgba(179, 38, 30, 0.32);
  transform: rotate(-0.5deg);
}
/* small screens: let the italic phrase wrap instead of forcing overflow */
@media (max-width: 640px) {
  .hero-title .mark { white-space: normal; }
  .hero-title .mark::after { display: none; }
  .hero-title .mark {
    text-decoration: underline;
    text-decoration-color: rgba(179, 38, 30, 0.45);
    text-decoration-thickness: 0.07em;
    text-underline-offset: 0.08em;
  }
  .btn { white-space: normal; }
}
.hero-lede {
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 52ch;
}
.hero-lede strong { color: var(--ink); font-weight: 600; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}
.hero-note {
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* hero document sheet */
.hero-doc { position: relative; }
.doc-sheet {
  position: relative;
  background: #FBF8F1;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-doc);
  padding: clamp(1.6rem, 3.4vw, 2.6rem);
  transform: rotate(0.6deg);
}
.doc-sheet::before {
  content: "";
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 1.2rem;
  border: 1px solid var(--line-faint);
  pointer-events: none;
}
.doc-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--navy);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}
.doc-body {
  padding: 1.5rem 0 2rem;
  background-image: repeating-linear-gradient(
    transparent,
    transparent calc(2rem - 1px),
    var(--line-faint) calc(2rem - 1px),
    var(--line-faint) 2rem
  );
}
.doc-line {
  font-family: var(--sans);
  font-size: 0.94rem;
  line-height: 2rem;
  color: var(--ink-2);
}
.doc-ink { color: var(--navy); font-weight: 600; }
.doc-mark {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--red);
}
.doc-sig {
  margin-top: 1rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--navy);
}
.doc-sheet .stamp-lg {
  position: absolute;
  top: 50%;
  right: clamp(1rem, 4vw, 2.5rem);
  transform: translateY(-50%) rotate(-9deg);
}
.doc-note {
  position: absolute;
  right: -0.6rem;
  bottom: -1.6rem;
  max-width: 15rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: var(--red);
  transform: rotate(-1deg);
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
  .hero { padding-top: clamp(4.5rem, 9vw, 7rem); }
}

/* ---------- 10. Memorandum strip ---------- */
.memo {
  background: var(--navy);
  color: var(--paper);
  border-block: 1px solid var(--navy-2);
}
.memo-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
  padding-block: clamp(2.2rem, 5vw, 3.2rem);
}
.memo-label {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: flex-start;
}
.memo-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: rgba(245, 241, 232, 0.55);
}
.memo-text {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.8rem);
  line-height: 1.42;
  color: var(--paper-on-navy);
}
.memo-text strong { color: var(--paper); font-weight: 600; }
@media (min-width: 760px) {
  .memo-grid { grid-template-columns: 13rem 1fr; }
}

/* ---------- 11. Case files (services) ---------- */
.files-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.file {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.2rem) clamp(1.4rem, 2.6vw, 2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-doc);
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.file:hover { transform: translateY(-4px); box-shadow: 0 1px 2px rgba(14,27,44,.05), 0 30px 60px -30px rgba(14,27,44,.34); }
.file-tab {
  position: absolute;
  top: -0.7rem;
  left: 1.4rem;
  padding: 0.28rem 0.7rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: none;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--red);
}
.file-no {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 1.4rem;
}
.file-title {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.file p { color: var(--muted); font-size: 0.95rem; }
.file-list {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.55rem;
}
.file-list li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.file-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--red);
}
.file-link {
  margin-top: auto;
  padding-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--red);
  text-transform: uppercase;
}
.file-link:hover { color: var(--red-deep); }
.file-link .btn-arrow { width: 1.5rem; height: 1.5rem; }

/* feature file — navy lead exhibit */
.file-feature {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--paper);
}
.file-feature .file-tab { background: var(--navy); border-color: var(--navy-2); color: var(--paper); }
.file-feature .file-no { color: rgba(245, 241, 232, 0.5); }
.file-feature .file-title { color: var(--paper); }
.file-feature p { color: var(--paper-dim); }
.file-feature .file-lede { color: var(--paper-on-navy); font-size: 1.02rem; }
.file-feature .file-list li { color: var(--paper-on-navy); }
.file-feature .file-list li::before { background: var(--red); }
.file-feature .file-link { color: var(--paper); }
.file-feature .file-link:hover { color: rgba(245, 241, 232, 0.75); }

@media (min-width: 760px) {
  .files-grid { grid-template-columns: repeat(3, 1fr); }
  .file-feature { grid-column: span 2; grid-row: span 2; }
}

/* ---------- 12. Chain of custody (process) ---------- */
.custody { background: var(--cream); border-block: 1px solid var(--line); }
.custody-track {
  display: grid;
  gap: 1.5rem;
  counter-reset: none;
}
.custody-step {
  position: relative;
  padding-top: 1.4rem;
  border-top: 2px solid var(--navy);
}
.custody-step::before {
  content: "";
  position: absolute;
  top: -0.42rem;
  left: 0;
  width: 0.8rem;
  height: 0.8rem;
  background: var(--red);
  border-radius: 50%;
}
.custody-num {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--red);
}
.custody-step h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin-block: 0.6rem;
}
.custody-step p { color: var(--muted); font-size: 0.95rem; }
.custody-cta {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding: clamp(1.5rem, 3.5vw, 2.2rem);
  background: var(--navy);
  color: var(--paper);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  border: 1px solid var(--navy-2);
}
.custody-cta p {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
}
@media (min-width: 760px) {
  .custody-track { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- 13. Position (about) ---------- */
.position-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: start;
}
.position-copy h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  letter-spacing: -0.015em;
  margin-block: 0.9rem 1.6rem;
  max-width: 16ch;
}
.position-copy h2 em { font-style: italic; color: var(--red-deep); }
.position-copy p { color: var(--muted); margin-bottom: 1.15rem; font-size: 1.02rem; }
.position-copy p strong { color: var(--ink); font-weight: 600; }
.pull-quote {
  position: relative;
  margin: 2rem 0 0;
  padding: 1.5rem 1.6rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  background: rgba(179, 38, 30, 0.045);
}
.pull-quote .stamp-sm { position: absolute; top: -0.9rem; left: 1.2rem; background: var(--paper); }
.pull-quote blockquote {
  margin: 0;
  padding-top: 0.7rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.4;
  color: var(--ink);
}
.pull-quote blockquote em { color: var(--red-deep); }

/* findings-of-fact panel */
.panel-ink {
  background: var(--navy);
  color: var(--paper);
  padding: clamp(1.6rem, 3.2vw, 2.4rem);
  border: 1px solid var(--navy-2);
  box-shadow: var(--shadow-doc);
}
.panel-code {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--red);
  margin-bottom: 1.1rem;
}
.panel-title {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  margin-bottom: 0.9rem;
}
.panel-text { color: var(--paper-dim); font-size: 0.95rem; }
.panel-list {
  margin-top: 1.4rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(245, 241, 232, 0.14);
  display: grid;
  gap: 0.6rem;
}
.panel-list li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.9rem;
  color: var(--paper-on-navy);
}
.panel-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.42rem;
  height: 0.42rem;
  background: var(--red);
}
.panel-foot {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(245, 241, 232, 0.14);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: rgba(245, 241, 232, 0.6);
}
@media (min-width: 900px) {
  .position-grid { grid-template-columns: 1.25fr 0.75fr; }
  .position-panel { margin-top: 3.5rem; }
}

/* ---------- 14. Evidence checklist ---------- */
.evidence { background: var(--cream); border-block: 1px solid var(--line); }
.evidence-sheet {
  background: #FBF8F1;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-doc);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}
.evidence-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--navy);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}
.evidence-list {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 0.5rem;
}
.evidence-list li {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.62rem 0.2rem;
  border-bottom: 1px solid var(--line-faint);
  font-size: 0.94rem;
  color: var(--ink-2);
}
.ev-check {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  border: 1.5px solid var(--red);
  transform: translateY(2px);
}
.ev-code {
  flex: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--red);
}
.evidence-foot {
  margin-top: 1.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--muted);
}
@media (min-width: 720px) {
  .evidence-list { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
}

/* ---------- 15. Scam alert ---------- */
.scam-sheet {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-doc);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  overflow: hidden;
}
.scam-sheet > .stamp-lg {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
  transform: rotate(9deg);
}
.scam-body { max-width: 62rem; }
.scam-cols {
  display: grid;
  gap: 1.6rem;
  margin-top: 1.4rem;
}
.scam-item { border-top: 2px solid var(--line); padding-top: 1.1rem; }
.scam-item h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin-bottom: 0.55rem;
}
.scam-item p { color: var(--muted); font-size: 0.95rem; }
.scam-foot {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  background: rgba(179, 38, 30, 0.06);
  border-left: 3px solid var(--red);
  font-family: var(--sans);
  font-weight: 500;
  color: var(--ink);
}
@media (min-width: 760px) {
  .scam-cols { grid-template-columns: 1fr 1fr; }
}

/* ---------- 16. FAQ ---------- */
.faq { background: var(--cream); border-block: 1px solid var(--line); }
.faq-list { display: grid; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0.4rem;
  cursor: pointer;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 500;
  color: var(--ink);
  list-style: none;
  transition: color var(--dur) var(--ease-out);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-code {
  flex: none;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--red);
  transform: translateY(2px);
}
.faq-item[open] summary { color: var(--red-deep); }
.faq-icon {
  flex: none;
  margin-left: auto;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid var(--line);
  position: relative;
  transition: transform var(--dur) var(--ease-spring), background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 1.5px;
  background: var(--navy);
  transform: translate(-50%, -50%);
  transition: transform var(--dur) var(--ease-spring), background var(--dur) var(--ease-out);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon { background: var(--red); border-color: var(--red); transform: rotate(180deg); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: var(--paper); }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq-body {
  padding: 0 0.4rem 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 74ch;
}
.faq-body p { margin-bottom: 0.7rem; }
.faq-body a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 17. Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: start;
}
.contact-copy h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.8vw, 3.3rem);
  letter-spacing: -0.015em;
  margin-block: 0.9rem 1.2rem;
  max-width: 15ch;
}
.contact-lede { color: var(--muted); max-width: 52ch; }
.contact-box {
  margin-top: 2rem;
  display: grid;
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-doc);
}
.contact-line {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line-faint);
  font-size: 0.95rem;
  color: var(--ink-2);
  align-items: baseline;
}
.contact-line:last-child { border-bottom: none; }
.contact-line > * { min-width: 0; overflow-wrap: break-word; }
.contact-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--red);
}
.contact-line a { font-weight: 600; color: var(--ink); }
.contact-line a:hover { color: var(--red-deep); }
.contact-note {
  display: block;
  grid-column: 2;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* form sheet */
.form-sheet {
  position: relative;
  background: #FBF8F1;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-doc);
  padding: clamp(1.5rem, 3.4vw, 2.4rem);
}
.form-sheet .stamp-sm { position: absolute; top: -0.9rem; right: 1.6rem; background: var(--paper); }
.form-title { font-family: var(--serif); font-size: 1.55rem; margin-bottom: 0.5rem; }
.form-intro { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.6rem; }
.field { margin-bottom: 1.05rem; display: grid; gap: 0.45rem; }
.field label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  min-width: 0;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 6rem; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15);
}
.form-note { margin-top: 1rem; font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.form-success {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  background: rgba(179, 38, 30, 0.05);
  color: var(--ink);
  font-size: 0.94rem;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 18. Footer ---------- */
.footer {
  background: var(--navy);
  color: var(--paper);
  padding: clamp(3rem, 7vw, 5rem) 0 2rem;
}
.footer-grid {
  display: grid;
  gap: 2.2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(245, 241, 232, 0.12);
}
.footer-brand { display: grid; gap: 1rem; align-content: start; }
.footer-mark { width: 2rem; height: 2rem; }
.footer-mark svg { width: 100%; height: 100%; }
.footer-brand p { color: var(--paper-dim); font-size: 0.9375rem; max-width: 34ch; }
.footer-nav { display: grid; gap: 0.65rem; align-content: start; }
.footer-nav a {
  color: var(--paper-on-navy);
  font-size: 0.9375rem;
  width: fit-content;
  transition: color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.footer-nav a:hover { color: var(--paper); transform: translateX(4px); }
.footer-contact { display: grid; gap: 0.5rem; align-content: start; }
.footer-contact a { font-family: var(--serif); font-size: 1.35rem; color: var(--paper); }
.footer-contact a:hover { color: rgba(245, 241, 232, 0.8); }
.footer-contact span { color: var(--paper-dim); font-size: 0.875rem; }
.footer-bottom {
  display: grid;
  gap: 0.9rem;
  padding-top: 1.6rem;
  font-size: 0.8rem;
  color: rgba(245, 241, 232, 0.5);
}
.footer-bottom p { margin: 0; }
.footer-disclaimer { max-width: 72ch; line-height: 1.6; }
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 0.6fr 1fr; }
  .footer-bottom { grid-template-columns: auto 1fr; align-items: start; }
}

/* ---------- 19. Scroll reveal (progressive enhancement) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), filter 0.8s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.in-view { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .file:hover, .btn:active, .nav-cta { transition: none; }
  .doc-sheet, .stamp, .doc-note { transform: none !important; }
}

/* ---------- 20. Print ---------- */
@media print {
  .masthead, .nav-wrap, .hero-actions, .hero-doc, .memo, .contact-form-wrap, .footer-nav, .footer-contact { display: none !important; }
  body { background: #fff; color: #000; }
  body::after { display: none; }
  .section { padding-block: 2rem; }
  .file, .evidence-sheet, .form-sheet, .panel-ink, .scam-sheet { box-shadow: none; }
  a { color: #000; text-decoration: underline; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
}
