ABSTRACT X-ray emission from active galactic nuclei (AGNs) often displays complex and rapid variability, which may provide a glimpse into the detailed thermal and dynamical structure of the accreting gas near the event horizon of the central black hole. The observed variability can be analysed using Fourier transforms of the light curves in multiple energy channels, which can be used to generate Fourier phase lags, corresponding to lags in the time domain. The X-ray time lags may be either soft lags or hard lags, depending on whether the variability in the hard energy channel precedes that in the soft channel or vice versa. The physical explanation for the observed X-ray time lags from AGNs has been puzzling, and several scenarios have been proposed. In this paper, we explore the hypothesis that the X-ray time lags are produced as a result of the reprocessing of iron L-line and K-line seed photons generated via fluorescence, which is driven by a variable incident radiation field. The seed photons are reprocessed by a combination of thermal and bulk Comptonization and spatial reverberation. We assume that the inner region of the accretion flow can be approximated as a hot, geometrically thick ADAF disc. The outer radius of the ADAF region is equal to the shock formation radius, which is located just outside the centrifugal barrier. The time-dependent radiative transfer in the disc is analysed using a Fourier-transformed, vertically averaged transport equation in cylindrical coordinates. We demonstrate that the new model can successfully reproduce the complex X-ray variability data for the Seyfert 1 galaxies 1H 0707–495 and Ark 564.