// nav.jsx — Fixed, discreet navigation + footer for CAJE Collective function TopNav({ route, navigate, inquiryMode, setInquiryMode }) { const [scrolled, setScrolled] = React.useState(false); const [menuOpen, setMenuOpen] = React.useState(false); const [wide, setWide] = React.useState(() => typeof window !== 'undefined' && window.innerWidth >= 1200); const isMobile = useIsMobile(); React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 40); const onResize = () => setWide(window.innerWidth >= 1200); onScroll(); onResize(); window.addEventListener('scroll', onScroll, { passive: true }); window.addEventListener('resize', onResize); return () => { window.removeEventListener('scroll', onScroll); window.removeEventListener('resize', onResize); }; }, []); React.useEffect(() => { document.body.style.overflow = menuOpen ? 'hidden' : ''; return () => { document.body.style.overflow = ''; }; }, [menuOpen]); const items = [ { id: 'about', label: 'About' }, { id: 'sanctuaries', label: 'Sanctuaries' }, { id: 'experiences', label: 'Experiences' }, { id: 'inquiry', label: 'Inquiry' }, ]; const go = (id) => { setMenuOpen(false); navigate(id); }; // ----- MOBILE: wordmark + hamburger, full-screen drawer ----- if (isMobile) { return ( <>
{ e.preventDefault(); go('home'); }} style={{ textDecoration: 'none', opacity: menuOpen ? 0 : 1, transition: 'opacity 0.3s' }}>
{/* Drawer */}
{ e.preventDefault(); go('inquiry'); }} style={{ fontFamily: 'Inter', fontSize: 11, letterSpacing: '0.28em', textTransform: 'uppercase', color: '#B89A79', textDecoration: 'none', }}> Begin the Dialogue  →
By appointment · Worldwide
); } return (
{ e.preventDefault(); navigate('home'); }} style={{ textDecoration: 'none' }}> {wide ? (
EN · FR · IT { e.preventDefault(); navigate('inquiry'); }} className="linky" style={{ fontSize: 11, letterSpacing: '0.28em', textTransform: 'uppercase', color: '#B89A79', }}> Begin the Dialogue
) : (
EN
)}
); } function Footer({ navigate }) { const isMobile = useIsMobile(); return ( ); } function FooterCol({ title, items, navigate }) { return (
{title}
); } Object.assign(window, { TopNav, Footer });