How did religion influence the Magna Carta?

How did the Magna Carta limit the power of King John?

How did the Magna Carta lay the foundation for democracy?