He tells her jokes and runs through subway tunnels like a maniac just to make her laugh.

She composes music for him and encourages his writing career.

They talk in the middle of the night just to hear each other’s voices.

So what if "she" is his computer’s operating system?

Welcome to "Her," writer-director Spike Jonze’s love story that’s sad and funny and touching and overflowing with every bit of the inventiveness you’d expect from the visual visionary behind "Being John Malkovich" and "Where the Wild Things Are."

Set in the "slight future," "Her" follows Theodore (Joaquin Phoenix), who earns a living penning other people’s correspondence at BeautifulHandwrittenLetters.com and feels utterly, painfully alone. When he sees a commercial touting the world’s first artificially intelligent operating system, he picks one up, installs it, answers three questions, and "Samantha" (voiced by Scarlett Johansson) springs to life.

Or at least a close facsimile of life.

She cleans up his email account and reminds him of meetings through his ever-present earpiece. Before long, though, they’re going on "dates" via the video camera on the small, booklike interface, which could be mistaken for an old-fashioned travel alarm clock, that’s almost always peeking out from his shirt pocket.

On the surface, "Her" sounds ridiculous. Sure, Theodore has some issues. He’s an awkward mumbler with a pedophile’s mustache. At first blush, he seems like somebody Hugh Jackman should’ve tortured in "Prisoners." But he isn’t some wackadoo who just BAM! falls in love with an OS.

Samantha is evolving every second, gradually becoming more intelligent and independent, and their relationship grows as she does. She’s less Siri, more HAL 9000 — a flirty, sassy HAL 9000.

"I can’t believe I’m having this conversation with my computer," Theodore marvels early on.

"You’re not," Samantha assures him. "You’re having it with me."

As she matures, she begins sending Theodore drawings, fantasizing about having a body, asking to watch him sleep and wondering things like, "What if your butt hole was in your armpit?"

The whole thing’s nearly as sweet as it is strange.

Part of the genius of "Her" is in the reactions from the people in Theodore’s life. His soon-to-be ex-wife (Rooney Mara) is appalled. His co-worker (Chris Pratt) wants to double date on a trip to Catalina.

This isn’t "Lars and the Real Girl," though. Plenty of people are doing it. Theodore’s friend and neighbor (Amy Adams, who’s slowly turning into Jenna Fischer, or vice versa) knows a woman who’s dating someone else’s OS. There’s even a service that provides sex surrogates for human-OS relationships. Because, of course there is.

For his first solo screenwriting outing, Jonze and his team have created a citrus-colored, barely recognizable Los Angeles. (That’s largely because many of "Her’s" exteriors were filmed in the Pudong District near Shanghai.)

As envisioned by Jonze, the future is one of random earpiece hookups (listen for Kristen Wiig in one of the most awkward, hilariously uncomfortable aural sex scenes you could ever stomach), virtual reality video games starring adorably foul-mouthed critters, and distractingly high-waisted pants. Between Theodore’s trousers and Freddie Quell’s hands-on-hips posture in "The Master," Phoenix seems to be building up to an inevitable Ed Grimley movie.

Samantha, who chose the moniker herself after scanning a book of 180,000 baby names in 0.2 seconds, is imbued with Johansson’s full vocal range, from a breathy whisper to that sexy voice-cracking thing. She’s the most inappropriate movie crush since Jessica Rabbit.

Jonze and his leading duo deliver a remarkable, daring achievement, made all the more so by its easily dismissible premise. It’s basically Philip K. Dick meets Nora Ephron. And it could go flying off the rails at any moment.

But if you let yourself go and get swept up in it, especially the intimate, wordless little moments scored by Arcade Fire, "Her" makes for a moving look at the nature of love and the difficulties of being in it.

Even if the person you love isn’t a person at all.

Christopher Lawrence writes about movies for the Las Vegas Review-Journal. Contact him at clawrence@reviewjournal.com.