/* ═══════════════════════════════════════════════════════════════
   CURSOR FX — sistema cursore custom condiviso
   Estratto da index.html (initCursorFX) per riuso nelle pagine
   secondarie (ideology-vision-v1/v2). Stessi token brand: usa
   --accent, --FM, --RS dichiarati nella pagina ospitante.
═══════════════════════════════════════════════════════════════ */

#cursorPixels {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: difference;
}
#cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
}
#cursor .cur-ring {
  position: absolute;
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  opacity: 0;
  transition:
    width   0.5s cubic-bezier(0.16,1,0.3,1),
    height  0.5s cubic-bezier(0.16,1,0.3,1),
    border-radius 0.5s cubic-bezier(0.16,1,0.3,1),
    background 0.4s cubic-bezier(0.16,1,0.3,1),
    border-color 0.35s ease,
    border-width 0.35s ease,
    box-shadow 0.4s cubic-bezier(0.16,1,0.3,1),
    backdrop-filter 0.4s ease,
    opacity 0.35s cubic-bezier(0.16,1,0.3,1),
    transform 0.5s cubic-bezier(0.16,1,0.3,1);
  will-change: width, height, border-radius, opacity, transform;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  overflow: hidden;
}
#cursor .cur-icon  { display: none; line-height: 0; color: var(--accent); }
#cursor .cur-icon svg { display: block; width: 14px; height: 14px; }
#cursor .cur-label {
  font-family: var(--FM);
  font-size: 10px;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  font-weight: 500;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  pointer-events: none;
}
#cursor.is-link .cur-ring {
  opacity: 1;
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(2px);
  transform: translate(-50%, -50%) scale(1);
}
#cursor.is-cta .cur-ring {
  opacity: 1;
  width: 78px; height: 78px;
  background: var(--accent);
  border-color: transparent;
  transform: translate(-50%, -50%) scale(1);
}
#cursor.is-link,
#cursor.is-cta,
#cursor.is-text   { mix-blend-mode: difference; }
#cursor.is-card .cur-ring {
  opacity: 1;
  width: 144px; height: 56px;
  border-radius: 0;
  background: var(--accent);
  border: 1px solid var(--accent);
  box-shadow:
    0 14px 32px rgba(0,0,0,0.35),
    0 0 24px rgba(242,199,0,0.15);
  transform: translate(-50%, -50%) scale(1);
}
#cursor.is-card .cur-icon  { display: inline-flex; color: #fff; }
#cursor.is-card .cur-label { opacity: 1; color: #000; font-family: var(--RS); }
#cursor.is-text .cur-ring {
  opacity: 1;
  width: 2px; height: 22px;
  border-radius: 0;
  border-width: 0;
  background: #fff;
  transform: translate(-50%, -50%) scale(1);
}
#cursor.is-hidden          { opacity: 0; }
#cursor.is-hidden ~ #cursorPixels { opacity: 0; }
@media (hover: none), (pointer: coarse), (max-width: 900px) {
  #cursor, #cursorPixels { display: none; }
  body { cursor: auto; }
}
