/**
 * NovaGlass scroll animations — staggered fade-up on scroll into view.
 *
 * Modelled on the WEMA Blocks fade-up system (IntersectionObserver + a
 * transform/opacity transition). A `render_block` PHP filter tags each block:
 *   - `.ng-fade-up`   → the observed container (a "group", not animated itself)
 *   - `.ng-fade-item` → individual elements inside it that fade up, staggered
 *   - `.ng-fade-self` → whole-block fallback for blocks with no discrete items
 *                       (and slider blocks, so Slick isn't disturbed)
 * Classes are injected into the front-end markup only, so stored static block
 * content stays byte-identical and valid.
 *
 * The hidden initial state is gated on `html.ng-anim` (added by a tiny inline
 * head script) so that if JavaScript is disabled the content is always
 * visible — no blank sections for no-JS visitors or crawlers.
 */

.ng-anim .ng-fade-item,
.ng-anim .ng-fade-self {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
	will-change: opacity, transform;
}

.ng-anim .ng-fade-item.is-visible,
.ng-anim .ng-fade-self.is-visible {
	opacity: 1;
	transform: none;
}

/* Accessibility — respect reduced motion. */
@media ( prefers-reduced-motion: reduce ) {
	.ng-anim .ng-fade-item,
	.ng-anim .ng-fade-self,
	.ng-anim .ng-fade-item.is-visible,
	.ng-anim .ng-fade-self.is-visible {
		opacity: 1;
		transform: none;
		transition: none;
	}
}
