It probably says something about how far we’ve wandered into Superhero Of The Week territory that Shane Black’s The Nice Guys is being positioned, by critics and analysts, as risky summer counter-programming. We’re not exactly in Béla Tarr territory here – this is a studio buddy action/comedy, with movie stars and shoot-outs and explosions and naked girls, and from a writer/director whose last credit was freaking Iron Man 3. And yet it’s most decidedly an underdog, sliding into theaters between Captain America: Civil War and X-Men: Apocalypse, its busted-out protagonists a long, long way from spandex-land. This works to its advantage; The Nice Guys is a goof and a treat, but it’s also a breath of fresh air.

Black and co-writer Anthony Bagarozzi engineer a fusion of the ‘70s private eye picture (there are echoes of The Long Goodbye, Hickey & Boggs, and The Big Fix) and the ‘80s buddy movie (which Lethal Weapon screenwriter Black knows a little something about). His protagonists are Holland March (Ryan Gosling), a fumble-fuck private investigator, and Jackson Healy (Russell Crowe), a freelance ballbreaker. They initially meet on opposite sides of Healy’s fist; he’s been hired by a young beauty named Amelia (Margaret Qualley) to get rid of some men who are looking for her, one of whom is March, working a case. But when Healy’s visited, and nearly killed, by the other guys who are seeking her out (the non-nice guys, it seems), he realizes he and March are on a similar trek, and would be wise to pool their resources.

As you’d expect from a ‘70s private eye movie – any private eye movie from any era, really – the case of the missing girl spins out into a far more labyrinthine scheme involving dead pornographers, briefcases full of money, ruthless killers, the Department of Justice, and the Big Three automakers. It’s a good little mystery, full of well-placed clues and clever turns, and Black and Bagarozzi have seen enough of these movies to know when to throw in a surprise flip, how to anticipate our expectations and turn them back on us.

But as per usual with Mr. Black, this is a movie whose pleasures lie less in the complex plotting or execution of action beats than in the weird little touches he throws in (and how much pleasure he clearly takes in putting them there). His specialty is, and has always been, the rat-tat-tat back-and-forths between his heroes, who often seem as comfortable with verbal as physical sparring; here, the more absurd the interactions, the better, so the biggest laughs include March’s stern rebuke of ventriloquism (“Fuck those guys, you can always see their mouths moving”) and a bit of confusion between the city of Munich and the word “eunuch” (complete with a shout-out to Hitler’s single testicle). He also enjoys twisting up conventional relationships; aside from the buddy byplay between March and Healy, there’s also a warm, funny, occasionally irresponsible dynamic between March and his daughter Holly (Angourie Rice), which somewhat mirrors the rapport between Tony Stark and little Harley Keener in IM3. (Ty Simkins, the actor who played Harley, pops up here in a small role.)

Black’s had something of a peculiar run; his first big spec script was Lethal Weapon, and he followed that up with a series of staggering sales for similarly styled action/comedies (The Last Boy Scout, Last Action Hero, The Long Kiss Goodnight). Then he disappeared for a few years, reappearing in 2005 with his directorial debut, Kiss Kiss Bang Bang, a wickedly funny and deliciously self-aware mixture of contemporary Hollywood satire and classic private eye flick. It was also wildly, sadly underseen – Warner Brothers clearly had no idea how to market it, attempting a kind of platform release that they just couldn’t pull of (similar, in fact, to the recent failure of Midnight Special) – but Robert Downey Jr.’s cocky, witty, winning leading turn seemed to helped him land the role of Tony Stark in the first Iron Man, and Downey presumably returned the favor by getting Black the IM3 gig. And now, turnabout being fair play, Black is back at Warner Brothers, kindly giving them the chance to get this one right.

As is so often the case when revisiting old turf, The Nice Guys doesn’t quite match Kiss Kiss Bang Bang – there are a few too many dead spots and first draft jokes, and the dueling hard-boiled narrations from our protagonist early on hint at a one-upping of KKBB’s much-loved narration/commentary that doesn’t pan out. And there are a couple of bothersome air pockets in the plotting as well, particularly a moment of deception that it’s tough to believe anyone, even these two, wouldn’t see coming.

But this is niggling; The Nice Guys is fast, and funny, and most of all, it loves movies. From the opening establishing shot, which creeps out from behind the decaying and disrepaired Hollywood sign to the tiny background details (the 1977 setting is reconfirmed by billboards for the blockbusters of the day, like Smokey and the Bandit and Airport ’77) to the in-jokes (the porn producer’s latest is an adult version of Pinocchio, using the “It’s not my nose that grows” tagline of an actual porn film from earlier in the decade) to the tributes (a drunken Gosling discovers a dead body, and his wheezing, yelping take is full-on Lou Costello). And the story’s MacGuffin ends up being a can of film, which the key players swipe, chase, and battle over through the climax, resulting in a resplendent moment of a seemingly lost cause holding the can aloft. Movies can save your life, don’tcha know, but the key takeaway from The Nice Guys isn’t as dramatic as all that; it’s that they can simply be a freewheeling good time. Savor it. It’s gonna be a long summer.

The Nice Guys is out Friday.