'use client'; import React, { useLayoutEffect, useEffect, useRef } from 'react'; import { gsap } from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; if (typeof window !== 'undefined') gsap.registerPlugin(ScrollTrigger); const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect; const words = [ { text: 'Effortless.', size: 'clamp(58px, 9vw, 134px)', color: '#ffffff' }, { text: 'Invisible.', size: 'clamp(50px, 7.5vw, 112px)', color: 'rgba(255,255,255,0.35)' }, { text: 'Yours.', size: 'clamp(58px, 9vw, 134px)', color: '#f4be28' }, ]; const steps = [ { n: '01', label: 'Walk into any partner store' }, { n: '02', label: 'Pay the way you always do' }, ]; export default function ExperienceSection() { const panelRef = useRef(null); const cardRef = useRef(null); useIsomorphicLayoutEffect(() => { if (typeof window === 'undefined') return; const section = panelRef.current; const card = cardRef.current; if (!section || !card) return; const ctx = gsap.context(() => { gsap.fromTo(card, { x: 200, opacity: 0 }, { x: 0, opacity: 1, ease: 'power2.out', scrollTrigger: { trigger: section, start: 'top 92%', end: 'top 25%', scrub: 1.2, } } ); }, section); return () => ctx.revert(); }, []); return (
The Experience07
{/* Giant words */}
{words.map((w, i) => ( {w.text} ))}

No plastic cards. No coupon hunting. No app open required at checkout. Loyaly works quietly in the background while you shop the way you always have.

{steps.map((s, i) => (
{s.n} {s.label}
))}
{['#ff7b39', '#4ade80', '#a855f7', '#3b82f6'].map((c, i) => (
0 ? -9 : 0 }} /> ))}
Joined by 50,000+ shoppers
); }