Longtime fans of Justin Timberlake were probably surprised earlier this year when the singer and actor announced he'd signed on to oversee the music for "Trolls," the new DreamWorks Animation movie inspired by the fuzzy-headed dolls popular in the early 1990s.
After all, this former member of the boy band 'N Sync has spent much of the last decade trying hard to shake his teenybopper past, with songs like the heavy-breathing "SexyBack" and grown-up film roles in "The Social Network" and "Inside Llewyn Davis." Now here he is happily stepping back into the realm of the branded lunch box.
But if Timberlake's decision caught some off-guard, they're in for an even bigger shock when they see the movie itself. Far from a straightforward kids' picture, "Trolls," due in theaters Nov. 4, is a deeply trippy experience full of swirling colors, otherworldly voices — and songs that can threaten to overwhelm your sonic and emotional receptors.
"It's kind of psychedelic, huh?" Timberlake, 35, asked the other day with visible pride. "The whole thing, you're just like, 'What is going on right now?'"
Directed by Mike Mitchell, the film follows two trolls — cheerful Poppy (voiced by Anna Kendrick) and grumpy Branch (Timberlake) — as they attempt to rescue their friends from the Bergens, miserable giants who think the only way to achieve happiness is by devouring the little wild-haired creatures. Other stars lending their voices include Zooey Deschanel, James Corden and Russell Brand.
More than that flimsy plot, though, the point of the movie seems to be the pure sensual stimulation of its elaborate song-and-dance sequences, some set to newly arranged covers of familiar pop tunes (including "The Sound of Silence," performed by a cast of creepy-beautiful bugs) and others with original music by Timberlake and various collaborators.
In fact, it's in that fresh material that "Trolls" delivers another surprise for close observers of Timberlake's musical career: the singer's reunion, after nearly 20 years, with Max Martin, the Swedish pop savant who helped make him a star by writing 'N Sync hits like "Tearin' Up My Heart" and "It's Gonna Be Me."
Known more recently for his chart-topping work with Taylor Swift and the Weeknd, Martin and his team of writers and producers joined Timberlake to create four songs for "Trolls," most notably "Can't Stop the Feeling," a catchy, ebullient disco jam released in May that's become the biggest-selling song of 2016, according to Nielsen Music, with more than 2 million downloads.
But they also made weirder stuff, such as "Hair Up," the movie's opening number that interpolates Edvard Grieg's "In the Hall of the Mountain King," and a throbbing, percussive duet between Timberlake and Gwen Stefani called "What U Workin' With?"
"Doing music and doing film, I've always said it would be amazing to do the music in a film," Timberlake said, his long legs tucked beneath him as he sat in a Beverly Hills hotel suite. A bit bleary after answering questions at an earlier press conference, he brightened when asked how much space Mitchell and DreamWorks gave him to bring his ideas to the soundtrack.
"Oh, a ton," he replied. "I was like, 'You fools! I don't know why you're entrusting me with this — but I'll do it.'"
Timberlake credited the studio, whose other animated movies include the successful "Shrek," "Madagascar" and "Kung Fu Panda" series, with sparking his interest in an unlikely project. (The birth last year of his son with wife Jessica Biel didn't hurt either.)
"Nobody pitches better than DreamWorks, because they have the type of money where they can go ahead and experiment with animation before they've even cast the movie," he said. "By the time I came on, they told me, 'We can show you what the movie's going to look like when it's done.'"
Yet he was also drawn to Mitchell's notion of using songs from the late '70s and early '80s — Lionel Richie's "Hello," for instance, and "September" by Earth Wind & Fire — to build a bridge between older and younger audiences.
"I think of it like 'Guitar Hero,'" the director said, referring to the play-along video game. "It's exciting for parents to see their kids learning the songs they grew up on."
Immersing himself in those pop standards, the singer thought about the "unabashed emotion" of the music. He thought too about the Bee Gees' soundtrack for "Saturday Night Fever" — specifically how some of the songs had come out ahead of the film so that audiences already knew them when they walked into the theater.
"That led to: 'Well, we need a song at the end of the movie that's a big, huge thing,'" he said. Then he made an exaggerated nervous face.
Why would a guy with more than a dozen top-10 hits choke?
"Because I'd never written a song under that type of pretense, where it's specific to the scene, and yet I also wanted it to be a song that could live by itself," he said.
There was also the fact that Timberlake had in a sense gotten out of the business of big, huge things. For his most recent solo album, 2013's two-part "The 20/20 Experience," the singer went relatively experimental, pairing with the producer Timbaland for long, atmospheric tracks that savored exotic textures and took unexpected instrumental detours.
The two volumes sold millions of copies — and laid the groundwork for some of the more out-there moments in "Trolls" — but none of the singles topped Billboard's Hot 100 as some of Timberlake's earlier songs had.
"For me that project was about: Let's be as expansive as we can," he said of the "20/20" records. "But then I started turning my attention to the idea that I could go back to something that sounded more immediate, like other things I had done in the past. And I just felt like there's nobody better at urgent, immediate pop music than Max Martin."
The producer avoids talking to the media, but Savan Kotecha, a member of Martin's crew who's written for Ariana Grande and Katy Perry, recalled sitting down with Timberlake.
"He told us about his vision to do an animated movie with bad-ass music, which was great to hear," Kotecha said. "If Justin says, 'I wanna make big hits,' you know he's going to get it right."
In the meeting Timberlake also tried to explain "Trolls" to the assembled musicians.
"Everybody was looking at me like I was on some acid trip," he said with a laugh. "I finally was like, 'You know what? You guys should just come down and see it.'"
Timberlake's reconnection with Martin was "very welcome news" to Tom Corson, president of the singer's label, RCA Records, who referred to "Can't Stop the Feeling" as "the gift that keeps on giving."
Yet the experience of working together again had "a totally different dynamic," the singer said, compared to when he recorded Martin's songs back in the 'N Sync '90s.
"I wasn't writing or producing when I was that age. I was just in the group, trying to soak it all up. I probably got on his nerves," he said, laughing. "This was a true collaboration. And some other cool stuff came out of it that we'll have to go back and revisit."
Indeed, the singer estimated he's about a third of the way through writing and demoing his next studio album. But if his work on "Trolls" reawakened his pop instinct, the movie also reminded him of the value of a left turn.
Among the songs he's most excited about is one he wrote with Martin's right-hand man, Shellback, that he described as "the antithesis" of "Can't Stop the Feeling."
Asked what it sounds like, Timberlake grinned.
"I don't know what to tell you," he said.