A high school dance becomes a pivotal moment for Cameron Post (Chloe Grace Moretz), but it’s all the people around her in the gymnasium that “The Miseducation of Cameron Post” writer/director Desiree Akhavan takes an interest in, scoping out the room to find all the awkward interactions between others. No one’s entirely comfortable, whether it’s the adult teachers in the corners, quietly biding their time as chaperones by attempting to read amidst the loud music, or the students on the dance floor, who seem to flail their arms to prove how adult they are, lacking the enthusiasm they should have as kids. Yet in the center of all this, Akhavan finds Cameron dancing with Coley (Quinn Shepherd), a friend who’s become a lover as the school year has worn on, completely uninhibited and comfortable in each other’s company, your eye gravitating to them not because it’s necessarily guided there, but because of how much they stand out without the spotlight on them. The night is a memorable one for Cameron, but sadly not for that reason as she and Coley are discovered shortly after in a car in flagrante, discovered by the boy who asked her to the dance in the first place, and notably, with the way the door opens, Cameron falls out upside down, as if to reflect just how topsy-turvy things are about to become.

An adaptation of Emily M. Danforth’s novel of the same name, the ’90s “The Miseducation of Cameron Post” follows its titular character to a Christian deprogramming camp where her cassette copy of The Breeders’ “Last Splash” may be confiscated upon arrival, but the film is complete rock ‘n’ roll, an electric drama that manages to be understated in tackling such difficult subject matter but exceptionally powerful in showing how those believed to be going against God are forced to go against nature with boundless sensitivity and grace. Akhavan, with co-writer Cecilia Frugiuele, doesn’t abandon the distinctive comic voice she established in her debut “Appropriate Behavior,” filling the God’s Promise camp with self-aware teens, many of whom have figured out how to work the counselors and the system until they can get out and Cameron, who is denied being called “Cam” since shortening it would “only exacerbate gender confusion,” gravitates towards Jane (Sasha Lane) and Adam (Forrest Goodluck), the rebels in the group who sneak out on hikes and wear their hair long.

The kids run through the motions of “Blessercize” exercise routines and completing psychological profiles called “Icebergs,” listing all the conceivable issues in their life that might’ve led them astray to homosexuality, but meanwhile, they aren’t fully formed in their beliefs yet, some more susceptible to God’s Promise more than others while some don’t know enough about themselves to even answer. Akhavan wisely resists mocking the absurdity of the process or those administering it, either Lydia Marsh, the pious, imperious director of the camp (played with brilliantly chilly resolve by Jennifer Ehle) or Rick (a heartbreaking John Gallagher Jr.), a kindhearted gay convert who can attest to the program’s efficacy, but instead finds humor in watching the gathered disciples come to terms with all its inherent contradictions, working their brains into knots trying to either understand or justify God’s Promise’s logic.

There’s likely no better cinematographer to capture this than Ashley Connor, whose gift for taking the temperature of a room through catching glimpses of those living inside of it has no peer, and the collaboration between her, editor Sara Shaw and Akhavan is constantly surprising in its nifty yet subtle scene transitions that create a visual language for how Cameron’s dreams and memories are being rewired and warped, also taking into account how conversations that may seem natural on the surface are actually a product of “therapy.” Group scenes involving all the teens at God’s Promise are well-written enough to expose how their individual perspectives are used against one another, ignoring what common ground they actually have as resentment builds about how far along they are in the process, but in expressing Cameron’s experience so vividly formally (as well as an effervescent turn from Moretz), the film speaks with a clarity about where she is at all times, even when she doesn’t exactly know herself.

It doesn’t hurt that Akhavan has assembled a remarkable cast, one that given Gallagher’s presence reminds of another ensemble drama he starred in as a counselor – “Short Term 12” with a group that included Brie Larson, Lakeith Stanfield, Rami Malek and Kaitlyn Dever in their breakout roles. Whether or not “The Miseducation of Cameron Post” offers the same career boost to is young stars, the live-wire energy of the film come in part from the sparks thrown off by Goodluck and Lane as Cameron’s closest confidants at the camp, as well as Emily Skeggs and Melanie Ehrlich who challenge her, struggling with their own demons. Owen Campbell, so good of late in films such as “Super Dark Times” and “As You Are,” is also a standout as Mark, the most outwardly flamboyant person at the camp whose arc ends up supplying “The Miseducation of Cameron Post” with much of its narrative shape. But Akhavan’s blazingly intelligent film acknowledges that there is no universal shape to this experience, yet somehow finds something everyone can relate to within it. What Akhavan captures here is usually ineffable and fittingly, there are no words strong enough to describe what a special film this is.

“The Miseducation of Cameron Post” will show at Sundance on January 28th on 3:30 p.m. at the Eccles and 5 p.m. at Park Avenue and January 29th at 9 p.m. at the Eccles.