// Hero.jsx — Hero section over navy with mockup // The headline cycles 3 words (vendem/impressionam/conquistam) using the same // pattern from apps/motion/02-hero-loop.html. The mockup on the right shows a // static case-study preview (CASE · ACME) — the previous iframe embed of the // hero-loop motion was removed because it duplicated the headline visually. const Hero = () => { const stackRef = React.useRef(null); // Cycle the 3 italic champagne words in the headline. React.useEffect(() => { if (!window.gsap || !stackRef.current) return; const words = stackRef.current.querySelectorAll('.w'); if (words.length < 3) return; // Inline transforms with explicit % units so GSAP parses yPercent correctly // (avoids the matrix-in-pixels parsing bug we hit in motion 02). words[0].style.transform = 'translateY(0%)'; words[1].style.transform = 'translateY(140%)'; words[2].style.transform = 'translateY(140%)'; // y:0 alongside yPercent zeroes any stray pixel offset GSAP might infer. gsap.set(words[0], { y: 0, yPercent: 0 }); gsap.set(words[1], { y: 0, yPercent: 140 }); gsap.set(words[2], { y: 0, yPercent: 140 }); const tl = gsap.timeline({ defaults: { ease: 'power3.inOut' }, repeat: -1 }); // Reset state at t=0 of EVERY iteration so the loop is stable. tl.set(words[0], { y: 0, yPercent: 0 }, 0); tl.set(words[1], { y: 0, yPercent: 140 }, 0); tl.set(words[2], { y: 0, yPercent: 140 }, 0); function cycleWord(time, fromIdx) { const cur = words[fromIdx]; const next = words[(fromIdx + 1) % 3]; tl.set(next, { yPercent: 140 }, time - 0.05); tl.to(cur, { yPercent: -140, duration: 0.7 }, time); tl.to(next, { yPercent: 0, duration: 0.7 }, time); } cycleWord(4.0, 0); // vendem → impressionam cycleWord(8.0, 1); // impressionam → conquistam cycleWord(10.8, 2); // conquistam → vendem (loops back) tl.to({}, { duration: 0.5 }, 11.5); return () => tl.kill(); }, []); const scrollTo = (id) => () => { const el = document.getElementById(id); if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' }); }; return (
Estúdio digital · Desde 2014

Projetamos e desenvolvemos sites e e-commerces sob medida para empresas médias e corporativo. Em 60 dias o seu projeto sai do briefing para o ar — pronto para escalar.

Ver proposta · BPM
); }; window.Hero = Hero;