Marriage is a religious union between a man and a woman.
Because that is a religious institution, any laws regarding it are a violation of the 1st Amendment.
The government can recognize a civil union between anyone or any group they choose. That's what obtaining what is traditionally called a "marriage" certificate is all about. Truthfully, marriage certificates need to be renamed "Civil Union Certificates." And the word, "marriage" needs to be changed on all legal documents to "civil union".