/**
 * animations.css  keyframes + reveal primitives, all reduced-motion aware.
 * Mechanisms preserved from the OpenDesign export (docs/AUDIT.md §5):
 * marquee, product-hero crossfade/scan, proof slide, progress-bar timing.
 */

@keyframes avt-marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

@keyframes avt-ai4s-reveal {
	0%,
	42% {
		opacity: 1;
	}
	50%,
	92% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}
@keyframes avt-ai4s-scan {
	0% {
		transform: translateY(-100%);
		opacity: 0;
	}
	50% {
		opacity: 0.7;
	}
	100% {
		transform: translateY(100%);
		opacity: 0;
	}
}

@keyframes avt-proof-in-next {
	from {
		opacity: 0;
		transform: translateX(24px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}
@keyframes avt-proof-in-prev {
	from {
		opacity: 0;
		transform: translateX(-24px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

/* Scroll-reveal (upgrade: IntersectionObserver adds .is-in) */
.avt-reveal {
	opacity: 0;
	transform: translateY(16px);
	transition:
		opacity 600ms ease,
		transform 600ms ease;
	will-change: opacity, transform;
}
.avt-reveal.is-in {
	opacity: 1;
	transform: none;
}

/* Progress bars driven by a CSS custom property duration */
.avt-progress {
	position: relative;
	overflow: hidden;
}
.avt-progress__fill {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: currentColor;
}
.avt-progress__fill.is-running {
	width: 100%;
	transition: width var(--avt-dur, 5s) linear;
}

@media (prefers-reduced-motion: reduce) {
	.avt-marquee__track {
		animation: none !important;
	}
	.avt-reveal {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	.avt-progress__fill.is-running {
		transition: none !important;
	}
	[class*='ai4s-'] {
		animation: none !important;
	}
}
