/* Top menu hover (every page): the word slides up and out while an identical copy slides
   in from below. js/nav-roll.js wraps each menu link's text in .nav__roll. */
/* Lime underline (.nav a::after):
   - on hover it waits until the copy has slid into place (.4s), then draws in; it leaves at once
   - the selected item (aria-current, set by js/nav-roll.js) keeps it on */
.nav a.has-roll:hover::after, .nav a.has-roll:focus-visible::after { transition-delay: .4s; }
.nav a[aria-current]::after { transform: scaleX(1); transition-delay: 0s; }
.nav__roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; }
.nav__roll > span { display: block; }
.nav__roll::after {
  content: attr(data-text); content: attr(data-text) / "";   /* the copy is hidden from screen readers */
  position: absolute; left: 0; top: 100%; white-space: nowrap;
}
.nav__roll > span, .nav__roll::after { transition: transform .5s cubic-bezier(.65,0,.35,1); }
.nav a:hover .nav__roll > span, .nav a:hover .nav__roll::after,
.nav a:focus-visible .nav__roll > span, .nav a:focus-visible .nav__roll::after { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) {
  .nav__roll > span, .nav__roll::after { transition: none; }
  .nav a.has-roll:hover::after, .nav a.has-roll:focus-visible::after { transition-delay: 0s; }
}
