11'use client'
22
3- import { motion } from 'framer-motion'
3+ import { useGSAP } from '@gsap/react'
4+ import { gsap } from 'gsap'
5+ import { ScrollTrigger } from 'gsap/ScrollTrigger'
6+ import { useRef } from 'react'
47import { NetworkBackground } from './network-background'
58
9+ gsap . registerPlugin ( ScrollTrigger )
10+
611export function LandingHero ( ) {
12+ const heroRef = useRef < HTMLDivElement > ( null )
13+
14+ useGSAP ( ( ) => {
15+ const tl = gsap . timeline ( )
16+
17+ // Stagger entrance animation for child elements
18+ tl . fromTo (
19+ '.hero-element' ,
20+ { opacity : 0 , y : 20 } ,
21+ {
22+ opacity : 1 ,
23+ y : 0 ,
24+ duration : 0.6 ,
25+ ease : 'power2.out' ,
26+ stagger : 0.1 ,
27+ }
28+ )
29+
30+ // Add ScrollTrigger for parallax effect
31+ ScrollTrigger . create ( {
32+ trigger : heroRef . current ,
33+ start : 'top bottom' ,
34+ end : 'bottom top' ,
35+ scrub : 1 ,
36+ onUpdate : ( self ) => {
37+ const progress = self . progress
38+ gsap . set ( heroRef . current , {
39+ y : - progress * 50 , // Parallax effect
40+ scale : 1 + progress * 0.05 , // Slight zoom
41+ } )
42+ } ,
43+ } )
44+ } )
45+
746 return (
847 < section className = "relative h-[800px] w-full overflow-hidden border-b border-border bg-background" >
948 { /* Interactive System Visualization */ }
@@ -14,40 +53,35 @@ export function LandingHero() {
1453
1554 < div className = "container relative z-10 mx-auto flex h-full flex-col items-center justify-center px-4 text-center" >
1655 { /* Main Content */ }
17- < motion . div
18- initial = { { opacity : 0 , y : 30 } }
19- animate = { { opacity : 1 , y : 0 } }
20- transition = { { duration : 0.6 } }
21- className = "mx-auto max-w-4xl"
22- >
23- < div className = "mb-6 inline-flex items-center rounded-full border border-white/10 bg-black/50 px-3 py-1 text-sm backdrop-blur-md shadow-lg shadow-black/20" >
56+ < div ref = { heroRef } className = "mx-auto max-w-4xl" >
57+ < div className = "mb-6 inline-flex items-center rounded-full border border-white/10 bg-black/50 px-3 py-1 text-sm backdrop-blur-md shadow-lg shadow-black/20 hero-element" >
2458 < span className = "flex size-2 me-2 rounded-full bg-green-500 animate-pulse" > </ span >
2559 < span className = "text-white/80 font-mono text-xs tracking-wider" >
2660 SYSTEM OPERATIONAL
2761 </ span >
2862 </ div >
2963
30- < h1 className = "mb-8 text-5xl font-bold tracking-tight text-foreground sm:text-6xl lg:text-8xl drop-shadow-2xl" >
64+ < h1 className = "mb-8 text-5xl font-bold tracking-tight text-foreground sm:text-6xl lg:text-8xl drop-shadow-2xl hero-element " >
3165 Agent Orchestration
3266 < br />
3367 < span className = "text-transparent bg-clip-text bg-linear-to-b from-white to-white/50" >
3468 Interactive Swarm
3569 </ span >
3670 </ h1 >
3771
38- < p className = "mx-auto mb-12 max-w-xl text-lg leading-relaxed text-muted-foreground sm:text-xl" >
72+ < p className = "mx-auto mb-12 max-w-xl text-lg leading-relaxed text-muted-foreground sm:text-xl hero-element " >
3973 Visualizing real-time agent interactions. Hover over the
4074 nodes to interact with the neural network.
4175 </ p >
4276
43- < div className = "flex items-center justify-center gap-4" >
77+ < div className = "flex items-center justify-center gap-4 hero-element " >
4478 < div className = "h-px w-24 bg-linear-to-r from-transparent via-border to-transparent" />
4579 < span className = "text-xs text-muted-foreground font-mono uppercase tracking-widest" >
4680 Live Simulation
4781 </ span >
4882 < div className = "h-px w-24 bg-linear-to-r from-transparent via-border to-transparent" />
4983 </ div >
50- </ motion . div >
84+ </ div >
5185 </ div >
5286 </ section >
5387 )
0 commit comments