  Here we develop the connection between thermodynamics, entanglement, and
gravity. By attributing thermodynamics to timeslices of a causal diamond, we
show that the Clausius relation $T\Delta S_{\text{rev}}=Q$, where $\Delta
S_{\text{rev}}$ is the reversible entropy change, gives rise to the non-linear
gravitational equations of motion for a wide class of diffeomorphism invariant
theories. We then compare the Clausius relation to the first law of causal
diamond mechanics (FLCD), a geometric identity and necessary ingredient in
deriving Jacobson's entanglement equilibrium proposal -- the entanglement
entropy of a spherical region with a fixed volume is maximal in vacuum.
Specifically we show that the condition of fixed volume can be understood as
subtracting the irreversible contribution to the thermodynamic entropy. This
provides a "reversible thermodynamic process" interpretation of the FLCD, and
that the condition of entanglement equilibrium may be regarded as equilibrium
thermodynamics for which the Clausius relation holds. Finally, we extend the
entanglement equilibrium proposal to the timelike stretched horizons of future
lightcones, providing an entanglement interpretation of stretched lightcone
thermodynamics.
