Solvent-mediated supramolecular templated assembly of a metal organophosphonate via a crystal–amorphous–crystal transformation