  Towards the end of their evolution hot massive stars develop strong stellar
winds and appear as emission line stars, such as WR stars or LBVs. The
quantitative description of the mass loss in these important pre-SN phases is
hampered by unknowns such as clumping and porosity due to an in-homogeneous
wind structure, and by an incomplete theoretical understanding of optically
thick stellar winds. In this work we investigate the conditions in deep
atmospheric layers of WR stars to find out whether these comply with the theory
of optically thick winds, and whether we find indications of clumping in these
layers. We use a new semi-empirical method to determine sonic-point optical
depths, densities, and temperatures for a large sample of WR stars of the
carbon (WC) and oxygen (WO) sequence. Based on an artificial model sequence we
investigate the reliability of our method and its sensitivity to uncertainties
in stellar parameters. We find that the WR stars in our sample obey an
approximate relation with P_rad/P_gas~80 at the sonic point. This 'wind
condition' is ubiquitous for radiatively driven, optically thick winds, and
sets constraints on possible wind/envelope solutions affecting radii, mass-loss
rates, and clumping properties. Our results suggest that the presence of an
optically thick wind may force many stars near the Eddington limit to develop
clumped, radially extended sub-surface zones. The clumping in these zones is
most likely sustained by the non-linear strange-mode instability, and may be
the origin of the observed wind clumping. The properties of typical late-type
WC stars comply with this model. Solutions without sub-surface clumping and
inflation are also possible but demand for compact stars with comparatively low
mass-loss rates. These objects may resemble the small group of WO stars with
their exceptionally hot stellar temperatures and highly ionized winds.
