/* ============================================================
   PREMIUM CUSTOM CURSOR  —  cursor.css
   Dark-UI Optimised | GSAP powered  (tp-cursor.js)
   ============================================================ */

/* ── Global native cursor removal ────────────────────────── */
/* * { cursor: none !important; } is injected by JS so it
   applies after any existing stylesheet overrides            */

/* ── Wrapper ──────────────────────────────────────────────── */
#magic-cursor {
  position: fixed;
  top:  0;
  left: 0;
  z-index: 99999;
  pointer-events: none;   /* NEVER intercepts clicks          */
  will-change: transform;
}

/* ── Dot  — the precise, sharp cursor core ────────────────── */
#cursor-dot {
  position: fixed;
  top:  0;
  left: 0;
  width:  8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow:
    0 0  6px 2px rgba(255, 255, 255, 0.50),
    0 0 14px 4px rgba(255, 255, 255, 0.18);
  pointer-events: none;
  will-change: transform;
  transform: translate(-50%, -50%);
  /* No transition — GSAP handles movement */
}

/* ── Ring  — the soft lagging circle ─────────────────────── */
#cursor-ring {
  position: fixed;
  top:  0;
  left: 0;
  width:  34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 12px 2px rgba(255, 255, 255, 0.08),
    inset 0 0  8px 1px rgba(255, 255, 255, 0.03);
  pointer-events: none;
  will-change: transform;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  /* Subtle frosted tint */
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ── Ripple ───────────────────────────────────────────────── */
.cursor-ripple {
  position: fixed;
  top:  0;
  left: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.60);
  box-shadow:
    0 0 18px 4px rgba(255, 255, 255, 0.12);
  pointer-events: none;
  will-change: transform, opacity;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
}

/* ── Glow trail canvas ────────────────────────────────────── */
#cursor-trail-canvas {
  position: fixed;
  top:  0;
  left: 0;
  width:  100%;
  height: 100%;
  pointer-events: none;
  z-index: 99998;       /* just below the cursor wrapper      */
  mix-blend-mode: screen;
  opacity: 1;
}

/* ── Hide cursor completely on touch devices ─────────────── */
@media (hover: none) and (pointer: coarse) {
  #magic-cursor,
  #cursor-trail-canvas {
    display: none !important;
  }
}

/* ── Reduced-motion: minimal version ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #cursor-ring {
    transition: none !important;
  }
  #cursor-trail-canvas {
    display: none !important;
  }
}
