/**
 * All motion for the theme.
 *
 * Everything here lives inside a single prefers-reduced-motion guard. One
 * wrapper rather than per-rule guards, so motion cannot be added outside it
 * by accident — CLAUDE.md:100-102 admits no exception.
 *
 * Every rule is additionally scoped to .elpis-has-js, set by reveal.js. That
 * matters: hiding an element in CSS and revealing it in JavaScript means a
 * script failure hides the content forever. Without the class, nothing hides.
 */

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

	/* Fade and rise. Once, on scroll into view. */
	.elpis-has-js .elpis-reveal {
		opacity: 0;
		transform: translateY( var( --wp--preset--spacing--40 ) );
		transition:
			opacity var( --wp--custom--motion--duration ) var( --wp--custom--motion--easing ),
			transform var( --wp--custom--motion--duration ) var( --wp--custom--motion--easing );
	}

	.elpis-has-js .elpis-reveal.is-revealed {
		opacity: 1;
		transform: none;
	}

	/*
	 * Hero parallax. Home hero only, translation capped at 60px total by the
	 * --wp--custom--motion--parallax-max token, enforced in reveal.js.
	 */
	.elpis-has-js .elpis-hero {
		will-change: transform;
	}

	/* Hover: colour, and at most a 1px shift. CLAUDE.md:107. */
	.elpis-has-js .wp-block-button__link,
	.elpis-has-js .elpis-hero-card-apply,
	.elpis-has-js .elpis-side-panel-cta {
		transition:
			background-color var( --wp--custom--motion--duration ) var( --wp--custom--motion--easing ),
			transform var( --wp--custom--motion--duration ) var( --wp--custom--motion--easing );
	}

	.elpis-has-js .wp-block-button__link:hover,
	.elpis-has-js .elpis-hero-card-apply:hover,
	.elpis-has-js .elpis-side-panel-cta:hover {
		transform: translateY( -1px );
	}

	/* The card-row arrow links, and the footer's link list: colour only (the
	   underline already added on hover/focus in base.css is not motion), no
	   shift — they read as text, not buttons. */
	.elpis-has-js .elpis-help-card-link,
	.elpis-has-js .elpis-footer-link {
		transition: color var( --wp--custom--motion--duration ) var( --wp--custom--motion--easing );
	}
}
