The main premise of Her is one that could easily be played for laughs by people who pander to the general audience. I think The Big Bang Theory did this when one of its characters pretends to date Siri. It takes a strong talent — both behind and in front of the camera — to make it into a heartfelt love story. This premise involves a man falling in love with artificial intelligence (AI), in this specific case an operating system (OS) in the near future which acts more like a personal assistant than anything we have available to us currently.

Theodore Twombly (Joaquin Phoenix) is a lonely man. He spends his days working at a place that writes letters between lovers who can’t find the words themselves. He is very good at this job — a real romantic, I guess. He has recently separated from his wife, Catherine (Rooney Mara), and has not gotten over the breakup. One day, he hears of a new OS that contains AI to allow it to adapt to a specific user. After answering a couple of personal questions and deciding that he wants it to have a female voice, in his ear he hears Samantha (voice of Scarlett Johansson).

They become quickly acquainted. They make one another laugh. She seems as real as any person, even going so far as to take pauses for breath, despite being an OS and living in a computer. She even declares that she has wants and desires. They’re beginning to fall in love. We see that perhaps before they feel it.

If you’re laughing at the idea on paper it’s because for many people it’s an inherently funny one. That’s why a show like The Big Bang Theory would play it for laughs — it’s easy to see how this would be funny. But Her manages to make it feel sincere. The film was written and directed by Spike Jonze, who has some pretty bizarre ideas floating around his head, but this might be the best filmmaking he’s done. The idea might initially seem weird but it’s quickly accepted and from there the film plays out something like a standard romance, going through all the phases and parts you’d expect.

What this allows for are calculated observations not just about this futuristic romance, but about the way that relationships play out nowadays. It gives specific characters — sometimes Samantha, sometimes Theodore’s lifelong friend, Amy (Amy Adams) — ample opportunity to present philosophical viewpoints on life. And it sees Theodore grow tremendously over the course of the film. You feel as if you’ve learned something after watching Her. This is an intelligent and thoughtful movie.

It’s also very sweet. Somehow — perhaps through magic and hypnotism — Jonze has made the romance between Theodore and Samantha into one of the sweetest you’ll be able to see at the movies. You can understand how this person would fall in love with the OS, and listening to Samantha makes you feel as if she, too, could fall in love, despite being an operating system. It’s surprising how heartfelt Her is, and how much you root for these two individuals to make their relationship work. Other characters might judge them but the film is so effective that the audience doesn’t.

The science fiction aspects to Her include essentially just slightly updated technologies that we currently posses. I think that’s important. The sci-fi doesn’t get in the way of the central story or its themes; instead, it highlights them and makes them possible. On a technical level, the film is shot beautifully and scored wonderfully. Samantha spontaneously composes piano pieces which are gorgeous. Some scenes involve nothing but Phoenix sitting, the camera panning around him, and “Samantha’s” composition playing in the background — and they’re fantastic cinema.

About the only part of Her that doesn’t fully work is a few events right before its conclusion. Without wanting to spoil them, a subplot is introduced too late to come full-circle. It’s a logical place for the film to go but an unsatisfying one emotionally, especially because of how late it starts to crop up. A few hints might have been dropped early on — or they might have been referring to something else; I’d have to see it again to be sure (and I will, someday) — but more would have helped make the ending feel less like a convenient way to wrap things up.

Joaquin Phoenix is a tremendous actor and here he plays his character with the perfect amount of awkwardness and sincerity. Any more of either could have pushed the project into silly territory, uprooting the whole tone. If awards were given for voice work Scarlett Johansson would win them all of her work in Her. With just a voice and Jonze’s script, she creates more of a full character than in most movies where a person is seen on-screen for most of the time — and she’s not playing a “person.” The two manage what might seem impossible. They create a believable romance that maybe should never be — or perhaps that’s where we, as a species, are headed.

Her is a tremendous piece of filmmaking slightly let down by its rushed ending. It manages to craft a sweet and surprisingly believable romance out of an awkward loner and his operating system, and with this premise the film has a lot to say about relationships in general, not just the one we happen to be watching. It’s an often beautiful film, it has a few moments of humor, and it’s incredibly affecting. The actors turn in great work and writer-director Spike Jonze has another bonafide winner.