Fun card animation with vanilla js