Preheat your oven to 375°F and lightly grease an 8x8-inch baking dish.
If using fresh spinach, sauté it in a dry pan over medium heat until wilted, then let it cool and squeeze out as much moisture as possible. This step is crucial — soggy spanakopita is a heartbreak I wouldn't wish on anyone.
In a large bowl, combine the spinach, feta, ricotta, eggs, green onions, garlic, dill, nutmeg, salt, and pepper. Mix until everything is evenly incorporated.
Mix the melted butter and olive oil together in a small bowl.
Lay one sheet of phyllo in the prepared baking dish and brush generously with the butter mixture. Repeat with three more sheets, brushing each one.
Spread the spinach filling evenly over the layered phyllo.
Layer the remaining four phyllo sheets on top, brushing each one with the butter mixture. Tuck any overhanging edges down the sides.
Score the top layers gently with a sharp knife into four portions — this makes cutting after baking so much easier.
Bake for 35–40 minutes until the top is deep golden and crisp. Let it rest for 10 minutes before slicing.