/* Shared The Curious Scholar page curtain */

.cs-page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #141c2b;
  transform: scaleY(0);
  transform-origin: bottom center;
  pointer-events: none;
  visibility: hidden;
  will-change: transform;
}

/* First paint cover when arriving via transition (before JS runs) */
html.cs-pt-pending .cs-page-transition {
  transform: scaleY(1);
  transform-origin: top center;
  visibility: visible;
  pointer-events: all;
}

/* JS-driven active cover — visibility only; transform owned by JS/GSAP */
.cs-page-transition.is-covering {
  visibility: visible;
  pointer-events: all;
}

/* Keep welcome copy stable after a routed enter (don't replay fade-in) */
html.cs-pt-pending .animate-fade-in-up,
html.cs-pt-entered .animate-fade-in-up,
html.cs-pt-routed .animate-fade-in-up {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .cs-page-transition {
    display: none !important;
  }
}
