@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: 150ms ease-in both rift-page-out;
  }

  ::view-transition-new(root) {
    animation: 310ms cubic-bezier(.2,.75,.25,1) both rift-page-in;
  }

  @keyframes rift-page-out {
    to { opacity: 0; transform: translateY(-6px); }
  }

  @keyframes rift-page-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }

  :is(.site-header button, .site-header a, .game-site-header a, .collection-view-all,
      .featured-group-link, .rift-catalog-card, .game-picker-card, .game-buy-action,
      .game-related-product, .btn-cart-primary, .key-variant-card, .dp-hero-btn) {
    transition-property: scale, background-color, border-color, color;
    transition-duration: 160ms;
    transition-timing-function: cubic-bezier(.2,.75,.25,1);
  }

  :is(.site-header button, .site-header a, .game-site-header a, .collection-view-all,
      .featured-group-link, .rift-catalog-card, .game-picker-card, .game-buy-action,
      .game-related-product, .btn-cart-primary, .key-variant-card, .dp-hero-btn):active {
    scale: .975;
    transition-duration: 70ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(root),
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none !important; }
}

@media (prefers-reduced-motion: no-preference) {
  .rift-page-leaving { background: #000; }
  .rift-page-leaving body { animation: 130ms ease-in both rift-page-out; }
  .rift-page-arriving body { animation: 310ms cubic-bezier(.2,.75,.25,1) backwards rift-page-in; }
}
