/* Motion shared by every page (motion.css, loaded after base.css by build.mjs, with motion.js). Tokens are in tokens.css.

   The rules (from the motion study, 12 November 2026):
   - Motion is added where the visitor allows it, never removed where they do not: everything here sits inside
     prefers-reduced-motion: no-preference, or behind html.mo, which motion.js sets only when motion is allowed.
   - A hidden start state is set by the script that plays the animation (or by a CSS animation with fill backwards),
     so a failure leaves the final state on screen. Nothing waits, hidden, for a script.
   - Transform, opacity and clip-path only, plus grid rows for a height. Time in seconds, never in frames.
   - Every scripted motion has one clock and reads where it is when interrupted. No timers chained to timers.
   - Play once. Nothing replays on scrolling back, and nothing loops except a backdrop under the Pause control.
   - Pages do not travel. Between pages the old one fades out and the new one in; the pill holds still; and a thing the
     visitor chose may travel into its place on the new page (a card into its case study, a service name into its
     page). A shared thing travels only when both its ends are on screen.
   - Text is the still point: body copy, ledger rows and quotes never fade up on scroll.
   - The pen (the hand of the footer logo) is rare: the Store audit maze, and nothing else until Millar says so. */

@media (prefers-reduced-motion:no-preference){
  /* Page to page, same site: a cross-fade. build.mjs holds a new page's first paint until its own script has drawn it. */
  @view-transition{navigation:auto}
  ::view-transition-old(root){animation:tsm-out var(--d-1) linear both}
  ::view-transition-new(root){animation:tsm-in var(--d-2) linear 60ms both}
  /* The pill is one object across the site: it holds still, and changes width between the homepage and the rest */
  .nav{view-transition-name:ts-nav}
  /* The group carries the pill's own shape and ink, so between the homepage (the mark alone) and the other pages it
     grows as one solid capsule and the names are revealed inside it */
  ::view-transition-group(ts-nav){animation-duration:360ms;animation-timing-function:cubic-bezier(.7,0,.2,1);overflow:clip;border-radius:999px;background:var(--ink);box-shadow:0 6px 24px rgba(0,0,0,.14)}
  ::view-transition-old(ts-nav),::view-transition-new(ts-nav){height:100%;width:auto;object-fit:none;object-position:left center}
  /* A card's picture and the third print of its case study are one picture, and it travels between them (the pages
     name one picture at a time: catalog.html, project.html). The picture that is leaving stays whole for the first
     half of the flight and the arriving one fades in over it in the second half, so the arriving picture is never
     seen before it has loaded. */
  ::view-transition-group(work-shot){animation-duration:var(--d-4);animation-timing-function:var(--e-move)}
  ::view-transition-old(work-shot),::view-transition-new(work-shot){width:100%;height:100%;object-fit:cover;mix-blend-mode:normal}
  ::view-transition-old(work-shot){animation:none}
  ::view-transition-new(work-shot){animation:tsm-late-in var(--d-4) linear both}
}
@keyframes tsm-late-in{0%,50%{opacity:0}100%{opacity:1}}
@keyframes tsm-out{to{opacity:0}}
@keyframes tsm-in{from{opacity:0}}
