// Animated donut chart — used in the Case section const Donut = ({ value = 72.9, size = 170, stroke = 14, primary = "var(--orange)", secondary = "var(--grad-c)", label, sub }) => { const [progress, setProgress] = React.useState(0); const ref = React.useRef(null); React.useEffect(() => { const el = ref.current; if (!el) return; const io = new IntersectionObserver((entries) => { entries.forEach(e => { if (e.isIntersecting) { let start = null; const dur = 1400; const tick = (t) => { if (!start) start = t; const p = Math.min(1, (t - start) / dur); const eased = 1 - Math.pow(1 - p, 3); setProgress(eased); if (p < 1) requestAnimationFrame(tick); }; requestAnimationFrame(tick); io.disconnect(); } }); }, { threshold: 0.4 }); io.observe(el); return () => io.disconnect(); }, []); const r = (size - stroke) / 2; const c = 2 * Math.PI * r; const filledFraction = (value / 100) * progress; const filled = c * filledFraction; const remainder = c - filled; return (