/**
 * Simple page fade — not an SPA transition (that was tried and reverted;
 * it required intercepting navigation, swapping page content via AJAX, and
 * re-initializing every section script, which caused real bugs with the
 * persistent nav and the homepage-only preloader). This is plain CSS tied
 * to real, normal page loads: [data-main] fades in on every page load via
 * a CSS animation, and page-fade.js adds .is-fading-out (a CSS transition)
 * for a moment before a real navigation actually happens.
 */
[data-main] {
  animation: page-fade-in .3s ease-out;
}

[data-main].is-fading-out {
  opacity: 0;
  transition: opacity .25s ease-in;
}

@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  [data-main] {
    animation: none;
  }

  [data-main].is-fading-out {
    transition: none;
  }
}
