1. Prepare the crust
In a large bowl, mix the flour, salt, and sugar. Cut in the cold butter until the mixture resembles coarse crumbs. Add ice water gradually until the dough comes together. Divide into two disks, wrap, and refrigerate for 30 minutes.
2. Make the filling
In a large bowl, toss the sliced apples with granulated sugar, brown sugar, cinnamon, nutmeg, flour, lemon juice, and vanilla until evenly coated.
3. Assemble the pie
Preheat the oven to 375°F (190°C). Roll out one dough disk into a rectangle large enough to fit a 9×13-inch pan. Press it into the pan with a little overhang on the edges. Spread the apple filling evenly over the crust. Roll out the second dough disk and place it over the top. Seal and crimp the edges, then cut a few slits for steam.
4. Finish and bake
Brush the top with beaten egg and sprinkle with coarse sugar if desired. Bake for 40–45 minutes, until the crust is golden and the filling is bubbling. Let cool slightly before slicing and serving.