Caste is not a protected class in US employment law. Arguably there might be a basis for a suit if you could show that it reasonably projects onto an existing protected class, but it's not clear to me that you could.
Nonetheless, my hunch is that legal or not legal, this kind of discrimination would be extremely unpalatable to most Americans across the political spectrum.
https://harvardlawreview.org/2021/06/title-vii-and-caste-dis...