Question about how sketch code is executed:

The right way to do it is to reduce your 12-second sequence into a series of states. Each time through loop() you can check your inputs and check to see if your system should switch to a new state or continue doing what it is doing. This is called a "State Machine" model. It is a way of eliminating the delay() calls that cause your program to be unresponsive.