/* Native cross-document View Transitions for full-page (MPA) navigations.

   The @view-transition opt-in must be present on BOTH the outgoing and the
   incoming document, so this file is linked on every page (the app shell and
   each auth/portal template) rather than per-page. CSS only - no JavaScript.

   - Same-origin navigations only (enforced by the API).
   - Works in Chromium and Safari 18.2+; unsupported browsers (older Safari /
     Firefox) simply ignore these rules and navigate normally - graceful degrade.
   - Honours prefers-reduced-motion. */

/* DISABLED 2026-07-12: Safari composites not-yet-painted regions of the
   incoming page as solid black during the cross-fade, which showed as a black
   block flashing right after login. Re-enable only with a Safari-safe
   workaround. (Removing the opt-in disables the transition for every
   navigation pair, since both documents must carry it.)
@view-transition {
  navigation: auto;
}
*/

/* Quick, subtle root cross-fade (~200ms ease) in place of the 250ms default. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 200ms;
  animation-timing-function: ease;
}

/* Accessibility: no motion for users who request reduced motion - the new page
   is shown immediately with no animation. */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}
