/* Use white reflected light while retaining the official keyboard-focus accent. */
.ds3-link-sheen {
  --ds3-link-sheen-glint: #fff;
}
.ds3-link-sheen { position: relative; }
/* Keep the visual copy aligned without affecting layout, clicks or text selection. */
.ds3-link-sheen-reflection,
.ds3-link-sheen-glow {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  user-select: none;
  opacity: 0;
}
/* Diffuse light around the glyphs without adding a tight text stroke. */
.ds3-link-sheen-glow {
  color: var(--ds3-link-sheen-glint);
  filter: blur(7px);
}
/* Unsupported browsers retain the normal link instead of a broken overlay. */
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .ds3-link-sheen-active > .ds3-link-sheen-reflection {
    /* Only reflected glyphs cast a halo; the original link stays untouched. */
    opacity: 1;
    background-image: linear-gradient(105deg,
      transparent 28%,
      color-mix(in srgb, var(--ds3-link-sheen-glint) 75%, transparent) 32%,
      transparent 36%,
      var(--ds3-link-sheen-glint) 44%,
      transparent 49%,
      color-mix(in srgb, var(--ds3-link-sheen-glint) 90%, transparent) 52%,
      var(--ds3-link-sheen-glint) 56%,
      color-mix(in srgb, var(--ds3-link-sheen-glint) 90%, transparent) 60%,
      transparent 64%);
    background-size: 400% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: ds3-link-sheen-sweep 6000ms ease-in-out;
    animation-delay: var(--ds3-link-sheen-phase, 0ms);
  }
  .ds3-link-sheen-active > .ds3-link-sheen-glow {
    animation: ds3-link-sheen-halo 6000ms ease-in-out;
    animation-delay: var(--ds3-link-sheen-phase, 0ms);
  }
}
/* Preserve a clear keyboard focus indicator without thickening the text. */
.ds3-link-sheen:focus-visible {
  outline: 2px solid var(--ds3-link-sheen-accent);
  outline-offset: 4px;
}
/* Move the reflection and fade its halo only at the beginning and end. */
@keyframes ds3-link-sheen-sweep {
  0% { background-position: 100% 50%; filter: drop-shadow(0 0 0 transparent) drop-shadow(0 0 0 transparent); }
  20%, 80% { filter: drop-shadow(0 0 2px var(--ds3-link-sheen-glint)) drop-shadow(0 0 7px var(--ds3-link-sheen-glint)); }
  100% { background-position: 0% 50%; filter: drop-shadow(0 0 0 transparent) drop-shadow(0 0 0 transparent); }
}
/* Keep the extra glow inside the active six-second phase, with a soft entrance and exit. */
@keyframes ds3-link-sheen-halo {
  0%, 100% { opacity: 0; }
  15%, 85% { opacity: 0.7; }
}
/* Accessibility preferences always override the decorative animation. */
@media (prefers-reduced-motion: reduce) {
  .ds3-link-sheen-active > .ds3-link-sheen-reflection,
  .ds3-link-sheen-active > .ds3-link-sheen-glow {
    opacity: 0;
    animation: none;
    background-image: none;
    -webkit-text-fill-color: currentColor;
    filter: none;
  }
}
