"use client"; import Link from "next/link"; import { CHAMFER } from "@/lib/chamfer"; import Image from "next/image"; import { useRef, useEffect } from "react"; import { gsap } from "gsap"; import DemoButton from "@/components/ui/DemoButton"; export default function HeroSection() { const sectionRef = useRef(null); const badgeRef = useRef(null); const headlineRef = useRef(null); const subtextRef = useRef(null); const buttonsRef = useRef(null); const screenshotRef = useRef(null); const sealRef = useRef(null); useEffect(() => { const ctx = gsap.context(() => { const tl = gsap.timeline({ defaults: { ease: "power3.out" } }); // Stagger entrance from left side tl.fromTo( badgeRef.current, { opacity: 0, y: 20 }, { opacity: 1, y: 0, duration: 0.5 } ) .fromTo( headlineRef.current, { opacity: 0, y: 30 }, { opacity: 1, y: 0, duration: 0.7 }, "-=0.3" ) .fromTo( subtextRef.current, { opacity: 0, y: 20 }, { opacity: 1, y: 0, duration: 0.5 }, "-=0.4" ) .fromTo( buttonsRef.current, { opacity: 0, y: 20 }, { opacity: 1, y: 0, duration: 0.5 }, "-=0.3" ) .fromTo( screenshotRef.current, { opacity: 0, scale: 0.95, y: 30 }, { opacity: 1, scale: 1, y: 0, duration: 0.8, ease: "power2.out" }, "-=0.4" ) .fromTo( sealRef.current, { opacity: 0, scale: 0.8 }, { opacity: 1, scale: 1, duration: 0.4 }, "-=0.3" ); }, sectionRef); return () => ctx.revert(); }, []); return (
); }