We present the first lattice determination of the two lowest Gegenbauer moments of the leading-twist pion and kaon light-cone distribution amplitudes with full control of all errors. The calculation is carried out on 35 different CLS ensembles with $N_f=2+1$ flavors of dynamical Wilson-clover fermions. These cover a multitude of pion and kaon mass combinations (including the physical point) and 5 different lattice spacings down to $a=0.039,$fm. The momentum smearing technique and a new operator basis are employed to reduce statistical fluctuations and to improve the overlap with the ground states. The results are obtained from a combined chiral and continuum limit extrapolation that includes three separate trajectories in the quark mass plane. The present arXiv version (v3) includes an Addendum where we update the results using the recently calculated three-loop matching factors for the conversion from the RI/SMOM to the $overline{text{MS}}$ scheme. We find $a_2^pi=0.116^{+19}_{-20}$ for the pion, $a_1^K=0.0525^{+31}_{-33}$ and $a_2^K=0.106^{+15}_{-16}$ for the kaon. We also include the previous values, which were obtained with two-loop matching.