If I happened to be teaching a class in screenwriting, I'd be overjoyed to have Crazy, Stupid, Love. as a case study: it's the best and most frustrating kind of good-but-not-great movie, in which the specific, singular script flaw that holds it back is absurdly obvious and easy to fix, but so profound in its effect that you absolutely cannot ignore it away like you can with the major problems in certain Hitchcock or John Ford films, for example. Namely, its title has distracting punctuation. No, actually, the flaw I have in mind occurs near the very end of the movie, so I shall at this point ask that we set it to the side temporarily.

First up, another one of the reasons I'd be overjoyed to teach Crazy, Stupid, Love.: it has one of the most casually mind-blowing openings of any fluffy mainstream comedy in ages. We see feet. Lots of random feet in a restaurant, and then a pair of feet wearing scuffed New Balance sneakers, underneath a table opposite feet in nice but not, like, affluent and super-dressy heels. These two sets of feet belong to Cal (Steve Carell) and Emily (Julianne Moore), a married couple who have just finished eating, and are trying to decide on desert. Cal is moaning about being full and wishing he hadn't gorged on bread, Emily is staring fixedly through the menu at nothing in particular. He suggests that they both just name the thing they want at the same instant. "I want a divorce" says Emily, a half step ahead of Cal saying "Crème brûlée". They look at each other for a long, hideously uncomfortable beat, and then the title appears between them; "Love." sidles a bit to the right, towards Emily.

It's breezy, it's visually inventive, it tells us a whole shitload about the characters using almost no time at all, and it's structurally ingenious to use the film's title as the punctuation to a gag and a visual-narrative element at one and the same time. It made me feel from the first instant that co-directors Glenn Ficarra & John Requa (of I Love You Phillip Morris and some screenplays good and bad) and writer Dan Fogelman (of Tangled, Bolt, and Cars, all clear analogues to this project) were going to be guiding me through one hell of a confident, inventive, honest tale of people fumbling through the modern world.

Which, it turns out, is only sort of true. The opening scene ends up being the brashest, most inventive part of the whole movie (save for one other scene, which I will get to): not that Crazy, Stupid, Love. - I should just call it CSL, but I'm getting addicted to the comma-comma-period thing - isn't in the main a good or even very good story about love and fucking in the modern world, for it is, but it ends up being an awfully typical one, buoyed primarily by a ridiculously solid cast and some really playful editing by Lee Haxall, cross-cutting between the two parallel stories (which I have not mentioned, but they are there) and collapsing scenes into one another with a stylish flair that is just barely different enough from the obvious and expected way of doing things that it keeps the movie seeming fresh and sprightly even if you only subliminally notice it's happening.

So, we have Cal and Emily; he, massively distraught and shutting down so quickly it's amazing he hasn't fallen into a coma by the time they get home, spontaneously announces the news to their 17-year-old babysitter Jessica (Annaleigh Tipton) and 13-year-old son Robbie (Jonah Bobo); this comes as good news to Jessica, who has a thing for Cal, and terrible news to Robbie, both because who wants their parents to divorce, and more importantly, because it throws him into a terrible internal conflict regarding his previously-cherished Romantic ideas about love, and in his case, a raging crush on Jessica.

While that messy little plot snarls along, we have another: law student Hannah (Emma Stone) is at a bar where she gets hit on by the immaculately smooth, toxically chauvinistic Jacob (Ryan Gosling). She shuts him down, and goes about her life with a miserably uninteresting long-term boyfriend (Josh Groban), somewhat aware that she ought to be happier; he goes right back to plucking women up with idle abandon, until he meets the sad-sack Cal trying his damnedest to get drunk out of his mind on vodka and cranberry juice. The younger man decides to take the middle-aged loser as a project: to reshape and mold Cal into a lothario in his own image.

The story that spins out of all this is very pleasurable if not entirely challenging; though it's a real treat to see a genre as devoid of subtlety as the romantic comedy played so quietly. Armed with one of the best slates of actors of any film in 2011 - Marisa Tomei and Kevin Bacon, prominently featured in the ads, both get what amount to cameos, but play their few scenes extremely well (Tomei especially), while the wonderful and entirely under-famous character actor John Carroll Lynch has one of the best moments in the entire film, when he has to "break up" with Cal on account of his wife deciding that they were going to side with Emily - CSL does a whole lot of showing and not very much telling, especially around Jacob; Gosling being, after all, one of the best actors now living, it's not surprising at all that he suggests his character's fear of being alone, his need for a stable father figure, and so on.

There are a good number of imperfections in all of this: the filmmakers telegraph their intention too clearly that the ultimate theme will be that heteronormative pair-bonding is really the only way you can be happy, and they punt on the hard questions the film asks in the middle about whether fighting for the one you love actually matters if that person doesn't love you back. It's also irritating, given that it's 2011 and we shouldn't still be having issues with representations of women in films, and given that Stone and Moore are two of our best comic actresses (while Tipton should absolutely have a swell career if this performance is any indication) and they should only ever have fantastic parts, that the movie ends up playing so much like the Cal & Jacob Show; though Emily and Hannah both get their moments in the sun, they never emerge much as characters. Admittedly, seeing the nascent buddy relationship played using the customary tropes of a romantic comedy is fascinating in its own right, and Carell and Gosling have phenomenal chemistry. So even if their female counterparts get short shrift, at least it's in the service of a finely etched pair of character studies.

All this is sweet and moving, nuanced without being terribly profound, more truthful than Hollywood usually cares to be but not so honest it hurts, and the film is well on its way to being a real charmer altogether, when it hits a strange wall. I don't want to spoil it: I think on the one hand that the film is well worth seeing, and its well worth seeing without knowing where things are going (which, in retrospect, is painfully obvious, and yet is hidden in plain sight so well that it still completely blind-sided me). So at the risk of being unnecessarily vague: there comes a point where the movie abruptly turns from a tender, amusing-but-not-aggressively-funny character-driven dramedy, and runs screaming into farce. Proper, honest-to-God, flailing about and crazy revelations one on top of the other, throw the characters into a blender, farce. And it is magnificent. Sitting there, watching it, I thought to myself with perfect clarity, that I could not remember the last time that I saw a film navigate such a sharp tonal shift so quickly, and did it with such unabashed success. It was a structural coup that would have seemed daring in the edgiest indie, but buried inside a mainstream Hollywood picture, it felt like the second coming of Preston Sturges. When everything wrapped up and stopped on that absurdist note, as was clearly about to happen, I was going to come home and write all about how this was the ballsiest move I'd seen in a comedy in forever. And then the movie kept going on for 20 minutes.

Not 20 bad minutes; 20 minutes mostly in keeping with the first 90, though it got a little bit obvious and preachy, and by "a little bit", I mean, "it turned into a fucking sermon about never giving up on your soulmate". And then there came one of those awful scenes where a person very awkwardly forces themselves into a public forum to explain the moral to everybody, and even though this would in real life be met with screams of derision from the mass of people wondering who this asshole was that was usurping [event], and how do we get this person arrested, in the film it just results in laughter and applause.

So, if you did nothing but slice off 20 pages at the end, and wrap up all the conflicts as quickly as the farcical storm had whipped up - and it would be possible to have every single relationship in the film end in exactly the same place with about an afternoon's worth of re-writes - Crazy, Stupid, Love. would be amazing. Instead, it wobbles on and becomes obvious and even, somewhat, begins doubling-back on what it seemed to be saying back when it was all about Cal and Jacob bonding. "Be free", the film said then, "live well". Now it stops short, and counters "Never mind, it is hellishly important that you grab onto whatever is comforting and familiar and never try to grow out of it, or you will die alone and miserable". It's only 20 minutes; thanks to the acting and the generally snappy dialogue, it's not a tenth as painful as I've made it sound just now. It surely doesn't keep Crazy, Stupid, Love. from being a wonderfully enjoyable, lighthearted movie. Though it does single-handedly keep it from being anything deeper.