/* Plain Memo — the paper, the ink, the serif.
   Brand: cream paper, charcoal ink, oxblood headline accent, Source Serif 4.
   Single deliberate look (a printed memo), no dark variant. */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/fonts/SourceSerif4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/fonts/SourceSerif4-Italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --paper: #ede3cf;
  --paper-hi: #f5eddd;
  --paper-lo: #e1d5b8;
  --paper-deep: #e3d8c0;
  --ink: #2b2a2b;
  --ink-soft: #4a4746;
  --muted: #5f584f;
  --oxblood: #7a232c;
  --crimson: #c8203f;
  --rule: rgba(43, 42, 43, 0.14);
  --rule-strong: rgba(43, 42, 43, 0.5);
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --measure: 62ch;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --s1: 0.5rem;
  --s2: 1rem;
  --s3: 2rem;
  --s4: 4rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow-wrap: break-word;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.1875rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  padding-inline: var(--gutter);
  position: relative;
}
/* The paper: a warm sheet, lighter where the light falls, with visible
   fibre and a fine grain. Both layers are fixed so the texture doesn't
   stretch with page length, and both sit behind everything. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
body::before {
  z-index: -2;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--paper-hi) 0%, var(--paper) 55%, var(--paper-lo) 130%);
}
body::after {
  opacity: 0.55;
  mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='420'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='0.012 0.35' numOctaves='3' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.62  0 0 0 0 0.55  0 0 0 0 0.42  0 0 0 0.28 0'/></filter><rect width='420' height='420' filter='url(%23f)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35  0 0 0 0 0.3  0 0 0 0 0.22  0 0 0 0.16 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  background-size: 420px 420px, 180px 180px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: rgba(43, 42, 43, 0.35); transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease); }
a:hover, a:focus-visible { text-decoration-color: var(--oxblood); color: var(--oxblood); }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-weight: 600; line-height: 1.12; letter-spacing: -0.012em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 0.5em 1em; z-index: 10; }
.skip:focus { left: 8px; }

main { max-width: var(--wrap); margin: 0 auto; }

/* ---------- masthead ---------- */
.masthead {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  padding: 1.1rem 0 0.9rem;
  border-bottom: 1px solid var(--rule-strong);
  view-transition-name: masthead;
}
.wordmark { display: inline-flex; align-items: center; gap: 0.6em; text-decoration: none; font-weight: 600; font-size: 1.15rem; letter-spacing: 0.08em; text-transform: uppercase; }
.wordmark:hover, .wordmark:focus-visible { color: var(--ink); }
.mark { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 1.5px solid var(--ink); border-radius: 4px; font-weight: 700; letter-spacing: -0.06em; font-size: 0.95rem; text-transform: none; }
.nav { display: flex; gap: clamp(0.9rem, 2.5vw, 1.8rem); font-size: 0.95rem; }
.nav a { text-decoration: none; padding-block: 0.2em; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a:focus-visible, .nav a[aria-current] { border-bottom-color: var(--oxblood); color: var(--ink); }
.nav-yt { color: var(--oxblood); }
@media (max-width: 560px) {
  .wordmark span:not(.mark) { display: none; }
  .nav { font-size: 0.9rem; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(2.6rem, 7vw, 5.5rem) 0 clamp(1.6rem, 4vw, 3rem); }
.hero-title { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 4.2rem); font-weight: 600; max-width: 16ch; }
.hero-title::first-letter { color: var(--oxblood); }
.hero-dek { margin-top: 1rem; font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); font-style: italic; color: var(--ink-soft); max-width: 40ch; }

.kicker, .kicker-h {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.4;
}
.kicker-h::after { content: ""; display: block; width: 3rem; height: 1px; background: var(--oxblood); margin-top: 0.7rem; }

/* ---------- site line + headliner (home) ---------- */
.site-line { margin: 0.9rem 0 0; font-size: 0.95rem; color: var(--muted); font-style: italic; text-wrap: pretty; max-width: 70ch; }
.site-line-main { color: var(--ink-soft); }
.headliner { padding: clamp(1.4rem, 4vw, 3rem) 0 clamp(1.5rem, 3vw, 2.5rem); }
.headline { font-size: clamp(2rem, 1.2rem + 3.2vw, 4rem); font-weight: 600; max-width: 20ch; margin: 0 0 0.7rem; }
.headline a { text-decoration: none; }
.headline a:hover, .headline a:focus-visible { color: var(--oxblood); }
.headline::first-letter { color: var(--oxblood); }
.headliner .meta { margin-bottom: 1.2rem; }
.headliner-copy { max-width: var(--measure); margin-top: 1.4rem; }
.headliner-blurb { font-size: 1.12em; line-height: 1.55; color: var(--ink-soft); }

/* ---------- latest ---------- */
.latest { padding: clamp(1.5rem, 3vw, 2.5rem) 0; border-top: 1px solid var(--rule-strong); }
.latest-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.25rem, 3vw, 3rem); align-items: start; }
@media (max-width: 860px) { .latest-grid { grid-template-columns: 1fr; } }
.latest-title { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.35rem); margin: 0.25rem 0 0.9rem; }
.latest-title a { text-decoration: none; }
.latest-title a:hover, .latest-title a:focus-visible { color: var(--oxblood); }
.latest-blurb { font-size: 1.05em; color: var(--ink-soft); }
.latest-actions { display: flex; flex-wrap: wrap; gap: 0.7rem 1.25rem; align-items: center; margin-top: 1.4rem; }
.start-here { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.95rem; color: var(--ink-soft); }
.start-label { display: block; font-style: italic; color: var(--muted); margin-bottom: 0.2rem; }

.meta { display: flex; flex-wrap: wrap; gap: 0.35em; font-size: 0.86rem; color: var(--muted); letter-spacing: 0.02em; margin: 0 0 0.35rem; font-variant-numeric: tabular-nums; }
.dot { opacity: 0.6; }

.btn, .btn-quiet {
  display: inline-block;
  font: inherit;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.55em 1.2em;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn { background: var(--ink); color: var(--paper); border: 1.5px solid var(--ink); }
.btn:hover, .btn:focus-visible { background: var(--oxblood); border-color: var(--oxblood); color: var(--paper); transform: translateY(-1px); }
.btn-quiet { border: 1.5px solid var(--rule-strong); color: var(--ink); }
.btn-quiet:hover, .btn-quiet:focus-visible { border-color: var(--oxblood); color: var(--oxblood); }

/* ---------- player (click-to-play facade) ---------- */
.player {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
  background: var(--ink);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(43, 42, 43, 0.08), 0 18px 40px -22px rgba(43, 42, 43, 0.55);
}
.player img { width: 100%; height: 100%; object-fit: cover; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(20, 18, 18, 0.28), rgba(20, 18, 18, 0) 100%);
  color: #fff;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1.1rem 1.25rem;
  transition: background 0.25s var(--ease);
}
.play:hover, .play:focus-visible { background: radial-gradient(60% 60% at 50% 50%, rgba(20, 18, 18, 0.42), rgba(20, 18, 18, 0.08) 100%); }
.play:focus-visible { outline-offset: -4px; outline-color: #fff; }
.play-glyph {
  width: 3.2rem; height: 3.2rem; border-radius: 50%;
  background: var(--paper);
  display: grid; place-items: center; flex-shrink: 0;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.play-glyph::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 0.55rem 0 0.55rem 0.95rem; border-color: transparent transparent transparent var(--ink); margin-left: 0.2rem; }
.play:hover .play-glyph, .play:focus-visible .play-glyph { transform: scale(1.06); background: #fff; }
.play-word { font-size: 1rem; font-weight: 600; letter-spacing: 0.02em; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.play-len { position: absolute; right: 0.8rem; bottom: 0.8rem; font-size: 0.85rem; font-variant-numeric: tabular-nums; background: rgba(0, 0, 0, 0.55); padding: 0.15em 0.55em; border-radius: 4px; }
.player-noscript { position: absolute; left: 1rem; bottom: 1rem; color: #fff; }
.player.is-playing .play, .player.is-playing img { display: none; }
@media (max-width: 480px) { .play { padding: 0.8rem 0.9rem; } .play-glyph { width: 2.6rem; height: 2.6rem; } .play-word { font-size: 0.9rem; } }

/* ---------- the memo grid ---------- */
.memos { padding: clamp(2rem, 5vw, 4rem) 0; border-top: 1px solid var(--rule-strong); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.count { color: var(--muted); font-size: 0.9rem; font-style: italic; }
.grid {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem);
}
.card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 5px;
  background: var(--paper-deep);
  margin-bottom: 0.8rem;
  box-shadow: 0 1px 0 rgba(43, 42, 43, 0.06), 0 12px 28px -20px rgba(43, 42, 43, 0.5);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.card-link:hover .card-thumb, .card-link:focus-visible .card-thumb { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(43, 42, 43, 0.06), 0 22px 36px -22px rgba(43, 42, 43, 0.6); }
.card-link:hover .card-thumb img, .card-link:focus-visible .card-thumb img { transform: scale(1.03); }
.badge { position: absolute; right: 0.55rem; bottom: 0.55rem; background: rgba(20, 18, 18, 0.78); color: #fff; font-size: 0.78rem; padding: 0.12em 0.5em; border-radius: 4px; font-variant-numeric: tabular-nums; }
.card-title { display: block; font-size: 1.2rem; font-weight: 600; line-height: 1.22; letter-spacing: -0.01em; margin-bottom: 0.45rem; text-wrap: pretty; transition: color 0.2s var(--ease); }
.card-link:hover .card-title, .card-link:focus-visible .card-title { color: var(--oxblood); }
.card-blurb { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.95rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- about ---------- */
.about { padding: clamp(2rem, 5vw, 4rem) 0; border-top: 1px solid var(--rule-strong); }
.about-grid { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.about-mark { width: min(220px, 40vw); border-radius: 8px; border: 1px solid var(--rule); box-shadow: 0 1px 0 rgba(43, 42, 43, 0.08), 0 14px 30px -22px rgba(43, 42, 43, 0.5); }
.about p { max-width: var(--measure); }
.lede { font-size: 1.15em; line-height: 1.5; }
.about-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.25rem; }
@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; } .about-mark { width: 140px; } }

/* ---------- faq ---------- */
.faq { padding: clamp(2rem, 5vw, 4rem) 0; border-top: 1px solid var(--rule-strong); }
.faq-list { max-width: 72ch; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1rem 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1.15rem; font-weight: 600; }
.faq-item summary::after { content: "+"; color: var(--oxblood); font-size: 1.4rem; line-height: 1; flex-shrink: 0; transition: transform 0.25s var(--ease); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 1.25rem; max-width: var(--measure); color: var(--ink-soft); }

/* ---------- notice ---------- */
.notice { border: 1px solid var(--rule-strong); border-left: 4px solid var(--oxblood); padding: 1rem 1.25rem; margin: 1rem 0 2rem; }
.notice p { margin: 0; }

/* ---------- memo page ---------- */
.crumbs { font-size: 0.86rem; color: var(--muted); padding: 1rem 0 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4em; }
.crumbs li + li::before { content: "/"; margin-right: 0.4em; opacity: 0.5; }
.crumbs a { text-decoration: none; }
.crumbs [aria-current] { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.memo { padding: clamp(1.25rem, 3vw, 2.5rem) 0; }
.memo-head { margin-bottom: clamp(1.25rem, 3vw, 2rem); }
.memo-title { font-size: clamp(1.8rem, 1.2rem + 2.6vw, 3.4rem); margin-bottom: 0.8rem; max-width: 20ch; }
.memo-title::first-letter { color: var(--oxblood); }
.player-lg { max-width: 100%; }
.memo-body { max-width: var(--measure); margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.memo-body > p:first-child { font-size: 1.12em; line-height: 1.55; }
.memo-body > p:first-child::first-letter { color: var(--oxblood); font-weight: 600; }
.chapters { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.chapter-list { list-style: none; margin: 0; padding: 0; }
.chapter-list li { border-bottom: 1px solid var(--rule); }
.chapter-list a { display: flex; gap: 1rem; padding: 0.6rem 0; text-decoration: none; }
.chapter-list a:hover .ch-label, .chapter-list a:focus-visible .ch-label { color: var(--oxblood); }
.ch-time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3.2em; }
.sources { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.source-list { margin: 0; padding-left: 1.2em; font-size: 0.92rem; color: var(--ink-soft); }
.source-list li { margin-bottom: 0.45rem; }
.source-list a { overflow-wrap: anywhere; }
.memo-links { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; margin-top: 2rem; }
.neighbours { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; border-top: 1px solid var(--rule-strong); padding: 1.5rem 0; margin-top: 1rem; }
.nb { text-decoration: none; display: block; }
.nb-next { text-align: right; }
.nb-label { display: block; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.nb-title { font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.nb:hover .nb-title, .nb:focus-visible .nb-title { color: var(--oxblood); }
@media (max-width: 560px) { .neighbours { grid-template-columns: 1fr; } .nb-next { text-align: left; } }
.back { padding-bottom: 1rem; }
.back a { text-decoration: none; color: var(--muted); }
.nf-main { padding: 4rem 0; max-width: 40ch; }

/* ---------- footer ---------- */
.footer { max-width: var(--wrap); margin: clamp(2rem, 5vw, 4rem) auto 0; padding: 2rem 0 2.5rem; border-top: 1px solid var(--rule-strong); font-size: 0.92rem; view-transition-name: footer; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-word { font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.4rem; }
.footer-line { margin: 0 0 0.6rem; max-width: 52ch; }
.muted { color: var(--muted); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-links a { text-decoration: none; }
.footer-fine { margin: 2rem 0 0; color: var(--muted); font-size: 0.82rem; }
.footer-fine a { text-decoration: none; }

/* ---------- motion (all gated) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-title, .hero-dek { animation: settle 0.9s var(--ease) both; }
  .hero-dek { animation-delay: 0.12s; }
  @keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

  @supports (animation-timeline: view()) {
    .card { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 28%; }
    @keyframes rise { from { opacity: 0.25; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  }

  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }
  ::view-transition-group(*) { animation-duration: 0.42s; animation-timing-function: var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

@media print {
  body::before, body::after, .play, .nav, .skip { display: none; }
  body { background: #fff; }
}
