/* 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 ( ); }; window.Navbar = Navbar;