/*
 * BrandForge Motion Layer
 * -----------------------
 * Progressive-enhancement animation styles that pair with brandforge-motion.js.
 * Everything here is opt-in through data-bf-* attributes, so it changes nothing
 * on a block until that block asks for it. All motion is disabled under
 * prefers-reduced-motion.
 *
 * Hooks (add to any element):
 *   data-bf="reveal"    fade + rise in on scroll
 *   data-bf="stagger"   reveal direct children in sequence
 *   data-bf="parallax"  gentle scroll-linked drift
 *   data-bf="float"     continuous idle float (decorative visuals only)
 *   data-bf="draw"      draw SVG strokes on scroll (needs DrawSVG)
 *   data-bf="count"     count a number up when it scrolls into view
 *   data-bf="tilt"      subtle pointer tilt (desktop, fine-pointer only)
 *
 * @since 0.5.0
 */

/* Pre-animation state. JS removes [data-bf-ready] once GSAP has taken over,
   so if JS fails the content is still fully visible (no FOUC, no hidden copy). */
@media (prefers-reduced-motion: no-preference) {

	[data-bf="reveal"]:not([data-bf-ready]),
	[data-bf="stagger"]:not([data-bf-ready]) > * {
		opacity: 0;
		transform: translate3d(0, 24px, 0);
		will-change: opacity, transform;
	}

	[data-bf="draw"]:not([data-bf-ready]) [data-bf-stroke] {
		opacity: 0;
	}
}

/* Pointer-tilt wrapper needs 3D context. */
[data-bf="tilt"] {
	transform-style: preserve-3d;
	transition: transform .18s ease-out;
}

/* Decorative float/parallax targets should never trigger layout work. */
[data-bf="float"],
[data-bf="parallax"] {
	will-change: transform;
}

/* Honour reduced motion everywhere: show final state, animate nothing. */
@media (prefers-reduced-motion: reduce) {
	[data-bf] {
		opacity: 1 !important;
		transform: none !important;
	}
}
