// Small touches only - every page works the same without this file. (function () { var calm = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches; // big numbers count up from 0 if (!calm) { document.querySelectorAll('.stat .value').forEach(function (el) { var node = el.firstChild; if (!node || node.nodeType !== 3) return; var end = parseInt(node.nodeValue, 10); if (!(end > 0)) return; var start = null, ms = Math.min(1400, 500 + end * 12); node.nodeValue = '0'; function step(t) { if (start === null) start = t; var p = Math.min(1, (t - start) / ms), eased = 1 - Math.pow(1 - p, 4); node.nodeValue = String(Math.round(end * eased)); if (p < 1) requestAnimationFrame(step); } requestAnimationFrame(step); }); } // chart bars rise one day after another document.querySelectorAll('.chart .col').forEach(function (col, i) { col.querySelectorAll('.seg').forEach(function (seg) { seg.style.animationDelay = (0.3 + i * 0.04) + 's'; }); }); // card glow follows the cursor document.addEventListener('pointermove', function (e) { var card = e.target.closest && e.target.closest('.panel, .stat'); if (!card) return; var r = card.getBoundingClientRect(); card.style.setProperty('--x', (e.clientX - r.left) + 'px'); card.style.setProperty('--y', (e.clientY - r.top) + 'px'); }, { passive: true }); })();