/* global React, Icon, Button, Eyebrow, Grain, useLanguage */ const { useState, useEffect, useRef } = React; const HERO_SLIDES = [ { src: 'assets/photos/hero-webp/01-central-park-photographer.webp', width: 1916, height: 821, eyebrow: 'central park · autumn', meta: 'frame 042 · canon · 35mm', position: 'center 38%', mobilePosition: '65% 38%' }, { src: 'assets/photos/hero-webp/02-long-beach-seated.webp', width: 1920, height: 1280, eyebrow: 'long beach · quiet tide', meta: 'frame 052 · long beach · ny', position: 'center 48%', mobilePosition: '56% 48%' }, { src: 'assets/photos/hero-webp/03-waterfront-portrait.webp', width: 2010, height: 1248, eyebrow: 'waterfront · winter light', meta: 'frame 001 · waterfront · ny', position: 'center 48%', mobilePosition: '58% 48%' }, { src: 'assets/photos/hero-webp/04-long-beach-walking.webp', width: 1920, height: 1280, eyebrow: 'long beach · ocean air', meta: 'frame 072 · long beach · ny', position: 'center 48%', mobilePosition: '56% 48%' }, { src: 'assets/photos/hero-webp/05-times-square-closeup.webp', width: 1920, height: 1280, eyebrow: 'times square · city light', meta: 'frame 024 · midtown · ny', position: 'center 42%', mobilePosition: '58% 42%' }, { src: 'assets/photos/hero-webp/06-times-square-wide.webp', width: 1920, height: 1280, eyebrow: 'times square · city rhythm', meta: 'frame 010 · midtown · ny', position: 'center 44%', mobilePosition: '58% 44%' }, { src: 'assets/photos/hero-webp/07-central-park-spring.webp', width: 1500, height: 1000, eyebrow: 'central park · spring', meta: 'frame 061 · uptown · ny', position: 'center 48%', mobilePosition: '46% 48%' } ]; function Hero({ openBooking, scrollTo }) { const { isPortuguese } = useLanguage(); const [idx, setIdx] = useState(0); const [paused, setPaused] = useState(false); const timerRef = useRef(null); // Auto-advance every 5s, pause on hover. useEffect(() => { if (paused || window.matchMedia('(prefers-reduced-motion: reduce)').matches) return; timerRef.current = setInterval(() => { setIdx((i) => (i + 1) % HERO_SLIDES.length); }, 5000); return () => clearInterval(timerRef.current); }, [paused]); const current = HERO_SLIDES[idx]; return (
setPaused(true)} onMouseLeave={() => setPaused(false)} style={{ position: 'relative', height: '100vh', minHeight: 720, width: '100%', overflow: 'hidden', background: 'var(--asphalt)' }}> {/* Every frame loads eagerly and remains mounted for a true overlapping dissolve. */} {HERO_SLIDES.map((slide, slideIndex) => { const active = slideIndex === idx; return (
); })} {/* Protection gradients */}
{/* Top eyebrow row */}
{current.eyebrow} est. 2019
brooklyn, ny
{/* Headline block — animates only on first load, content stays fixed across slides */}

{isPortuguese ? <>Guarde o Momento
em Nova
York : <>Save the Moment
in New
York}.

{isPortuguese ? 'Fotografia natural em Nova York para casais, famílias e viajantes. Histórias autênticas entre parques, ruas, praias e táxis amarelos.' : 'Natural New York City photography for couples, families, and travelers. Authentic stories captured in parks, city streets, and at the beach.'}

{/* Dot indicators — bottom-center, click to jump, softly animate */}
{HERO_SLIDES.map((_, i) => { const active = i === idx; return (
{/* Frame meta — bottom-left, swaps with the active slide */}
{current.meta}
{/* Slide counter — bottom-right */}
0{idx + 1} / 0{HERO_SLIDES.length}
); } window.Hero = Hero;