Tangerine, a breakout hit from this year’s Sundance Film Festival, is full of surprises. There’s the subject matter: transgender prostitutes working in a not-so glamorous part of Hollywood. And there are the characters: flinty, funny, nobody’s victim. But the story behind the camera is as surprising as what’s in front of it. Particularly because the camera used to shoot Tangerine was the iPhone 5S.

"It was surprisingly easy."

Plenty of amateur films have been shot using iPhones, but by all reports, this is the first movie at the Sundance Film Festival to be shot almost entirely on an Apple device. It was a decision that indie writer and director Sean Baker made to accommodate the film’s small budget. But you’d never guess the camera, to look at it: Tangerine was shot in a widescreen, 2:35:1 aspect ratio, and its camera zooms through the streets of LA with a fluidity you’d never expect from a handheld device. And yet despite his camera of choice, Baker says the iPhone made for a good partner. "It was surprisingly easy," Baker says. "We never lost any footage."

So how do you make a Sundance movie for iPhone? You need four things. First, of course, the iPhone (Baker and his team used three). Second, an $8 app called Filmic Pro that allowed the filmmakers fine-grained control over the focus, aperture, and color temperature. Third, a Steadicam. "These phones, because they’re so light, and they’re so small, a human hand — no matter how stable you are — it will shake. And it won’t look good," says Baker. "So you needed the Steadicam rig to stabilize it."

The final ingredient was a set of anamorphic adapter lenses that attach to the iPhone. The lenses were prototypes from Moondog Labs, and Baker said they were essential to making Tangerine look like it belonged on a big screen. "To tell you the truth, I wouldn’t have even made the movie without it," Baker says. "It truly elevated it to a cinematic level."

"Jesus Christ, man, I was on The Wire."

Like any conventional film, Tangerine underwent post-production. "With a lot of these social realist films, the first thing you do is drain the color," Baker says. "We went the other way. We pumped the colors and put the saturation through the roof. Just because the world there is so colorful, and the women are so colorful. We wanted it to match them." (Orange emerged as the dominant color in the film, inspiring its title.) The final step was to apply a digital grain to the movie, giving it a quality more reminiscent of actual film.

At first, the cast wasn’t convinced shooting with the iPhone would work. "I had some hesitancy about it, more out of pride," says James Ransone, who plays Chester, the pimp at the center of Tangerine’s love triangle. "I’m like, Jesus Christ, man, I was on The Wire. I’ve ended up in iPhone movies!" But Ransone came to appreciate the flexibility of the device. "There’s a lot that can be done with an iPhone." (One example: Baker shot several scenes while riding his 10-speed bicycle in circles around his actors.)

Ransone said that the key to shooting Tangerine was having a team well-versed in traditional filmmaking. "You still need to know how editing works. You still need to know how sound works. You still need to know how a camera works," he says. "You can’t just go out and shoot." iPhone footage hasn’t yet caught up with true 35 millimeter film — a high bar — but Ransone expects it will some day. "Yes, you can make a beautiful-looking film on a shoestring budget," he says. "But you have to know 100 years worth of filmmaking."

"You can make a beautiful film on a shoestring budget."

The unusual creative process behind Tangerine doesn’t stop with its camera. Baker made the movie after becoming obsessed with a donut store in his neighborhood, a seedy block on Santa Monica Boulevard with a notorious reputation. "It was a chaotic corner — there was always something going on in Donut Time," he says. "So I said, I wanna make a film about Donut Time." That idea led him and his co-writer, Chris Bergoch, to a nearby LGBT center, where they met Mya Taylor, an aspiring singer and actress, who in turn introduced the filmmakers to her roommate and eventual co-star, Kiki Kitana Rodriguez.

The two women began sharing some stories from around the block, ("People love to hear drama. Especially filmmakers," Taylor tells me) and happened upon a striking bit of drama from the neighborhood: a trans woman became enraged when she heard her boyfriend had slept with a biological female — "actual fish," as they say in Tangerine. The trans woman decided to hunt the other woman down, and thus Tangerine found its inspiration, with the writers collaborating with their cast on the script.

The result, at least for me, is the ideal Sundance movie: totally unexpected, set in a world I’ve never visited, with a story the major studios wouldn’t touch with a 10-foot selfie stick. Rodriguez is an effervescent blur as Sin-Dee Rella, an ex-con hunting down her pimp fiancée’s mistress on Christmas Eve. She stomps down Hollywood’s Walk of Fame like it’s a catwalk, spitting fire at anyone dumb enough to cross her, and manages to terrify nearly every man she meets. Taylor, as her best friend and fellow prostitute Alexandra, tries to talk sense into Sin-Dee every step of the way, cleaning up the damage in her wake. Their sisterhood in the face of real danger brings depth to the frequently over-the-top comedy.

Tangerine isn’t perfect — it slows considerably in its final third, and the big climax at Donut Time feels less convincing than the film that led up to it. But in a festival full of coming-of-age dramas and straightforward documentaries, it’s a minor miracle: a good long look at the margins, captured by a $550 phone.