/* Scroll animations — see assets/js/reveal.js.
   Only elements the script has marked (data-reveal) are ever hidden. */

/* 1 + 3. Fade-up (single blocks and staggered grid items) */
.am-reveal-ready [data-reveal]:not(.is-in) {
	opacity: 0;
	transform: translate3d(0, 28px, 0);
}
.am-reveal-ready [data-reveal] {
	transition:
		opacity 900ms var(--a-ease-out, cubic-bezier(.22, 1, .36, 1)),
		transform 900ms var(--a-ease-out, cubic-bezier(.22, 1, .36, 1));
}
/* After arriving, items get their own hover transitions back (cards lift, images zoom). */
.am-reveal-ready [data-reveal].is-in { transform: none; }

/* 2. Zoom into view: the hero product photos start slightly smaller and grow to
   full size as their section scrolls up the screen — tied to the scroll itself,
   so it follows the finger and runs on the graphics chip. */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.am-jumbo__img,
		.am-feature__img {
			animation: am-zoom-in linear both;
			animation-timeline: view();
			animation-range: entry 0% cover 45%;
			transform-origin: 50% 70%;
		}
	}
}
@keyframes am-zoom-in {
	from { transform: scale(.82); opacity: .4; }
	to   { transform: scale(1);   opacity: 1; }
}

/* Less motion requested on the device: nothing moves or zooms, items simply fade in. */
@media (prefers-reduced-motion: reduce) {
	.am-reveal-ready [data-reveal]:not(.is-in) { transform: none; }
	.am-reveal-ready [data-reveal] { transition: opacity 600ms ease-out; }
}
