/* ═══════════════════════════════════════════════════════════
   NODO ZERO — CUSTOM CURSOR
   ═══════════════════════════════════════════════════════════ */

/* Hide default cursor on all interactive elements */
*, *::before, *::after { cursor: none; }
@media (pointer: coarse) {
  *, *::before, *::after { cursor: auto; }
}

/* Cursor container */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: normal;
}

/* Central dot */
#cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: #00FF88;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99999;
  transition: width 0.15s, height 0.15s, background 0.2s, opacity 0.2s;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.8);
  will-change: transform;
}

/* Ring / follower */
#cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(0, 255, 136, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 99998;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.25s,
              background 0.25s,
              opacity 0.2s;
  will-change: transform;
}

/* Trail canvas */
#cursor-trail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99990;
  mix-blend-mode: screen;
}

/* ── Hover states ── */

/* On clickable elements: expand ring, shrink dot */
body.cursor-hover #cursor-dot {
  width: 4px;
  height: 4px;
  background: #00FF88;
}

body.cursor-hover #cursor-ring {
  width: 54px;
  height: 54px;
  border-color: rgba(0, 255, 136, 0.9);
  background: rgba(0, 255, 136, 0.05);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

/* On text elements: become underline-style */
body.cursor-text #cursor-dot {
  width: 2px;
  height: 24px;
  border-radius: 1px;
  background: var(--green);
}

body.cursor-text #cursor-ring {
  opacity: 0;
}

/* On drag elements */
body.cursor-drag #cursor-dot {
  width: 10px;
  height: 10px;
  background: var(--blue);
}

body.cursor-drag #cursor-ring {
  width: 48px;
  height: 48px;
  border-color: rgba(10, 122, 255, 0.7);
  background: rgba(10, 122, 255, 0.05);
}

/* Click ripple — element created via JS at exact cursor coords */
.cursor-ripple {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(0, 255, 136, 0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  animation: cursorClick 0.4s var(--ease-expo) forwards;
}

@keyframes cursorClick {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
}

/* Hide cursor when leaving window */
body.cursor-out #cursor-dot,
body.cursor-out #cursor-ring {
  opacity: 0;
}
