/* Reused from gutyina2000/BeYou, app/navigation.css. Scoped for Magi's independent logo and card frames. */
.beyou-lustre { position: relative; isolation: isolate; }
.beyou-lustre .header-lustre {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.beyou-lustre .header-lustre::before {
  content: '';
  position: absolute;
  inset-block: -70%;
  left: 0;
  width: 28%;
  opacity: 0;
  background: linear-gradient(100deg, transparent, #fffbf16b 36%, #ffffff9c 50%, #fffbf159 64%, transparent);
  transform: translateX(-180%) skewX(-22deg);
}
.beyou-lustre .header-lustre::after {
  content: '';
  position: absolute;
  inset: 6px 0;
  border-block: var(--lustre-rule, 0);
}
.beyou-lustre:is(:hover, :focus-within) .header-lustre::before {
  animation: beyou-header-sheen 1250ms ease-out 1;
}
.beyou-lustre .header-glint {
  position: absolute;
  width: 7px;
  height: 7px;
  background: #a48959;
  opacity: .25;
  clip-path: polygon(50% 0, 58% 40%, 100% 50%, 58% 59%, 50% 100%, 42% 59%, 0 50%, 42% 40%);
  transition: opacity 450ms ease, transform 650ms ease;
}
.beyou-lustre .glint-one { left: 27%; top: 5px; }
.beyou-lustre .glint-two { right: 26%; bottom: 4px; width: 8px; height: 8px; transition-delay: 130ms; }
.beyou-lustre .glint-three { right: 8%; top: 5px; width: 5px; height: 5px; transition-delay: 230ms; }
.beyou-lustre:is(:hover, :focus-within) .header-glint { opacity: .72; transform: scale(1.28); }

@keyframes beyou-header-sheen {
  0% { opacity: 0; transform: translateX(-180%) skewX(-22deg); }
  15% { opacity: var(--sheen-peak, .7); }
  80% { opacity: var(--sheen-tail, .35); }
  100% { opacity: 0; transform: translateX(470%) skewX(-22deg); }
}
@media (prefers-reduced-motion: reduce) {
  .beyou-lustre .header-lustre::before { display: none; }
  .beyou-lustre .header-glint { transition: none; transform: none !important; }
}

#navigation a[aria-current="page"], .navbutton.menu-window {
  --sheen-peak: .14;
  --sheen-tail: .07;
}

/* The same BeYou sweep also runs once when a menu window comes into view. */
.menu-window .header-lustre { border-radius: inherit; }
.menu-window .header-glint {
  background: #f3dfb4;
  opacity: .85;
  filter: drop-shadow(0 0 2px #917349);
}
.menu-window .glint-one { left: 12px; top: 5px; }
.menu-window .glint-two { right: 11px; bottom: 5px; }
.menu-window:nth-child(2) { --shine-delay: 160ms; }
.menu-window:nth-child(3) { --shine-delay: 320ms; }
.menu-window:nth-child(4) { --shine-delay: 480ms; }
.menu-window:nth-child(5) { --shine-delay: 640ms; }
.menu-window:nth-child(6) { --shine-delay: 800ms; }
.menu-window.glimmer-on-arrival .header-lustre::before {
  animation: beyou-header-sheen 1600ms ease-out var(--shine-delay, 0ms) 1;
}
@media (prefers-reduced-motion: reduce) {
  .menu-window.glimmer-on-arrival .header-lustre::before { animation: none; }
}
