The critical period for the visual control of foot placement in complex terrain occurs in the preceding step