/* EVE motion round 1: one easing curve for every fade on the site, and the page change as one continuous move.
   Loaded by all four pages. AUTO 2: the curves and durations are the motion bible's tokens (motion-tokens.css, loaded just
   before this file; --eve-ease and --eve-fade are its aliases for --m-ease-out and --m-fade). */

/* Cross-document View Transition: home <-> chapter and chapter <-> chapter never flash white.
   nav.js names the chapter card on the home page and the chapter's visible hero "eve-hero", so the card grows into the
   hero on the way in and the hero folds back into its card on the way out. Browsers without support navigate normally.
   X1c: the opt-in itself is also inlined as the first thing in every page's <head>. Chromium re-reads the opt-in at each
   style update of the arriving page before its first frame; one that ran while this file was still loading saw none and
   aborted the transition inside the new page ("ViewTransition opt-in disabled", an unhandled rejection no page script
   can catch). Kept here too, so the rule survives if a page's inline copy is ever lost. */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  .masthead{view-transition-name:eve-masthead}
  ::view-transition-group(*){animation-duration:var(--m-vt-root);animation-timing-function:var(--m-ease-out)}
  ::view-transition-old(root),::view-transition-new(root){animation-duration:var(--m-vt-root);animation-timing-function:var(--m-ease-out)}
  ::view-transition-group(eve-hero){animation-duration:var(--m-vt-hero)}
  ::view-transition-old(eve-hero),::view-transition-new(eve-hero){height:100%;object-fit:cover;overflow:clip;animation-timing-function:var(--m-ease-out)}
  /* In: the card's face gives way at once and the photograph fills the growing frame. */
  ::view-transition-old(eve-hero){animation:eve-vt-out var(--m-vt-hero-out) var(--m-ease-out) both}
  ::view-transition-new(eve-hero){animation:eve-vt-in var(--m-vt-hero-in) var(--m-ease-out) both}
  /* Back: the photograph stays while it folds into the card, then the card's face returns. */
  html:active-view-transition-type(eve-back)::view-transition-old(eve-hero){animation:eve-vt-out var(--m-vt-back-out) var(--m-vt-back-out-delay) var(--m-ease-out) both}
  html:active-view-transition-type(eve-back)::view-transition-new(eve-hero){animation:eve-vt-in var(--m-vt-back-in) var(--m-vt-back-in-delay) var(--m-ease-out) both}
  @keyframes eve-vt-out{to{opacity:0}}
  @keyframes eve-vt-in{from{opacity:0}}
}

/* AUTO: the quiet pause/play control every self-playing page shares (timeline.js). Pause shows two bars, paused and
   ended show a play triangle. Ink only responds; the surface stays still. Its box, ink and press states are the motion
   bible's shared control (motion-tokens.css); only the icon is drawn here. */
.timeline-icon{position:relative;display:block;width:10px;height:12px}
.timeline-icon::before,.timeline-icon::after{content:"";position:absolute;top:0;bottom:0;width:3px;background:currentColor;border-radius:1px}
.timeline-icon::before{left:0}.timeline-icon::after{right:0}
.timeline-toggle:not([data-state="playing"]) .timeline-icon::before{left:1px;width:10px;border-radius:0;clip-path:polygon(0 0,100% 50%,0 100%)}
.timeline-toggle:not([data-state="playing"]) .timeline-icon::after{display:none}
