You can most certainly mix genres—and yes I consider literary a genre. Come on—it appeals to a certain audience and that audience has expectations when they read. It's a genre. Two general things before I give my specific example: you should be aware of the expectations of a reader of urban fantasy or literary or science fiction or YA or whatever and know that you'll need to fulfill some of those expectations to connect with your reader. However, the ways you fulfill some of those expectations can be completely new and different and surprising. In fact, I believe some genre readers will love your story for these creative directions. People do like to be surprised. That's one thing. Another is you can blend genres in ways that give your writing a distinct whatever—tone, set of characters, setting, language, story...You can also play against genre once you know what the expectations are—though obviously you have to take care with this. All I'm really saying is something pretty simple: knowing and understanding what the expectations are of the genre you are writing in gives you a better understanding of yourself as a writer. Break any rule you like. But knowing when you're breaking one seems a better strategy than settling for ignorance is bliss. It so often isn't. Think Custer's Last Stand. Just saying.
A little on my first novel in series: A True Story from a Parallel Universe
Setting a novel in a parallel universe sounds like the story is bound for science fiction but if it is bound that way it takes a hard right long before it gets there and heads straight for urban fantasy. And when I say straight I mean in a typical (for me) zig and zag. Did I know this at conception? Can’t remember. Let’s say yes though just to make it sound better, which writers do a lot.
Honestly, I’m never satisfied with writing in only one genre. This first novel in the series, A True story from A Parallel Universe, isn’t really just urban fantasy though it does have a lot of urban fantasy to it. It has a few other elements that zig and zag in the direction of other genres though. In fact, it does actually have a little science fiction—a bit of the old alien coming on down for a little visit to our earth.( By the by, I am always looking for the hardest readers in the world to find, those special ones who read in many genres—though tend toward the speculative—who enjoy a good play on words now and then and other elements of humorous writing. Maverick readers who go their own way—like you. Thankfully, there are a few.)
What I don’t explain directly but do get into a bit in book 2 of my series is that most of the Supernaturals, that is the creatures and humans with magical abilities, are descendants of gods who have since mostly disappeared. These gods will be recognizable: Greek , Norse, and Egyptian mostly in origin. They mated with humans and the mix of god and human is what created this race of Supernaturals. The gods came to earth in a very large ship. Did someone say Chariot of the Gods? Never. That cheese is long spoiled. But I will say there will be some interesting backstory that takes center stage in one of the series’ novels down the road.
P.S. If you haven't read my first novel in the series I am giving it away for free on Amazon, January 10. https://www.amazon.com/gp/product/B08FLZC68Z?ref_=dbs_p_mng_rwt_ser_shvlr&storeType=ebooks