forethought

Careful planning and thinking ahead before something happens.