A mechanistic understanding of calcification in corals