/* SAFER Method companion site. Follows website/design/design-dna.yml.
   Editorial-dossier: bone parchment, navy structure, brass + duty-red as signal. */

:root {
  --bone: #F3F0E9;
  --surface: #FBFAF6;
  --ink: #14253A;
  --ink-soft: #41525F;
  --duty-red: #9E2A2B;
  --brass: #A8812C;
  --brass-hi: #D4AF37;
  --line: #C9C2B2;
  --olive: #3D5A3D;

  --head: "Libre Franklin", "Arial Narrow", Arial, sans-serif;
  --body: "Public Sans", system-ui, Arial, sans-serif;
  --quote: "Spectral", Georgia, serif;

  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
  background: var(--bone);
  line-height: 1.6;
  font-size: 18px;
}

h1, h2, h3, h4 {
  font-family: var(--head);
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1rem; max-width: 68ch; }

a { color: var(--duty-red); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.kicker {
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin: 0 0 0.6rem;
}

/* Brass-over-navy double rule, the recurring letterhead motif */
.rule-double { border: 0; margin: 0; height: 6px; position: relative; background: transparent; }
.rule-double::before,
.rule-double::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px;
}
.rule-double::before { top: 0; background: var(--brass); }
.rule-double::after { top: 4px; background: var(--ink); }

/* ---- Header / nav ---- */
.site-nav {
  background: var(--bone);
  border-bottom: 2px solid var(--ink);
  position: sticky; top: 0; z-index: 40;
}
.site-nav .bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: var(--wrap); margin: 0 auto; }
.brandmark { font-family: var(--head); font-weight: 900; letter-spacing: 0.22em; font-size: 1.15rem; color: var(--ink); }
.brandmark span { color: var(--duty-red); }
.navlinks { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.navlinks a { font-family: var(--head); font-weight: 700; font-size: 0.95rem; color: var(--ink); text-transform: uppercase; letter-spacing: 0.06em; }
.navlinks a.active, .navlinks a:hover { color: var(--duty-red); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--ink); cursor: pointer; }

/* ---- Sections ---- */
section { padding: 72px 0; }
.band-navy { background: var(--ink); color: var(--bone); }
.band-navy h1, .band-navy h2, .band-navy h3 { color: var(--bone); }
.band-navy .kicker { color: var(--brass-hi); }
.band-navy a { color: var(--brass-hi); }

.lead { font-size: 1.3rem; color: var(--ink-soft); max-width: 60ch; }
.band-navy .lead { color: #cdd5dd; }

/* ---- Hero ---- */
.hero { background: var(--ink); color: var(--bone); padding: 0; }
.hero .inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 80px 0; }
.hero h1 { color: var(--bone); }
.hero .lead { color: #cdd5dd; }
.hero figure { margin: 0; background: var(--bone); border-radius: 2px; padding: 18px; }
.hero figure img { width: 100%; display: block; }

/* ---- Buttons ---- */
.btn, .btn-outline {
  display: inline-block; font-family: var(--head); font-weight: 700;
  font-size: 0.98rem; letter-spacing: 0.03em; padding: 13px 26px;
  border-radius: 2px; min-height: 44px; cursor: pointer; border: 2px solid transparent;
}
.btn { background: var(--duty-red); color: #fff; }
.btn:hover { background: #872325; text-decoration: none; }
.btn-outline { background: transparent; color: var(--bone); border-color: var(--brass-hi); }
.btn-outline:hover { background: rgba(212,175,55,0.12); text-decoration: none; }
.actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 24px; }

/* ---- Cards / grids ---- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 28px;
}
.card .tag { font-family: var(--head); font-weight: 900; color: var(--duty-red); font-size: 1.4rem; }

/* ---- Exhibit (graphic in a case-file frame) ---- */
.exhibit { margin: 0; background: var(--surface); border: 1px solid var(--ink); border-radius: 2px; padding: 22px; }
.exhibit img, .exhibit object { width: 100%; display: block; }
.exhibit figcaption { font-size: 0.9rem; color: var(--ink-soft); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.exhibit .exno { font-family: var(--head); font-weight: 800; color: var(--brass); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.78rem; }

/* ---- Pillar blocks on the method page ---- */
.pillar { padding: 64px 0; border-bottom: 1px solid var(--line); }
.pillar:last-child { border-bottom: 0; }
.pillar .head-row { display: flex; align-items: baseline; gap: 18px; margin-bottom: 8px; }
.pillar .letter { font-family: var(--head); font-weight: 900; font-size: 3.2rem; color: var(--duty-red); line-height: 1; }
.pillar .split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 44px; align-items: start; margin-top: 24px; }

/* ---- Quote ---- */
.pullquote { font-family: var(--quote); font-size: 1.7rem; font-style: italic; line-height: 1.4; max-width: 30ch; }

/* ---- Video library ---- */
.video-group { margin-bottom: 56px; }
.video-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.video-card { background: var(--surface); border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; }
.video-card video, .video-card .embed { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; border: 0; }
.video-card .meta { padding: 16px 18px; }
.video-card .meta h4 { margin: 0 0 4px; font-size: 1.05rem; }
.video-card .meta .sub { font-size: 0.85rem; color: var(--ink-soft); }
.video-card .meta .runtime { font-family: var(--head); font-weight: 700; color: var(--brass); font-size: 0.8rem; letter-spacing: 0.06em; }
.embed-link { display: flex; align-items: center; justify-content: center; aspect-ratio: 16/9; background: var(--ink); color: var(--brass-hi); font-family: var(--head); font-weight: 700; text-align: center; padding: 20px; }

/* ---- Resource list ---- */
.res-list { list-style: none; padding: 0; margin: 0; }
.res-list li { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--surface); border: 1px solid var(--ink); border-radius: 2px; padding: 20px 24px; margin-bottom: 16px; }
.res-list .info h3 { margin: 0 0 4px; }
.res-list .info p { margin: 0; font-size: 0.95rem; color: var(--ink-soft); }

.refs { columns: 2; column-gap: 48px; }
.refs li { break-inside: avoid; margin-bottom: 12px; font-size: 0.95rem; }
@media (max-width: 760px) { .refs { columns: 1; } }

/* ---- Content warning callout ---- */
.callout { background: #fbecec; border-left: 4px solid var(--duty-red); padding: 18px 22px; border-radius: 2px; margin: 0 0 28px; }
.callout strong { color: var(--duty-red); }

/* ---- Footer ---- */
.site-foot { background: var(--ink); color: #aeb8c2; padding: 56px 0 40px; }
.site-foot h4 { color: var(--bone); }
.site-foot a { color: var(--brass-hi); }
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
.site-foot .fineprint { margin-top: 36px; padding-top: 20px; border-top: 1px solid #2a3a4d; font-size: 0.85rem; }

/* ---- Reveal motion (subtle, progressive enhancement) ---- */
/* Content is visible by default. Only when JS is active do we hide-then-fade,
   so a JS or observer failure never leaves content invisible. */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Responsive ---- */
@media (max-width: 880px) {
  .hero .inner, .pillar .split { grid-template-columns: 1fr; }
  .grid-3, .grid-2, .video-grid, .site-foot .cols { grid-template-columns: 1fr; }
  .navlinks { position: absolute; top: 100%; right: 0; left: 0; background: var(--bone); flex-direction: column; gap: 0; border-bottom: 2px solid var(--ink); display: none; }
  .navlinks.open { display: flex; }
  .navlinks li { border-top: 1px solid var(--line); }
  .navlinks a { display: block; padding: 16px 24px; }
  .nav-toggle { display: block; }
}
