Landau–de Gennes theory of anchoring transitions at a nematic liquid crystal–substrate interface