/* Swup Page Transitions - Basic Fade */

/* Base transition container */
#swup {
  position: relative;
  z-index: 1;
  /* Note: will-change: transform creates a containing block for fixed children,
     breaking ScrollSmoother which uses position:fixed with height:100% */
}

/* Basic fade transition */
.swup-transition-fade {
  opacity: 1;
  transition: opacity 0.3s ease;
}

html.is-animating .swup-transition-fade {
  opacity: 0;
}

/* COMMENTED OUT: Stacking effect z-index - re-enable with GSAP animations
html.is-animating.is-leaving #swup {
  z-index: 0;
}

html.is-animating.is-rendering #swup {
  z-index: 2;
}
*/

/* Note: Preloader visibility is handled by common.js which removes the element
   after animation completes. No CSS override needed here. */

/* Prevent scroll during transition */
html.is-changing {
  overflow: hidden;
}

/* Smooth scrolling reset after transition */
html.is-changing .has-smooth,
html.is-changing #smooth-wrapper {
  overflow: visible !important;
}

/* Safety: ensure content is visible when not animating */
html:not(.is-animating) .swup-transition-fade {
  opacity: 1 !important;
}
