/* ============================================================ 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 (
{HE_LABELS.map(n => (
{n.label}
))}
{HE_RESULTS.map(r => )}
); } /* ---------------- desktop: radial network ---------------- */ return (
{/* ambient depth */}
{/* faint topology guide ring */} {HE_NODES.map((n, i) => { const d = hePath(n, i); return ( {/* base trace */} {/* flowing signal dashes */} {/* endpoint node */} {/* traveling data pulse */} ); })} {/* center core */}
{/* channel / system nodes */} {HE_NODES.map((n, i) => (
{n.label}
))} {/* result microcards (corners — sinais de execução) */} {HE_RESULTS.map((r, i) => (
))}
); }; /* ---- central core node (menor, elegante) ---- */ const HeroCore = ({ mobile }) => { const d = mobile ? 100 : 104; return (
Agente de IA AR
em execução
); }; /* ---- result microcard ---- */ const HeroResult = ({ icon, label, mobile }) => (
{label}
); /* ---- shared styles ---- */ const heNodeIcon = { width: 26, height: 26, borderRadius: 8, flexShrink: 0, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', background: 'rgba(0,212,255,0.10)', border: '1px solid rgba(0,212,255,0.30)', color: '#00D4FF', }; const heChipStyle = { display: 'flex', alignItems: 'center', gap: 9, padding: '10px 11px', borderRadius: 13, background: 'var(--ar-bg-card)', border: '1px solid rgba(255,255,255,0.10)', }; window.HeroEcosystem = HeroEcosystem;