A 7474 dual d flip flop as a "stepper" for 3 modes (on1, off, on2). This can be used with other logic, or transistors as shown here.
Also, added some button debouncing for real world applications.
You may need to add some 1k resistors for logic signals between each of the logic gates/latches. IRL the circuit was unstable on a breadboard until I added those resistors.