function animateStats(id, end, suffix) { let current = 0; const el = document.getElementById(id); const interval = setInterval(() => { current += end / 40; if (current >= end) { el.innerHTML = end.toFixed(1) + suffix; clearInterval(interval); } else { el.innerHTML = current.toFixed(1) + suffix; } }, 30); } function triggerGrowth() { const bars = document.querySelectorAll(".bar-total"); bars.forEach((bar, i) => { const height = 35 + i * 15 + Math.random() * 5; bar.style.height = height + "%"; }); animateStats("roiValue", 8.2, "x"); } /* 3D TILT */ document.addEventListener("mousemove", (e) => { const tilt = document.getElementById("tiltLayer"); if (window.innerWidth > 768) { const x = (window.innerWidth / 2 - e.pageX) / 50; const y = (window.innerHeight / 2 - e.pageY) / 50; tilt.style.transform = `rotateY(${x}deg) rotateX(${-y}deg)`; } }); window.onload = () => { setTimeout(triggerGrowth, 300); setInterval(triggerGrowth, 5000); };