@@ -12,7 +12,7 @@ import { gsap, useGSAP } from '@/lib/gsap'
1212import { getAssetPath } from '@/lib/utils'
1313import SplitType from 'split-type'
1414import { RequestSection } from '@/components/home/RequestSection'
15- import { CustomCursor } from '@/components/ui/CustomCursor'
15+
1616
1717export default function Home ( ) {
1818 const heroRef = useRef < HTMLElement > ( null )
@@ -63,83 +63,60 @@ export default function Home() {
6363 // ── Hero animations ──
6464 const tl = gsap . timeline ( { defaults : { ease : 'power4.out' } } )
6565
66- // Initial Reveal
66+ // Background (Independent)
67+ tl . to ( '.hero-bg-mountains img' , {
68+ scale : 1.1 ,
69+ duration : 20 ,
70+ ease : 'none' ,
71+ } , 0 )
72+
73+ // Title Reveal
6774 if ( titleRef . current ) {
6875 const split = new SplitType ( titleRef . current , {
6976 types : 'words' ,
7077 tagName : 'span'
7178 } )
7279
73- // Background gentle zoom
74- tl . to ( '.hero-bg-mountains img' , {
75- scale : 1.1 ,
76- duration : 20 ,
77- ease : 'none' ,
78- } , 0 )
79-
80- // Text Reveal
8180 tl . from ( split . words , {
8281 yPercent : 100 ,
8382 opacity : 0 ,
84- stagger : 0.08 ,
85- duration : 1.2 ,
83+ stagger : 0.05 ,
84+ duration : 0.8 ,
8685 ease : 'power4.out' ,
87- } , 0.5 )
88- . from ( '.hero-subtitle' , {
89- y : 30 ,
90- opacity : 0 ,
91- duration : 1 ,
92- ease : 'power3.out' ,
93- } , '-=0.8' )
94- . from ( '.hero-cta' , {
95- y : 20 ,
96- opacity : 0 ,
97- duration : 0.8 ,
98- stagger : 0.1 ,
99- ease : 'power3.out' ,
100- } , '-=0.6' )
101- . from ( '.hero-scroll-indicator' , {
102- opacity : 0 ,
103- duration : 1 ,
104- } , '-=0.4' )
86+ } , 0.1 )
10587 }
10688
107- // ── Parallax Scroll Effects ──
108- // Mountains (Background) - Moves slowest (0.2x visual speed relative to scroll)
109- gsap . to ( '.hero-bg-mountains' , {
110- yPercent : 20 , // Moves slightly down as we scroll down
111- ease : 'none' ,
112- scrollTrigger : {
113- trigger : heroRef . current ,
114- start : 'top top' ,
115- end : 'bottom top' ,
116- scrub : true ,
117- }
118- } )
89+ // Subtitle & Rest (Sequenced with absolute timing for reliability)
90+ // Subtitle & Rest (Sequenced with absolute timing for reliability)
91+ tl . fromTo ( '.hero-subtitle' ,
92+ { y : 20 , autoAlpha : 0 } ,
93+ { y : 0 , autoAlpha : 1 , duration : 0.8 , ease : 'power3.out' } ,
94+ 0.5
95+ )
96+
97+ tl . fromTo ( '.hero-cta' ,
98+ { y : 20 , autoAlpha : 0 } ,
99+ { y : 0 , autoAlpha : 1 , duration : 0.8 , stagger : 0.1 , ease : 'power3.out' } ,
100+ 0.6
101+ )
102+
103+ tl . fromTo ( '.hero-scroll-indicator' ,
104+ { autoAlpha : 0 } ,
105+ { autoAlpha : 1 , duration : 1 } ,
106+ 0.9
107+ )
119108
120- // Tea Gardens (Mid-ground) - Moves medium speed (0.5x)
121- gsap . to ( '.hero-bg-midground' , {
122- yPercent : 40 , // Moves faster than mountains
123- ease : 'none' ,
124- scrollTrigger : {
125- trigger : heroRef . current ,
126- start : 'top top' ,
127- end : 'bottom top' ,
128- scrub : true ,
129- }
130- } )
131-
132- // Text/Foreground (1x - Natural scroll, but we can add a slight opacity fade)
109+ // ── Parallax Scroll Effects ──
133110 gsap . to ( '.hero-foreground' , {
134- yPercent : 60 , // Parallax text movement
135- opacity : 0 ,
136- ease : 'none' ,
137111 scrollTrigger : {
138112 trigger : heroRef . current ,
139113 start : 'top top' ,
140- end : 'bottom top ' , // Fade out by 60% of viewport
114+ end : 'bottom center ' , // Fade out halfway through
141115 scrub : true ,
142- }
116+ } ,
117+ y : - 50 , // Move up slightly
118+ opacity : 0 ,
119+ ease : 'none'
143120 } )
144121
145122 // ── Magic section — stagger reveal ──
@@ -238,14 +215,16 @@ export default function Home() {
238215 } , { scope : heroRef , dependencies : [ ] } )
239216
240217 return (
241- < main className = "relative overflow-hidden cursor-none" > { /* Hide default cursor here too for safety */ }
242- < CustomCursor />
218+ < main className = "relative overflow-hidden" >
219+
243220
244221 { /* ═══════════ HERO ═══════════ */ }
245- < section ref = { heroRef } className = "relative h-screen w-full flex items-center justify-center overflow-hidden bg-black" >
222+ < section ref = { heroRef } className = "relative h-[100dvh] w-full flex items-center justify-center overflow-hidden" >
223+ { /* Layer 0: Deep Black Background (Fallback) */ }
224+ < div className = "absolute inset-0 bg-black -z-50" />
246225
247- { /* Layer 1: Background Mountains (Moves slow ) */ }
248- < div className = "hero-bg-mountains absolute inset-0 -z-30 h-[120%] w-full top-0" >
226+ { /* Layer 1: Background Mountains (Single Hero Image ) */ }
227+ < div className = "hero-bg-mountains absolute inset-0 z-0 h-full w-full top-0" >
249228 < Image
250229 src = { getAssetPath ( "/images/darjeeling_hero_bg_1770289408859.webp" ) }
251230 alt = "Himalayan Peaks"
@@ -254,21 +233,8 @@ export default function Home() {
254233 priority
255234 quality = { 90 }
256235 />
257- { /* Atmospheric Haze */ }
258- < div className = "absolute inset-0 bg-gradient-to-b from-slate-900/30 via-transparent to-slate-900/80" />
259- </ div >
260-
261- { /* Layer 2: Midground Tea Gardens (Moves medium) */ }
262- < div className = "hero-bg-midground absolute inset-0 -z-20 h-[120%] w-full top-[20%]" >
263- < Image
264- src = { getAssetPath ( "/images/darjeeling_tea_garden.webp" ) }
265- alt = "Tea Gardens"
266- fill
267- className = "object-cover object-top opacity-90"
268- priority
269- />
270- { /* Blend Gradient */ }
271- < div className = "absolute inset-0 bg-gradient-to-t from-black via-black/20 to-transparent" />
236+ { /* Atmospheric Haze - Enhanced for contrast */ }
237+ < div className = "absolute inset-0 bg-gradient-to-b from-black/60 via-black/40 to-black/80" />
272238 </ div >
273239
274240 { /* Layer 3: Foreground Text */ }
@@ -295,14 +261,14 @@ export default function Home() {
295261 onClick = { ( ) => {
296262 document . getElementById ( 'routes' ) ?. scrollIntoView ( { behavior : 'smooth' } ) ;
297263 } }
298- className = "hero-cta group inline-flex items-center gap-3 px-10 py-5 bg-white text-primary text-sm tracking-[0.2em] uppercase font-bold rounded-full hover:bg-white/90 hover:scale-105 hover:shadow-[0_0_40px_rgba(255,255,255,0.3)] transition-all duration-500"
264+ className = "hero-cta will-change-transform group inline-flex items-center gap-3 px-10 py-5 bg-white text-primary text-sm tracking-[0.2em] uppercase font-bold rounded-full hover:bg-white/90 hover:scale-105 transition-all duration-500"
299265 >
300266 Start Exploring
301267 < ArrowRight className = "w-4 h-4 transition-transform group-hover:translate-x-1" />
302268 </ button >
303269 < Link
304270 href = "/signup"
305- className = "hero-cta inline-flex items-center gap-3 px-10 py-5 bg-white/10 text-white text-sm tracking-[0.2em] uppercase font-semibold rounded-full hover:bg-white/20 backdrop-blur-md border border-white/20 hover:border-white/40 transition-all duration-500"
271+ className = "hero-cta will-change-transform inline-flex items-center gap-3 px-10 py-5 bg-white/10 text-white text-sm tracking-[0.2em] uppercase font-semibold rounded-full hover:bg-white/20 backdrop-blur-md border border-white/20 hover:border-white/40 transition-all duration-500"
306272 >
307273 For Agencies
308274 </ Link >
0 commit comments