If Hollywood ever wants advice on how to increase visibility and sensitive depictions of transgender and non-binary characters, it would do well to see how Sebastian Lelio approached it.

Lelio is the Chilean writer-director behind A Fantastic Woman, nominated for best foreign-language film at next month's Academy Awards – and a film with a vibrant transgender woman at its core.

The film had been finished long before the Casting Society of America, as part of its commitment to more inclusion in film and television, hosted an international open call in October for transgender, non-binary and genderqueer actors. But there's no doubt the two share a common cause.

Story continues below advertisement

When I talked with Lelio at the Toronto International Film Festival in September, A Fantastic Woman was already a favourite on the festival circuit after a buzzy Berlin premiere. He explained how the script, co-written with frequent collaborator Gonzalo Maza, wasn't initially about a transgender woman's experience at all.

"It was: What would happen if the person you love dies in your arms and those arms are the worst place in the world for that person to die, because you are the unwanted?" Lelio explains. "The rejected one."

When the two happened to watch a Latin American television interview with a transgender woman, something about the idea clicked, and Lelio and Maza set out to learn about authentic lived experience in the trans community.

A Fantastic Woman concerns Marina, who is a trans woman, and her affluent older partner, Orlando, who have spent a romantic birthday evening out when suddenly – it's not a spoiler, it's the premise – he dies after suffering an aneurysm. In the wake of his death, as Marina tries to mourn and move on, she faces constant challenges ranging from the greed, homophobia and transphobia of his family and friends to the suspicion of the authorities. Orlando's son wants the apartment, his ex-wife wants the car and nobody wants the dog – but more than that, they want Marina not to have it.

"The only one apart from Orlando who doesn't have any problem with her, who is by her side without judging her, is the dog," Lelio emphasizes. "And it's sad because we are not as human as dogs are. But good news because, come on, we can be at least as human as dogs are."

The 43-year-old director, who lives in Berlin, says he was already detached from what was going on day to day in Santiago, where the story is set. But add to that, when it came to trans issues, "I had only clichés in my mind. I was ignorant." Lelio and Maza stopped writing and went out to meet people living in the community. "It was very revealing and great and mind-blowing in a certain way," he says. Especially when he was introduced to trans actor Daniela Vega.

As Marina, Chilean singer and hairstylist turned actor Vega delivers an outstanding performance in A Fantastic Woman. Still, Lelio wasn't actually looking for an actor at the time, he was looking for a story consultant. He recalls that he came out of their initial conversation not yet understanding that Vega was The One, but at least knowing that he was not going to make the film without a transgender actor. "But the conversation was so great, Daniela was so magnetic and funny and witty and political and graceful. I loved her."

Story continues below advertisement

After he returned to Germany and continued writing, the pair Skyped regularly. "She was very generous in sharing her experiences. And of course the script wasn't about her life at all – it was never about that – but in a certain way she brought many, many things to the script through those conversations."

During the character-creation process, for example, Lelio and Vega swapped reference materials and experience. "I showed her fragments of films, like the way that Jeanne Moreau walks under the rain in the Louis Malle film Elevator to the Gallows, one of the most beautiful walks in the history of cinema," he recalls. "But then she pushed everything farther for me, her complexity into unknown territories."

On her side, Vega constantly pushed Lelio to think about the question: What is a woman?

"But the film itself – making it – made me question what is a film," Lelio says. "So the film itself is a device to interrogate itself. It's a film about film's own identity."

Their process of exchange led to what Lelio calls "a transgender film" about a transgender woman.

"It was crucial," he says. "And we use the same word in English. Genero. Genre. That was a revelation, the main source of freedom for me."

Story continues below advertisement

A Fantastic Woman certainly defies easy classification. "It's not a cause film, it's not a romantic film, it's not a ghost film, it's not a humiliation-revenge film, it's not a funeral movie, it's not only the portrait of a woman," he rhymes off. "It's the combination of all this, and also each one."

The film explores prejudice, compassion and the limits of empathy with noirish moments and a dance-number interlude. There are allusions to Virginia Woolf, dinosaurs and the neocortex, "the most evolved layer of our brains where empathy lives," all set to an original score with a propulsive nightclub set-piece by electronic composer Matthew Herbert.

Lelio was also at TIFF 2017 to support his English-language directorial debut, Disobedience, starring the two Rachels: Weisz and McAdams.The project originated with Weisz, who had optioned Naomi Alderman's novel and brought it to him.

"She saw Gloria and somehow thought I could make it," Lelio says of his award-winnning 2013 feature. "It's one of the many beautiful things that Gloria brought." Another is that he's just completed shooting an English-language remake of that film, with Julianne Moore as a lonely and adventurous middle-aged divorcée looking for love.

Although it's a remake, Lelio insists that isn't quite the right word for the new Gloria – it's more a reimagining. "It's very different, stylistically," he says, thanks to the breakthrough experience of A Fantastic Woman. "It's like having a new lover who allows you to discover things you didn't know, this is how I feel now. And I am so grateful for that because I don't think I can go back. Now I want more."

A Fantastic Woman opens Feb. 9 in Toronto and Vancouver and Feb. 16 in Montreal.