Two things in Kerala show religion working at opposite ends of the social scale.
Theyyam is a ritual performance of the northern districts in which a man of a low-caste community, prepared over days with fasting, elaborate costume and face painting, becomes the deity rather than representing it. In that state he is approached, consulted and given offerings by people of every caste, including those who would not otherwise share a space with him, and he pronounces on their affairs. The reversal is the point, and it is temporary: the performer returns to his ordinary position afterwards. The forms number in the hundreds, each with its own shrine, story and costume, and many commemorate a person killed unjustly.
At the other end sits the Sabarimala case. The shrine of Ayyappa on a forest hill had excluded women of menstruating age, a practice the temple defended as intrinsic to the deity's celibate character. In 2018 the Supreme Court of India held by a majority that the exclusion violated constitutional guarantees of equality and of religious freedom for the women concerned. The judgment was met with mass protest in the state, very few women were able to enter, and a larger bench was convened to reconsider the questions it raised.
Both cases turn on the same question in different forms: who is entitled to stand in front of a god.