/* Header navigation. Astra's primary menu links carry u-nav__link, added
   by inc/nav.php. The colours are Astra Customizer settings written by
   _project/tools/setup-site.php (links ink, hover and current page green),
   so Astra prints them itself and nothing here fights its cascade. This
   file adds the one thing the Customizer cannot: a line under the link
   that grows in on hover and stays under the current page. Desktop menu
   only; the stacked mobile menu keeps colour alone. Asked for by the
   client on 27 August 2026. All rules under .u-nav. Tokens only. */

@media (min-width: 921px) {

  .u-nav__link {
    position: relative;
  }

  /* Astra sets the link 80px tall with the text centred and 16px of side
     padding, so the line is inset by that padding and sits a little under
     the text rather than on the bottom edge of the header. */
  .u-nav__link::after {
    content: "";
    position: absolute;
    inset-inline: var(--u-space-4);
    bottom: calc(50% - 1.1em);
    height: 2px;
    background: var(--u-green);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--u-dur) var(--u-ease);
  }

  .u-nav__link:hover::after,
  .u-nav__link:focus-visible::after,
  .u-nav__link[aria-current="page"]::after {
    transform: scaleX(1);
  }
}
