// Sticky 90px nav. Logo left, links centered, login + CTA right. // Multi-page version: active link highlighted; Services is a dropdown. function Nav({ active = 'home', showClientLogin = true, primaryCtaLabel = 'Book a Free Call' }) { const [scrolled, setScrolled] = React.useState(false); const [servicesOpen, setServicesOpen] = React.useState(false); const [mobileOpen, setMobileOpen] = React.useState(false); const closeTimer = React.useRef(null); React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 8); window.addEventListener('scroll', onScroll); return () => window.removeEventListener('scroll', onScroll); }, []); React.useEffect(() => { document.body.style.overflow = mobileOpen ? 'hidden' : ''; }, [mobileOpen]); const openServices = () => { if (closeTimer.current) { clearTimeout(closeTimer.current); closeTimer.current = null; } setServicesOpen(true); }; const scheduleClose = () => { closeTimer.current = setTimeout(() => setServicesOpen(false), 140); }; const serviceItems = [ { key: 'monthly', label: 'Monthly Bookkeeping', href: 'monthly-bookkeeping.html', blurb: 'Clean books and reports every month.' }, { key: 'cleanup', label: 'Cleanup & Catch-Up', href: 'cleanup.html', blurb: 'Get your books back on track.' }, { key: 'advisory', label: 'Advisory', href: 'advisory.html', blurb: 'Strategy and insights, monthly.' }, ]; // Primary nav — kept short on purpose. Service Areas + Contact live in the footer / CTA. const links = [ { key: 'pricing', label: 'Pricing', href: 'pricing.html' }, { key: 'about', label: 'About', href: 'about.html' }, { key: 'testimonials', label: 'Reviews', href: 'reviews.html' }, ]; // Mobile sheet includes everything. const mobileExtras = [ { key: 'contact', label: 'Contact', href: 'contact.html' }, ]; const isServicesActive = ['monthly', 'cleanup', 'advisory'].includes(active); const linkStyle = (isActive) => ({ fontSize: 14, fontWeight: isActive ? 600 : 500, color: isActive ? '#3F8074' : '#163F34', textDecoration: 'none', letterSpacing: '-0.005em', padding: '6px 0', position: 'relative', transition: 'color .2s', }); return ( ); } Object.assign(window, { Nav });