/* global React */ const { useState, useEffect, useRef } = React; // ============================================ // Logo // ============================================ function Logo({ size = "md" }) { const sizeClass = size === "xl" ? "logo logo-xl" : "logo"; return ( FL i NKS ); } // ============================================ // Cursor // ============================================ function Cursor() { const dotRef = useRef(null); const ringRef = useRef(null); useEffect(() => { let dotX = window.innerWidth / 2, dotY = window.innerHeight / 2; let ringX = dotX, ringY = dotY; let mx = dotX, my = dotY; const onMove = (e) => { mx = e.clientX; my = e.clientY; }; window.addEventListener('mousemove', onMove); let raf; const tick = () => { dotX += (mx - dotX) * 0.5; dotY += (my - dotY) * 0.5; ringX += (mx - ringX) * 0.15; ringY += (my - ringY) * 0.15; if (dotRef.current) dotRef.current.style.transform = `translate(${dotX}px, ${dotY}px) translate(-50%, -50%)`; if (ringRef.current) ringRef.current.style.transform = `translate(${ringX}px, ${ringY}px) translate(-50%, -50%)`; raf = requestAnimationFrame(tick); }; tick(); const onOver = (e) => { const isInteractive = e.target.closest('a, button, .pillar, .case, .stack-item, .chip, .faq-q, input, textarea'); if (dotRef.current) dotRef.current.classList.toggle('hover', !!isInteractive); if (ringRef.current) ringRef.current.classList.toggle('hover', !!isInteractive); }; document.addEventListener('mouseover', onOver); return () => { window.removeEventListener('mousemove', onMove); document.removeEventListener('mouseover', onOver); cancelAnimationFrame(raf); }; }, []); return ( <>
> ); } // ============================================ // Nav // ============================================ function Nav({ page, setPage, lang, setLang, t }) { const links = [ { id: 'home', n: '01', label: t.nav.home }, { id: 'services', n: '02', label: t.nav.services }, { id: 'about', n: '03', label: t.nav.about }, { id: 'contact', n: '04', label: t.nav.contact } ]; return ( ); } // ============================================ // Footer // ============================================ function Footer({ t, setPage }) { const [email, setEmail] = useState(''); const [subscribed, setSubscribed] = useState(false); return ( ); } // ============================================ // Reveal helper // ============================================ function Reveal({ children, delay = 0, className = "", as: Tag = "div" }) { const ref = useRef(null); const [shown, setShown] = useState(false); useEffect(() => { const el = ref.current; if (!el) return; const io = new IntersectionObserver(([e]) => { if (e.isIntersecting) { setTimeout(() => setShown(true), delay); io.disconnect(); } }, { threshold: 0.15 }); io.observe(el); return () => io.disconnect(); }, [delay]); return