Post-Carrollian mechanics, ideal gas and gravity