Geochemical evolution of structure-bedding controlled hydrothermal dolomites of the Kinta Valley, Western Malaysia

Study of secondary dolomitization and documentation of the evolution of basinal fluids and host rock, especially that of fine-grained deepwater carbonate mudstone are of interest toward of reservoir characterization. From this perspective, field characteristics in relation to mineralogy, petrography and geochemistry of the Paleaozoic carbonates of the Kinta Valley, Peninsular Malaysia, were investigated and documented. A total of 33 samples were collected across the various degree of dolomitization and analyzed for their petrographic properties (n = 55), while mineralogical and geochemical compositions (n = 33) were analyzed using XRD, ICP and ICPMS analysis, respectively. These analyses were performed to elucidate the diagenetic events, episodic dolomitization and development of fluid evolution as a function of regional tectono-thermal events during the Permian to Cenozoic. It is interpreted that the host calcareous mudstones (HCMs) were deposited in oxygenated, open marine seawaters. The studied samples retain the original seawater characteristics despite negligible, minor alterations of REE characteristics due to diagenesis and detrital input. Though the concentrations and trends of REEs of the dolomitic facies are modified to a certain extent, their affinities with HCMs are preserved. Enrichments of Mg, Mn, Na and depletion of Sr are linked to the effect of dolomitization under the open system of diagenesis. The redox conditions fluctuated to show distinct, recognizable variations between different dolomite phases. The MREE enrichments with other trace elements such as Mn, Fe and low Sr content indicate the association of diagenetic fluids with deep-circulating crustal hydrothermal fluids. Hydrothermal influence has been recorded along the fractures, which might have originated from the sub-surface litho units and facilitated episodic dolomitization, especially during significant tectono-thermal events. This study affirms that the occurrence, geochemical and mineralogical evolution of the dolomites of the Kinta Valley were controlled by magmatic events, whereas the intensity of replacement dolomitization was controlled by host rock texture, varied bulk chemistry of host rock, circulating fluid and temperature.


Introduction
Nearly half of the Earth's carbonate rocks are dolomitized (Zenger et al. 1980;Warren 2000;Machel 2004;Escorcia et al. 2013). Approximately 60% of oil and 40% of gas reserves occur in the carbonates of the World and among which, substantial hydrocarbon reservoirs are found in dolomitized carbonates (Purser et al. 1994;Braithwaite et al. 2004;MacDonald et al. 2015). Hence, sedimentologists and petroleum geologists are working on improving the current understanding of the origin and documentation of occurrences of dolomites (Machel 2004;Anan and Wanas 2015;Saleem et al. 2022). These endeavors bear scientific significance and economic value as potential hosts for hydrocarbon reserves (Martín-Martín et al. 2015). Accurate characterization of carbonate reservoirs requires systematic documentation of prevalent diagenetic processes as the rock fabrics are significantly modified and porosity increased/altered during diagenesis (Vandeginste et al. 2013). Dolomitization is one of the key diagenetic processes that control carbonate reservoir quality and heterogeneity (Zenger et al. 1980;Sun 1995;Braithwaite et al. 2004;Wilson et al. 2007). It can strongly impact the petrophysical properties of the carbonate rocks (Vandeginste et al. 2013) by modifying original depositional textures, porosity and permeability distribution (Chen et al. 2004). These changes in turn influence fluid flow and oil recovery (Warren 2000). The distribution of rock heterogeneities that resulted from the evolution of basinal fluids, fluid-rock interactions and mineralization govern the occurrences of dolomitized bodies in the subsurface. Nevertheless, their relationships and the extent of influence on reservoir quality are still poorly constrained (e.g. Sun 1995;Duggan et al. 2001;Chen et al. 2004;Ronchi et al. 2012a;Vandeginste et al. 2013;Martín-Martín et al. 2015).
Application of major, trace and rare earth elements (REE) as geochemical proxies is gaining wide acceptance in carbonate provenance studies and the environmental settings during carbonate deposition/precipitation (Banner et al. 1988a, b;Kamber and Webb. 2001;Nothdurft et al. 2004;Frimmel 2009;Nagarajan et al. 2011;Azomani et al. 2013;Zhao and Jones 2013;Zhao and Zheng 2014;Li et al. 2017;Srivastava and Singh 2019;Guruaribam et al. 2021) and post-depositional alteration (Delpomdor et al. 2013;Nagarajan et al. 2013;Wang et al. 2014;Franchi et al. 2015;Ganai et al. 2018;Dutt et al. 2021). This paper presents petrographic, mineralogical and geochemical data, regarding which discussion on the occurrences of polyphase dolomite geobodies, examination of the strata and structural controls are attempted. These were utilized to interpret hydrothermal dolomites' genetic and paragenetic sequences and to demonstrate how the regional tectonic evolution affected paragenesis.

Regional geological setting
Peninsular Malaysia (Fig. 1A) lies on the western part of the Sundaland and can be structurally and geologically divided into the following three north-south trending regions (Fig. 1B): the Western, the Central and the Eastern belts (Lee 2009;Metcalfe 2013). The Western and Central belts lie on the Sibumasu terrane, while the Eastern Belt is part of the East Malaya block (Metcalfe Page 3 of 30 62 2013). The former consists of the Main Range plutons and the latter consists of the Eastern Malaya plutons (Searle et al. 2012). The collision between Sibumasu and East Malaya in the Early to Middle Triassic is evidenced by the Bentong-Raub Suture (Harbury et al. 1990;Metcalfe 1991;Hutchison 1994) which marks the closure of the Paleo-Tethys (Hutchison 1994;Metcalfe 2011a;Searle et al. 2012;Cottam et al. 2013).
From being part of Indochina and Cathaysia, the East Malaya Block was separated from the Gondwana during the Early Paleaozoic as a result of the opening of the Paleo-Tethys (Metcalfe 2011a). Based on faunal and floral evidences, the Cathaysia block was interpreted to have experienced warm-water equatorial climate since the Carboniferous (Metcalfe 2011a). On the contrary, Sibumasu was characterized by cold-water biotas displaying the Gondwana affinity until the Permian (Metcalfe 2011a). Later, it was detached from the Gondwana, concomitant with the opening of the Meso-Tethys (Wakita and Metcalfe 2005). The occurrence of subduction-related Latest Permian to Triassic calcalkaline magmatism on both the blocks was linked to the convergence of the two blocks (Searle et al. 2012). Following this period of subduction, the intra-oceanic Sukhothai Arc separated from the East Malaya, and the two blocks collided prior to the arrival and docking of the Sibumasu (Metcalfe 2011a) with the East Malaya and the Sukhothai Arcs. This collision resulted in a sequence of events such as crustal thickening, regional metamorphism (Searle et al. 2012) and emplacement of the Late Triassic S-type granitoids in the Western Belt (Krähenbuhl 1991;Searle et al. 2012;Ghani et al. 2013;Ng et al. 2015a, b). The eminent late-orogenic acidic granitic intrusions, distinguished by melting of the deep crust (anatexis), testify to the intensity of this thermal event (Metcalfe 2013;Sautter et al. 2017). During the Late Cretaceous, magmatism was significant in the Eastern Belt (Searle et al. 2012). An anomalous thermal history across the Malay Peninsula region during the Late Cretaceous is evidenced by the emplacement of several isolated plutons Ng et al. 2015a, b;Md Ali et al. 2016). Throughout the late Early Cretaceous to the Early Cenozoic, the Main Range granites in the Western Belt underwent high-intensity fracturing while sedimentary units were folded extensively. It was then accompanied by the exhumation of the granitic bodies (Krähenbuhl 1991;Cottam et al. 2013;Md Ali et al. 2016;François et al. 2017;Sautter et al. 2017). The underlying mechanisms of the series of events are still poorly understood, although cessation of subduction along the Sunda margin and subsequent collision of various microcontinental fragments with the southern margin of Sundaland (Clements et al. 2011;Hall 2012;Cottam et al. 2013) are presumed and await affirmative documentation. An early extension movement stretching N-S in the Latest Cretaceous to the Early Paleocene was reported (Kawakami et al. 2014;Md Ali et al. 2016;François et al. 2017;Sautter et al. 2017Sautter et al. , 2019. Rapid exhumation of the plutons during the Late Eocene to the Oligocene was interpreted to have counteracted the resumption of the subduction event with extensional detachments located all around the Sunda margin (Cottam et al. 2013) at nearly 45 Ma (Hall 2012). Fig. 1 A-D Regional geological setting, structural trends and location of the study area (modified after Ramkumar et al. 2019). A Simplified regional topographic map showing the regional setting and location of the Kinta Valley in western Malaysia. C Geological map showing sprawl of Kinta Valley, geology of the region and location of the study area, sandwiched between two granitic plutons. D Digital Elevation Model (DEM) of the region manifesting landscape and regional structural trends of the Kinta Valley and adjoining regions. E-F Major tectono-magmatic events in and around Kinta Valley in the western belt, Western Malaysia. E Cross section across the profile indicated in D; F Sketches of tectono-magmatic events, successive stages and resultant structural deformations. G-M LaFarge quarry face exposes strata-bound and fault-related dolomite phases and host calcareous mudstone (HCMs), and well-preserved structural characteristics. G Millimeter-thick, multi-directional veins cut through all the facies types, representing the last generation of fractures. H Second set of thinner and irregularly oriented fractures. I Brecciated HCM and dolostone found at the foot of the fracture. J First set of fractures characterized by bedding parallel, tangent and perpendicular NW-SE and E-W oriented dolomite-filled fractures cutting through the HCM. K Slickensides in the fracture-controlled dolostone reflecting brittle deformation. L NW-SE oriented dolomite-filled fractures exposed on the smaller inverted "V" fracture in the mine wall. M Lafarge quarry face exposing strata-bound and fault-related dolomite phases and HCMs, each with a distinct texture, form, geometry, morphology and associated fracture patterns and orientations. N-Q. Field-scale structures and fracture patterns on the quarry wall opposite the wall are depicted in M. N Evidences of fluid movement and brittle deformations such as thin-bedding parallel fractures and slickensides as explicit in a distinct coloration. The occurrence of this bedding parallel fracture is observed on the opposite mine wall located away from the fracture shown in M. Continuation of the fracture shown in M is traceable through the mine floor to this location. The red box area shows ductile deformation characterized by folding. O Close-up view of the ductile deformation shown in the previous photo. Boudins (?) indicated by the red arrow are visible as manifested by the thickening and thinning of beds and folding. P Brittle deformations are observed on another section of this same mine wall, characterized by thin fractures (indicated by red lines) and breccia (indicated by red arrow). Q Structural characteristics are characterized by fractures (indicated by red lines), displacements (indicated by yellow lines) and folds (indicated by orange lines). R-W. Dolomite and calcite facies types. R Early replacement dolomite (P2). Dolomites (P2) and HCMs (P1) are easily distinguished by the color differences between yellowish orange (dolomites) and light to dark grey color (HCM). The contact between HCMs (P1) and dolomite (P2) is gradual. S Sucrosic dolomite (P3) exhibits a sugary texture, associated with multi-directional criss-cross fractures and kinks. T Sharp contact between metamorphosed dolomite (P4) and early replacement dolomite (F2), and minor fractures filled with calcite veins. U Late replacement dolomite (P5) is characterized by its white color appearance associated with dense fractures. V Brecciated HCM (P1) and early replacement dolomite (P2). Angular clasts of breccia fragments are cemented by white-colored calcite. W Perfectly developed, transparent rhombohedral calcite crystals of the last phase of the diagenetic history The Kinta Valley ( Fig. 1B and C) is located in the central part of the Western Belt. This is a V-shaped valley with limestone hills located between northeast-southwest trending Kledang Range in the west and the Main Range Batholith in the east ( Fig. 1C and D). Despite being studied for one and a half-century (e.g. Rastall 1927;Jones 1970;Lee 2009), for tin deposits, the regional lithostratigraphy, chronostratigraphy, depositional environments and thermal history and resultant changes in the rocks are yet to be systematically documented/understood. The Paleaozoic Kinta Limestone deposited during the Silurian to the Permian (Hassan et al. 2014), is a 700-m limestone succession, extending across the western belt of Peninsular Malaysia (Fontaine and Ibrahim 1995;Lee 2009;Metcalfe 2011b).
The carbonates of the Kinta Valley were largely affected by two intensive thermo-tectonic events (Metcalfe 2013): first, the intrusion of the S-type granitic plutons during the Late Triassic to the Early Jurassic (Rastall 1927;Lee 2009;Metcalfe 2013) and second, during the Middle to the Late Cretaceous where significant folding and faulting (Harbury et al. 1990;Krähenbuhl 1991;Shuib 2009) affected the Main Range granites of the Western Belt (Harun 2002). This was associated with the emplacement of isolated granitic plutons (Searle et al. 2012;Cottam et al. 2013;Ng et al. 2015a, b). This poorly explained Late Cretaceous diffuse orogenic event is also caused by the clogging of the Upper Cretaceous faults and pluton edges by immense amounts of acidic/felsic fluids (Sautter et al. 2017). These dykes are dated through associated chronological events, along with evident rigorous hydrothermal circulation regionally during the Late Mesozoic and pre-date the regional extension in the Cenozoic. It is herein inferred that the extensive recrystallization and dolomitization affecting the Kinta host calcareous mudstones (HCMs) were also the result of these thermal events (Fontaine and Ibrahim 1995;Lee 2009). The chronological sequence of these major tectono-magmatic events and subsequent structural deformations (Ramkumar et al. 2019) are presented in Fig. 1E and F.

Materials and methods
Initially, documentation of structural settings through regional mapping was attempted with the help of SRTM (Shuttle Radar Topography Mission) 30 m Digital Elevation Models (SRTM data of 30 m resolution available at NASA website) of the Peninsular Malaysia (Fig. 1D), published literature and data on regional geology and structural trends (Fig. 1B-D). It was followed by a field study to select suitable outcrops and quarry sections (LaFarge Quarry - Fig. 1G-Q) in the Kinta Limestone of the Kinta Valley and to document structural data and tectonic structures ( Fig. 1M-Q), facies characteristics at the field ( Fig. 1R-W), and occurrence and compositional phases of dolomites ( Fig. 1R-W). The dolomites were characterized through structural and textural characteristics, various lithofacies types, contact relationships with other lithofacies, dolomite phases, etc. (Fig. 1G-Q). A total of 33 samples including 20 core samples were obtained from various facies types including the HCM, strata-bound, and fracture-controlled dolomites and dolocalcites, dolomite phases and other facies types across the HCM and fracture-fills (dolomite, dolocalcite, calcite and marble) for further analyses. A total of 55 thin sections were prepared from these samples and were first subjected to staining techniques by using a mixture of Alizarin Red-S and potassium ferricyanide for distinguishing calcite from dolomite and ferroan carbonate from non-ferroan carbonates (Dickson 1965;Adams et al. 1984). Detailed petrographic analysis was carried out using the laboratory's reflected and transmitted light microscopes to categorize the textural and morphological types for each carbonate phase recognized in the field ( Fig. 2A-L). Petrographic characteristics including crystal morphology, size, textures, dolomite sizes and textures, and relationships with matrix, clasts and other cements were examined. Petrographic classifications of dolomites proposed by Folk (1974) and Sibley and Gregg (1987) were employed for descriptions of the dolomite sizes and textures, respectively. Other detailed petrographic features such as the occurrence of stylolites, recrystallization, zoning, corrosion, overgrowth, dissolution-precipitation, and dissolution-replacement and their cross-cutting relationships were also documented if any.
All the samples (n = 33) were ground into powder of 63 µm size using agate mortar and pestle to ensure homogenization of the sample, minimize the effects of varied particle sizes for clay mineralogy, and complete digestion for analyses of whole-rock geochemistry. Mineralogical analyses were performed using an Empyrean diffractometer, PANalytical in the University of Malaya. The finely powdered samples were packed into the sample holder for X-ray diffraction analysis. Patterns were recorded in the range of 2θ from 5 to 90 degrees at 45 kV and 40 mA using Cu radiation, with a step size of 0.026° and 150 s per step. A quantitative analysis was conducted using phase analysis software (HighScore Plus Software version 3.0d), adopting the Rietveld method. Whole-rock geochemical analysis was carried out in the Activation Laboratories Ltd, Canada using Code 4LITHO (11+) Major Elements Fusion ICP(WRA)/Trace Elements Fusion ICP/MS(WRA4B2) package. A known weight of the sample was fused with lithium metaborate/ tetraborate in platinum crucibles and the molten sample was cast into a glass disc and the analysis was carried by XRF for major oxides. For the trace and REE analysis, the molten bead was digested rapidly with a weak nitric acid solution. The fusion ensured the dissolution of the entire sample and the analysis was carried out by ICP and ICPMS. Certified reference materials DNC-1, W2a, GBW 07,113 (for major and trace elements) and NCS DC70009, OREAS 100a, 101a and 101b (for REEs) were used to ensure accuracy and precision.
The accuracy and precision of the analysis were better than 10%. Geochemical and mineralogical analyses were first grouped according to the field and petrographic facies and further subdivided with variants within each facies. The planar-s to non-planar-a with hypidiotopic to xenotopic mosaics and medium to coarse (100-400 µm) planar-e dolomite crystals with idiotopic mosaics. P3 dolomite crystals show majority of hypidiotopic texture and relatively larger grain size that that of P2 dolomites, testifying higher degree of recrystallization. The presence of HCMs' relicts again implies replacement. H Microscopic texture of late replacement dolomite (P5) exhibits coarse to very coarse (1000-2000 µm) planar-e and -s to non-planar-a dolomite crystals with idiotopic to hypidiotopic and xenotopic mosaics. P5 dolomite crystals exhibit tightly interlocking xenotopic mosaic, with relatively largest grain sizes implying highest degree of recrystallization. Relicts of precursor limestone are also present but in a relative smaller amount reflecting relatively less replacement. I Occurrence of saddle dolomites in late replacement dolomite facies (P5) characterized by large crystal size (coarse to very coarse), curved crystal faces, and scimitar-like terminations pointing to pore spaces. J Microscopic view of brecciated HCM and dolostone (P6) showing planar subhedral dolomite crystals of various sizes, ranging from 50-500 µm. K The brecciated dolomites in P6 facies are cut through by calcite veins. L Dolomite crystals being severely sheared and tectonized again reflects the recurrence of tectonic events (adapted from Ramkumar et al. 2019) statistical analyses examined 33 geochemical constituents for their quantitative measurements using SPSS software, utilizing a standardized dataset with uniform measurement units and PAAS-normalized REE data. Statistical techniques such as correlation and factor analysis were also performed within the same facies and among various facies, grouping according to elemental compositions, the variance of data and dominance of respective elements over total variance (Ramkumar et al. 2006(Ramkumar et al. , 2013(Ramkumar et al. , 2014. The interpretations derived from these analyses were consequently discussed to assess the parameters influencing the distribution of REE and various elements and reveal the relationships between elemental compositions to identify the potential factors controlling the sources of various elements.
These field, petrographic, geochemical and mineralogical data were used to interpret different phases of dolomitization, to constrain the stages and phases of evolution and their paragenetic sequence. These were then integrated with regional structural trends and stages to evolve an idealistic model on which implications for the geochemical evolution and interaction between host rock and hydrothermal fluids are addressed.

Facies characteristics
The study area LaFarge quarry is located within the Kinta Valley and < 2 km from the eastern flank of the Kledang Range. The Kinta Valley roughly exhibits a "V" shaped morphology. Ramkumar et al. (2019) documented the structural characteristics of the quarry and from the study of the petrographic characteristics of Kinta-Valley carbonates, classified them into seven facies using textural and morphological classification in which six are dolomitic facies and the other is HCM facies and the same are considered for the present study. Textural descriptions adopted terminologies proposed by Friedman (1965), Gregg and Sibley (1984), Sibley and Gregg (1987), and Mazzullo (1992), while that of size description adopted Folk's (1962) size scale (< 30 µm -finecrystalline, 30-150 µm -medium-crystalline and > 150 µm -coarse-crystalline dolomite). Salient characters of each of these facies types are presented herein.

and B)
The host rocks are light to dark grey colored thin to thickbedded, massive (structureless) calcareous mudstones (limestone) (Fig. 1M). The HCMs are non-porous and non-fossiliferous in nature. They are highly fractured. The fractures show multiple orientations (i.e., bedding parallel, tangent and perpendicular). Late-stage calcite and dolomite veins crosscut this facies at different orientations (Fig. 1G). The beds show regional variations in compaction (Fig. 1M). Stylolites are common and can be classified into low-amplitude stylolite and tectonic stylolite ( Fig. 2A and B).

and D)
This facies is yellowish orange colored dolomite, occurs along the closed fractures which resemble an inverted "V" shape and is formed adjacent to the HCM facies ( Fig. 1M and R). Based on the color, texture and mineralogy, these dolomites are considered as the first stage of replacement dolomites. These dolomites consist of polymodal mosaics, medium to coarse transitional planar-e (euhedral) and planar -s (subhedral) to non-planar-a (anhedral) dolomite crystals (Fig. 2C). The planar euhedral [idiotopic mosaic of Friedman (1965); idiotopic-E texture of Gregg and Sibley (1984); and planar-e texture of Mazzullo (1992)] to subhedral dolomite crystals [(hypidiotopic texture of Friedman (1965); idiotopic-S of Gregg and Sibley (1984) and planar-s texture of Sibley and Gregg (1987) and Mazzullo (1992)] are noticed. These are varying in size between 100 and 1000 µm. The non-planar anhedral dolomite crystals [xenotopic texture of Friedman (1965); xenotopic-A texture of Gregg and Sibley (1984); nonplanar texture of Sibley and Gregg (1987) and nonplanar-A texture of Mazzullo (1992)] are 100-2000 µm sized. Most of the dolomites of this facies exhibit straight compromised crystalline boundaries and crystal-face junctions. These dolomites are crosscut by stylolites and calcite veins of different compositions (Fig. 2C). This dolomite facies comprises 65% of the total dolomite by volume in the outcrop. These are considered as replacement dolomites, formed during the first phase of dolomitization based on their thickness, occurrence and contact relationships.

Sucrosic dolomite (P3; Fig. 2F and G)
These are massive in nature and varied in color, (reddish gray and white colored) with sugary texture and formed at the core of the fracture. These are surrounded by the replacement dolomites and exhibit sharp contact with the replacement dolomites. Multi-directional criss-cross fractures (mm thick) and kinks are common in this facies (Fig. 1T). Microscopically, these are polymodal mosaics, coarse to very coarse (200-2000 µm) planar subhedral crystals to non-planar anhedral crystals and medium to coarse (100-400 µm) planar euhedral dolomite crystals (Fig. 2G). Most of the dolomite crystals are tightly interlocked with irregular intercrystalline boundaries with rarely preserved crystal-face junctions and are commonly crosscut by calcite veins (Fig. 2F). P3 dolomites account for 10% of the total dolomite volume in the outcrop.

Metamorphosed dolomite (P4)
These are formed within the early replacement dolomite facies. Metamorphosed dolomite appears to be a relatively small, massive, pinkish orange geobody, mimics/occupies the morphology of early replacement dolomite facies (P2) and shows sharp contact with early replacement dolomite (Fig. 1U). Minor fractures are common and these fractures are filled with calcite veins.
Late replacement dolomite (P5; Fig. 2H and I) These are white colored and are located between the early replacement dolomite (P2) and the sucrosic dolomite (P3). They show sharp contacts with the early replacement dolomites (P2) (Fig. 1V). They occur in the dense fractures, which crosscut all other facies. The crosscutting relationship of this dolomitic facies (P5) postdates the early replacement dolomites (P2) filled fractures. The dolomites of this facies are unimodal, coarse to very coarse (1000-2000 µm) planar euhedral to subhedral and non-planar anhedral dolomite crystals (Fig. 2H). This dolomite facies shows closely packed dolomite crystals with irregular intercrystalline boundaries, rarely preserved crystal-face junctions and some with undulatory extinction. In addition, saddle dolomite crystals are common. They range in size from 1000 to 2000 µm non-planar crystals, with a scimitar, or half-moon-like terminations pointing to pore spaces (Fig. 2I). The P5 dolomites comprise 25% of total dolomite by volume of the outcrop.

Late stage calcite (P6; Fig. 2J-L):
This calcite facies consists of perfect rhombohedral, transparent calcite crystals which represent the last stage of the diagenetic history of the metamorphosed limestone. They occur within the apex of the fractures as relatively small, massive, dusky white to transparent isolated chunks (Fig. 1W).

Mineralogy
The HCM consists of Mg-Ca carbonate, Mg-calcite, calcium carbonate and calcite. The majority of the HCM samples are high Mg-Ca carbonates (80-100%). The dolomitized phases are enriched in dolomite and by Mg-Ca carbonates. The P2 and P5 samples are exclusively dolomites. The studied carbonates were divided based on XRD quantitative results, which further provide information on the degree of dolomitization. Following the mineralogical classification of Carr et al. (1994), the carbonates are grouped according to their dolomite contents. Accordingly, the studied samples consist of 85% of dolomites and 15% of calcitic dolomites. The carbonates varied from calcitic dolomite in P1 facies to dolomite in P2-P5 carbonate facies.

Geochemistry
A summary of the geochemical analytical results of the studied samples is presented in Table 1 and the complete dataset is presented in Table S1 (Supplementary table S1a-d).

Major oxides
The HCM and calcite (P1 and P6) have relatively higher CaO content (53 Wt% in P1 and 56 Wt% in P6) than the dolomite group of rocks (P2-P5; 38 Wt%, 32 Wt%, 48 Wt% and 32 Wt%). The MgO content is higher in the dolomite group of rocks (16 Wt%, 19 Wt% 6 Wt% and 20 Wt% in P2-P5 facies, respectively) than the HCM and calcite (1 Wt% and 0.23 Wt% in P1and P6 facies, respectively). In general, SiO 2 and Al 2 O 3 are < 2 Wt% and 1 Wt%, respectively, in all the studied carbonates. The Na 2 O, K 2 O, TiO 2 and P 2 O 5 are < 0.1 Wt%. Overall, SiO 2 , Al 2 O 3 , TiO 2 and P 2 O 5 are higher in the P2 group of samples, while Fe 2 O 3 , MnO, MgO and Na 2 O are higher in the P5 group of samples. P6 (n = 1) records the lowest concentration for all the elements and shows the highest contents of CaO. The Fe 2 O 3 , MnO and MgO contents show a relatively similar decreasing trend as high in P5 and low in P6 samples and are enriched in the dolomite group of samples rather than HCM. PAAS normalized plot shows that the CaO content is depleted while MgO (2-tenfold), and MnO (up to 30-fold) contents are enriched in dolomite samples (P2-P5) than the HCM and calcite (P1 and P6; Fig. 3A).

Trace elements
The trace elements Co, Cr, Ni, Rb, Cs, Zn, Ga, As, Nb, Sn, Ta and W are below the detection limits in most of the samples whilst Be, Ge, Ag, In, Ti, Pb and Bi are below detection limits in all the samples, and hence these elements are not used for the interpretations. Among the trace elements determined, Sr is significantly higher. Yet, a disparity exists such that, Sr is in the range of 159-668 ppm in HCM and it is recorded in the ranges of 32-203; 31-61; 93 and 34-48 ppm in P2-P5 dolomite facies respectively. Next to Sr, the most abundant element is Cu, with average values of 34 ppm in the HCM (P1 facies), 40 ppm in the calcite (P6 facies) and 29, 39, 30 and 30 ppm in the dolomites (P2-P5 facies, respectively). Sc, Ba, Sr, Cr and U are higher in HCM (P1),

Rare earth elements (REE)
The shale normalized REE pattern of each facies displays a parallel to sub-parallel (nearly flat) shape and does not show any fractionation (Fig. 3B) (Fig. 4A, B).

Geochemical characteristics of HCM (P1) and dolomites (P2-P5)
The relationships and differences between the studied parameters of the HCMs and dolomitized phases were tested through factor analysis. In this study, only the factor scores with an Eigen value > 1 resulting from varimax rotation are considered for interpretation. The factor analysis has returned six principal factors explaining 97% of total variance with communalities of 0.80 and above for all the studied parameters of the HCM (Table S2). Factor 1 is loaded with many detrital elements (except MgO, Ba, Sr, Zr, Cu, Eu, U) and negatively loaded with CaO, LOI and Eu/Eu*. It indicates the prevalent dominant control of detrital influx (probably represented by aluminosilicates as revealed by XRD as well as petrography described previously) over the depositional conditions. The inference of influx of aluminosilicates is affirmed by the positive correlations of Al 2 O 3 with other elements and negative correlation of CaO with SiO 2 and Al 2 O 3 (e.g. Nothdurft et al. 2004;Zhao and Zheng 2014;Li et al. 2019a, b). The Kinta carbonates are interbedded with clastic materials or argillaceous units as a calcareous subordinate of schists and phyllites (Kadir et al. 2011) and shales (Gebretsadik et al. 2017). These might have been the sources of these aluminosilicates during the deposition of the HCMs. This factor alone explains 48.5% of the total variance and unequivocally establishes the preservation of pristine, depositional signatures despite extended diagenetic and other events that followed since deposition. Factor 2 represents 16.7% of the total variance. It is positively loaded with Sr, Eu and elemental ratios (Y/Ho, Eu/ Eu*, Gd/Yb and La/Yb). The positive loadings of Sr and Eu in this factor can be related to detrital feldspars. However, Eu/Eu* anomaly shows a moderate negative correlation with the majority of the elements and positive correlations with CaO and Sr (r = 0.66; 0.54, respectively). This may indicate that the Eu anomaly is not masked by terrigenous input and the studied samples retain seawater characters or influence of hydrothermal activities without significant obliteration. Factor 3 explains 9.7% of the total variance. It is positively loaded with MgO, TiO 2 and Zr, indicating control of these elements by aluminosilicates/dolomitization represented by either heavy mineral fraction and/or Mg-phyllosilicates. The mineral zircon appears to control the REE content of the HCM, in particular HREEs (Zr Vs HREE; r = 0.56). The presence of these elements has partially influenced the seawater REE pattern; i.e. Y/Ho ratio and La/Sm ratio. Factor 4 represents 7.3% of the total variance and is explained by positive loadings of Fe 2 O 3 , Th and Ce/Ce*. These indicate that the seawater Ce anomaly has been modified by the Feoxides and Th resulting in increased Ce/Ce* values > 0.4 in the studied HCMs (e.g. MacLeod and Irving 1996; Tostevin et al. 2016). However, the Ce anomalies of the limestones have been influenced by the detrital input and Fe-oxides. These explain the enriched Ce anomaly. On the other hand, positive Ce anomaly (Sample Number 4YA; Ce/ Ce* = 1.48) is developed by the influence of Fe oxide-rich oxic sediments, for instance, red clay (Piper 1974b;Toyoda et al. 1990;Nagarajan et al. 2011) and cherts (Slack et al. 2007;Planavsky et al. 2010). At this juncture, the presence of minor hematite confirmed in XRD analysis is noteworthy. Factor 5 is explained by positive loadings of Cu and U, which may have been controlled by either sulphide phases or redox conditions. However, other redox-sensitive elements are not loaded in this factor. Thus, this behavior may not represent redox conditions during the deposition of the HCM. Factor 6 is positively loaded with Ba, Sr and negative loading of P 2 O 5, which can be related to diagenetic fluids.
The dolomites are distinct from the HCM by enrichment of MgO. During this process of substitution/replacement and/or preferential accumulation of Mg, the elements such as Sr, Ba, Ca and U were also expelled as indicated by their negative correlations with MgO. However, Na 2 O and MnO contents of the dolomites show affinity with dolomitization. Though the chemical characteristics of the HCMs are modified during the dolomitization process, relict features are recorded. That is, the geochemical signatures associated with detrital phases, aluminosilicates and heavy minerals  Reynard et al. (1999). Dolomite samples show a decreasing trend of (La/Yb) SN ratios, interpreted as a progressive mechanism of REE recrystallization onto the carbonate lattice during late diagenesis are preserved. However, REEs of dolomites do not show strong relationships with any detrital elements. Although, a weak positive correlation exists between the LREEs with the Si and the Al. A similar association is observed in HCMs, where concentrations of the REEs were mainly influenced by HREEs together with Zr, TiO 2 , V, Th and U. In particular, U is associated with the REE contents in the HCM. Variations in the relationships of elements in dolomites can be related to variations in the effect of dolomitization, which are discussed herein.
The factor analysis of the dolomitic phases using principal components with varimax rotation returned five principal factors, explaining a total variance of 89.17% with communalities above 0.75 for most of the parameters except for Cu (communalities = 0.51) and Fe 2 O 3 (communalities = 0.61) ( Table S3). Factor 1 explains 41.51% of the total variance with the positive loadings of REEs and Y indicative of the preserved seawater characteristics of precursor HCMs and uninfluenced by later-stage diagenetic fluids. Factor 1 is also explained by moderate positive loadings of U, which indicates redox conditions of the seawater. Factor 2 explains 16.85% of the total variance with the positive loadings of Si, Al, Ti, P, V, Zr and Th, suggestive of terrigenous fraction-controlled nature (Ganai et al. 2018;Li et al. 2019a, b). The association of these elements with detrital fractions correlates to the preserved depositional signatures of the precursor HCM in the dolomites. However, few of the trace elements may also have been controlled by the diagenetic fluids as selected elements can be remobilized from carbonate and non-carbonate fractions (Ganai et al. 2018). Factor 3 has negative loadings of Mn, Mg and Na and positive loadings of Ca, Ba and Sr. This characteristic indicates that the elements Mn, Mg and Na have substituted Ca, Ba and Sr during dolomitization, perhaps under high temperatures (e.g. Stanley 2008). Higher Na contents in dolomites show coherent nature with Mg and Mn in the studied samples, which is oblivious to the common occurrences of depletion of Na in carbonates during diagenesis and implies similar diagenetic fluids enriched with Na. Factor 4 represented by positive loading of Eu anomaly, Cu, Th, Al and Si indicates that the positive Eu anomaly formed by the effect of hydrothermal input in HCM might have been modified by minor suspended solids introduced from diagenetic fluids. Factor 5 explains 5.94% of the total variance. It is represented by positive loadings of Ce anomaly and Ce, and negative loading of Fe 2 O 3. It indicates the unrelated nature of the Ceanomaly with the Fe-Oxides and dolomitization processes.

Geochemical signatures of the HCM (P1) and depositional conditions
The presence or absence of Ce anomalies in ancient marine authigenic sediments (Elderfield and Greaves 1982;Liu et al. 1988;Nagarajan et al. 2011;Li et al. 2019a, b) help interpret palaeo-redox variations in the ancient oceans. Distinct negative Ce anomalies are shown in carbonate minerals precipitated in equilibrium with seawater and this may also be observed in the bulk REE pattern (Piper 1974a;Palmer 1985). Their occurrences indicate the incorporation of REEs into the mineral phases directly from seawater or pore water under oxic conditions (Elderfield and Greaves 1982;Liu et al. 1988;Nagarajan et al. 2011;Tostevin 2021).
A bivariate plot has shown the occurrences of La anomaly and Ce anomaly ( Fig. 4A; Bau and Dulski 1996). The samples of HCM in this discrimination plot (Pr/Pr* vs. Ce/ Ce*) show original negative Ce anomalies and positive La anomalies and are almost compatible with the modern seawater (Fig. 4A) with a slight deviation. Similarly, a strong negative correlation exists between the CaO and the ∑REEs affirming seawater origin and preservation of depositional signature without much obliteration.
The HCMs exhibit a negative Ce anomaly resembling that of the seawater, but relatively higher Ce/Ce* values than that of typical seawater values (average Ce/Ce* ratios: P1: 0.51, P2: 0.58, P3: 0.44; P5: 0.52) with small variations in their range (Table 1). Together, they imply that the bottom water oxygen level was stable and did not fluctuate too much. However, when compared with the Ce/Ce* values of the seawater (< 0.1 to 0.4; Elderfield and Greaves 1982), the samples under study show relatively higher Ce/ Ce* values and suggest prevalent mixing of detrital clay with marine sediments. The superchondritic Y/Ho ratios for the analyzed carbonates (32.2-59.4) fall within the range of seawater (Y/Ho = 44 to 74; Bau 1996; 60-90; Lawrence et al. 2006) except few samples, which show lower values. The values are also significantly different from the open-ocean seawater and nearshore environments (Y/Ho ratio 108 and 94, respectively; Nozaki et al. 1997). The lower values are comparable to the Y/Ho ratio of the terrigenous materials and volcanic ash, which show a constant ratio of ~ 28. The occurrences of excellent correlations between the Y and Ho concentrations of the studied samples (r = 0.93 for HCMs; r = 0.90 for dolomites) imply that the fluids in which these carbonates were stabilized have similar Y/Ho ratios (e.g. Zhao and Jones 2013). The Y/Ho values of many HCM samples represent the seawater range except few samples. The fluctuations of Y/Ho ratios of the HCM reflect a possible change in the ratios by terrigenous input as suggested by the detrital elements, which have changed the Y/Ho ratio of seawater. However, a narrow range of Y/Ho points toward a relatively stable tectonic environment.
Carbonates with enriched ∑REEs could be related to the contamination by oxides, sulphides, phosphates or silicates, derived from either terrestrial particulate matter (shale) and/ or hydrothermal input (Frimmel 2009). The mean ∑REE of HCM in the studied samples (7.8-62.3 ppm) is higher than other Paleozoic marine carbonates (e.g. Wang et al. 2009), with more than 90% of samples showing ∑REE content > 20 ppm, which further supports detrital input. A minor REE contribution from shale as little as 1-2% could significantly affect the La and Ce anomalies, and hence, the REE pattern recorded in the marine carbonates is considered altered resulting in flat, uniform shale-normalized patterns due to the relatively high content of REEs in shale (Nothdurft et al. 2004;Ganai et al. 2018) than that of in seawater. Subsequently, altered seawater-like REE distribution with the majority of the samples exhibiting LREE enrichment and flat REE pattern recorded in HCM reflects modification due to shale contamination.
The Si, Al, Ti and Mn show strong to moderate positive correlations with the REEs. The correlations among detrital minerals signify the presence of terrigenous input during deposition. These could be interpreted as the result of an influx of significant additional sources for LREE and thus modified seawater REE pattern (e.g. Nothdurft et al. 2004;Frimmel 2009;Delpomdor et al. 2013). Insoluble elements in natural waters (i.e. Ti, Al, Zr, Nb, Hf, Ta and Th) have shorter residence times than in ocean and low seawater/crust distribution coefficients (Taylor and McLennan 1985). These elements are rich in shales and abundant in various detrital minerals, for instance, zircon and clay minerals (Frimmel 2009;Ganai et al. 2018;Li et al. 2019a, b) and thus useful to detect the degree of contamination by terrestrial particulate matter and shale into the carbonate system (Frimmel 2009;Ganai et al. 2018;Li et al. 2019a, b). The SiO 2 , Al 2 O 3 , TiO 2 , Th, Fe 2 O 3 and MnO show moderate correlation with most of the REEs and ∑REEs (r = 0.93, 0.85, 0.76, 0.60, 0.59 and 0.62, respectively). These, together with variation in the ∑REEs indicate the input of non-carbonate aluminosilicates during the deposition of the HCMs (e.g. Srivastava and Singh 2019). In addition, P 2 O 5 shows a weak positive correlation with ∑REEs and implies control of the REE content in the limestones by the presence of apatites (phosphates).

Diagenesis
Significant depletion of Sr and enrichment of Mn in the diagenetic carbonate phase are expected during the diagenetic transformation of marine carbonates (Veizer 1983a, b;Kaufman and Knoll 1995). Thus, the correlation between the Sr and Mn can be useful to understand the diagenetic alteration in the carbonates (Brand and Veizer 1980;Ganai et al. 2018). The ratio of Mn/Sr can be used to assess the effect of diagenesis or the degree of carbonate preservation against diagenesis (Veizer 1983a,b;Kaufman and Knoll 1995;Delpomdor et al. 2013). The plot of Mn against Sr shows a strong negative correlation for dolomites while a weaker correlation in the HCMs (Fig. 5A). Diagenetically affected dolomites show significant enrichment in Mn (> 1000 ppm vs few 100 s ppm in the HCM (P1) and 39 ppm in P6 calcites) and depletion of Sr (< 100 ppm in dolomites from 668 to 159 ppm in HCMs). These observations suggest that the dolomites are highly altered by diagenesis than the limestones. According to Bartley et al. (2001) the characteristics of non-diagenetic carbonate sediments are: Mn/Sr ≤ 3 and Rb/Sr ≤ 0.01 (dolomites) and Mn/Sr ≤ 1 and Rb/ Sr ≤ 0.01 (limestones). In the present study, both HCMs and selected dolomites are considered unaltered as they have the similar elemental ratios that of non-diagenetic carbonates as reported by Bartley et al. (2001). Accordingly, the majority of the HCMs (Mn/Sr: 0.4-2.5; P1) are unaltered except for two samples that show ratios > 1. On the other hand, P2 dolomites (Mn/Sr: 6.8-74.5) are less altered compared to the P3 (Mn/Sr: 33.5-85.4) and P5 dolomites (Mn/Sr: 49-77).
Higher Sr/Ca ratios in open diagenetic systems reflect intensive rock-water interaction while Sr/Ca ratios in semiclosed diagenetic systems tend to stay consistent due to low rock-water interaction and limited changes in various diagenetic stages with respect to pristine carbonates (Brand and Veizer 1980;Veizer et al. 1990). The P3 and P5 dolomites show consistent Sr/Ca ratios while P2 dolomites show two clusters, which indicate variable diagenetic stages (early and late) with respect to the HCMs (P1) (Fig. 5B). The occurrence of thermogenic calcite during the last phase of diagenesis points toward a closed system and exhaustion of magnesium supply. The Sr/Ca against Mn plot reveals an open system in the dolomitization phases (Fig. 5B). As the water/rock ratio could represent the openness of the diagenetic system (Brand and Veizer 1980) and the higher water/ rock ratios during late diagenesis imply open diagenetic systems. The open diagenetic system implies less extensive water-rock interaction where diagenetic fluid evolves due to constant dissolution-precipitation processes and enrichment or depletion of elemental compositions in diagenetic fluid dependent on distribution coefficient, but to a lesser extent than that in closed systems (e.g. Mehmandosti and Adabi 2013). This is consistent with the geochemical trends as described in previous sections and preceding paragraphs. The P2 dolomites show two clusters where the second cluster overlaps with P3 and P5 dolomites. This implies that the dolomites experienced less extensive water and rock reactions in a more open system. The semi-closed/open dolomitization system could be explained to have formed as a result of faults, fractures and stylolites created during tectonic events and subsequent episodic dolomitization(s) that allowed intermittent connectivity and fluid flow (Lonne and Al-Aasm 2000;Ramkumar et al. 2019). Large variations of water composition within facies could point towards the implication of a low water-rock ratio and a closed system of disequilibrium during dolomitization in which diagenetic water constantly changed its composition due to extensive water-rock interaction. These might result in concentration 1 3 62 Page 14 of 30 gradients of trace elements (a wide range of values) within the studied samples (Veizer 1983b). Hence, the relatively wider range of values in only P2 dolomites pointing to a low water-rock ratio is consistent with the plot showing a relatively closed diagenetic system with higher rock-water interaction. The inverse relationship between Sr/Ca with Mn ( Fig. 5B) indicates depleting Sr with increasing stoichiometry. Thus, increasing crystal size and increasing non-planar crystal boundaries suggest diagenetic alteration (recrystallization) of early non-stoichiometric dolomite (e.g., Kupecz et al. 1993;Kupecz and Land 1994), under burial conditions (e.g., Kirmaci and Akdag 2005). Higher Mn values in various diagenetic phases also imply a more open diagenetic system, yet under reducing conditions (Brand and Veizer 1980;Cicero and Lohmann 2001) as reducing conditions favor incorporation of Mn in the carbonate lattice (Shanmugam and Benedict 1983). The gradual enrichment of Mn contents (Fe not exclusively) in the different phases of dolomites ( Fig. 5A-C) may be due to a slow change of the diagenetic environments as progressive burial resulting in more reducing conditions and increasing diagenesis (e.g., Veizer 1983a,b;Azmy et al. 2011).

Dolomitization
The predominantly calcitic HCM facies (P1) (Fig. 1M, 2A and B) contains low MgO (0.8-2%; mean = 1.28%) and higher CaO contents (51-55%; mean = 53%). It signifies the absence of broad-scale dolomitization owing to the occurrence of a stable calcite phase. The wide range of MgO content in P2 dolomitic limestone (8.4-20.4%) reflects a varied degree of dolomitization in this dolomite group. The range overlaps a few of the P2 dolomitic limestone (Figs. 1R, 2C) P3 dolomitic limestone (Figs. 1T, 2G) and P5 dolomitic limestone (Figs. 1V, 2H). This observation, together with the narrow range of MgO contents (17.48-21.04% (P3); 19.61-20.32% (P5)) implies a similar degree of dolomitization at a later stage. This phenomenon is common as nonstoichiometric dolomites are susceptible to further diagenetic modification due to their metastable state (i.e., Sibley et al. 1994;Chai et al. 1995;Zhao and Jones 2012). The CaO contents of the dolomites allow the grouping of dolomites into two populations. This grouping signifies that the dolomites underwent varied dolomitization stages, i.e., early stage of dolomitization (weaker intensity) and late stage of dolomitization (higher intensity). The P2 dolomites (early replacement dolomite) exhibit mixed groups of lower calcian dolomites and higher calcian dolomites (30.43-43.46%), while P3 and P5 dolomites (Sucrosic and late replacement dolomite) are classified as low calcian dolomites with CaO contents of 31.18-33.42 and 30.77-31.81%, respectively. This is in line with the dolomite synthesis experiments of Kaczmarek and Sibley (2011) that espoused the calcian dolomitic nature of the early stage of dolomitization under high-temperature conditions. The control exerted by Mg/ Ca ratio of the diagenetic fluids for Ca % of the dolomites (e.g., Zhao and Jones 2012) is also demonstrated by the calcian nature of the studied samples. The Kinta carbonates are interpreted to be selectively dolomitized and altered by hydrothermal dolomitization (Ramkumar et al. 2019;Mohammad Zahir et al. 2020;Xin Hui et al. 2021). These studies add support to the inferences on calcian dolomites which are the major control of dolomitization.
The dolomites are categorized as secondary dolomites and further analyzed to differentiate replacement dolomites through a scatter plot of Mg/Ca against MgO ( Fig. 5D; Warren 2000; Chen et al. 2010). The dolomite samples fall in the replacement dolomite field along the replacement line with a positive correlation, which affirms the replacement origin. During dolomitization of limestones, the Ca 2+ will be substituted by Mg 2+ and the composition of limestone becomes progressively stoichiometric and thus those samples close to stoichiometry fall along the replacement line (e.g. Chen et al. 2010;Zhang et al. 2014). The Sr versus MgO plot shows a decreasing trend for Sr with increasing MgO (Fig. 5E), due to the non-stoichiometric nature of the dolomites (Rahimi et al. 2016). The Sr content in dolomites decreases with increasing stoichiometry (Vahrenkamp and Swart 1990). For instance, more stoichiometric P3 dolomites have 21% of MgO and 31 ppm of Sr, whereas less stoichiometric P2 dolomites contain 8.4 wt% of MgO and 203 ppm of Sr, respectively. The gradual depletion of Sr contents in the studied samples could be explained by the progression of dolomites towards stoichiometry via dissolution and reprecipitation, with a lower effective partition coefficient during progressive stabilization (Land 1980;Veizer 1983a, b;Qing and Mountjoy 1989;Kupecz and Land 1994). Huang et al. (2006) interpreted the low concentration of Sr in dolomites due to precipitation of dolomites from low Sr fluids, or it was difficult for Sr to be incorporated into the dolomite lattice during dolomitization. On the other hand, the primary mineral being replaced with dolomite and its Sr content plays the main role (Veizer 1978). Higher contents of Sr could be observed in replacement dolomites originating from aragonites than those originating from the calcite (Rahimi et al. 2016). However, aragonite is absent in the Kinta carbonates, and there are no indications of their prevalence even at depositional times and thus the primary mineralogy before the replacement of dolomites affecting the Sr values was not taken into account.
In general, Sr and Na are depleted during post-depositional diagenesis of carbonates, especially in late diagenetic dolomites, while Mn and Fe are enriched (Brand and Veizer 1980;Veizer1983a, b). The rationale for this phenomenon is the occurrences of lesser concentrations of Fe and Mn in seawater than in diagenetic fluids (Tucker and Wright 1990) and higher concentrations of Fe and Mn in diagenetic fluids in reducing conditions (Warren 2000;Ramkumar 2007Ramkumar , 2008. In the present study, only Mn is enriched with Mg but Fe is not enriched. Fe does not show any correlation either with Mn or MgO (Fig. 5C), which indicates Fe content in the studied dolomites was not controlled by the dolomitization. The rise of Mn concentration in dolomite than the limestone can be related to the substitution of Mn for Mg (Rahimi et al. 2016). Mn is preferentially incorporated into the carbonate lattices during diagenesis because the distribution coefficients in carbonates are greater than 1 (Veizer 1983a, b;Land 1985). In dolomites, Na shows positive correlations with Mn (r = 0.80); and Mg (r = 0.76) (Fig. 5F), which indicate that the Na contents were enriched rather than decreased, perhaps due to the nature and interactions of the diagenetic fluids. Na is mostly below the detection limit (BDL) in HCMs and subsequently enriched during diagenesis.

Recrystallization
An increase in crystal size and non-planar texture are considered petrographic characteristics of the recrystallized dolomites (Kupecz and Land 1994;Machel 2004). These are evident in all the dolomite phases (P2, P3 and P5 dolomites). Despite that ancient dolomites are expected to exhibit ordered configuration, the older and recrystallized dolomites exhibit disordered configuration and/or early diagenetic conditions (e.g. Kupecz et al. 1993). This is seen in geochemical compositions among the studied P2 dolomites with a wider range of elemental compositions (Fig. 5A-F) and varied clusters signifying compositions of early and late diagenetic dolomites. The other dolomite groups, P3 and P5, show clustered distributions with elevated Mn and Mg contents but depleted Sr contents, implying late diagenetic dolomitization. The varied ordering in P2 dolomites could be explained by their exposure to varied diagenetic durations (Kupecz et al. 1993). This further implies that the P2 dolomites were initially subjected to the diagenetic environment in a relatively shorter period of time and later affected by diagenesis for a longer period where the remaining metastable phases underwent further stabilization resulting in the formation of late diagenetic dolomites. While the P3 and P5 dolomites were subjected to diagenesis sufficiently long period that stabilized the metastable dolomites and produced late diagenetic (recrystallized) dolomites. The recrystallization is clearly evident by the depletion of Sr and enrichment of Mn from the HCMs (e.g. Jacobsen and Kaufman 1999;Zhang et al. 2014).
Geochemical traits of the recrystallized dolomites include decreased REE, Sr, and Ba concentrations. The P2 dolomites from the earliest dolomitization phase have the widest range of ∑REE + Y values. These could have resulted from prevalent progressive/episodic stabilization of dolomites where higher values represent initial stabilization of early diagenetic dolomites while relatively lower values represent late-stage recrystallization. The P2, P3 and P5 dolomites have recorded the lower ∑REE + Y values, and imply that P2 dolomites, together with P3 and P5 dolomites have undergone more intense late-stage recrystallization. The Dolomites with higher Sr levels are interpreted as evidences of a lower degree of recrystallization while those with lower Sr levels are indicative of losing their original Sr during recrystallization. These phenomena are evident in P3-P5 and a few samples of P2 (Brand and Veizer 1980;Land 1980Land , 1985Mazzullo 1992;Malone et al. 1996). The decrease in average Sr content from P2 (80.7 ppm) to P5 (39.8 ppm) suggests that the degree of recrystallization of the dolomites increased from P2 to P5. The relatively lower mean Sr contents in P3 (45.7 ppm) and P5 (39.8 ppm) dolomites indicate that these dolomites underwent late diagenesis and the highest degree of recrystallization. The wide range of Sr content in P2 dolomite, (32-203 ppm), reflects that these dolomites underwent both early and late diagenesis, suggesting that the P2 dolomites underwent various degrees of recrystallization.
Sr content decreases with increasing crystal size. Diagenetic dolomites have coarser crystals than primary, smaller dolomite crystal sizes, and may contain lesser Sr contents (Kupecz and Land 1994). This is in line with observations from petrographic studies revealing that the dolomites with larger dolomite crystals (partial P2, P3 and P5 dolomites) contain comparatively lower Sr content and P5 dolomites with largest crystals have the lowest Sr concentrations.
The studied samples are further analyzed using (La/ Sm) SN vs (La/Yb) SN plot ( Fig. 4C; Reynard et al. 1999) to interpret the prevalent dominant mechanisms (adsorption and/or substitution) during diagenesis. Relatively higher (La/ Yb) SN ratios than seawater could be interpreted to be LREE enrichment contributed through the adsorption process at the sediment-water interface during post-depositional features such as early diagenesis (Reynard et al. 1999;Picard et al. 2002). According to Reynard et al. (1999), the La/ Yb) SN values < 2.5 indicate only a minor adsorption effect during early diagenesis. The (La/Yb) SN and (La/Sm) SN ratios are decreasing in selected dolomites and are parallel to the late diagenetic trend (Fig. 4C). Together, these observations suggest that the samples are affected by recrystallization (Reynard et al. 1999). The manifestation of corresponding decreased (La/Yb) SN and (La/Sm) SN ratios is often associated with MREE enrichment and shows "bell-shaped" REE distribution (Picard et al. 2002). However, such a trend is not recorded clearly though few samples show relative enrichment of MREEs, which can be related to Sm concentrations in biogenic apatites with seawater-type patterns (e.g. Reynard et al. 1999).

Diagenetic fluids
As the incorporation of REEs into calcite is restricted by a relatively narrow range of partition coefficient values (Zhong and Mucci 1995), the changes shown by the REEs reflect the nature and intensity of crystallization processes, oceanic composition and/or characteristics of fluids that precipitated the carbonates (Azomani et al. 2013). Thus, they serve as proxies for the chemistry and the source of the fluids (Nothdurft et al. 2004) in which the mineral phases were precipitated. REE contents in the dolomites are controlled by several factors as follows| i.e. (a) the concentration of REE in the parental unaltered rocks, (b) the REE contents in the dolomitizing fluids, (c) the partitioning of REE between the dolomitizing fluids and dolomite and (d) fluid-rock ratios during diagenesis (Banner et al. 1988a, b;Qing and Mountjoy 1994). Unlike limestone, dolomite is uncommon to be used as an REE proxy to reconstruct the REE composition of the palaeo-seawater (Yamamoto et al. 2004). However, both ancient limestones and dolostones are used as proxies for the reconstruction of REE + Y compositions of ancient seawater that deposited the carbonates (e.g. Kamber and Webb 2001;Azmy et al. 2011).
The REE spectra of the dolomites and HCMs, the shale normalized REE patterns and concentrations show no systematic variations but look identical (e.g. Frimmel 2009). The overall relatively flat shapes of the REE patterns of the precursor limestones are often inherited and conserved in the dolomites. This reflects that the composition of the diagenetic dolomites is primarily controlled by the precursor carbonate and that fluids that formed the dolomites probably contained seawater that deposited the limestones (e.g. Azomani et al. 2013). However, the REEs of the HCMs are significantly controlled by the detrital input and thus show relatively flat PAAS normalized REE trends. In other words, it is construed that the extent of dolomitization and REE concentrations are unrelated. This interpretation is consistent with the findings of earlier studies that stated that the dolomitization and subsequent recrystallization do not significantly modify the general shape of the REE + Y patterns of the precursor carbonates (Banner et al. 1988a, b;Qing and Mountjoy 1994;Frimmel 2009;Wang et al., 2009;Allwood et al. 2010;Nagarajan et al. 2011;Zhao and Jones 2013;Liu et al. 2019;Smrzka et al. 2019. The REE concentrations of P2 dolomites (45.7 ppm) are only slightly higher than that of the HCMs (45.3 ppm) and show a decreasing trend from P2 to P5 dolomites. However, the REE patterns of different dolomite phases did not differ much, implying that the REEs behave in a similar way during dolomitization with no apparent fractionation although the REE amounts decreased during dolomitization process ). This also implies low ratios of fluid to rock volumes (e.g. Banner et al. 1988a, b;Webb and Kamber 2000;Nothdurft et al. 2004). This is reflected in the localized dolomitization as shown in field evidence. It also points to a focused source of the diagenetic fluids, consistent with the focused outflow of hydrothermal diagenetic fluid origin (Warren 2000;Davies and Smith 2006;Ronchi et al. 2012b). In the present study, dolomitization is limited along the fracture and stratabound with a small amount of diagenetic fluids involved and low fluid-rock reactions which has not significantly affected the REE contents and patterns during dolomitization process.
Dolomitization would not alter the REE contents of precursor carbonates if it is mediated by seawater-like dolomitizing agents because the REE contents of seawater are very low relative to that of limestone (Banner et al. 1988b). The average ∑REE + Y values of the HCMs and early dolomites are similar (P1: avg. 45.29; P2: avg. = 45.72) while that of the later dolomite phases are relatively lower (P3: avg. = 36.93; P5: avg. = 30.33). Hence, despite the observed similar REE patterns, a relatively higher ∑REE + Y range of values of P2 dolomites and subsequent lower REE values in successive dolomites suggested that the dolomitizing fluids of the late-stage dolomites were not mediated by seawater nor seawater-like fluids. This is consistent with the phenomenon found elsewhere (e.g. Azmy et al. 2011) and suggests that the dolomitization might have been mediated by basinal brines. The unaltered seawater-like REE signatures in the Kinta carbonates are due to less extensive dolomitization where the extent of cation exchange with dolomitizing fluids was not sufficient to alter the REE signatures of the Kinta carbonates (e.g., Nothdurft et al. 2004). Subsequently, the REE patterns of the Kinta dolomites were preserved even though the dolomitization was not mediated by seawater or seawater-like fluids. The inference of dolomitization from basinal brines is in conformity with previous studies (Ramkumar et al. 2019) that espoused episodic dolomitization by tectono-thermal events; Xin Hui et al. (2021) that proposed local and limited availability of Mg 2+ for dolomitization).
The mixing of seawater and hydrothermal fluids of unknown compositions would affect the REE pattern (Franchi et al. 2015;Zhao et al. 2018). The slight depletion of HREE in both calcite and dolomite relative to the LREE may suggest the involvement of hot brines but at different temperatures and burial settings (Azomani et al. 2013). Depletions of LREE and HREE result in enrichment of MREE. This is recognized as a "bell-shaped" pattern by Picard et al. (2002) and considered as a secondary feature that departs from seawater patterns (e.g. German and Elderfield 1990; Shields and Stille 2001;Shields and Webb 2004). In this regard, a binary diagram of (La/Sm) SN versus (Gd/ Yb) SN is employed to ascertain the distribution pattern of REE. The studied samples mostly plotted (dolomites of P2, P3) in the field "A": (La/Sm) SN < 1, (Gd/Yb) SN > 1, which indicates enrichment of MREE. Few HCMs (P1) fall in the field "B" and indicate enrichment of LREE (Fig. 4B). However, enrichment of MREE is relatively lesser and thus, insignificant alteration of the REEs during dolomitization could be inferred.
Positive Eu anomaly and light (LREE) to middle (MREE) REE-enrichment distributions are interpreted to be the resultant of high-temperature hydrothermal modification or reduced and acidic hydrothermal fluids (Bau and Dulski 1999;Bau et al. 2010;Delpomdor et al. 2013;Navarro-Ciurana et al. 2017). Hence, the positive Eu anomaly as observed in the HCMs and one sample each from P2 and P3 dolomites, coupled with overall association with minor MREE enrichment can be considered as influenced by hydrothermal activities (e.g. Delpomdor et al. 2013). This could be a product of either admixture of hydrothermal fluids or co-precipitation of hydrothermal Fe-sulphide (e.g. Frimmel 2009). The positive loadings of Si, Al, Cu with Eu anomaly of dolomites can explain the possibility of mixing heated brine water with seawater. In addition, Eu anomalies can occur as either positive or negative, varying with the redox state of the hydrothermal fluid and its total activity, where pyrite-bearing carbonate exhibits positive Eu anomaly and Fe-oxide rich domains show negative Eu anomaly (Fig. 6A) (Frimmel 2009). Eu anomalies can also be contributed by Eu mobilization by diagenetic fluids (Frimmel 2009). The presence of Eu 2+ in the weathered source can lead to preferred leaching of Eu during weathering , particularly if it is feldspar enriched (Kamber et al. 2005). However, no feldspar is observed through petrographic and mineralogical studies. Thus, it is prudent to interpret that the Eu anomalies of the carbonates are not controlled by the feldspars. Also, there are no significant positive or negative correlations observed for Eu/Eu* with K/Al and Na/Al ratios, which unequivocally establish that the Eu anomaly is not controlled by the detrital feldspars ( Fig. 6B, C) (e.g. Nagarajan et al. 2011).
The distinct positive Eu anomaly in the carbonates can represent an elevated Eh in the parent fluid (Lee et al. 2003) due to the increased Eu 3+ /Eu 2+ ratio. Slight positive or negative Eu anomalies in dolomites are suggested to be contributed by Eh alteration of parent fluid (Kučera et al. 2009). The primary fluid composition may also explain the positive Eu anomalies in carbonates (Kučera et al. 2009). Mobilization of Eu during high temperature (> 200 ºC) diagenetic processes or metamorphism of rocks with Caplagioclase where Eu 3+ is reduced to Eu 2+ may cause positive Eu anomalies in fluids (e.g. Schwinn and Markl 2005). Eu 2+ ions are easily remobilized in aquatic thermal solutions as they tend to adsorb on mineral surfaces and within the intergranular spaces after cooling (Kučera et al. 2009). This could explain the positive Eu anomalies in the HCMs.
It is envisaged that hydrothermal alteration took place at elevated temperature during post-depositional times before initiation of dolomitization, contributing to most positive Eu anomalies found in HCMs but not dolomitized carbonates. According to Zhao et al. (2018), even 0.2% of hightemperature fluids in the seawater can display a positive Eu anomaly. Based on this surmise, it can be envisaged that even 0.1% hydrothermal high-temperature fluid may account for the observed Eu anomalies in HCMs (Fig. 6D,  E). Although the positive Eu anomaly in dolomites could be interpreted due to the dilution of hydrothermal fluid with a large volume of ambient seawater (Bau et al. 2010;Johannessen et al. 2017;Zhao et al. 2018), the involvement of only a small volume of diagenetic fluids in the episodic localized dolomitization obviates this interpretation. The REE + Y abundances in hydrothermal fluids are of negligible importance for resulting REE + Y patterns of dolomites (Kučera et al. 2009). This explains the absence of anticipated positive Eu anomalies and elevated REE contents in dolomites despite their hydrothermal alteration. Kučera et al. (2009) suggested that fluid temperature may have a great influence on the fluid-rock interaction and total REE concentrations. The dolomites precipitated from fluids of higher temperature are mostly REEenriched than those of colder fluids, which are mostly REE-depleted. This phenomenon due to the leaching of REE-bearing minerals (e.g. monazite, allanite) in higher temperatures may result in higher total REE + Y content (Kučera et al. 2009). The explanation of relatively higher total REE concentration in the HCMs due to elevated temperatures is consistent with the presence of positive Eu anomalies in the same group, which can be attributed to prevalent high temperatures. The relatively depleted REE contents in successive dolomites can be related to the recrystallization or the REE remobilization of dolomite (Elderfield and Sholkovitz 1987;Kučera et al. 2009;Smrzka et al. 2019), at an even higher temperature. Applying these to the studied samples, the latter dolomite phases can be deemed to be formed at higher temperatures as evident in larger crystal sizes but they have relatively lesser REE concentrations. The absence of prominent positive Eu anomalies in studied dolomites, coupled with the relatively depleted REE concentrations compared to the HCM, suggests dolomitizing fluids with depleted REE contents. On the other hand, pH modifications in the solution can be a comparatively more important factor (Kučera et al. 2009). The REE contents in a solution increase with decreasing pH in different hydrothermal systems (Michard 1989). However, the total REE concentrations in dolomite samples do not show a significant correlation with either Sr or Na (salinity indicators). These geochemical behaviors of the studied samples are anticipated due to previous studies (Ramkumar et al.2019;Xin Hui et al. 2021) and field and petrographic observations where occurrences of hydrothermal alteration are reported. These studies interpreted that the fluids originated from the underlying rocks, channeled up-dip through the fractured system, and dolomitized the HCMs of the Kinta Valley.
Fe and Mn contents in dolomite serve as useful indicators as they reflect both the redox conditions during  Zhao et al. 2018). F Ba Vs. Eu/Eu* plot shows no definite trend amongst the Kinta carbonates dolomitization and the availability of these elements in the dolomitizing fluids (Budd 1997). The dolomites formed in normal marine environments commonly contain low Fe and Mn concentrations varying from 3 to 50 ppm and 1 ppm, respectively (Veizer 1983b), although the different ranges of higher values have also been reported (Vahrenkamp and Swart 1990;Budd 1997). Significantly higher concentrations of Fe may imply the possibility of diagenetic fluids related to magmatic activities (e.g., Hou et al. 2016) or circulated through volcanic rocks, whereas Mn concentrations could reach up to 34,000 ppm in carbonate diagenesis involving meteoric waters (Driese and Mora 1993). Mn concentrations higher than 400 ppm are considered as a common feature implying non-marine fluids (Bruckschen et al. 1999). The Fe and Mn contents in the Kinta dolomites (1399-5246 and 1371-2649 ppm, respectively) are significantly higher than the marine dolomites and much lower than the carbonates that underwent diagenesis under meteoric water. Elevated Fe and Mn levels in the dolomites by substituting for Mg imply that the dolomitization occurred under reducing conditions (Land 1986). This inference warrants dolomitization at deeper burial conditions (Adabi and Mehmandosti 2008). The source of the Fe and Mn in dolomitizing fluids must be a non-carbonate, for instance, associated siliciclastics or underlying crystalline basement (Vandeginste et al. 2013), which is an important source of magnesium. The range of Fe contents in the dolomites resembles those of dolomites precipitated from hot, saline, basinal fluids as reported by Aharon et al. (1987) on the atolls at Niue, South Pacific (620-5740 ppm). The dolomites enriched in calcium (30.4-43.5 mol % CaO) and iron (1398.9-5245.7 ppm) are typical characteristics of phases that precipitated from basinal fluids rich in Ca and Fe (Amthor and Friedman 1992). In addition, the medium to coarse crystalline dolomites are likely to be derived from compaction of shales on the underneath, and the basinal brines. The released Mg 2+ from shale may have migrated upwards through pore fluids and dolomitized the overlying carbonates along the fracture and bedding plane. Fe and Mn concentrations in the studied dolomites show no correlation between them (r = -0.03), which could be explained by the progressive enrichment of Mn content in fluids due to disequilibrium (Lonne and Al-Aasm 2000).
Sr concentrations in the dolomites may reflect the nature of the dolomitizing fluids (e.g., Lu and Meyers 1998). The Dolomites precipitated from normal seawater should have a theoretical equilibrium concentration of 470-550 ppm Sr with reference to the dolomite-water distribution coefficient (Veizer 1983b) (Table 2). Conversely, "pene-contemporaneous" dolomites formed in evaporitic settings contain about 500-700 ppm (Land 1991) and fluids of high salinity origin from hypersaline sabkhas have low Sr contents (< 550 ppm) (Tucker and Wright 1990). The Sr concentrations of the dolomite samples (31-203 ppm) are significantly lower and imply that these dolomites were not precipitated from normal marine, evaporitic settings and hypersaline sabkhas. The low Sr levels recorded in the studied dolomites are comparable with those precipitated from basinal brines, which are Srdepleted fluids (e.g. Sperber et al. 1984;Azmy et al. 2011;Azomani et al. 2013;Hou et al. 2016) (Table 2). Although low Sr contents may also associate with Sr-depleted meteoric water fluids (Pierson 1981), this is most unlikely to be the case as the dolomite bodies are associated with structure-controlled geobodies with closed fractures indicative of fluids coming from beneath. Dolomitizing fluids expelled from clastic rocks or evaporates are attributed to low Sr concentrations (Huang et al. 2006). Accordingly, in addition to the inferences based on geochemistry and lithology, the emanation of dolomitizing fluids from the underlying carbonaceous-argillaceous Ordovician strata seems to be plausible.
Sodium, being the most abundant cation in the seawater, is recognized as a useful palaeosalinity tracer in ancient fluids and carbonates (Land and Hoops 1973;Veizer et al. 1977;Sass and Bein 1988). Hence Na can also be a potential indicator of the salinity of the dolomitizing fluids (Budd 1997). High contents of Na in all the dolomites indicate that they were formed from higher salinity non-marine dolomitizing fluids (Kirmaci 2008;Azomani et al. 2013) (Table 2). However, interpreting the concentrations of Na is tricky and should be used with caution, as Na enrichment in dolomite can be due to solid and fluid inclusions of NaCl, Na substitution in the crystal lattice (Qing and Mountjoy 1989), and contamination by Na-bearing clay minerals and tuffites (Kirmaci and Akdag 2005;Kirmaci 2008). In the present study, a close relationship of Na with Mn and Mg indicates that the effect of diagenetic fluids increased the Na content in dolomite. This inference is contrary to the common occurrence that the contents of Na may be lowered during an increased degree of recrystallization. Seawater typically contains Ba contents of 0.01-0.05 ppm, while subsurface brines commonly range from 1 to nearly 6000 ppm Ba (Hanor 1979) ( Table 2). The Ba content of the Kinta dolomites in the range of 3-7 ppm (Fig. 6F) again reaffirms the non-marine origin of the dolomites. Hence, inference of non-marine origin of the diagenetic fluids is justifiable. He et al. (2006) reported that Ba can be incorporated into the dolomite lattice only at high temperatures. Thus, the higher than normal seawater Ba content in the studied dolomites reflects a hydrothermal fluid setting; again pointing to a basinal brine origin for the dolomitizing fluids.
Occurrences of various dolomite phases as evident from field, petrography and geochemistry findings reflect multiple dolomitization episodes although geochemically insignificant variations are shown among the phases. Together, they point towards the contribution of episodic fluxes. The similar REE profiles of the various dolomite phases and HCMs with insignificant differences among them imply that the various dolomite generations are formed by diagenetic fluids of identical composition (e.g. circulated basinal brines) but at different temperatures and burial environments (e.g. Azomani et al. 2013).

P1 Diagenetic fluids
The first phase of fluid flux and alteration of the geochemical composition of the host phases by the hydrothermal fluids is evident from the presence of positive Eu anomalies, and lower contents of Fe, and Mn, and higher contents of Sr and Ba. The geochemical traits exhibited in limestone samples generally point towards a nonmarine origin of the diagenetic fluid. Influences of hydrothermal fluid that emanated from subsurface are affirmed by the positive Eu anomalies (Bau and Dulski 1999;Frimmel 2009) and high Ba values (He et al. 2006). The highest positive Eu anomalies and Ba values as shown in the P1 carbonates reflect the involvement of the highest temperature during diagenesis.

P2-P5 Diagenetic fluids
The diagenetic fluids of the dolomites (P2-P5) exhibit similar features namely, low Sr/Ca ratios, lower positive Eu anomalies, higher Mn, Fe (Fig. 6E) and Na and lower Sr and Ba contents. However, the ∑REEs varied from P2-P5, showing a declining trend. These features strongly support that the fluids are basinal brines that are mixed with seawater derived from underneath. The fluids have dissolved and dolomitized the HCMs along the fractures under high temperatures. High Fe and Mn values reflect the reducing nature of the diagenetic fluids (Land 1986;Warren 2000) and Sr depletion implying the source of diagenetic fluids to be hot, reducing, basinal fluids (Azmy et al. 2011;Azomani et al. 2013;Hou et al. 2016).
The relatively lower concentrations of Fe and Mn in some of the P2 dolomites imply a less reducing diagenetic environment with a lower supply of divalent Fe and Mn (e.g. Qing and Mountjoy 1989). The reducing conditions of P2 dolomites are further supported by illustrations from the plot of Sr/Ca ratio vs Mn (Fig. 5B). The presence of anhedral dolomite crystals, depletion of positive Eu anomalies and Sr contents imply relatively higher temperature during diagenesis where high temperatures facilitated remobilization of Eu resulting in depleting positive Eu anomaly (Kučera et al. 2009) and lower Sr values indicate a higher degree of recrystallization (Brand and Veizer 1980;Land 1980;Mazullo 1992). The higher Mn contents of P2-P3 dolomites despite decreasing trend of Fe contents could be attributed to preferential incorporation of Mn 2+ with decreasing Eh due to higher solubility of Mn 2+ than Fe 2+ over a larger range of Eh conditions (Harris et al. 1985) and higher partition coefficient of Mn (5-30) comparable to that of Fe (1-20) in substitution for Ca and/or Mg in dolomite (James and Jones 2015). This resulted in availability of Mn 2+ ions for incorporation into dolomite lattice when Fe was not readily available and or actively substituted. Both Fe and Mn ions are actively incorporated into calcite and dolomite under ideal reducing conditions (Lonne and Al-Aasm 2000). Hence, the lower average Fe contents in P3 dolomites could indicate a reducing condition of the fluids that were not sufficient/significant enough to liberate more Fe ions for incorporation into dolomite. Although the decreasing trend in Fe values was observed in the P2-P3 dolomites, the Mn contents showed a decrease in the P2-P3 dolomites. The Fe and Mn values generally overlap in the dolomite phases and denote similar fluid chemistry from similar sources. The manifestation of larger anhedral dolomites crystals with non-planar texture and saddle dolomite (largest crystal), coupled with lesser positive Eu anomalies and significantly depleted Sr concentrations in P5 dolomites indicates another fluid flux with relatively higher temperature. This inference is comparable to the study of Al-Aasm (2003).

Paragenesis and implications for tectonic and thermal events
Integration of the geochemical signatures of individual facies types (Table 1) with field and petrographic characteristics suggests an intrinsic relationship to prevalent tectonothermal events. Increasing trend of Mn values coupled with decreasing trends of ∑REE, Sr and less positive Eu anomalies reflect incremental changes of thermal conditions during formations of various phases of dolomites set in this general backdrop, the first episode of the diagenetic history of the studied Kinta carbonates was manifested by a positive Eu anomaly in the HCM produced by diagenetic modification in a hydrothermal setting (Bau and Dulski 1999;Frimmel 2009). This event occurred prior to the onset of the dolomitizations resultant from successive thermo-tectonic events. This high-temperature diagenetic event was associated with a distant submarine Permian volcanic event near Central Range (Basori et al. 2017) that supplied hydrothermal fluids hot enough to alter REE signatures into positive Eu anomaly (Bau and Dulski 1999;Frimmel 2009;He et al. 2006).
The younger dolomitization events in burial conditions are reflected in petrographic evidences such as dolomite crystals along the dissolution seams and field evidences of dolomite geobodies that are enclosed within inverted "v" fractures that terminated below surface level. The inferred compaction event is further supported by the occurrences of low-amplitude stylolites in the HCMs (P1). These lowamplitude stylolites may have been formed at a burial depth of at least 500 m (Duggan et al. 2001;Kirmaci 2008). The prevalence of dolomitization events in subsurface conditions is further supported by the occurrences of medium to coarse crystalline fabrics (e.g. Azomani et al. 2013). This is consistent with the occurrences of dolomites along the dissolution seams that resulted from compaction events implying precedence of compaction before the dolomitization event. The comparatively higher Fe and Mn contents of HCMs (least dolomitized) also support the inference of subsurface, reducing conditions of dolomitization (Land 1986;Warren 2000). The first dolomitization event could be associated with the folding and faulting prevalent during the Permo-Triassic Sibumasu-East Malaya collision (Ramkumar et al. 2019;Xin Hui et al. 2021). The presence of positive Eu anomalies and highest Ba values indicate the involvement of diagenetic fluids of high temperature (Bau and Dulski 1999;Frimmel 2009;He et al. 2006). This dolomitizing fluid might have penetrated through fractures and then permeable beds. This inference implies high pressure (compactional?) for allowing the channeling of the dolomitizing fluid. The diagenetic system was increasingly open as reflected by decreased Sr contents (Brand and Veizer 1980) contributed by micro faults, fractures and stylolites formed during the episodic tectonic event (Ramkumar et al. 2019;Xin Hui et al. 2021).
The HCMs were subjected to subsequent dolomitization events during succeeding thermo-tectonic events. Brecciated HCM with fractures filled with replacement dolomites represents the initiation of second phase tectonic event related to post-orogenic phase of subsidence that resulted in the formation of collapse breccias. The subsequent dolomitization is recognized in the field by distinctive varied color and dolomite petrographic textures. The medium to coarse crystalline fabric of the dolomites, and their increasing crystal size reflect the replacement dolomitization events associated with enhanced temperature and pressure (Warren 2000) and deep burial conditions (e.g. Azomani et al. 2013). This dolomite phase recorded increased Fe and Mn contents but depleted Eu anomalies implying higher temperature of diagenetic fluids that enabled the remobilization of Fe, Mn and Eu contents (e.g., Kučera et al. 2009). Though non-stoichiometric calcian dolomite in P2 dolomites is interpreted to have been formed under a relatively closed diagenetic system, it may not have been a perfect closed system. The depletion in Sr values signifies an open system (Brand and Veizer 1980) with increased pathways (fractures) resultant from fractures formed during the tectonic event (Lonne and Al-Aasm 2000) and however, restricted fluid flow and/or Mg 2+ supply (Azomani et al. 2013). This series of diagenetic events could be correlated with Late Triassic to Early Jurassic regional post-orogenic subsidence (Meng et al. 2021) and associated metamorphism.
The next dolomitization event is manifested in varied colored dolomite geobody with distinct sugary texture. The occurrence of sucrosic texture of the dolomites points towards a restricted fluid flow of dolomitizing fluids (Warren 2000) although depleted Sr contents are indicative of an increasingly open dolomitization system (Brand and Veizer 1980). The increase in openness of the system could be explained by the introduction of external dolomitizing fluids through fractures and fluid flow through them. However, overlapping of most elemental compositions among the dolomite phases implies similar P-T ranges during multiple dolomitization events. The overlapping geochemical compositions also indicate dolomitization by fluids of identical composition in a closed diagenetic system at varying temperatures (Azmy et al. 2011;Azomani et al. 2013;Mahboubi et al. 2016) or burial fluids of the same origin that have circulated in a closed to semi-closed system (Azomani et al. 2013). A relatively higher temperature is also reflected through higher positive Eu anomalies and Fe and Mn range. The thermo-tectonic event that could be correlated with the similar P-T ranges but a higher temperature could be the Late Cretaceous fracturing event with the formation of NW-SE and NE-SW faults and associated regional thermal anomaly that produced acidic dykes that filled the fractures and Main Range pluton edges (Sautter et al. 2017).
The next dolomitization phase is evident in yet another different colored dolomite geobody recognized in the field. Petrographically, it shows an increment in crystal size indicative of the association of higher temperature and pressure during the replacement dolomitization events (Warren 2000). Low porosity in these dolomites reflects a rich supply of magnesium-rich fluids that enabled pervasive dolomitization in an open system (e.g. Azomani et al. 2013). Nevertheless, the higher porosity as exhibited in late-stage dolomites suggests a closed to semi-closed system with a low water-rock ratio and limited supply of magnesium source, which has not been able to occlude the available and or newly created pore spaces completely. In addition, the absence of void-filling dolomites implies a limited external supply of Mg 2+ ions and hence there was no extra dolomite to occlude the newly-developed inter-crystalline pore spaces. The increasing trend of Fe and Mn from P1-P5 dolomites implies an increase in reducing conditions from the early to late replacement dolomites (Azomani et al. 2013). The intensified tectonic events that contributed to this dolomitization phase could be the reactivation of major dextral slip faults during the Late Cretaceous to Paleogene associated with the early rifting stage across the Malay Peninsula. Despite the dolomite phases showing an increasingly open diagenetic system, occurrences of mm-thick calcite veins cutting through all dolomite phases and thermogenic calcite in the last phase of diagenetic history imply a closed diagenetic system with a limited external supply of Mg 2+ ions. This is in line with the thermal event during quiescence of tectonics during the Late Cenozoic Period where no fractures were created to provide fresh sources of diagenetic fluids and Mg 2+ ions, hence diagenetic system remained closed.

Conclusions
The Kinta carbonates were deposited under open marine oxygenated waters. The marine signature of the studied carbonates is affirmed by the REE + Y patterns. Prevalence of multiple episodes of physical and chemical compaction, fracturing, dolomitization and recrystallization are inferred from seven facies types which in turn are grouped into two distinct clusters representative of early and late diagenetic events. These clusters have unique signatures of trace and rare earth elements such as elevated ∑REE + Y, Fe, Mn, Na and Ba contents, depleted Sr concentrations, minor MREE enrichment and positive Eu anomalies. Prevalent changes in the P-T conditions have imprinted variable diagenetic signatures in terms of fluid chemistry of diagenetic fluid chemistry, openness of the diagenetic system and intensity of water-rock interaction. Absence of pervasive diagenetic transformation and occurrences of diagenetic changes only along the interfaces wherein the circulating fluids and host rocks interacted, which in turn were facilitated by the multiple fractures that originated by the tectono-thermal events of Permian to Cretaceous are also inferred by the present study. The temporal evolution of the diagenetic fluids was characterized by the presence of positive Eu anomaly in P1 limestone but depleting in dolomites, low Fe, Mn but high Sr, Ba values in P1 limestone while high Mn, Fe, Na but low Sr and Ba contents in dolomites, decreasing REE values from P2-P5 dolomites. The thermal event during tectonic quiescence had played primary and secondary roles in multi-stage diagenetic events by providing connectivity enabling fluid flow and producing multiple fluxes of diagenetic fluid as deep-circulating crustal hydrothermal fluids. The diagenetic fluids show affinity to basinal brines that emanated from tectono-thermal compaction of underlying Ordovician carbonaceous-argillaceous strata. The updip movement of fluids was facilitated by fractures and bedding planes, the thermal events have produced episodic crystallization/replacement of dolomite phases, that culminated in precipitation of calcite as the final event when the limited availability of Mg 2+ was exhausted.