How do I know if my animation needs JavaScript or just CSS?

Ask one question: does the animation need runtime control? If you need to pause, reverse, seek, respond to user input mid-animation, sync to scroll position, or coordinate with application state or data, you need JavaScript. If you just need to move from one state to another on hover or a class toggle, CSS is enough. Runtime control is the dividing line — everything else is detail.