I will admit that there were a lot of high-soaring words that might have covered up the legal basis, but to me, the legal component of the ruling was simply:
1) The court finds that marriage is an inherent part of life and liberty (arguably the shakiest part)
2) A State passing a law prohibiting marriage by one specific group of people is taking away their rights of life and liberty
3) Therefore, said law is found to violate the Fourteenth Amendment which grants life, liberty, and equal protection under the law to all United States citizens, and is thus unconstitutional.