We recover, expand, and unify quantum (and classical) large deviation results for lattice Gibbs states. The main new ingredient in this paper is a control on the overlap of spectral projections for non-commutative observables. Our proof of large deviations is based on Ruelle–Lanford functions [20, 34] which establishes the existence of a rate function directly by subadditivity arguments, as done in the classical case in [23, 32], instead of relying on Gärtner–Ellis theorem, and cluster expansion or transfer operators as done in the quantum case in [21, 13, 27, 22, 16, 28]. We assume that the Gibbs states are asymptotically decoupled [23, 32], which controls the dependence of observables localized at different spatial locations. In the companion paper [29], we discuss the characterization of rate functions in terms of relative entropies.