/* Page to page: the screen fades to the navy of the sky, and opens again on the next page.
   The opening is pure CSS, so it can never leave a page covered. */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: #14213d;
  opacity: 0;
  pointer-events: none;
  animation: page-open 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
  transition: opacity 0.26s cubic-bezier(0.4, 0, 0.2, 1);
}

html.page-leaving::before {
  opacity: 1;
  animation: none;
  pointer-events: auto;
}

@keyframes page-open {
  0%, 18% { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html::before {
    display: none;
  }
}
