Thermodynamics of water sorption in clay