/* global React, ReactDOM */ const { useState, useEffect, useRef } = React; function App() { const [hero, setHero] = useState(1); // default to split (1 of 3) const [menuOpen, setMenuOpen] = useState(false); // Reveal on scroll useEffect(() => { const els = document.querySelectorAll('.reveal'); const io = new IntersectionObserver((entries)=>{ entries.forEach(e=>{ if(e.isIntersecting) e.target.classList.add('in'); }); }, { threshold: 0.12 }); els.forEach(el=>io.observe(el)); return ()=>io.disconnect(); }, [hero]); const scrollTo = (id) => { const el = document.getElementById(id); if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' }); }; const heroes = [HeroSplit, HeroMarquee, HeroCollage]; const HeroComp = heroes[hero - 1] || HeroSplit; return ( <>