The magmatic to hydrothermal transition and its bearing on ore-forming systems