Predictive models for interwell-scale variations in heterogeneous carbonate rock are best made from outcrop studies of well-exposed limestone and dolomite, such as the upper Miocene reef complex that crops out in the sea cliffs of Mallorca, Spain. The sea-cliff sections reveal highly complex lithofacies stacking patterns that could lead to ambiguous lateral correlations of coeval units. The stratigraphic complexity and distribution of primary and secondary porosity are the result of a sea-level-driven hierarchical stacking of different magnitudes of accretional units. Thickest sections of porous and permeable rocks are in the aggradational portions of the reef, upper slope, and outer lagoon units. The relative volume of the various accretional units and heterogeneity in the lithofacies architecture were dependent on the amount of carbonate production, which was related to (1) accommodation changes controlled by sea-level fluctuations and (2) depositional profile. Moldic porosity, mostly from the dissolution of aragonitic constituents, is the predominant porosity type, and its heterogeneous distribution is related to the lateral and vertical distribution of lithofacies. The secondary porosity in much of this reef complex was produced mainly during early dolomitization. Dolomite patterns are complicated, apparently mainly related to shallow flooding of the platform during third- or fourth-order sea level highs and to geographic location of permeable pathways for brine reflux, probably primarily through fourth-order aggradational reef units. Many of these stratigraphic complexities and diagenetic patterns are below the resolution of seismic and well analyses; thus models based on outcrop data such as this can enhance reservoir development in certain shallow-water carbonate rocks.