Smooth out header transition between states