/* ═══════════════════════════════════════════════════════════════════ UI COMPONENTS Scroll progress, side rail navigation, footer ═══════════════════════════════════════════════════════════════════ */ function ScrollProgress() { const ref = useRef(null); useEffect(() => { const onScroll = () => { const h = document.documentElement; const max = h.scrollHeight - h.clientHeight; const p = max > 0 ? window.scrollY / max : 0; if (ref.current) ref.current.style.transform = `scaleX(${p})`; }; window.addEventListener("scroll", onScroll, { passive: true }); onScroll(); return () => window.removeEventListener("scroll", onScroll); }, []); return (
); } function SideRail({ active }) { const items = [ { idx: 1, label: "01 — Início" }, { idx: 2, label: "02 — O Desafio" }, { idx: 3, label: "03 — Metodologia" }, { idx: 4, label: "04 — Resultados" }, { idx: 5, label: "05 — Fit" }, { idx: 6, label: "06 — Contato" }, ]; const scrollTo = (idx) => smoothScrollTo(panelDocTop(idx)); return ( ); } function Footer() { return ( ); }