/* ==========================================================================
   Front-end motion only (not loaded in the block editor).
   Every animation is wrapped so prefers-reduced-motion users get the final state.
   ========================================================================== */

@keyframes atpPeakPulse {
	0%, 100% { opacity: 1; transform: translateX(-50%) rotate(45deg) scale(1); }
	50% { opacity: .55; transform: translateX(-50%) rotate(45deg) scale(.7); }
}
@keyframes atpTickerScroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@keyframes atpHeroPop {
	from { opacity: 0; transform: translateY(22px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Ticker: JS clones the items and adds .is-running */
.atp-ticker-wrap::before { animation: atpPeakPulse 2.6s ease-in-out infinite; }
.atp-ticker__track.is-running { animation: atpTickerScroll 32s linear infinite; }
@media (max-width: 840px) {
	.atp-ticker__track.is-running { animation-duration: 22s; }
}

/* Hero entrance */
.atp-hero__inner > *,
.atp-page-hero__inner > * {
	opacity: 0;
	animation: atpHeroPop .85s cubic-bezier(.16, 1, .3, 1) forwards;
}
.atp-hero__inner > :nth-child(1), .atp-page-hero__inner > :nth-child(1) { animation-delay: .05s; }
.atp-hero__inner > :nth-child(2), .atp-page-hero__inner > :nth-child(2) { animation-delay: .16s; }
.atp-hero__inner > :nth-child(3), .atp-page-hero__inner > :nth-child(3) { animation-delay: .27s; }
.atp-hero__inner > :nth-child(4), .atp-page-hero__inner > :nth-child(4) { animation-delay: .38s; }
.atp-hero__inner > :nth-child(5), .atp-page-hero__inner > :nth-child(5) { animation-delay: .49s; }

/* Scroll reveal. Start states only apply when JS is running (html.atp-js), so the page never stays hidden. */
.atp-js .atp-card,
.atp-js .atp-why__point,
.atp-js .atp-stat,
.atp-js .atp-cta__item,
.atp-js .atp-detail__row,
.atp-js .atp-contact__info,
.atp-js .atp-contact__form,
.atp-js .atp-feature__text,
.atp-js .atp-intro > *,
.atp-js .atp-why__inner > :not(.atp-why__grid),
.atp-js .atp-footer__col {
	opacity: 0;
	will-change: opacity, transform;
	transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}
.atp-js .atp-card,
.atp-js .atp-why__point,
.atp-js .atp-stat,
.atp-js .atp-cta__item,
.atp-js .atp-detail__row { transform: translateY(34px) scale(.95); }
.atp-js .atp-feature__text,
.atp-js .atp-contact__info { transform: translateX(-44px) scale(.97); }
.atp-js .atp-contact__form { transform: translateX(44px) scale(.97); }
.atp-js .atp-intro > *,
.atp-js .atp-why__inner > :not(.atp-why__grid),
.atp-js .atp-footer__col { transform: translateY(14px); }

.atp-js .in-view {
	opacity: 1 !important;
	transform: translateY(0) translateX(0) scale(1) !important;
}

@media (prefers-reduced-motion: reduce) {
	.atp-ticker-wrap::before { animation: none; }
	.atp-ticker__track.is-running { animation: none; }
	.atp-js .atp-card,
	.atp-js .atp-why__point,
	.atp-js .atp-stat,
	.atp-js .atp-cta__item,
	.atp-js .atp-detail__row,
	.atp-js .atp-contact__info,
	.atp-js .atp-contact__form,
	.atp-js .atp-feature__text,
	.atp-js .atp-intro > *,
	.atp-js .atp-why__inner > :not(.atp-why__grid),
	.atp-js .atp-footer__col {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
	.atp-hero__inner > *,
	.atp-page-hero__inner > * {
		opacity: 1 !important;
		animation: none !important;
	}
}
