/* Spotlight Card (React Bits) — facts / awards cards
 * https://reactbits.dev/components/spotlight-card
 */

#facts .fact-box.card-spotlight {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --mouse-x: 50%;
  --mouse-y: 50%;
  --spotlight-color: rgba(240, 196, 60, 0.28);
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

#facts .fact-box.card-spotlight > * {
  position: relative;
  z-index: 1;
}

#facts .fact-box.card-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(
    circle 180px at var(--mouse-x) var(--mouse-y),
    var(--spotlight-color),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

#facts .fact-box.card-spotlight:hover,
#facts .fact-box.card-spotlight:focus-within {
  border-color: rgba(240, 196, 60, 0.35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

#facts .fact-box.card-spotlight:hover::before,
#facts .fact-box.card-spotlight:focus-within::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  #facts .fact-box.card-spotlight::before {
    display: none;
  }
}

@media (hover: none) {
  #facts .fact-box.card-spotlight::before {
    display: none;
  }
}
