A warming planet and acid oceans will radically transform marine ecosystems. How will our beloved reefs survive?