/* ==========================================================================
   Global Animation Utilities — Custom Theme
   --------------------------------------------------------------------------
   Reusable animation system for all sections.
   Currently used by: Hero Banner (entrance animation on page load).
   --------------------------------------------------------------------------
   Usage:
     Add .ust-reveal to any element that should animate in.
     JavaScript adds .ust-reveal--visible when the element should be shown.

     For elements that should animate immediately on page load (no scroll),
     JavaScript adds .ust-reveal--visible on DOMContentLoaded, with staggered
     delays applied via data-ust-delay (value in ms).

   Keyframes defined here are shared across all sections.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Core Keyframes
   -------------------------------------------------------------------------- */

@keyframes ust-fade-up {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes ust-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes ust-scale-in {
	from {
		opacity: 0;
		transform: scale(1.03);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* --------------------------------------------------------------------------
   Reveal Base State
   --------------------------------------------------------------------------
   Elements start invisible. Both initial and revealed states are explicit
   so there is no flash-of-content before the animation triggers.
   -------------------------------------------------------------------------- */

.ust-reveal {
	opacity: 0;
}

/* --------------------------------------------------------------------------
   Fade-up reveal — heading, description, CTA buttons
   -------------------------------------------------------------------------- */

.ust-reveal--fade-up {
	transform: translateY(24px);
}

.ust-reveal--fade-up.ust-reveal--visible {
	animation: ust-fade-up 750ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --------------------------------------------------------------------------
   Fade-in reveal — opacity-only, used for overlays / supplementary elements
   -------------------------------------------------------------------------- */

.ust-reveal--fade-in {
	transform: none;
}

.ust-reveal--fade-in.ust-reveal--visible {
	animation: ust-fade-in 900ms ease forwards;
}

/* --------------------------------------------------------------------------
   Scale-in reveal — hero background image (subtle zoom-out 1.03 → 1)
   -------------------------------------------------------------------------- */

.ust-reveal--scale-in {
	transform: scale(1.03);
}

.ust-reveal--scale-in.ust-reveal--visible {
	animation: ust-scale-in 950ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --------------------------------------------------------------------------
   Stagger delay utility classes
   Inline style (animation-delay) is set via JS from data-ust-delay.
   These classes are optional aliases for the most common values.
   -------------------------------------------------------------------------- */

.ust-reveal--delay-100 { animation-delay: 100ms; }
.ust-reveal--delay-150 { animation-delay: 150ms; }
.ust-reveal--delay-200 { animation-delay: 200ms; }
.ust-reveal--delay-250 { animation-delay: 250ms; }
.ust-reveal--delay-300 { animation-delay: 300ms; }

/* --------------------------------------------------------------------------
   Accessibility — Reduced Motion
   --------------------------------------------------------------------------
   When the user has requested reduced motion, skip all movement and make
   all .ust-reveal elements immediately visible with no delay.
   CSS handles this; JavaScript does not need to branch.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.ust-reveal,
	.ust-reveal--fade-up,
	.ust-reveal--fade-in,
	.ust-reveal--scale-in {
		opacity: 1 !important;
		transform: none !important;
		animation: none !important;
		transition: none !important;
	}
}
