We provide a unified theory, within the framework of the multi-phase Darcy description, on gravity current, interfacial and unsaturated flows in a vertically heterogeneous porous layer, which finds applications in many geophysical, environmental and industrial contexts. Based on the assumption of vertical gravitational-capillary equilibrium, a theoretical model is presented to describe the time evolution of the saturation field and the interface shape, imposing a general formula for the vertical distribution of intrinsic permeability, porosity and capillary entry pressure. Example calculations are then provided in the Cartesian configuration to illustrate potential implications of the theory, imposing power-law distribution of vertical heterogeneity. Seven dimensionless parameters are identified, which arise from the standard Darcy description of multi-phase flow and measure the influence of vertical heterogeneity, viscosity ratio, and the competition between gravitational and capillary forces. Four asymptotic regimes are recognised, representing unconfined unsaturated flows, confined unsaturated flows, unconfined interfacial flows and confined interfacial flows. The influence of heterogeneity is then discussed in the two unsaturated flow regimes based on the evolution of the interface shape, frontal location, saturation distribution, and the time transition between unconfined and confined self-similar flows.