/* =============================================================================
   COMPONENT — CUSTOM CURSOR
   Fixed glowing dot + trailing ring, replacing the system cursor on fine-
   pointer/hover-capable devices only. js/effects.js gates everything behind
   a matchMedia check and only then adds html.has-custom-cursor and attaches
   listeners — touch devices and prefers-reduced-motion never lose their
   native cursor.
   Depends on: tokens.css.
   ============================================================================= */
.cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
}

.cursor__dot,
.cursor__ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
}

.cursor__dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--color-glow-strong);
  box-shadow: var(--shadow-glow-sm);
  transform: translate3d(var(--dot-x, -100px), var(--dot-y, -100px), 0);
  transition: width 0.25s var(--ease-out-expo), height 0.25s var(--ease-out-expo),
    margin 0.25s var(--ease-out-expo), opacity 0.2s ease;
}

.cursor__ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid var(--color-glow-border);
  transform: translate3d(var(--ring-x, -100px), var(--ring-y, -100px), 0);
  transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo),
    margin 0.3s var(--ease-out-expo), border-color 0.3s ease, opacity 0.2s ease;
}

.cursor--active .cursor__ring {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-color: var(--color-glow);
  box-shadow: var(--shadow-glow-md);
}

.cursor--active .cursor__dot {
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
}

.cursor--text .cursor__ring {
  opacity: 0;
}

/* Only takes effect once js/effects.js confirms pointer support and adds
   this class — see the anti-flash inline script in index.html for how it's
   applied before first paint. */
html.has-custom-cursor,
html.has-custom-cursor a,
html.has-custom-cursor button,
html.has-custom-cursor .btn,
html.has-custom-cursor label {
  cursor: none;
}

html.has-custom-cursor input,
html.has-custom-cursor textarea,
html.has-custom-cursor select {
  cursor: auto;
}
