Hi, This is some of my advise:
1. one you must consider about debouncing of button, because it's mechanical push button (I'll show you the trick).
2. you have to use pull up resistor series with button(external pull up) and add capacitor paralel with button to ground(about 100nF) to reduce debouncing via hardware.
3. If that part was already finished, it's just about state machine of your program, right?
4. I will use non-blocking state for this kind of program, so, your state machine still could run even when your button is still pressed. I will show you the detail over chat :).
Lets discuss it further more over chat.
Best regards,
Rijal