Frame-based animation with requestAnimationFrame (Vanilla JS)