/* ================================================================
   CUSTOM CURSOR — Clicandseo Brand
   Techie "SEO Scanner": adaptive dot + rotating ring + trail
   Negro sobre fondos claros — Bio-Lime sobre fondos oscuros
================================================================ */

@media (pointer: fine) {
  *, *::before, *::after {
    cursor: none !important;
  }

  /* ---- Dot: center point (negro por defecto) ---- */
  .cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 8px;
    height: 8px;
    background: #0F172A;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                height 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                background 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  /* ---- Ring: rotating dashed border (negro por defecto) ---- */
  .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 40px;
    height: 40px;
    border: 2px dashed rgba(15, 23, 42, 0.35);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    animation: cursor-spin 8s linear infinite;
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                height 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-style 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

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

  /* ---- Trail particles (negro por defecto) ---- */
  .cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #0F172A;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99997;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: background 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  /* ======== HOVER: Interactive elements (negro) ======== */
  .cursor-hover .cursor-dot {
    width: 14px;
    height: 14px;
  }
  .cursor-hover .cursor-ring {
    width: 56px;
    height: 56px;
    border-color: rgba(15, 23, 42, 0.55);
    border-style: solid;
    border-width: 2px;
    animation-duration: 4s;
    box-shadow:
      inset 12px 0 0 -10px #0F172A,
      inset -12px 0 0 -10px #0F172A,
      inset 0 12px 0 -10px #0F172A,
      inset 0 -12px 0 -10px #0F172A;
  }

  /* ======== DARK SECTIONS: Bio-Lime cursor ======== */
  .cursor-on-dark .cursor-dot {
    background: #D8F9B8;
    box-shadow: 0 0 8px rgba(216, 249, 184, 0.4);
  }
  .cursor-on-dark .cursor-ring {
    border-color: rgba(216, 249, 184, 0.45);
  }
  .cursor-on-dark .cursor-trail {
    background: #D8F9B8;
  }

  /* Dark + hover */
  .cursor-on-dark.cursor-hover .cursor-dot {
    background: #D8F9B8;
    box-shadow: 0 0 14px rgba(216, 249, 184, 0.6);
  }
  .cursor-on-dark.cursor-hover .cursor-ring {
    border-color: rgba(216, 249, 184, 0.7);
    box-shadow:
      inset 12px 0 0 -10px #D8F9B8,
      inset -12px 0 0 -10px #D8F9B8,
      inset 0 12px 0 -10px #D8F9B8,
      inset 0 -12px 0 -10px #D8F9B8;
  }

  /* ======== TEXT: Input fields ======== */
  .cursor-text .cursor-dot {
    width: 2px;
    height: 22px;
    border-radius: 1px;
    animation: cursor-blink 1s ease-in-out infinite;
  }
  .cursor-text .cursor-ring {
    width: 0; height: 0;
    opacity: 0;
    border: none;
  }
  @keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  /* ======== CLICK: Pulse feedback ======== */
  .cursor-click .cursor-dot {
    width: 5px;
    height: 5px;
  }
  .cursor-click .cursor-ring {
    width: 32px;
    height: 32px;
    border-style: solid;
    animation-duration: 2s;
  }
  .cursor-on-dark.cursor-click .cursor-dot {
    box-shadow: 0 0 20px rgba(216, 249, 184, 0.7);
  }
  .cursor-on-dark.cursor-click .cursor-ring {
    border-color: rgba(216, 249, 184, 0.9);
  }

  /* ======== HIDDEN ======== */
  .cursor-hidden .cursor-dot,
  .cursor-hidden .cursor-ring {
    opacity: 0 !important;
    transition: opacity 0.15s ease;
  }
}

/* Touch devices — no custom cursor */
@media (pointer: coarse) {
  .cursor-dot, .cursor-ring, .cursor-trail { display: none !important; }
}
