/**
 * Apex scroll reveal.
 *
 * Sections fade and rise into place as they enter the viewport. Active only
 * when JavaScript is on (html.apex-anim, set by an inline head snippet so there
 * is no flash of hidden content) and the visitor allows motion. The `is-in`
 * class is toggled by assets/js/reveal.js.
 */

@media ( prefers-reduced-motion: no-preference ) {

	html.apex-anim :where(
	.apex-centered-intro,
	.apex-feature-card,
	.apex-closing__inner,
	.apex-jet-intro,
	.apex-spec-table,
	.apex-feature-checklist,
	.apex-image-slider,
	.apex-contact-form__inner
) {
		opacity: 0;
		transform: translateY(20px);
		transition:
			opacity 1.6s cubic-bezier(0.2, 0.6, 0.2, 1),
			transform 1.6s cubic-bezier(0.2, 0.6, 0.2, 1);
	}

	html.apex-anim .is-in {
		opacity: 1;
		transform: none;
	}

	/* Image + Text — the copy rises while the image slides in from whichever
	   side it sits on (right by default, left for is-image-left). The block
	   clips the slide (see the block stylesheet) so it can't scroll the page. */
	html.apex-anim .apex-image-text__content {
		opacity: 0;
		transform: translateY(20px);
		transition:
			opacity 1.6s cubic-bezier(0.2, 0.6, 0.2, 1),
			transform 1.6s cubic-bezier(0.2, 0.6, 0.2, 1);
	}

	html.apex-anim .apex-image-text__media {
		opacity: 0;
		transform: translateX(40px);
		transition:
			opacity 1.8s cubic-bezier(0.2, 0.6, 0.2, 1),
			transform 1.8s cubic-bezier(0.2, 0.6, 0.2, 1);
	}

	html.apex-anim .apex-image-text.is-image-left .apex-image-text__media {
		transform: translateX(-40px);
	}

	html.apex-anim .apex-image-text.is-in .apex-image-text__content,
	html.apex-anim .apex-image-text.is-in .apex-image-text__media {
		opacity: 1;
		transform: none;
	}

	/* Feature Highlights — the intro rises; each icon fades in from just above
	   in a gentle stagger as the row scrolls into view. */
	html.apex-anim .apex-feature-highlights__top {
		opacity: 0;
		transform: translateY(18px);
		transition:
			opacity 1.6s cubic-bezier(0.2, 0.6, 0.2, 1),
			transform 1.6s cubic-bezier(0.2, 0.6, 0.2, 1);
	}

	html.apex-anim .apex-feature-highlights__item {
		opacity: 0;
		transform: translateY(-12px);
		transition:
			opacity 1.4s ease,
			transform 1.4s cubic-bezier(0.2, 0.6, 0.2, 1);
	}

	html.apex-anim .apex-feature-highlights__item:nth-child(2) {
		transition-delay: 0.12s;
	}

	html.apex-anim .apex-feature-highlights__item:nth-child(3) {
		transition-delay: 0.24s;
	}

	html.apex-anim .apex-feature-highlights__item:nth-child(4) {
		transition-delay: 0.36s;
	}

	html.apex-anim .apex-feature-highlights__item:nth-child(5) {
		transition-delay: 0.48s;
	}

	html.apex-anim .apex-feature-highlights__item:nth-child(6) {
		transition-delay: 0.6s;
	}

	html.apex-anim .apex-feature-highlights.is-in .apex-feature-highlights__top,
	html.apex-anim .apex-feature-highlights.is-in .apex-feature-highlights__item {
		opacity: 1;
		transform: none;
	}
}
