Philiana Ng/ Entertainment Tonight 

Entanglement is the ultimate alternative to the typical romantic comedy.

In the quirky indie film, directed by Jason James and written by Jason Filiatrault, Silicon Valley star Thomas Middleditch plays Ben Layten, a 30-something divorcee suffering from mental illness who uncovers a family secret that leads him to a mysterious woman named Hanna (Jess Weixler). When the two unexpectedly fall in love, Ben’s life becomes increasingly and strangely complicated as he begins to discover that everything is magically connected in a way he never could have imagined.

“I do think this movie is trying to turn the rom-com on its head a little bit,” Weixler tells ET, who likened it to the ethereal 2001 romance Serendipity,“and I wanted to do that with my character specifically, at first playing into all those rom-com tropes of the super charming person who’s quirky and kind of haphazard. They smoke. They’re a little bit of a troublemaker. They’re confident and brave. All those things that make you think, ‘Oh, that person is so charming and fun.’ And hopefully, [as the movie goes on,] veering her more into a whole person as she becomes more and more — without giving too much away — connected to him.”

For Weixler, whom audiences may be familiar with from her stint on The Good Wife as daring investigator Robyn, the character of Hanna represented a complete 180 from roles she’s played in the past. “It was fun to play somebody so idealized and somebody this confident, and I don’t know that I normally do,” she says. (In the film, Ben becomes enchanted by Hanna’s carefree vibe.) “I was watching Marilyn Monroe and James Dean to see what it is about these people that makes them so attractive that people became so obsessed with them.”

“Hanna is such a confident, dare I say the word, sexy force, and to try and play into that felt very new for me,” Weixler adds. “My acting coach says this thing, which really flipped a switch for me: What you want to see is really how that person, the actor, relates to the character and embodies them, because all the characters are pieces of you. What’s been really fun about the different parts I’ve played, like Robyn or Hanna, is hopefully it’s finding a piece of myself that is true and highlighting it. I’m almost not confident saying this because it’s something that, as a woman, letting yourself be sexy…

“Even in this time, feeling strong and feeling like it’s OK to be sexy is kind of confusing, and I’ve always [relied] on being funny or goofy because I’m more comfortable being goofy than being sexy per se,” she explains. “For this film, I knew I needed to go a bit more for the Marilyn Monroe thing, and it was nice to let myself be confident, to not apologize for it afterward or make a joke about it.”

Most of Weixler’s scenes in Entanglement were with Middleditch, and she said it was a trip working alongside the 35-year-old actor, crediting their easy-go-lucky working relationship to their similar senses of humor. “As funny as Thomas Middleditch is in all of the stuff that he has out there, he’s a thousand times funnier in person because clearly he’s not censoring himself at all,” Weixler says with a laugh. “He’s got the most amazing dark humor, which I love, and it made being on set with him really easy to get comfortable and playful with him. When we would start filming, he had the acting chops to shift himself down because [Ben] is so introverted in carrying the weight of the movie.”

Weixler shared that the spellbinding swimming sequence at the end of the film was the most challenging part of the month-long shoot, because, as she puts it, “we were so cold and miserable.” “Everybody got sick after those filming days,” she recalls, later chuckling at the irony of that particular portion of the film being the most rewarding experience. “It was such a feat to try and do it, to stay underwater that long. When we would come up, we would have to go into the warming area and jump into the sauna. Ben has such a beautiful heart-to-heart with Hanna at the side of the pool, and my character needs to love him and seeing him open up and be vulnerable, it was very easy to adore him in that moment.”

Entanglement hits select theaters and is available On Demand and digital HD on Friday, Feb. 9.