// Ecosistem V1 — 3 produse, 1 platformă. 3D tilt cards (Aceternity-port, no deps).
const { useState: useStateEco, useEffect: useEffectEco, useRef: useRefEco, useCallback: useCallbackEco } = React;
// ─── 3D Card primitives (ported from Aceternity, inline styles, no Tailwind) ─
const Card3DContainer = ({ children, style }) => {
const cardRef = useRefEco(null);
const [entered, setEntered] = useStateEco(false);
const onMove = useCallbackEco((e) => {
const el = cardRef.current;
if (!el) return;
const { left, top, width, height } = el.getBoundingClientRect();
const x = (e.clientX - left - width / 2) / 22;
const y = (e.clientY - top - height / 2) / 22;
el.style.transform = `rotateY(${x}deg) rotateX(${-y}deg)`;
}, []);
const onEnter = useCallbackEco(() => setEntered(true), []);
const onLeave = useCallbackEco(() => {
setEntered(false);
if (cardRef.current) cardRef.current.style.transform = "rotateY(0deg) rotateX(0deg)";
}, []);
return (
{typeof children === "function" ? children(entered) : children}
);
};
// Float items at a given Z depth
const Card3DItem = ({ children, z = 0, style, as: Tag = "div", ...rest }) => (
{children}
);
// ─── Data ─────────────────────────────────────────────────────────────────────
const ECO_PRODUCTS = [
{
id: "voice",
name: "Confirmări.ro",
tagline: "Agentul vocal AI",
desc: "Sunăm clienții pentru confirmare COD, recuperare coșuri abandonate, upsell-ui și multe altele.",
features: ["Confirmăm comenzi", "Recuperăm comenzi abandonate", "Upsell la confirmare prin Apel și SMS", "Validăm adresa de livrare", "Încercăm confirmarea comenzii de 3 ori", "Dashboard în timp real cu statusul fiecărei comenzi"],
logo: "logoMain",
color: "var(--neon-purple)",
colorRgb: "9,169,85",
color2: "var(--neon-purple-2)",
flagship: true,
},
];
const logoSrc = (key) =>
(window.__resources && window.__resources[key]) || "assets/confirmari_logo.png";
// ─── Main Component ────────────────────────────────────────────────────────────
const EcosistemV1 = () => {
const [isMobile, setIsMobile] = useStateEco(false);
useEffectEco(() => {
const mq = () => setIsMobile(window.innerWidth < 760);
mq();
window.addEventListener("resize", mq);
return () => window.removeEventListener("resize", mq);
}, []);
return (
Echipa TA dedicată
{/* Flagship card */}
{ECO_PRODUCTS.map((p) => (
{(entered) => (
{/* Ambient glow (not 3D, stays flat) */}
{/* Logo */}
{p.id === "voice" ? (
) : (
)}
{/* Desc */}
{p.desc}
{/* Features */}
{p.features.map((f) => (
{f}
))}
)}
))}
);
};
window.EcosistemV1 = EcosistemV1;