/* ============================================================ HeroEcosystem.jsx — núcleo "Agente de IA AR" orquestrando a operação. Topologia radial refinada com conexões curvas tipo data-flow / circuito, pulsos de dados e glow sutil. Desktop: rede radial · Mobile: empilhado. ============================================================ */ const HE_W = 760, HE_H = 600; const RING = { cx: 380, cy: 300, rx: 258, ry: 214 }; const HE_LABELS = [ { icon: 'message-circle', label: 'WhatsApp' }, { icon: 'camera', label: 'Instagram' }, { icon: 'globe', label: 'Site' }, { icon: 'calendar-check', label: 'Agenda' }, { icon: 'trending-up', label: 'Vendas' }, { icon: 'wallet', label: 'Financeiro' }, { icon: 'file-text', label: 'Documentos' }, { icon: 'contact', label: 'CRM' }, { icon: 'mail', label: 'E-mail' }, ]; const HE_NODES = HE_LABELS.map((n, i) => { const a = (-90 + i * 40) * Math.PI / 180; return { ...n, x: RING.cx + RING.rx * Math.cos(a), y: RING.cy + RING.ry * Math.sin(a) }; }); /* curva Bézier suave do núcleo até o nó (arco perpendicular alternado) */ const hePath = (n, i) => { const { cx, cy } = RING; const mx = (cx + n.x) / 2, my = (cy + n.y) / 2; const dx = n.x - cx, dy = n.y - cy, L = Math.hypot(dx, dy) || 1; const px = -dy / L, py = dx / L; const k = (i % 2 ? -1 : 1) * 30; return `M${cx},${cy} Q${(mx + px * k).toFixed(1)},${(my + py * k).toFixed(1)} ${n.x.toFixed(1)},${n.y.toFixed(1)}`; }; const HE_RESULTS = [ { icon: 'user-check', label: 'Lead qualificado', x: 58, y: 92, anchor: 'l' }, { icon: 'refresh-cw', label: 'CRM sincronizado', x: 58, y: 508, anchor: 'l' }, { icon: 'calendar-check', label: 'Agenda atualizada',x: 702, y: 92, anchor: 'r' }, { icon: 'zap', label: 'Resposta em segundos', x: 702, y: 508, anchor: 'r' }, ]; const HeroEcosystem = ({ tilt = { x: 0, y: 0 } }) => { const [narrow, setNarrow] = React.useState(false); React.useEffect(() => { const mq = window.matchMedia('(max-width: 760px)'); const on = () => setNarrow(mq.matches); on(); mq.addEventListener('change', on); return () => mq.removeEventListener('change', on); }, []); React.useEffect(() => { window.lucide && window.lucide.createIcons(); }); const tx = (tilt.x || 0) * 6, ty = (tilt.y || 0) * 6; const pct = (v, total) => (v / total) * 100 + '%'; /* ---------------- mobile: stacked ---------------- */ if (narrow) { return (