The absolute brightness (i.e. number of photons per unit time for a fixed size detector) decreases as the square of the distance.
To prove this for yourself, think of the photons passing through the surface of a sphere of radius
So if the absolute brightness decreases by a factor of
That makes the distant cepheid variable