Variational modelling of wave–structure interactions with an offshore wind-turbine mast