/*
 * Subtle CSS animations for BacklinkTower theme.
 * All animations respect prefers-reduced-motion.
 */
@media ( prefers-reduced-motion: no-preference ) {

	/* Smooth hover transitions for interactive elements */
	a,
	button,
	.wp-block-button__link {
		transition:
			color 0.15s ease,
			background-color 0.15s ease,
			box-shadow 0.15s ease,
			transform 0.15s ease,
			border-color 0.15s ease;
	}

	/* Subtle lift on post card hover */
	.wp-block-post {
		transition: transform 0.2s ease, box-shadow 0.2s ease;
	}

	.wp-block-post:hover {
		transform: translateY( -2px );
		box-shadow: 0 4px 12px rgba( 0, 0, 0, 0.08 );
	}

	/* Fade-in on scroll using CSS scroll-driven animations */
	@supports ( animation-timeline: view() ) {
		.wp-block-group.alignfull,
		.wp-block-columns {
			animation: fade-up linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 30%;
		}

		@keyframes fade-up {
			from {
				opacity: 0;
				transform: translateY( 1rem );
			}
			to {
				opacity: 1;
				transform: translateY( 0 );
			}
		}
	}
}
