/* ── Site-wide enhancements: page transitions + load polish ───── */

/* Native cross-document view transitions (Chromium).
   Browsers without support simply navigate instantly — no fallback needed. */
@view-transition { navigation: auto; }

/* Keep the crossfade quick and snappy */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--t-fade, 240ms);
  animation-timing-function: var(--ease, cubic-bezier(.25, 1, .5, 1));
}

/* Gentle fade on first paint (opacity only — safe with fixed layouts).
   No fill: once it's done, nothing of it stays applied to the body. */
@keyframes site-fade-in {
  from { opacity: 0; }
}
body {
  animation: site-fade-in var(--t-fade, 240ms) var(--ease, cubic-bezier(.25, 1, .5, 1));
}

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