HBO’s Mrs. Fletcher could be something of a farce. After all, it’s about a “MILF” of a single mother falling down the rabbit hole of online porn in the wake of her only son’s departure to college. It’s the stuff of adolescent fantasy and actual pornographic plots. Nevertheless, the limited series is refreshingly tender look at how sexuality shapes our sense of self in modern America. Through experimenting with pornography, masturbation, and personal reflection, “Mrs.” Eve Fletcher finds her world expanding in new and unexpected ways.

Mrs. Fletcher is the brainchild of writer Tom Perrotta, the writer whose novels have inspired the films Election and Little Children, and the critically-acclaimed HBO series The Leftovers. Even though Perrotta has collaborated on adaptations of his work in the past, Mrs. Fletcher marks the first time that he is the creator and sole showrunner of a series based on his work. To bring Mrs. Fletcher to life, Perrotta assembled an all-female team of directors that included the likes of Nicole Holofcener and Carrie Brownstein, and he cast the luminous Kathryn Hahn as Eve Fletcher.

As Eve, Hahn has the difficult task of playing a woman embarking on a personal quest to find herself. When her teenaged son Brandon (Jackson White) leaves the nest to go to college, Eve has to reassess who she when her role as “mother” is stripped away. Already divorced, she faces the task of not necessarily reinventing herself, but reclaiming the vibrant, ferocious, and passionate woman she could have been. Embracing pornography is less of a step in this journey than an apt metaphor for Eve learning how to literally love herself.

Recently Decider spoke with Perrotta about the challenges in bringing the complex tone of Mrs. Fletcher to life. Perrotta shared how they tackled working real (and simulated) pornography into a mainstream show and how someone as sensitive as Eve could raise a boorish bully like Brendan.

DECIDER: I want to ask about casting Kathryn Hahn as Eve, and what, in your mind, made her the ideal actress for that part?

Tom Perrotta: Well, she’s basically the ideal actress for any part, but I think the thing that was most on my mind was that a lot of the role of Eve was kind of a very private story. There are just so many crucial things where she’s alone and thinking or looking at something, and that’s just hard to do, to be a solitary actor in a scene. And so much of the story is just told by very small expressions on her face, and I just don’t think there’s any actor whose face is as mobile or interesting as Kathryn’s.

Pornography plays a key role in the storytelling. I’m really curious about how you and the writer’s room decide which clips would be used in what context, because it feels like they kind of interplay with what’s going on in Eve’s life. And what’s the process for using pornography in a TV show in terms of crediting the performers or reaching out to them? Can you just walk me through that process?

Yeah, yeah, so that was pretty complicated [laughs]. So, I think we originally thought that we would have to shoot our own because there are definitely different standards for TV and porn sites. The problem was it’s harder than it looks.

I remember years ago I was trying to do some ghostwriting and I wrote a sample for Sweet Valley High and the person who was evaluating said, “You know, this is really good but I keep hearing this little tone like you’re making fun of it.” You know, somehow you’ve got to really believe in something like porn or a genre fiction to do it right. You can’t do it as an outsider, I think.

So then we started actually calling clips from the web and some of those are in the show, and they are shocking. And we were able to use on the Milfateria homepage really pretty graphic stuff that we didn’t shoot that was on the web that we had permission to use through a provider that HBO connected us with.

Sometimes we did find material where we couldn’t contact actors for permission, and then we decided that we couldn’t use it because it’s one thing to consent to making porn and having it shown in a porn space, and I think you really have to explicitly consent to being in a mainstream TV show. Then in that case, we really had to go full circle and kind of shoot our own stuff…we tried to really recreate the look and kind of the format of stuff that was available. And that doesn’t feel to me like we’re satirizing a brand of porn, it really does feel like as close as we can get to the original.

One question I keep seeing people ask is how someone like Eve, who seems really emotionally intelligent, could raise Brendan, who does not seem that way. Given that these are your creations, how do you think that happened?

Well, first of all, it is just an overarching question of the culture. In some ways, you’d think that given that feminism is something that has been happening in this culture for a couple generations now, and so many mothers are feminist mothers, and yet so many sons are sexist sons. Once you get into it a question like that and say it’s a cultural one, I think the answer is also cultural. So we can think about that.

But I was reading that book, I think it’s called Blurred Lines by Vanessa Grigoriadis, and there’s just an amazing chapter where she goes to a like support group for moms whose sons have been accused of — I don’t know if it was a support group, but she just got them together — moms whose sons have been accused of sexual assault in college. It’s just an amazing chapter…to see them talk about their own experiences in college. You know, some of them had experienced sexual assault themselves, but they also wanted so deeply to believe in the goodness of their sons. So there was just like this kind of deep confusion on their parts. I think it’s a pretty common thing, first of all, just to say that male sexuality seems to be shaped by forces bigger than whether or not your mom is a feminist.

Obviously, the way we raise our children matters. I think the more micro explanation is that Eve feels very guilty towards Brendan and sees him as a sort of lost, sad kid. When she looks at him, she doesn’t see a big, scary guy. She sees a little, lost boy. That’s why that speech in the car in the pilot is so interesting because she has heard through the door and she’s been a little shocked by the language he’s using and she’s trying to engage with him as a sexual being. You need to see how uncomfortable they are talking about sex and that’s obviously another issue in the culture.

It’s hard for one generation to talk to another about sex or even know if they’re talking about the same thing when they talk about sex. Because I know the sexual rules that I played by are so different from my parents’ sexual rules, and the sexual rules my kids play by are different than the ones I did. You know, so, it’s sometimes hard for a parent to enter that space and say something that feels relevant to the kid.

In many way a very faithful adaptation in the broad strokes, but so many little details got changed. I think that everything around Episode 2 and the date with Peter and the swimming pool scene are really entirely new constructions. And also I think the Roy Rafferty stuff — which is much fuller in the show than it was in the book. It’s really just sort of alluded to without being shown but I think we did a much fuller job of fleshing out Eve’s friendship with Roy and her sadness about what happened to him.

This interview has been condensed and edited for clarity.

Where to stream Mrs. Fletcher