Yep! I don't feel its so much a grey area so much as the work around makes it confusing... technically you have to be IN a country for it to be legally binding. Easiest to get married in and reference a U.S. wedding if you live here, but you can absolutely be married IN another country and have it be valid as long as our government recognizes their issued certificates.
Super common with destination weddings...! At least of the people I know, most will go to the courthouse before they leave and do all the "legal wedding" bits, then go have the "ceremonial wedding" where they choose. I do wonder sometimes which day they use for their anniversary... I'd be tempted to say both! More cake that way.