  In a recent publication \cite{us}, a cosmological scenario featuring a scalar
field, $\varphi$, that is a source for Dark Matter and Dark Energy has been
proposed. In this paper, a concrete realization of that scenario is presented.
As in many models of scalar-field driven Dark Energy, the effective Lagrangian
of the field $\varphi$ contains a potential proportional to $e^{-\varphi/f}$.
This potential is modulated in such a way that, in the absence of other matter
fields, it has a local minimum at a small value of $\varphi$. Fluctuations of
$\varphi$ around this minimum give rise to a gas of dark-matter particles. The
field $\varphi$ is coupled to another scalar field $\chi$ in such a way that
the minimum in the effective potential of $\varphi$ disappears when, after a
continuous phase transition accompanied by spontaneous symmetry breaking,
$\chi$ develops a non-vanishing expectation value. This triggers slow growth of
a homogeneous component of $\varphi$ accompanied by the emergence of Dark
Energy, a phenomenon analogous to the "wetting transition" in statistical
mechanics. Inside regions of the Universe where the pressure is small and the
energy density is large enough to stall expansion, in particular around
galaxies and galaxy clusters, the phase transition in the state of $\chi$ does
not take place, and a gas of cold dark-matter particles persists. The evolution
of $\varphi$ at very early times may tune the rate of baryogenesis.
