/* Menu depth: each ring is split into a back half (behind the links) and a
   front half (in front of them), so the links sit inside the rings. */
.menu-wrapper .ring-back {
  z-index: 500 !important;
  -webkit-clip-path: inset(0 0 50% 0);
  clip-path: inset(0 0 50% 0);
}
.menu-wrapper .ring-front {
  -webkit-clip-path: inset(50% 0 0 0);
  clip-path: inset(50% 0 0 0);
}
.menu-wrapper .ring-back,
.menu-wrapper .ring-front {
  will-change: transform, opacity;
}

/* Each link sits between the ring's two halves (back 500, front 502). The columns don't stack
   on their own, so hovering lifts only that link in front of the rings, not its whole column. */
.menu-wrapper .srv-lnk-div { z-index: auto !important; }
.menu-wrapper .srv-lnk-div a { z-index: 501 !important; }
.menu-wrapper .srv-lnk-div a:hover,
.menu-wrapper .srv-lnk-div a:focus-visible { z-index: 503 !important; }

/* Desktop: bring the side columns in from the edges so their links sit inside the rings */
@media (min-width: 992px) {
  .menu-wrapper .srv-lnk-div.is1 { margin-left: 9vw !important; }
  .menu-wrapper .srv-lnk-div.is3 { margin-right: 9vw !important; }
  .menu-wrapper .srv-lnk-div.is2 { margin-left: 3vw !important; margin-right: 3vw !important; }
}

/* Keep page overlays (like the homepage scroll hint) out of the open menu */
html.menu-open .scroll-overlay {
  opacity: 0 !important;
  visibility: hidden;
}

/* Menu footer (socials, credits) stays above the rings */
.menu-div .footer-white {
  z-index: 504;
}

/* On small screens the ring lines are scaled far down; a soft glow keeps them visible */
@media (max-width: 991px) {
  .menu-wrapper .ring-lines {
    filter: drop-shadow(0 0 1px #2b2dff) drop-shadow(0 0 1.5px #2b2dff);
  }
}

/* Pressing a link starts the hoop catch: no browser tap box behind the word */
.menu-wrapper .srv-lnk-div a { -webkit-tap-highlight-color: transparent; }

/* Closing: the rings fade out as the panel starts to slide away (menu-depth.js sets menu-closing
   on the press), instead of riding the panel out, where some browsers leave them behind for a
   moment and then drop them all at once */
html.menu-closing .menu-wrapper .ring-lines,
html.menu-closing .menu-wrapper .ring-wall { opacity: 0 !important; transition: opacity .25s ease-out; }
