/* Native document transitions: no click interception, fetch router or load delay.
   Unsupported browsers retain normal navigation and visible content. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  .site-header {
    view-transition-name: site-header;
  }

  ::view-transition-group(root) {
    animation-duration: 600ms;
  }

  /* Keep the previous page underneath; reveal the fully rendered destination.
     Avoid fading both pages to transparency, which flashes on dark heroes. */
  ::view-transition-old(root) {
    animation: none;
    mix-blend-mode: normal;
  }

  ::view-transition-new(root) {
    animation: qp-page-arrive 600ms cubic-bezier(0.4, 0, 0.2, 1) both;
    mix-blend-mode: normal;
  }

  /* The shared header is an orientation anchor, not part of the dissolve. */
  ::view-transition-group(site-header),
  ::view-transition-new(site-header) {
    animation: none;
  }

  ::view-transition-old(site-header) {
    display: none;
  }
}

@keyframes qp-page-arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}
