/* ==========================================================================
   Scroll reveal — the hidden state and the move. js/wayvo-reveal.js decides
   WHAT is tagged; this decides how a tag looks. Numbers are tokens
   (--wv-reveal-*, tokens.css).

   Five moves:
     rise     fade in, up from --wv-reveal-distance      copy, headings
     stagger  the element's CHILDREN rise one after the   copy blocks, card
              other, --wv-reveal-stagger apart             rows, logo grids
     settle   fade in, scale up from --wv-reveal-scale    boxed panels
     zoom     fade in, scale DOWN from --wv-reveal-zoom   full-bleed photos
              (inside an overflow: hidden band)
     fade     opacity only                                anything that already
                                                          moves itself

   NOTHING HERE HIDES CONTENT ON ITS OWN. Only elements the script tags are
   hidden, and it tags only what is still below the fold — so no script, an
   old browser or reduced motion all mean everything simply shows.

   THE !important IS DELIBERATE AND TEMPORARY. Tagged elements include
   buttons and vendor-styled headings whose own transition / opacity rules
   out-rank (0,1,0); the reveal must win while it plays. The script removes
   the tag once the move has finished, so the element is then back to its
   own rules — hover transitions included. Never tag an element that has a
   transform of its own (the About hero card, carousel tracks, deck cards):
   this would replace it for the length of the move.
   ========================================================================== */

[data-wv-reveal="rise"],
[data-wv-reveal="settle"],
[data-wv-reveal="zoom"],
[data-wv-reveal="fade"],
[data-wv-reveal="stagger"] > [data-wv-reveal-item] {
	transition-property: opacity, transform !important;
	transition-duration: var(--wv-reveal-duration, 700ms) !important;
	transition-timing-function: var(--wv-reveal-ease, ease-out) !important;
	transition-delay: calc(var(--wv-reveal-i, 0) * var(--wv-reveal-stagger, 80ms)) !important;
}

[data-wv-reveal="rise"]:not(.is-revealed),
[data-wv-reveal="stagger"]:not(.is-revealed) > [data-wv-reveal-item] {
	opacity: 0 !important;
	transform: translate3d(0, var(--wv-reveal-distance, 16px), 0) !important;
}

[data-wv-reveal="settle"]:not(.is-revealed) {
	opacity: 0 !important;
	transform: scale(var(--wv-reveal-scale, 0.98)) !important;
}

[data-wv-reveal="zoom"]:not(.is-revealed) {
	opacity: 0 !important;
	transform: scale(var(--wv-reveal-zoom, 1.04)) !important;
}

[data-wv-reveal="fade"]:not(.is-revealed) {
	opacity: 0 !important;
}

/* The script already skips tagging under reduced motion; this covers the
   setting being switched on with the page open. */
@media (prefers-reduced-motion: reduce) {
	[data-wv-reveal],
	[data-wv-reveal] > [data-wv-reveal-item] {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}
}
