/* A narrow copper slit separates the two frames in the native transition. */
@view-transition {
  navigation: auto;
}

::view-transition {
  background: linear-gradient(150deg, #171a20, #a56d44 51%, #d6a477 69%, #13171c);
  pointer-events: none;
}

::view-transition-image-pair(root) {
  isolation: isolate;
  overflow: hidden;
}

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

::view-transition-old(root),
::view-transition-new(root) {
  mix-blend-mode: normal;
  animation: 520ms cubic-bezier(.67, .06, .24, .97) both;
}
::view-transition-old(root) { animation-name: n79-frame-out; }
::view-transition-new(root) { animation-name: n79-frame-in; }

@keyframes n79-frame-out {
  from {
    clip-path: polygon(0 0, 100% 0, 112% 100%, 0 100%);
    filter: brightness(1);
  }
  to {
    clip-path: polygon(0 0, -17% 0, -5% 100%, 0 100%);
    filter: brightness(.68);
  }
}

@keyframes n79-frame-in {
  from {
    clip-path: polygon(108% 0, 100% 0, 100% 100%, 120% 100%);
    filter: brightness(.84);
  }
  to {
    clip-path: polygon(-15% 0, 100% 0, 100% 100%, -3% 100%);
    filter: brightness(1);
  }
}

/* The same curtain is used before and after a real navigation across domains. */
html.n79-scene-out::after,
html.n79-scene-in::after {
  content: "";
  position: fixed;
  z-index: 10000;
  inset: -6vh -16vw;
  pointer-events: none;
  clip-path: polygon(9% 0, 100% 0, 91% 100%, 0 100%);
  background:
    linear-gradient(102deg, #d2a071 0%, #9b6642 2%, #171c22 10%, #11171c 48%, #283139 85%, #b2825c 98%, #e3b98c);
}

html.n79-scene-out::after {
  animation: n79-curtain-out 185ms cubic-bezier(.45, .05, .74, .78) both;
}

html.n79-scene-in::after {
  animation: n79-curtain-in 440ms cubic-bezier(.65, .04, .26, 1) both;
}

@keyframes n79-curtain-out {
  from { transform: translateX(104%); }
  to { transform: translateX(0); }
}

@keyframes n79-curtain-in {
  from { transform: translateX(0); }
  to { transform: translateX(-104%); }
}

html.motion-off.n79-scene-out::after,
html.motion-off.n79-scene-in::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  html.n79-scene-out::after,
  html.n79-scene-in::after { display: none; }

  ::view-transition-group(root),
  ::view-transition-old(root),
  ::view-transition-new(root) { animation-duration: 0s; }
  ::view-transition-old(root) { opacity: 0; }
}

