/* Scroll motion: one small vocabulary for the whole site (2026-11).
   Loaded on every page with motion.js. Components opt in with data
   attributes; there are no per-page reveal rules any more.

   title     Every h2 (and [data-clip-reveal]) below the first screen: words
             slide up out of a mask, 1000ms, 65ms a word (heading-reveal.js).
             Page headlines (h1) never animate on load.
   rise      data-motion="rise" (a block) or data-motion="group" (each child).
             Fade in from 24px below, 700ms, cubic-bezier(.22,1,.36,1); blocks
             entering together go 80ms apart, at most 4 steps (motion.js).
   drift     data-motion="drift" on a frame that holds one photo or video.
             The picture moves at a slower pace than the page, like a view
             through a window: 6% of its height either way over the frame's
             pass, scaled 1.14 so no edge shows. A picture that is already
             larger than its frame sets --drift-scale:1. Scroll-driven CSS, so it runs on the
             compositor; browsers without scroll timelines keep it still.
   hand-off  data-motion="handoff" on a dark section: the section after it
             is a panel with rounded top corners (40px, 28px on phones)
             that tucks over its last 40px and slides over it. Heroes'
             copy and artwork drift back meanwhile (parallax.js, desktop);
             the homepage story drifts back and dims (style.css).

   Reduced motion and the pause button: everything is shown and still. */

[data-motion-pending]{opacity:0}
@media print{[data-motion-pending]{opacity:1!important}}

/* The overlap margin is !important because page layout rules reset section
   margins with stronger selectors. */
[data-motion~="handoff"]+*{position:relative;z-index:3;margin-top:-40px!important;border-radius:40px 40px 0 0}
:where([data-motion~="handoff"])+section{background-color:#fff}
@media(max-width:700px){[data-motion~="handoff"]+*{margin-top:-28px!important;border-radius:28px 28px 0 0}}

@supports (animation-timeline:view()){
  [data-motion~="drift"]{overflow:clip;view-timeline:--drift block;view-timeline-inset:0px}
  :root:not(.paused-motion) [data-motion~="drift"]>:is(img,video,picture){scale:var(--drift-scale,1.14);animation:drift linear both;animation-timeline:--drift;animation-range:cover 0% cover 100%}
  @keyframes drift{from{translate:0 calc(var(--drift,6%) * -1)}to{translate:0 var(--drift,6%)}}
}
@media(prefers-reduced-motion:reduce){
  [data-motion-pending]{opacity:1!important}
  [data-motion~="drift"]>:is(img,video,picture){animation:none!important;scale:none!important;translate:none!important}
}
