/* ══════════════════════════════════════════════════════════════════════
   MUUS print stylesheet — case-detail pages only (/case/*.html), linked
   with media="print" so none of this ever loads or costs anything on
   screen. The site is dark-themed everywhere; that prints terribly by
   default (dark grounds either vanish under a browser's default "skip
   backgrounds" print behavior, or if forced, burn ink/toner and read
   illegibly), so this file re-points the SAME custom-property layer
   base.css already builds every component from — .case-hero, .case-body,
   .case-meta, .stats/.stat, footer — onto a light-paper/dark-ink palette:
   the token trick that already keeps the dark theme consistent site-wide,
   just run in reverse. Everything below that isn't a token remap is
   either killing on-screen-only chrome (nav, the persistent CTA bar,
   cursor/grain/mist decoration) or a real print-layout fix — most
   importantly, the reveal-on-scroll system defaults every heading and
   paragraph to opacity:0 until an IntersectionObserver sees it on
   screen (base.css .rv / site.js), which would otherwise print a mostly
   blank page for anyone who hits Print before scrolling. ══════════════ */

/* kill every transition/animation outright — the same blanket approach
   the codebase already uses for prefers-reduced-motion (base.css) — so
   print never captures a half-finished tween (a page-load reveal, a
   hover sweep) instead of each element's resting state. */
*{animation:none!important;transition:none!important;}

@page{margin:14mm;}

html,body{-webkit-print-color-adjust:exact;print-color-adjust:exact;color-adjust:exact;}

:root{
  /* light-paper / dark-ink remap of the exact tokens base.css's
     components already consume — nothing below this needs its own
     component-level override just to become legible on paper. */
  --bg:#fff;
  --void:#eae7dc;
  --white:#1f1e1b;
  --dim:rgba(31,30,27,.8);
  --dim-2:rgba(31,30,27,.65);
  /* --green/--accent share one source value on screen (#eefb87) but stay
     two separate custom properties — both get remapped, since real
     case-body copy sets color:var(--accent) directly (the
     snackables.studio credit link in case/snackables.html) alongside
     every component that reads --green. Butter-yellow-green measures
     under 2:1 contrast on white paper; this is the same hue darkened to
     clear WCAG AA's 4.5:1 for normal text (verified ~6.8:1 on #fff). */
  --green:#5e5c3c;
  --accent:#5e5c3c;
  --glass:rgba(31,30,27,.045);
  --glass-line:rgba(31,30,27,.22);
}

/* ── on-screen-only chrome — none of it means anything on paper ── */
.grain,.skip,.nav,.cta-bar,.cur,.curR,
.case-hero .mist,.case-hero .back,.case-nav,
.case-player .playhint,
.zone.atmos::before,.stats::before,
.card::after,.stat::after,.case-player::before{
  display:none!important;content:none!important;
}
/* the case-nav's own wrapping <section class="zone"> would otherwise
   survive as an empty, padded blank block once .case-nav inside it is
   hidden above — collapse the whole section instead. Progressive
   enhancement: browsers without :has() just keep a little unused
   padding, nothing breaks. */
section:has(.case-nav){display:none!important;}

/* the .close section's CTA buttons aren't clickable on paper — the
   heading + subhead above them stay as the page's closing line. */
.close .btn{display:none!important;}

/* ── reveal-on-scroll system: every headline/paragraph/stat on a
   case-detail page starts at opacity:0 (base.css .rv) until an
   IntersectionObserver adds .in once it scrolls into view (site.js). A
   print triggered before the visitor has scrolled the whole page — the
   common case — would otherwise render most of the document blank.
   !important is required: .card.rv/.stat.rv carry a higher-specificity
   transform of their own, and GSAP's word-mask reveal (the .wm/.lm spans
   under h1/h2) writes its yPercent offset as an inline style, which only
   an !important external rule can outrank. ── */
.rv,.rv.d1,.rv.d2,.rv.d3,.rv.in,
.card.rv,.stat.rv,.card.rv.in,.stat.rv.in{
  opacity:1!important;transform:none!important;
}
.wm>span,.lm>span{transform:none!important;}

/* ── layout: screen spacing is tuned for a full-height scroll ('vh'
   section padding, a hero padded clear of the fixed nav) — none of that
   belongs on a printed page. ── */
.case-hero{min-height:auto!important;padding:0 0 8mm!important;}
.zone{padding:10mm 0!important;}

/* ── the case film: <video> print rendering is inconsistent across
   engines (often just a blank box), so it's hidden in favor of its own
   poster frame, painted in as a background-image. The poster URL comes
   from site.js's beforeprint handler, which stamps it onto this same
   --poster property right before the browser rasterizes the page. ── */
.case-player video{display:none!important;}
.case-player{
  background-image:var(--poster,none);background-size:cover;background-position:center;
  box-shadow:none!important;
}
.case-still img{filter:none!important;}

/* hardcoded (non-token) rgba hairlines that read as light-on-dark on
   screen — invisible/wrong once the ground flips to white. */
.case-meta{border-top-color:rgba(31,30,27,.18)!important;}
footer{border-top-color:rgba(31,30,27,.18)!important;}

/* show the real destination after any real content link — currently
   just the snackables.studio credit in case/snackables.html, but this is
   a standing rule, not a one-off. The URL is dead weight as a link on
   paper, so it prints as text instead. */
.case-body a[href]::after{content:" (" attr(href) ")";font-size:.85em;font-weight:400;}

/* keep headings from being orphaned at the bottom of a page, and keep
   small self-contained blocks (a stat card, the case film, a pull quote)
   from splitting across a page break */
h1,h2,h3{break-after:avoid;page-break-after:avoid;}
.case-meta,.stat,.stats,.case-player,.case-still,.pullquote{
  break-inside:avoid;page-break-inside:avoid;
}
