The first step is a pericyclic 'ene' reaction.
'Ene' reaction involved again - this time in the second step.