I don't think your going to be able to AC directly due to part 2 (caps don't store AC power). A small wall wart to provide DC power will solve that but create another. A 1 second hold time is a long time.
I'm just roughing this out, I have not put pen to paper. AC power comes on, DC voltage comes up, at some point relay 1 will turn on. The first trick is to turn it off after 1 second. I'm thinking an transistor drive on the relay with an RC combination in the base. As C1 charges the base drive will drop, and at some charge voltage the transistor will turn off and thus turn off the relay.
The second trick is to have relay 2 turn on when AC is lost and stay on for one second. This might require a two stage implementation. The first stage to detect the PS voltage drop, which activates the second stage to activate the relay. This time a large capacitor will be needed as it will be the only power source for the relay. A 5V relay with a 100 ohm coil is going to draw 50mA. Assuming a 10% release point, the capacitor will need to supply 50mA for 1 second and only lose 0.5V. With i=C dv/dt where dt=1, and dv=0.5 gives C=0.05/0.5=0.1F capacitor.
Don't forget to place current limiting resistor between the off-relay capacitor and the power supply. Without the current limiter, you have two issues. First the big cap will hold down the PS while it charges which will affect on relay operation. Secondly, it will charge VERY fast either damaging it now or with repeated use and eventually it will blow.
Are the buttons, the same button or two different buttons?