Why Do Separate Rhythms Fall into Step? Fireflies, Pendulums, and the Mathematics of Collective Synchronization