Contact Thermodynamics