Can get silly light wider range cassettes too if you shop about and don’t mind spending mega bucks.
Losing a chainring up front is likely to save you more weight though. And constantly shifting to find the right gear was a PITA with a 12-27 on an XC bike.
Go 10spd, honestly! It’s bloody ace… In fact, on one of my bikes I’ve gone 1×10 with a 32 ring up front, and 11-36 out back, and its pretty much all the gear ratios I ever need. Any lower than 32/36 and I just have to tell myself “get out the saddle, people ride up here on a singlespeed”, and any taller than 32/11 and I’m spinning out going downhill on tarmac anyway.