/* Cross-document page transitions.
   Kept out of styles.css so that file stays byte-identical - nothing here
   touches layout, type or colour, only the hand-off between pages. */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 320ms;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Arriving from another page on this site, the browser already holds the old
   frame until the new one is painted, so the black preloader has nothing left
   to hide - it would just insert a blackout in the middle of the cross-fade.
   First arrivals from outside still get it. */
html.internal-nav .container {
  opacity: 1;
}

html.internal-nav .preloader {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
