The first thing you might notice about the new HBO series, Perry Mason, is that the titular character is not a lawyer, but a lowdown private dick. This could be jarring to those of us who know our television history, seeing that the original CBS series (which aired from 1957 to 1966) was about a razor sharp, courtroom attorney. But the original series was so mired in its formula, you hardly ever saw Mason outside of his offices or courtroom. Starring Raymond Burr, Mason used his inscrutable wit and charm to cross-examine witnesses on the stand until they melted into a puddle of blubbery tears and confessions. Before Law and Order or movies like A Few Good Men, Perry Mason set the bar for the procedural courtroom drama. Mason was the original bad-ass lawyer.

So, who is this demoralized, unshaven, alcoholic gumshoe with the small paunch, Stetson hat and dirty tie in the new eight-part reboot? Well, it’s Perry Mason alright (portrayed with a naturalistic aplomb by Welsh actor Matthew Rhys), but it’s Perry Mason before he cleaned up and gleaned all those fancy judiciary skills. Taking its cues from the original Erle Stanley Gardner novels from the 1930s instead of the TV show, this new Perry Mason drops us into Depression-era Los Angeles with a patience and attention to detail most shows simply bypass. Sure, there are moments that pop and sizzle, but Perry also has the confidence to pull back from story and let the characters percolate in their environment. Although the narrative struggles to encapsulate a full eight hours, Perry Mason is more than just a stale rehash; it’s classic noir sprinkled with revisionist history, pulpy violence and gritty characters.

Like most classic noir stories, Perry Mason starts with the victimization of your everyday citizen, which eventually leads to corruption in the most prestigious stations. Perry Mason opens in downtown Los Angeles on New Year’s Eve as the city rings in 1932. As everyone celebrates outside, a frantic couple is holed up in an empty apartment, pleading on the phone with their baby’s kidnappers while clutching a bag filled with cash. After making the exchange on Angel’s Flight, they find their baby wrapped in a blanket, dead, with his eyes stitched open. Yep, this miniseries starts with a mutilated baby. Right away, you know this isn’t your parents’ Perry Mason. After the baby’s father becomes a suspect, his wealthy church deacon enlists the help of defense attorney, E.B. Jonathan (John Lithgow), who, with his tough-as-nails assistant Della (Juliet Rylance), hire their favorite, alcoholic private eye to find out who the real kidnappers are.

Mason and his curmudgeonly assistant Pete Strickland (Shea Wigham) have their work cut out for them as they go head-to-head with L.A.’s most powerful forces, including smarmy District Attorney Maynard Barnes (Stephen Root), two ruthless LAPD detectives (Andrew Howard, Eric Lange) and even a powerful, albeit creepy religious sect headed by Sister Alice (Tatiana Maslany) and her mother Birdy (Lili Taylor). Meanwhile, a Black police officer, Paul Drake (Chris Chalk) discovers a crime scene related to the kidnapping, and before you know it, these dwindling yarns begin to intertwine.

Perry Mason is not without a couple missteps. Besides some of war flashbacks, which feel slightly melodramatic and out of place in a classic noir tale, the show suffers from a few overindulgent sequences regarding Sister Alice and her Radiant Assembly of God. Although her character is based on real life Protestant evangelist Aimee Semple McPherson (and actress Tatiana Malsany’s portrayal is electric), some of these passages are a little protracted and overwrought.

Still, the casting is spot on and everyone brings their A-game, especially the scruffy and rumpled Rhys who elevates Perry Mason to a new level. With his weary, hangdog countenance and depleted stare, the actor looks as if the world has dealt him one too many shitty hands and he can’t take another. Rhys’ Mason is not your traditional detective. Sure, he’s recalcitrant, boozy and determined like he’s been in past portrayals, but he’s also vulnerable, inconsistent and self-loathing. Living on his family’s dairy farm next to a second-hand runway, Mason drinks with abandon, reeling from his time as a soldier in WWI, a nasty divorce and ongoing estrangement from his son.

In one scene, after drunkenly hanging up on his ex-wife, he takes a baseball bat to his son’s toy firetruck. This scene says it all. As a struggling private detective, he makes pennies on the dollar, taking pictures of cheating spouses or mischievous actors under contract from the studios. His only respite is found in the arms of his Latin lover, Lupe (Veronica Falcon), who calls him, “Papi,” with an almost maternal affection. These scenes are played with a raw poignancy and humor as we become embroiled in his downward spiral.

The other bright spot in Perry Mason is its impressive costume and production design. Perry Mason forgoes the smooth veneer we’ve seen in too many period pieces, and favors a gritty, almost gothic look. From the stifling red and brown murkiness of the offices, bars and diners to the sun-dappled gray streets teeming with desperate souls, Perry Mason’s menacing atmosphere just enhances its narrative tone. This is not a criticism; it’s high praise. Not since Boardwalk Empire has a show’s production design and story fed off each other with such lyrical gusto.

And for those who think that the Perry Mason incarnation is mere nostalgic fluff, well, let’s just say writers and showrunners Ron Fitzgerald and Rolin Jones explore subjects like police corruption, racism and religious hypocrisy set to a historical backdrop where there was a clear delineation between rich and poor. This isn’t escapism, it’s a hard-boiled, revisionist study of human frailty and corruption in the city of broken dreams. Grab your Fedora, slip on your suspenders and get ready to jump on the trolly because Perry Mason is a ride back in time worth taking.