An insane dentist, a zombie rock band and gay neo-Nazis star in a movie out in the US on Friday that confronts some of America’s greatest challenges. The movie is Inherent Vice, it’s set in Los Angeles, 1970, and it’s about the United States today.

As anyone who’s seen the trailer knows, director Paul Thomas Anderson has adapted that movie from a book by Thomas Pynchon. What there is of a plot follows a private detective, Doc Sportello, as he cruises through LA trying to find his ex-girlfriend’s missing billionaire boyfriend, investigate a nefarious syndicate called the Golden Fang, and save the life of a rock saxophonist mixed up with corrupt LAPD officers and an apparent cult. He does all of this completely stoned.

A story this weird set 40 years ago seems unlikely to have anything to say about the US circa 2014, and admittedly nothing in the paragraph above resembles reality – much less our world of iPhones and internet.

But Inherent Vice tells stories about race and minorities, capitalism and inequality, and America at large, a bit like how John Steinbeck’s Grapes of Wrath has plenty to say about the modern US from the vantage point of the 1930s. Steinbeck said everything loudly and simply; Pynchon says most of it indirectly – through pop culture allusions in Vineland, latitude lines and a pot-smoking George Washington in Mason & Dixon, and actual rocket science in Gravity’s Rainbow.

With this in mind, the background and bit players of Inherent Vice take on a little more depth than their weird names suggest. Recent memories of the 1965 Watts race riots keep tensions high between conservative whites and black characters, and the story occasionally looks about ready to veer into the territory of militant black power groups and gangs of well-armed white men hired by the LAPD to keep those groups down. Aside from Doc’s nemesis, the rogue detective Bigfoot Bjornsen, the police are untouchable and the justice system consistently rigged – themes taken up by protesters all over the US this year in the aftermath of police killings.

The novel also illustrates the insidious consequences of “development”. One black character’s neighbourhood is bowdlerised for cookie-cutter homes and a shopping mall, and the book’s villains are real estate moguls, who force minorities out and fight to boost their property values – actions not wholly dissimilar from what’s called gentrification today. The billionaires also prove insatiable, forever competing to carve up and cannabalise land into ever smaller parcels, at residents’ expense – an American tradition inaugurated by the first settlers, who claimed to own land already lived in.

When one of the novel’s moguls – the new boyfriend of Doc’s ex, Shasta – tries to change his ways and do good, the sinister powers that be drag him back to a career of gaudy mini-mansions and gleaming neon casinos. Pynchon marks 1970 LA as the moment America let capitalism fly off the leash toward its logical extreme: exploitation and entrapment. Inherent Vice was published in 2009, a year after the economy collapsed due to rampant misconduct, greed and the exploitation of mortgages at homeowners’ expense.

Hovering in the background of the book is “the war in Indochina” and the traumatized veterans who returned to a country that largely let them down; in 2014, as it was in 2009 and 1970, the US is mired in foreign wars and failing veterans.

But Inherent Vice has no simple split of likeable weirdos and the vicious or the powerful. For each of Doc’s eccentric friends with minority traits or lifestyles – potheads, ex-junkies, lesbian masseuses, a TV-obsessed maritime lawyer and an interracial couple – there’s a vicious counterpoint: heroin dealers, mercenary neo-Nazis, cultists and the violently unhinged. For every story that ends well, another reaches a horrible conclusion, and no one ends up where they thought they would. Even Doc, proud of his counterculture credentials, knows Shasta has it right for noticing he’s changed: he’s a cop who never wanted to be a cop.

How the hope of the 1960s blinkered out is right there in the title: inherent vice is a legal term that means everything contains the seeds of its own downfall. Followed too far, capitalism leads to corruption and broken communities, drugs lead to addiction and shattered lives, even the ideals of flower power take their toll over time. Businesses co-opt seemingly unassailable culture – in the book a rock band becomes full of zombies after it “evolved into a brand name”, and we need look no further than yoga or veganism to see ideas commoditised out of the 60s. Even mysticism ends up perverted and turned into horror in the Manson family mansion.

And as Bigfoot warns Doc in the novel, most hippies don’t know the difference between being childlike and childish and why one might be better than the other. This should all sound familiar: fast-food chains shill “organic food”, fashion companies tout “green” and “artisanal” goods, and yet another generation of young people has allegedly refused to grow up.

By the end, Doc describes California as an ark of outcasts – a shadow of the refuge the US declared itself for the huddled masses. But it’s not all bleak: even if America lost that ideal somewhere along the way, Doc and a handful of characters preserve it a version of it. Inherent Vice turns out a redemption story – Doc and his makeshift family of losers fight to give an ex-junkie a second chance with his own family, and it’s with family that the motley Americans find hope again. (Pynchon isn’t always subtle: one of the characters is literally named Hope.)

Eccentric families are also what Paul Thomas Anderson does best (the porn community in Boogie Nights, the father and adopted son of There Will Be Blood, the cult in The Master), and all his movies explore very American themes (business versus art in Boogie Nights, ambition in There Will Be Blood, self-reinvention in The Master). Anderson has reportedly reworked the book’s ending dramatically for the film, but based on his past work of sprawling, funny, sad movies, it seems likely that the two will have a similar gist. The book ends on a highway in fog, Americans heading into the future led only by the taillights on their cars, one after another, in one anonymous rolling family.