/* ============================================================
   CUSTOM CURSOR (desktop only)
   ============================================================ */
@media (pointer: fine) {
  * { cursor: none !important; }

  #custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-cursor);
    pointer-events: none;
    will-change: transform;
    mix-blend-mode: difference;
  }

  /* Inner dot */
  .cursor-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--morico-white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease;
  }

  /* Outer ring (lags slightly for trail effect — done in JS) */
  .cursor-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    border: 2px solid var(--morico-white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
    opacity: 0.5;
  }

  /* Hover state */
  body.cursor-hover .cursor-dot {
    width: 12px;
    height: 12px;
    background: var(--morico-red);
  }

  body.cursor-hover .cursor-ring {
    width: 56px;
    height: 56px;
    border-color: var(--morico-red);
    opacity: 0.3;
  }

  /* Click state */
  body.cursor-click .cursor-dot {
    width: 16px;
    height: 16px;
    background: var(--morico-red);
  }

  body.cursor-click .cursor-ring {
    width: 28px;
    height: 28px;
    opacity: 0.8;
    border-color: var(--morico-red);
  }

  /* Text / input cursor state */
  body.cursor-text .cursor-dot {
    width: 2px;
    height: 24px;
    border-radius: 1px;
    animation: cursorBlink 1s step-end infinite;
  }

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

  @keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
  }

  /* Spotlight / radial glow that follows cursor */
  #cursor-spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    background: radial-gradient(
      circle,
      rgba(232,25,44,0.04) 0%,
      transparent 60%
    );
    will-change: transform;
    transition: opacity 0.3s ease;
    opacity: 0;
  }

  .hero #cursor-spotlight,
  .particle-bg #cursor-spotlight {
    opacity: 1;
  }
}

/* On touch devices, ensure default cursor */
@media (pointer: coarse) {
  #custom-cursor,
  #cursor-spotlight {
    display: none !important;
  }
}
