// Compact animated stat pill for the hero trust row — reuses the same
// real counters data + useCountUp hook as About's counter cards, just in
// a smaller inline form that fits the dark hero background.
function HeroStat({ item }) {
const ref = React.useRef(null);
const [active, setActive] = React.useState(false);
React.useEffect(() => {
const el = ref.current;
if (!el) return;
const io = new IntersectionObserver((entries) => {
entries.forEach((e) => { if (e.isIntersecting) { setActive(true); io.disconnect(); } });
}, { threshold: 0.4 });
io.observe(el);
return () => io.disconnect();
}, []);
const value = window.useCountUp(item.value, active);
return (