@view-transition {
  navigation: auto;
}

/* Without this, the old and new snapshots can both be near-transparent at
   the same instant mid-crossfade (old fading to opacity 0, new still
   fading in from opacity 0), and the browser's default canvas - white -
   shows through underneath for a frame. A black backdrop here means that
   gap reveals black instead of a bright white flash. */
::view-transition-group(root) {
  animation-duration: .9s;
  background-color: var(--black);
}

/* Old page dismisses fast and sharp - it's leaving, so it shouldn't linger.
   New page eases in slower with a settle, which is what actually reads as
   premium: the destination arriving deliberately rather than a flat
   same-speed crossfade on both sides. */
::view-transition-old(root) {
  animation: vt-blur-out .45s cubic-bezier(.4, 0, 1, 1) both;
}
::view-transition-new(root) {
  animation: vt-blur-in .9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Blur radius kept modest on purpose: a full-viewport layer animating a
   heavy blur() together with scale() forces the GPU to repeatedly
   reallocate a large backing texture, and on real hardware (not visible
   in software-rendered test automation) that reallocation can briefly
   clear to white before the next frame paints - showing up as a bright
   flash mid-transition. Lower radius here trades a little blur intensity
   for not risking that. */
@keyframes vt-blur-out {
  from { opacity: 1; filter: blur(0); transform: scale(1); }
  to   { opacity: 0; filter: blur(10px); transform: scale(1.03); }
}
@keyframes vt-blur-in {
  from { opacity: 0; filter: blur(14px); transform: scale(0.98); }
  to   { opacity: 1; filter: blur(0); transform: scale(1); }
}
