/* Smooth page-to-page transitions.
   Layered approach:
     1. Modern browsers (Chrome 126+, Safari 18.2+) get a native cross-document
        View Transition — a soft cross-fade between the leaving and arriving
        page handled entirely by the browser.
     2. Older browsers fall back to a JS-driven body fade-out
        (see assets/js/page-transitions.js).                                 */

@view-transition {
	navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
	animation-duration: 280ms;
	animation-timing-function: ease;
}

/* JS fallback: when the script intercepts an internal click, it adds the
   `is-leaving` class to <body>, which fades the whole page out before
   navigation. The arriving page's existing preloader and theme-level
   fade-in animation handle the entrance. */
body {
	transition: opacity 220ms ease;
}

body.is-leaving {
	opacity: 0;
}
