afaik the core of Sanatana Dharma as seen in the earliest texts like the Rigveda describes varna as a functional division of society based on qualities and roles (guna-karma), not rigid birth-based hierarchies that lock people in forever.

The famous Purusha Sukta mentions the four varnas emerging from the cosmic being, but scholars point out it's more poetic/symbolic than a strict social code, and the Vedic period shows a lot more fluidity in roles than what we see later.

The jati system (the thousands of birth-based sub-groups we associate with "(indian)" today) evolved much later, getting more rigid during medieval times. Mughals and especially the British didn't "invent" it from scratch, but they massively amplified and froze it. The British colonial census starting in the 1870s classified everyone into neat (indian) boxes for administrative convenience, turning fluid social identities into fixed, hierarchical categories. They elevated texts like Manusmriti (which has harsh verses on varna) as the definitive "Hindu law" while sidelining more egalitarian interpretations, basically creating the rigid, oppressive version we recognize now to make divide-and-rule easier.

Same logic applies to practices like sati and ghunghat/purdah. Sati has ancient mentions but was rare and mostly limited to certain warrior elites until medieval times; it became more widespread partly as a response to invasions and fear of dishonor, peaking under pressure. Ghunghat/purdah intensified in northern India during Islamic rule (Delhi Sultanate and Mughals), adopted by many Hindu upper classes as a prestige marker and protection mechanism, then got romanticized as "tradition."

So the argument isn't that Hinduism had zero social divisions or gender restrictions ever, but that the extreme, dehumanizing, birth locked version of (indian), along with intensified sati and veiling, got hardened and institutionalized under foreign rule. Mughals influenced cultural practices, and the British systematized and weaponized them through colonial policies. True Vedic spirit was more about dharma through personal qualities than hereditary oppression. Blaming only outsiders oversimplifies, but ignoring their huge role in rigidifying these things is equally dishonest.

----------------------------

PS : Anyone who follows or endorses (indian) System, Ghunghat and Sati Pratha is Anti Hindu even if they claim themselves to be hindu and/or affiliate themselves with the hindu culture