/*
 * Cross-document View Transitions: white-through sequence, header kept static.
 * Enabled/disabled by main.js depending on scroll position (top only).
 */
@media (prefers-reduced-motion: no-preference){
  @view-transition{navigation:auto;}

  header.site-header{view-transition-name:site-header;}

  /* Old page fades to white, then the new page fades in: no overlap. */
  ::view-transition-old(root){
    animation:tgw-vt-out 120ms ease-out both;
  }
  ::view-transition-new(root){
    animation:tgw-vt-in 120ms ease-in both;
    animation-delay:120ms;
  }

  /* Header group stays put instead of cross-fading. */
  ::view-transition-group(site-header),
  ::view-transition-old(site-header),
  ::view-transition-new(site-header){
    animation:none;
  }

  @keyframes tgw-vt-out{from{opacity:1;}to{opacity:0;}}
  @keyframes tgw-vt-in{from{opacity:0;}to{opacity:1;}}
}
