Diversification and cooperation in a decarbonizing world