/* Hover glow for cards: a spinning comet of light around the border plus a soft blue bloom behind.
   Palette A accent: mint #8bf3e6 into tech blue #38bdf8. Targets are tagged by card-glow.js */
@property --glow-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes glow-spin { to { --glow-angle: 360deg; } }

.has-glow {
  position: relative;
  isolation: isolate;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), box-shadow .5s cubic-bezier(.22, 1, .36, 1), border-color .5s;
}
.has-glow > .card-glow {
  position: absolute;
  inset: 0;
  z-index: 5;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s;
  background: conic-gradient(from var(--glow-angle), transparent 0deg, transparent 295deg, #8bf3e6 330deg, #38bdf8 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.has-glow:hover,
.has-glow:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 18px 60px -18px rgba(56, 189, 248, .45);
  border-color: rgba(139, 243, 230, .35);
}
.has-glow:hover > .card-glow,
.has-glow:focus-within > .card-glow {
  opacity: 1;
  animation: glow-spin 2.4s linear infinite;
}

/* Touch screens have no hover: keep the cards still */
@media (hover: none) {
  .has-glow:hover { transform: none; box-shadow: none; }
  .has-glow:hover > .card-glow { opacity: 0; animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .has-glow:hover > .card-glow { animation: none; }
  .has-glow:hover { transform: none; }
}
