:root {
  --brand-blue: #2563eb;
  --brand-blue-strong: #1d4ed8;
  --card-glow-x: 50%;
  --card-glow-y: 0%;
}

.glow-card {
  --card-glow-opacity: 0;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 8px;
  transition:
    border-color 180ms ease,
    box-shadow 220ms ease,
    transform 220ms ease,
    background-color 220ms ease;
}

.glow-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: var(--card-glow-opacity);
  background:
    radial-gradient(
      280px circle at var(--card-glow-x) var(--card-glow-y),
      rgba(37, 99, 235, 0.28),
      rgba(29, 78, 216, 0.13) 36%,
      rgba(37, 99, 235, 0.04) 58%,
      transparent 72%
    );
  transition: opacity 180ms ease;
}

.glow-card > * {
  position: relative;
  z-index: 1;
}

.glow-card:hover,
.glow-card:focus-within {
  --card-glow-opacity: 1;
  border-color: rgba(37, 99, 235, 0.68) !important;
  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(37, 99, 235, 0.18);
  transform: translateY(-2px);
}

@media (hover: none) {
  .glow-card::before {
    display: none;
  }

  .glow-card:active {
    border-color: rgba(37, 99, 235, 0.68) !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow-card,
  .glow-card::before {
    transition: none;
  }

  .glow-card:hover,
  .glow-card:focus-within {
    transform: none;
  }
}
