Few people make a comic book movie their first stop in a journey of theological inquiry. And that’s just fine — it’s not what comics are for.

But DC’s Shazam, now on the big screen, might be the shining exception that proves the rule.

There is a fairly standard-issue supervillain in the new Shazam movie, Dr. Thaddeus Sivana (Mark Strong). But a more ancient evil lurks throughout the film that Billy Batson/Shazam must battle. The menace, which predates comic books, comes from ancient Christian tradition: a group of fundamental vices that afflict the heart, called the seven deadly sins.

I’ll be honest: As someone who’s not too well versed in comics, I was at first a little surprised by this, and then kind of delighted. The seven deadly sins themselves aren’t delightful, obviously. But the choice to have Billy Batson/Shazam battle the oldest deadly enemies of humankind (in fact, that’s what they were called in some early editions of the comics) seemed both super goofy and oddly high-stakes, all at once.

What might be more interesting, though, is the way Shazam treats those sins. Certainly the group of vices — pride, envy, greed, anger, sloth, gluttony, and lust — have popped up in literature and popular culture before, from Dante’s Divine Comedy to David Fincher’s 1995 film Seven.

But while some storytellers can’t resist the handy grouping of sins, the stories don’t always get them right. Seven, for instance, “gets all of the sins wrong except for envy and wrath,” as Rebecca Konyndyk DeYoung told me. DeYoung is a professor of philosophy at Calvin College in Michigan and a leading expert on the seven deadly sins. Fincher’s movie — in which a mysterious serial killer seems to be enacting the seven deadly sins — gets envy and wrath “dead on,” she said, but the rest of the movie makes a typical mistake: It thinks of the sins as “behavioral, not about internal disposition but external, outward errors.”

What she’s talking about turns out to be a key distinction between the way the idea of the sins developed in ancient and medieval Christianity and how they morphed during modernity. And, strangely enough, by this measure, Shazam might just get it right.

The seven deadly sins were born in the temptations of the wilderness

So where did the list of seven “deadly” sins come from? Not the Bible, as it turns out — or at least, not explicitly. Though there are lists of sins in the Bible (like the 10 Commandments, or the list of seven “detestable” sins in the Book of Proverbs, for starters), the codified, bullet-point list of seven deadly sins came a little later.

In the third and fourth centuries, Christian monks would leave their cities and go into the wilderness to live alone. “The idea is that, just as Christ went into the wilderness to fight temptation early in his ministry, in following the way of Christ, you follow him into the desert,” DeYoung says. Being alone in the desert isn’t easy (and often fasting and intense periods of prayer were involved), but it would result in a “purgative” stage in the monk’s Christian journey.

“The idea is to achieve what [early Christian theologian] John Cassian calls ‘purity of heart,’” DeYoung says, so it’s probably not accidental that Billy Batson is deemed worthy of the powers of Shazam because of his “purity of heart” — and Sivana is rejected because he lacks it. But someone who had fled to the desert would experience sins of temptations that come from bodily desires, emotions, and thoughts. And those could only be countered by meditating upon the word of God.

During this period, the seven deadly sins were developed as part of the pastoral counsel that disciples who had fled into the desert, searching for wisdom from the monks, would seek. They would ask for wisdom in fighting a particular temptation, and the monk would reply with a story that was “part parable, part admonition about fight that particular temptation,” as DeYoung says. The focus was less on actions than on countering temptations toward those vices. Battling them was an effort to form one’s own disposition away from the sins.

“They’re meant to be ‘source’ vices, or foundational places where the devil gets a foothold,” DeYoung said. “But they’re not meant to be the worst things you can do.” In other words, the seven deadly sins aren’t about actions — they’re about attitudes.

That’s worth pausing on. Virtues and vices, traditionally, aren’t about what you do. They are about habits of the heart and mind, or even formation of the soul, that predispose you to act in certain ways and in certain contexts. If you are beholden to the deadly sin of envy, then you’ve developed a foundational way of being that predisposes you to act enviously in certain situations. But the actual act you commit may change, depending on a variety of circumstances: You may be slanderous, or try to sabotage someone, or become violent, or any number of other things.

Those actions, however, stem from a basic proclivity born from a vice you’ve developed — a kind of virtual rut or path in your heart that you’re prone to fall into. So the deadly sins are less about the things you do than about the ways you’ve developed your heart that make you do them.

Ideas about the seven deadly sins shifted during the Middle Ages and modernity

Once the list developed as part of Christian tradition, the seven deadly sins were called “capital” sins or “principal” vices. But by the medieval age, through a variety of writers and church traditions, they morphed into “deadly” sins, a codified list that shows up in monastic manuals as well as a commentary on the biblical Book of Job, written by the man who would become Pope Gregory the Great in AD 590.

By 1215, a church council mandated that clergy preach on the seven deadly sins each year, often as part of Lent, the season of penitence leading up to Easter. (Possibly coincidentally, Shazam was released during Lent.) “So there, it becomes a part of common conversation and culture,” DeYoung said.

During the Middle Ages, the emphasis was still on the sins as vices. But as the medieval ages gave way to the modern age, there was a shift: “The move after the Middle Ages is to go from virtue/vice talk altogether to more ‘commandment’ language,” as DeYoung put it. “Ethics in general [at this time] is shifting toward rule-based ethics.” In other words, sin was what you did, not the bent of your heart — and thus, the seven deadly sins were actions.

Part of this shift has to do with the dawn of Protestantism and the move away from the idea that “working” at virtue will save your soul. (The doctrine of “sola fide,” or salvation by faith alone, becomes important, thanks to Martin Luther and the reformers who followed.)

So you see a shift from thinking about the seven deadly sins as habits of the heart toward them being depicted as linked to specific actions. Gluttony is eating a lot; if you’re “thin,” then you can’t be a glutton, right? (Wrong.)

“One of the most interesting things today is that the seven deadly sins are either lightweight cultural kitsch or heavy-duty sin talk that has no sense of the actual Christian history,” DeYoung says. “So people tend to make up whatever they think the ‘sin’ has to be — like, sloth is laziness, gluttony pairs with various eating disorders, and anger is anger management.”

In other words, as DeYoung points out, vice and virtue talk has seen a recent resurgence among Christians recently, yet Christian practice today still largely depends on thinking about what you do as a way to measure your own righteousness and character (even if actions aren’t how you earn the salvation of your soul). And when the seven deadly sins come up, they’re often within that framework.

So today, our perception of the seven deadly sins is that they are “behaviorally coded,” she said. “There’s no sense that these would be internal dispositions that would manifest themselves, sometimes in contrary ways — like sloth can manifest itself both in frantic busy-ness and in a kind of escapism and flight, and in a depression imitating torpor that’s not actually depression. There’s a trivialization, an identification of an internal disposition with outward behavior. And then there’s confusions about what that behavior could be.”

That’s exactly what the murderer in Seven does to illustrate the seven deadly sins. A man is forced to eat until his stomach explodes, which symbolizes gluttony. (In a classic understanding, though, gluttony could mean any inordinate desire.) A sex worker is raped with a bladed strap-on, symbolizing lust. (But lust means much more than having lots of sex, and, in fact, this one may be the most problematic of the bunch.)

Shazam manages to actually get the seven deadly sins ... kind of right?

Surprisingly enough, Shazam seems to get it right, even if it’s mostly a lighthearted movie that’s basically Big, but with superheroes. Near the film’s climax — not to give too much away — it becomes clear that, at least in the Shazam universe, the seven deadly sins aren’t just the things you do; they’re the attitudes and dispositions that live deep inside you. In the film, the seven deadly sins possess your soul (or, at least, Sivana’s soul). And they can only be driven out — as in ancient Christian tradition — by wise counsel, a pure heart, and a community of those who love you. (Or by some fancy DC Comics magic.)

Whether you buy any of this in real life, of course, has everything to do with your religious predilections. But it’s interesting to see that someone at the dawn of the Shazam universe seems to have been well enough versed in Christian tradition to pick up on a long-running theme in Christian belief, stretching back centuries before comic books were even thought of, and actually manage to tap into its original, ancient meaning instead of the more modern twist.

And this year’s feature-film adaptation of Shazam understands something about the ancient roots of its ominous forces of evil that modern pop culture — and even some modern Christianity — might miss. Comics are, after all, a lot more about superheroes in tights.