An analytical model of hanging-wall and footwall deformation at ramps on normal and thrust faults