Artisan Studios Achieves AWS Generative AI CompetencyAWS GenAI Competency Achieved
Check It Out
// 2. HERO INTRO ANIMATIONS
// Staggered fade-in and de-blur for paragraph, button, bg image, and main image.
// ────────────────────────────────────────────────────────────────────────────
// Helper to DRY up fromTo calls for blur-fade effects
function blurFadeIn(target, { duration, delay, ease = "power3.out" }) {
gsap.fromTo(
target,
{ opacity: 0, filter: "blur(12px)", y: "0.75rem" },
{ opacity: 1, filter: "blur(0px)", y: "0rem", duration, delay, ease }
);
}
// Paragraph and button
blurFadeIn("#hero-p", { duration: 1, delay: 0.5 });
blurFadeIn("#hero-btn", { duration: 1, delay: 0.75 });
// Background image (no blur, longer fade)
gsap.fromTo(
"#hero-bg-img",
{ opacity: 0 },
{ opacity: 1, duration: 3, delay: 1 }
);
// Main hero image
gsap.fromTo(
"#hero-img",
{ opacity: 0 },
{ opacity: 1, duration: 2, delay: 1.25, ease: "power3.out" }
);
});