The chill air was whipping through Harry's hair, and before he'd stopped enjoying the ride, it was over.
(Harry Potter and the Chamber of Secrets)
The conditional clause - before he'd stopped enjoying the ride – has the perfect tense, and its main clause past one. I guess this perfect tense does not denote that conditional clause precedes the main clause in time sequence, but the tense emphasizes the completion of the conditional act. So ‘it was over’ precedes ‘before he’d stopped enjoying the ride.’ Is this right guessing?