The Enlightenment and Racism were bedfellows. That doesn't make sense to me. The French and American Revolutions birthed both Nationalism and Democracy, but at the same time set the scene for profound Apartheid that wasn't as much of a thing before then. Yes, class has deep roots in most cultures as a way of organising societies (know your place), but as Empires spread, they typically married power to power with scant regard for race. As sovereignty shifted from 'the divine right of kings' to the people... you had to define the people. We think in stories. Stories categorise. Using characteristics such as ethnic origins, language, religion, customs and history became a way to tell a new story that empowered 'the people'. That story of empowerment also had unintended consequence.
Tired of being controlled