html.has-custom-cursor,
html.has-custom-cursor body {
  cursor: none !important;
}

html.has-custom-cursor a,
html.has-custom-cursor button,
html.has-custom-cursor input,
html.has-custom-cursor textarea,
html.has-custom-cursor select,
html.has-custom-cursor summary,
html.has-custom-cursor [role="button"],
html.has-custom-cursor [role="tab"],
html.has-custom-cursor [data-cursor="interactive"] {
  cursor: none !important;
}

.custom-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--cursor-opacity, 0);
  transform: translate3d(-50%, -50%, 0);
  transform-origin: center center;
  transition: opacity 180ms ease;
  mix-blend-mode: normal;
  will-change: transform, opacity;
}

.custom-cursor::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 999px;
  background: radial-gradient(circle, color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 42%, transparent) 0%, transparent 68%);
  opacity: var(--cursor-glow-opacity, 0.5);
  filter: blur(10px);
  transform: scale(var(--cursor-aura-scale, 1));
  animation: cursor-breathe 2.6s ease-in-out infinite;
}

.custom-cursor-aura,
.custom-cursor-ring,
.custom-cursor-core {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  transform-origin: center center;
}

.custom-cursor-aura {
  inset: 4px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.42), transparent 34%),
    radial-gradient(circle at 60% 70%, color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 66%, white) 0%, transparent 66%);
  opacity: calc(var(--cursor-glow-opacity, 0.5) * 0.65);
  filter: blur(5px);
  transform: scale(var(--cursor-aura-scale, 1));
  animation: cursor-breathe 2.2s ease-in-out infinite;
}

.custom-cursor-ring {
  inset: 0;
  border: 1.5px solid color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 68%, rgba(34, 54, 80, 0.18));
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.42) 18%, transparent 36%),
    radial-gradient(circle at 70% 72%, rgba(255, 255, 255, 0.14), transparent 54%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.08));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 0 26px color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 52%, transparent);
  opacity: 1;
  transform: scale(var(--cursor-ring-scale, 1));
  transition:
    transform 110ms cubic-bezier(0.2, 0, 0, 1),
    border-color 110ms cubic-bezier(0.2, 0, 0, 1),
    box-shadow 110ms cubic-bezier(0.2, 0, 0, 1),
    background 110ms cubic-bezier(0.2, 0, 0, 1);
}

.custom-cursor-core {
  inset: 16px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 16%, transparent 34%),
    linear-gradient(180deg, color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 72%, white), color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 76%, black));
  opacity: 0.14;
  transform: scale(var(--cursor-core-scale, 0.42));
  filter: drop-shadow(0 0 10px color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 54%, transparent));
  transition:
    transform 110ms cubic-bezier(0.2, 0, 0, 1),
    opacity 110ms cubic-bezier(0.2, 0, 0, 1),
    background 110ms cubic-bezier(0.2, 0, 0, 1),
    filter 110ms cubic-bezier(0.2, 0, 0, 1);
}

.custom-cursor.is-hovering .custom-cursor-ring {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.66) inset,
    0 0 30px color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 56%, transparent);
}

.custom-cursor.is-hovering .custom-cursor-core {
  opacity: 0.28;
}

.custom-cursor.is-down {
  filter: saturate(1.12);
}

.custom-cursor.is-down .custom-cursor-ring {
  border-color: color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 78%, white);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.7) inset,
    0 0 40px color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 84%, transparent);
}

.custom-cursor.is-down .custom-cursor-core {
  opacity: 1;
  filter: drop-shadow(0 0 14px color-mix(in oklab, var(--cursor-tint, rgba(160, 192, 232, 0.8)) 82%, transparent));
}

@keyframes cursor-breathe {
  0%,
  100% {
    transform: scale(0.96);
  }
  50% {
    transform: scale(1.04);
  }
}
