The very things that were supposed to destroy religion — democracy and markets, technology and reason — are combining to make it stronger