The setting is a pharmaceutical trial of a psychiatric medication. The trial room is like the inside of a spaceship from the 1970s. From the other side of a purple-lit window, a beautiful young scientist in aviator eyeglasses intones, “Subjects, take your pills.” Owen Milgrim (Jonah Hill), a kindly schizophrenic, and Annie Landsberg (Emma Stone), a smart slacker traumatized by her sister’s death, gulp them down.

This scene comes in the thick of Maniac, a new ten-part Netflix series from director Cary Joji Fukunaga (Sin Nombre, True Detective). The season takes a good four episodes to get going, but from there it opens up like a flower. Set in an alternate but contemporary universe where analog technology still rules the day, Maniac is much more like a long, episodic movie than a television show. In its hallucinatory stylings it recalls The Science of Sleep (2006) or Eternal Sunshine of the Spotless Mind (2004). Like those movies, Maniac takes place largely inside the dreamed worlds of its protagonists, controlled by the drugs they take to see if a damaged mind can be healed. The result is a TV show which perhaps does not treat mental illness very scientifically, but achieves real catharsis by pushing its leads down a road of psychological transformation.

Maniac plays heavily on its analog premise. A person short on cash, for example, can raise money by being advertised to in real life: An “Ad Buddy” shows up to read you a script on what product to buy. But the “real” world is mostly a place to establish Owen and Annie’s motivations to become lab rats: Owen’s in it for the money, while Annie has blackmailed her way in because she’s already addicted to one of the trial’s drugs. Owen’s family is a horrible identikit set of WASPs, while Annie is unemployed and lonely, unable to put together her life after the terrible car accident that killed her sister and that she blames on herself.

Michele K. Short / Netflix

In contrast, the science lab where they enter the drug trial is a gorgeous funland of actual maniacs. Justin Theroux plays Dr. James Mantleray, a deranged researcher with a complicated relationship with his mom, a celebrity therapist played by Sally Field. She helps people across America talk through their problems; he hates his mother and wants to fix the world’s problems with pills. His partner in science and troubled romance is the aforementioned beauty in aviators, Dr. Azumi Fujita, played by Sonoya Mizuno (Ex Machina). These two form a sort of mirror relationship to Owen and Annie, but they are without doubt the truly “mad” ones of the show.

The show’s narrative divides into the three stages of the drug trial, which consists of drugs named A, B, and C. In sequence, each pill forces the subjects into unconscious reveries, which we see played out as action. Drug A makes the subjects rehearse their trauma. Drug B takes them through a series of “reflections” that explore their emotional architecture through fantastical plots. Drug C prompts “confrontation,” which supposedly helps the subjects to break through their psychological strictures. Through it all, the subjects are both guided and analyzed by a very large mainframe computer nicknamed “Gertie.” The problem with Gertie is that she has been programmed to feel empathy—and therefore, like the humans she is monitoring, she runs into her own emotional crisis, and mismanages the trial.

The other big problem is that Owen and Annie keep being drawn into each other’s “reveries.” In one plot they show up as a couple named Bruce and Linda, on a quest to return a lemur named Wendy to its rightful owner. Then they are glamorous 1940s aristocrats, hunting a lost chapter of Don Quixote at a séance. Sometimes they lose each other. Owen has to endure his family becoming a shockingly violent mob gang without Annie as his companion. Annie embarks alone on a Lord of the Rings–style journey to transport her sister to a healing lake. In the strangest of all the reveries, Owen becomes a Swedish man named Snorri who accidentally kills an alien.

Michele K. Short / Netflix

The reveries are entertaining vignettes, like little movies within a TV show. But they also offer an interesting meditation on narrative itself. Owen’s chief psychiatric problem is that he sees patterns where they don’t exist. Television does the same thing: The world is really just chaos, not a self-contained story. But because the reveries take place inside the minds of Owen and Annie, they possess a narrative neatness that is psychologically realistic, rather than artistically so. They’re dreams, not plots.

The show hinges entirely on Owen and Annie’s relationship, which is a friendship, not a romance. Hill and Stone have worked together before, in 2007’s Superbad, but the pair have truly unusual chemistry here. By the end of the show, their friendship has formed a third entity, a psychological bond with a potential healing power. Interpersonal communication is not a cure-all fix in Maniac, but real empathy—poor Gertie’s errant programming notwithstanding—is the only thing that can hoist Annie and Owen out of their self-destructive trajectories.

Maniac is the rare series that plays with reality without alienating the viewer emotionally. It’s not really about madness at all, and that just about excuses its fast and loose treatment of schizophrenia and grief—which are, after all, just boring old parts of our world. Instead it’s about stories: the ones we tell ourselves about who we are, the ones that compose the industry of therapy and psychiatric treatment, and the ones that we make in partnership with the people we meet in life.