// Shared primitives used across sections const { useEffect: _useEffect, useRef: _useRef, useState: _useState, useCallback: _useCallback } = React; // Reveal on scroll function useReveal() { _useEffect(() => { const els = document.querySelectorAll(".reveal"); if (!("IntersectionObserver" in window)) { els.forEach((e) => e.classList.add("is-visible")); return; } const io = new IntersectionObserver( (entries) => { entries.forEach((e) => { if (e.isIntersecting) { e.target.classList.add("is-visible"); io.unobserve(e.target); } }); }, { threshold: 0.12 } ); els.forEach((el) => io.observe(el)); return () => io.disconnect(); }, []); } // Animated number counter function CountUp({ to, duration = 1400, suffix = "", className = "" }) { const [val, setVal] = _useState(0); const ref = _useRef(null); const started = _useRef(false); _useEffect(() => { if (!ref.current) return; const io = new IntersectionObserver( (entries) => { entries.forEach((e) => { if (e.isIntersecting && !started.current) { started.current = true; const start = performance.now(); const tick = (now) => { const t = Math.min(1, (now - start) / duration); const eased = 1 - Math.pow(1 - t, 3); setVal(Math.round(to * eased)); if (t < 1) requestAnimationFrame(tick); }; requestAnimationFrame(tick); } }); }, { threshold: 0.4 } ); io.observe(ref.current); return () => io.disconnect(); }, [to, duration]); // Format with K/L/M shorthand handled by parent — here just commas const formatted = val.toLocaleString("en-IN"); return ( {formatted} {suffix} ); } // Section heading function SectionEyebrow({ children }) { return (