Combining Will Smith — Mr. July, the Biggest Movie Star in the World — with the highly lucrative superhero genre is a no-brainer. The only question about “Hancock” is what took them so long?

Hancock is no ordinary superhero, though, and the movie is unusual, to say the least. It starts as a comedy, becomes an action vehicle, then winds up as a relationship drama. It doesn’t execute these tonal shifts without some problems — director Peter Berg maintains his usual intense, shaky-camera style even in light-hearted scenes with jaunty background music — but the movie is consistently enjoyable nonetheless.

Audiences are already abundantly familiar with superheroes and their origin stories, and we’ve even seen a few instances (as in “The Incredibles”) of people with super powers having to grapple with everyday nuisances like lawsuits and liability. So “Hancock” skips a lot of the formalities and starts with what would normally be Act II, where the hero has already had his moment in the sun and is now suffering setbacks.

John Hancock (Smith) has your basic super powers — he can fly, he’s really strong, bullets bounce off him — but he’s let himself go. He’s drunk and reckless. When he saves people from villains or accidents, it’s generally accompanied by millions of dollars in property damage. He’s grown apathetic. In short, he’s an a-hole (that particular epithet, without the censoring, is leveled against him regularly), and the people of Los Angeles have turned against him.

But one day he saves an idealistic public relations man from an oncoming train. The guy is named Ray Embrey (Jason Bateman), and he sees an opportunity to make the world a better place (Ray is big on that) by tapping into Hancock’s potential. All the man needs is an image makeover, a few public apologies, and better interpersonal skills and he’ll be hailed as a superman again. Hancock gets past his initial reluctance, realizing he’s lonely, angry, and needs help, and he and Ray team up. Ray’s wife, Mary (Charlize Theron), doesn’t want the destructive oaf hanging around the house, but their little boy (Jae Head) loves the idea. What kid doesn’t like a superhero, no matter how ill-behaved he is?

So for a while the film is about the rehabilitation of Hancock, and that’s fun. Jason Bateman deploys his fussy dry wit as a foil for Will Smith’s grumpy charm, and the two — aided by a sharp script from Vy Vincent Ngo and “X-Files” veteran Vince Gilligan — make a fine comic pair.

You could easily make a film about a washed-up superhero who finds redemption, end with him regaining favor with the public, and call it a day. But the two-movies-in-one “Hancock” takes it further, with a great twist halfway through that sends the story in new, unexpected directions.

I admire Berg and Co. for making a superhero movie that’s different from the norm. Whether each specific deviation from the formula works or not is almost beside the point, as is the fact that the story, for all its twists and turns, is ultimately rather thin. What I like is that most of the film is zippy, funny, and fascinatingly strange — all qualities that are often lacking in some of the more bloated action blockbusters. “Hancock” ain’t exactly non-bloated — its budget was around $150 million — but it manages to stay light on its feet anyway.

B (1 hr., 32 min.; PG-13, a lot of profanity, one F-bomb, lots of destruction and violence but nothing very graphic.)