/* WD motion layer. Everything here is progressive: without JS or with
   reduced motion, content is simply visible and still. */

/* ---------- Reveal on scroll ---------- */
.wd-js .is-style-reveal {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
	transition-delay: var(--wd-delay, 0s);
}
.wd-js .is-style-reveal.is-visible { opacity: 1; transform: none; }

/* Children of a revealed group come in one after another. */
.wd-js .is-style-reveal.wd-stagger > * {
	opacity: 0; transform: translateY(20px);
	transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.wd-js .is-style-reveal.wd-stagger.is-visible > * { opacity: 1; transform: none; }
.wd-js .is-style-reveal.wd-stagger.is-visible > *:nth-child(2) { transition-delay: .1s; }
.wd-js .is-style-reveal.wd-stagger.is-visible > *:nth-child(3) { transition-delay: .2s; }
.wd-js .is-style-reveal.wd-stagger.is-visible > *:nth-child(4) { transition-delay: .3s; }
.wd-js .is-style-reveal.wd-stagger.is-visible > *:nth-child(5) { transition-delay: .4s; }

/* ---------- Word-by-word headings (add class wd-split) ---------- */
.wd-split .wd-word { display: inline-block; }
.wd-js .wd-split .wd-word {
	opacity: 0; transform: translateY(0.4em);
	transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
	transition-delay: calc(var(--i, 0) * 70ms);
}
.wd-js .wd-split.is-visible .wd-word { opacity: 1; transform: none; }

/* ---------- Marquee ---------- */
.wd-marquee .wd-marquee-track { animation: wd-marquee 32s linear infinite; }
.wd-marquee:hover .wd-marquee-track { animation-play-state: paused; }
@keyframes wd-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Parallax on HUD covers and .wd-parallax images ---------- */
@supports (animation-timeline: view()) {
	.wp-block-cover.is-style-hud .wp-block-cover__image-background,
	.wp-block-cover.is-style-hud .wp-block-cover__video-background,
	.wd-parallax img {
		animation: wd-parallax linear both;
		animation-timeline: view();
	}
}
@keyframes wd-parallax {
	from { transform: translateY(-7%) scale(1.16); }
	to   { transform: translateY(7%) scale(1.16); }
}

/* ---------- Small signals ---------- */
.wd-dot { animation: wd-pulse 1.8s ease-in-out infinite; }
.wd-cursor { animation: wd-blink 1s steps(1) infinite; }
@keyframes wd-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes wd-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.wd-js .is-style-reveal,
	.wd-js .is-style-reveal.wd-stagger > *,
	.wd-js .wd-split .wd-word { opacity: 1 !important; transform: none !important; transition: none !important; }
	.wd-marquee .wd-marquee-track,
	.wd-dot, .wd-cursor,
	.wp-block-cover.is-style-hud .wp-block-cover__image-background,
	.wd-parallax img { animation: none !important; }
}
