  The composition of the Sun is an essential piece of reference data for
astronomy, cosmology, astroparticle, space and geo-physics. This article,
dealing with the intermediate-mass elements Na to Ca, is the first in a series
describing the comprehensive re-determination of the solar composition. In this
series we severely scrutinise all ingredients of the analysis across all
elements, to obtain the most accurate, homogeneous and reliable results
possible. We employ a highly realistic 3D hydrodynamic solar photospheric
model, which has successfully passed an arsenal of observational diagnostics.
To quantify systematic errors, we repeat the analysis with three 1D hydrostatic
model atmospheres (MARCS, MISS and Holweger & M\"{u}ller 1974) and a
horizontally and temporally-averaged version of the 3D model
($\langle$3D$\rangle$). We account for departures from LTE wherever possible.
We have scoured the literature for the best transition probabilities, partition
functions, hyperfine and other data, and stringently checked all observed
profiles for blends. Our final 3D+NLTE abundances are:
$\log\epsilon_{\mathrm{Na}}=6.21\pm0.04$,
$\log\epsilon_{\mathrm{Mg}}=7.59\pm0.04$,
$\log\epsilon_{\mathrm{Al}}=6.43\pm0.04$,
$\log\epsilon_{\mathrm{Si}}=7.51\pm0.03$,
$\log\epsilon_{\mathrm{P}}=5.41\pm0.03$, $\log
\epsilon_{\mathrm{S}}=7.13\pm0.03$, $\log\epsilon_{\mathrm{K}}=5.04\pm0.05$ and
$\log\epsilon_{\mathrm{Ca}}=6.32\pm0.03$. The uncertainties include both
statistical and systematic errors. Our results are systematically smaller than
most previous ones with the 1D semi-empirical Holweger & M\"uller model. The
$\langle$3D$\rangle$ model returns abundances very similar to the full 3D
calculations. This analysis provides a complete description and a slight update
of the Na to Ca results presented in Asplund, Grevesse, Sauval & Scott
(arXiv:0909.0948), with full details of all lines and input data.
