Shift key into safe mode gives a prohibition sign on boot instead of the apple. So that's not an option. Upon releasing shift, it goes back to the apple icon, and progress bar which freezes at around 40%.
Diagnosis: the boot section of your drive is unavailable; either the drive has physically failed or the boot system data is corrupted.
Command-R does not go into recovery mode, but just the apple icon and the progress bar, freeze at 40%.
Recovery mode uses a different section of the disk to boot from. If that's failing too, this also suggests that the either the drive has physically failed or the boot system data is corrupted. In this case, it looks like you'll need to erase the drive completely and try to set up up from scratch.
Alt key gives two disks to choose from, the first being "Time Machine". Choosing this gives the apple icon, and progress bar, freeze at 40%. The second disk says "Recovery 10.12.6". Choosing this gives the exact same result: apple icon, progress bar, freeze at 40%.
Again, this suggests a complete erase and reinstall of macOS is needed.
I'd boot into Internet Recovery Mode (Hold Shift-Option-Command-R on startup), erase the drive, reinstall macOS. Upgrade macOS to the version you were using and finally reboot into recovery mode (Command-R on startup) and restore from your Time Machine backup.
This only works, of course, if the drive (or something else like the logic board, RAM, etc.) itself isn't physically faulty.
Good luck