The Hidden-Manifold Hopfield Model and a learning phase transition