/* ════════════════════════════════════════════
   Joint Custom Cursor — Foglio di stile
   Associazione Joint · v1.0.0
   ════════════════════════════════════════════ */

/* Nasconde il cursore nativo su tutto il sito */
html, html *, html *::before, html *::after {
  cursor: none !important;
}

/* ── Elementi base ── */
.jc-dot,
.jc-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2147483647;
  will-change: transform;
  opacity: 0;
}

/* Punto centrale: segue il mouse senza ritardo */
.jc-dot {
  width: 8px;
  height: 8px;
  background: #1a1a1a;
  transition:
    opacity 0.4s ease,
    width   0.22s ease,
    height  0.22s ease,
    background-color 0.3s ease,
    transform 0.05s linear;
}

/* Anello: segue con easing morbido (via JS) */
.jc-ring {
  width: 42px;
  height: 42px;
  border: 2px solid #1a1a1a;
  background: transparent;
  transition:
    opacity 0.4s ease,
    width  0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    height 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    border-color  0.3s ease,
    border-width  0.3s ease,
    border-style  0.3s ease,
    background-color 0.3s ease;
}

/* ── Stato: HOVER (link, bottoni, cliccabili) ── */
body[data-jc-state="hover"] .jc-dot {
  width: 5px;
  height: 5px;
  opacity: 0.3 !important;
}
body[data-jc-state="hover"] .jc-ring {
  width: 62px;
  height: 62px;
}

/* ── Stato: IMMAGINI ── */
body[data-jc-state="image"] .jc-dot {
  width: 4px;
  height: 4px;
}
body[data-jc-state="image"] .jc-ring {
  width: 76px;
  height: 76px;
  border-style: dashed;
  border-width: 1.5px;
}

/* ── Stato: TESTO (input, textarea) ── */
body[data-jc-state="text"] .jc-dot {
  width: 2px;
  height: 20px;
  border-radius: 1px;
}
body[data-jc-state="text"] .jc-ring {
  opacity: 0 !important;
}

/* ── Stato: CLICK ── */
body[data-jc-state="click"] .jc-dot {
  width: 16px;
  height: 16px;
}
body[data-jc-state="click"] .jc-ring {
  width: 28px;
  height: 28px;
}

/* ── Touch / Stylus: ripristina cursore nativo ── */
@media (hover: none) and (pointer: coarse) {
  .jc-dot,
  .jc-ring {
    display: none !important;
  }
  html, html *, html *::before, html *::after {
    cursor: auto !important;
  }
}
