Amplitudes of Rayleigh waves are known to decrease exponentially away from the surface. If elastic properties of the solid are stratified on a scale much smaller than the wavelength, the Rayleigh-wave amplitude at a given depth should also be affected by the formation properties at that depth: the softer the medium, the larger the amplitude. An increasingly widespread deployment of fiber-optic cables in wells makes it possible to record this depth variation of Rayleigh-wave strain amplitudes and their variations over time (due to changes of formation properties) using distributed acoustic sensing (DAS). To investigate this opportunity, we have explored temporal variations of downhole DAS amplitudes of ocean-generated Rayleigh waves during injection of CO2 into a water-saturated thin porous layer. Analysis of these data clearly shows changes of these amplitudes related to the CO2 injection. To understand these amplitude variations, we perform a theoretical analysis and numerical simulations, which explain our field observations. In particular, analysis of downhole DAS data and theoretical modeling show that Rayleigh-wave amplitudes measured with vertical fiber-optic cables can be used to detect thin layers in the subsurface. Furthermore, time-lapse analysis of these amplitudes indicates temporal changes of stiffness of these layers, such as changes in saturation or pressure of the fluid in a porous layer in the vicinity of the borehole. In particular, Rayleigh-wave amplitudes are sensitive to the presence in the vicinity of the wellbore of a CO2 plume created as a result of a small injection into a thin porous reservoir layer. Our analysis also shows that the effect of a thin layer on Rayleigh-wave amplitudes strongly depends on frequency so that at different frequencies the amplitude is affected by different combinations of elastic properties. This opens an opportunity to use amplitude variations with depth at different frequencies to separately estimate changes in bulk and shear moduli.