/* AI sparkle motion adapted from Uiverse.io by JkHuger; desktop/tablet AI only. */
body .phai-sparkle-button {
  --phai-active: 0; --phai-play: paused; --phai-transition: .25s;
  --phai-bg: radial-gradient(40% 50% at center 100%, rgb(181 245 255 / var(--phai-active)), transparent), radial-gradient(80% 100% at center 120%, rgb(61 206 230 / var(--phai-active)), transparent), color-mix(in srgb, #C9E5EE, #5FD2E5 calc(var(--phai-active) * 100%));
  position: relative; isolation: isolate; cursor: pointer; overflow: visible;
}
body .nav-shell > .phai-sparkle-button {
  gap: 7px; border: 0; border-radius: 100px; padding: 10px 14px;
  background: transparent; color: #082A47; min-height: 42px;
  font: 650 13px/1.3 system-ui, sans-serif; transition: transform var(--phai-transition);
}
.phai-sparkle-surface {
  position: absolute; inset: 0; border-radius: 100px; pointer-events: none; background: var(--phai-bg);
  box-shadow: 0 0 calc(var(--phai-active) * 12px) calc(var(--phai-active) * 3px) rgb(95 210 229 / .85), 0 0 calc(var(--phai-active) * 32px) calc(var(--phai-active) * 9px) rgb(95 210 229 / .45);
  transition: box-shadow var(--phai-transition), background var(--phai-transition);
}
.phai-sparkle-surface::before {
  content: ''; position: absolute; inset: -4px; border: 2px solid rgb(24 173 199 / .65);
  border-radius: inherit; opacity: var(--phai-active); transition: opacity var(--phai-transition);
}
.phai-sparkle-orbit { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.phai-sparkle-orbit::before {
  content: ''; position: absolute; width: 220%; aspect-ratio: 1; top: 50%; left: 50%;
  background: conic-gradient(from 0deg, transparent 0 285deg, #5FD2E5 310deg, white 340deg 360deg);
  opacity: calc(.15 + var(--phai-active) * .85); animation: phai-sparkle-rotate 1.4s linear infinite;
  animation-play-state: var(--phai-play); transition: opacity var(--phai-transition);
}
.phai-sparkle-backdrop { position: absolute; inset: calc(1px + var(--phai-active) * 2px); background: var(--phai-bg); border-radius: inherit; transition: inset var(--phai-transition); }
body .phai-sparkle-button .phai-sparkle-text {
  position: relative; z-index: 1; padding: 0; background: transparent; border-radius: 0;
  color: #082A47; white-space: nowrap;
}
.phai-sparkle-icon { position: relative; z-index: 1; flex: 0 0 auto; width: 20px; height: 20px; color: #082A47; }
.phai-sparkle-icon path { fill: currentColor; transform-box: fill-box; transform-origin: center; animation: phai-sparkle-bounce 1s infinite; animation-play-state: var(--phai-play); }
.phai-sparkle-icon path:nth-child(1) { --bounce: .65; animation-delay: .05s; }
.phai-sparkle-icon path:nth-child(2) { --bounce: 1.6; animation-delay: .2s; }
.phai-sparkle-icon path:nth-child(3) { --bounce: 2; animation-delay: .35s; }
body .phai-sparkle-button:focus-visible { --phai-active: 1; --phai-play: running; outline: 3px solid #082A47; outline-offset: 7px; }
@media (hover: hover) {
  body .phai-sparkle-button:hover { --phai-active: 1; --phai-play: running; }
  body .nav-shell > .phai-sparkle-button:hover { transform: scale(1.06); }
}
body .phai-sparkle-button:active { --phai-active: 1; }
body .nav-shell > .phai-sparkle-button:active { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  body .phai-sparkle-button, body .phai-sparkle-button *, .phai-sparkle-orbit::before { animation: none !important; transition: none !important; }
  body .nav-shell > .phai-sparkle-button:hover { transform: none; }
  }
@keyframes phai-sparkle-rotate { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes phai-sparkle-bounce { 0%, 80%, 100% { scale: 1; } 35%, 55% { scale: var(--bounce); } }
