/**
 * FlyBlock Scroll & Entrance Animations
 *
 * IntersectionObserver-based entrance animations.
 * Respects prefers-reduced-motion accessibility preference.
 *
 * @package FlyBlock
 */

/* Base animation setup — elements start hidden */
.fb-animate {
	animation-fill-mode: both;
}

/* Respect system accessibility preference */
@media (prefers-reduced-motion: no-preference) {
	.fb-animate[data-reveal] {
		opacity: 0;
		will-change: opacity, transform;
	}

	.fb-animate[data-reveal="bottom:no"],
	.fb-animate[data-reveal="fade-up"] {
		transform: translateY(24px);
	}

	.fb-animate[data-reveal="fade-in"] {
		transform: none;
	}

	.fb-animate[data-reveal="fade-left"] {
		transform: translateX(-24px);
	}

	.fb-animate[data-reveal="fade-right"] {
		transform: translateX(24px);
	}

	/* When in-view class is applied by IntersectionObserver */
	.fb-animate.fb-in-view {
		opacity: 1;
		transform: none;
		transition: opacity 0.5s ease, transform 0.5s ease;
	}
}

/* Stagger children delay for grids */
.fb-posts-loop .fb-animate:nth-child(1) { transition-delay: 0ms; }
.fb-posts-loop .fb-animate:nth-child(2) { transition-delay: 80ms; }
.fb-posts-loop .fb-animate:nth-child(3) { transition-delay: 160ms; }
.fb-posts-loop .fb-animate:nth-child(4) { transition-delay: 240ms; }
.fb-posts-loop .fb-animate:nth-child(5) { transition-delay: 320ms; }
.fb-posts-loop .fb-animate:nth-child(6) { transition-delay: 400ms; }

.fb-related-posts-grid .fb-animate:nth-child(1) { transition-delay: 0ms; }
.fb-related-posts-grid .fb-animate:nth-child(2) { transition-delay: 100ms; }
.fb-related-posts-grid .fb-animate:nth-child(3) { transition-delay: 200ms; }
