Two-dimensional materials such as graphene allow direct access to the entirety of atoms constituting the crystal. While this makes shaping by lithography particularly attractive as a tool for band structure engineering through quantum confinement effects, edge disorder and contamination have so far limited progress towards experimental realization. Here, we define a superlattice in graphene encapsulated in hexagonal boron nitride, by etching an array of holes through the heterostructure with minimum feature sizes of 12-15 nm. We observe a magnetotransport regime that is distinctly different from the characteristic Landau fan of graphene, with a sizeable bandgap that can be tuned by a magnetic field. The measurements are accurately described by transport simulations and analytical calculations. Finally, we observe strong indications that the lithographically engineered band structure at the main Dirac point is cloned to a satellite peak that appears due to moiré interactions between the graphene and the encapsulating material.