You can assign permissions to a page via the page headers. This can include group access. Then you would just have to modify your navigation twig so that when it loops over the pages to display to the user, it inspects the page’s access requirements and only displays the menu item if the current user is in that group.
Sorry but i don’t have sample code for this scenario.
Building a site with Grav is kinda like building blocks. Grav is the starter kit, but you get the powerful functionality by integrating plugins. This way a simple site can be kept very fast and lean, and you can also develop complex sites if you need to.
Pretty much all functionality is added via plugins, including the User Plugin which is optional (as many people don’t need it). This plugin handles user accounts, logging in, and also permissions and groups.