Catalyzes the condensation of acetyl-CoA with acetoacetyl-CoA to form 3-hydroxy-3-methylglutaryl-CoA (HMG-CoA). Functions in the mevalonate (MVA) pathway leading to isopentenyl diphosphate (IPP), a key precursor for the biosynthesis of isoprenoid compounds that are building blocks of archaeal membrane lipids