These conditional structures are all hypothetical to a greater or lesser degree.
If + subj + (should) happen + to + inf
If you (should) happen to see Maria tell her I will call her later.
if + subj + was/were to + inf
If you were to win the lottery how would you spend it?
supposing/imagine + (that) + subj + past simple/past perfect
Imagine you won the lottery what would you do?
Inversions are used in formal writing and are very easy to use.
The structure is very simple. We take out if, invert the position of the aux and subject, and begin with the aux.
If I had known Ricardo was stupid I wouldn’t have married him.
Had I known Ricardo was stupid I wouldn’t have married him.