/* global React, BtnPrimary */ // Top nav — sticky, blur backdrop after scroll. const Navbar = ({ onNavigate }) => { const [scrolled, setScrolled] = React.useState(false); React.useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 20); window.addEventListener('scroll', onScroll, { passive: true }); return () => window.removeEventListener('scroll', onScroll); }, []); const link = (id, label) => ( { e.preventDefault(); onNavigate?.(id); }} style={{ color: 'rgba(254,255,238,0.45)', textDecoration: 'none', fontSize: 14, fontWeight: 400, transition: 'color .2s', }} onMouseEnter={(e) => (e.currentTarget.style.color = 'rgba(254,255,238,0.9)')} onMouseLeave={(e) => (e.currentTarget.style.color = 'rgba(254,255,238,0.45)')} > {label} ); return ( { e.preventDefault(); onNavigate?.('hero'); }} style={{ fontSize: 18, fontWeight: 600, color: 'var(--mlc-cream)', textDecoration: 'none', letterSpacing: '-0.01em', }} > mylittlechart {link('hero', 'Home')} {link('features', 'Features')} {link('pricing', 'Pricing')} {link('capabilities', 'About')} (e.currentTarget.style.color = 'rgba(254,255,238,0.9)')} onMouseLeave={(e) => (e.currentTarget.style.color = 'rgba(254,255,238,0.45)')} > Login { e.preventDefault(); onNavigate?.('download'); }} style={{ fontSize: 13, fontWeight: 600, padding: '10px 20px' }} > Get Started Free ); }; window.Navbar = Navbar;