/* =========================================================
   CURSOR.CSS – Cursore Doppio Magnetico · Armony Media
   ========================================================= */

/* ── CURSORE PRINCIPALE ── */
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: var(--z-cursor);
  border-radius: 50%;
  will-change: transform;
  /* Nascosto di default su mobile e touch */
}

/* Dot – punto piccolo luminoso */
.cursor-dot {
  width: 8px;
  height: 8px;
  background: #fff;
  box-shadow:
    0 0 6px rgba(255,255,255,0.8),
    0 0 12px var(--color-electric),
    0 0 20px rgba(0, 195, 255, 0.4);
  transform: translate(-50%, -50%);
  transition:
    width  0.2s cubic-bezier(0.23, 1, 0.32, 1),
    height 0.2s cubic-bezier(0.23, 1, 0.32, 1),
    opacity 0.2s ease;
  mix-blend-mode: screen;
}

/* Ring – anello grande */
.cursor-ring {
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition:
    width  0.4s cubic-bezier(0.23, 1, 0.32, 1),
    height 0.4s cubic-bezier(0.23, 1, 0.32, 1),
    border-color 0.3s ease,
    opacity 0.3s ease;
}

/* ── STATI HOVER ── */

/* Su bottoni e link – ring cresce */
.cursor-dot.is-hovering {
  width: 6px;
  height: 6px;
  background: var(--color-electric);
  box-shadow:
    0 0 10px var(--color-electric),
    0 0 20px var(--color-electric),
    0 0 40px rgba(0, 195, 255, 0.6);
}

.cursor-ring.is-hovering {
  width: 64px;
  height: 64px;
  border-color: var(--color-electric);
  border-width: 1px;
}

/* Su testi – cursore testo */
.cursor-dot.is-text {
  width: 3px;
  height: 24px;
  border-radius: 2px;
  background: var(--color-white);
}

.cursor-ring.is-text {
  opacity: 0;
}

/* Su immagini */
.cursor-dot.is-image {
  width: 12px;
  height: 12px;
  background: var(--color-magenta);
}

.cursor-ring.is-image {
  width: 80px;
  height: 80px;
  border-color: var(--color-magenta);
}

/* Click – schiacciamento */
.cursor-dot.is-clicking {
  transform: translate(-50%, -50%) scale(0.6);
}

.cursor-ring.is-clicking {
  transform: translate(-50%, -50%) scale(0.85);
  border-color: var(--color-magenta);
}

/* ── NASCOSTO SU TOUCH ── */
@media (hover: none) and (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  body {
    cursor: auto !important;
  }

  a, button, [role="button"] {
    cursor: auto !important;
  }
}

/* ── STATO CARICAMENTO ── */
.cursor-dot.is-loading {
  background: transparent;
  border: 2px solid var(--color-electric);
  border-top-color: transparent;
  animation: spin-cursor 0.8s linear infinite;
  box-shadow: none;
}

@keyframes spin-cursor {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ── ETICHETTA MAGNETICA ── */
.cursor-ring::after {
  content: attr(data-cursor-label);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-white);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.cursor-ring.has-label::after {
  opacity: 1;
}
