/* ============================================================
   THINKADS — Custom Cursor
   Dual-layer glowing red cursor with label states
   ============================================================ */

/* Hide custom cursor on touch devices */
@media (hover: none), (pointer: coarse) {
  .cursor,
  .cursor-dot,
  .cursor-label {
    display: none !important;
  }
}

/* Reduce motion: hide custom cursor */
@media (prefers-reduced-motion: reduce) {
  .cursor,
  .cursor-dot,
  .cursor-label {
    display: none !important;
  }
  body { cursor: auto !important; }
}

/* ── Cursor Ring (Outer) ──────────────────────────────────── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(254, 0, 3, 0.6);
  background: transparent;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition:
    width   0.35s cubic-bezier(0.16, 1, 0.3, 1),
    height  0.35s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.2s ease,
    background   0.2s ease,
    opacity 0.2s ease;
  mix-blend-mode: normal;
  will-change: transform, width, height;
}

/* The cursor ring lags slightly (JS handles transform) */
.cursor::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254,0,3,0.06), transparent 70%);
  pointer-events: none;
}

/* ── Cursor Dot (Inner) ────────────────────────────────────── */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red, #fe0003);
  pointer-events: none;
  z-index: 100000;
  transform: translate(-50%, -50%);
  will-change: transform;
  box-shadow: 0 0 8px rgba(254, 0, 3, 0.8), 0 0 16px rgba(254, 0, 3, 0.4);
  transition: width 0.2s, height 0.2s, opacity 0.2s;
}

/* ── Cursor Label ─────────────────────────────────────────── */
.cursor-label {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 100001;
  transform: translate(-50%, -50%);
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: white;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
  will-change: transform;
}

.cursor-label.visible {
  opacity: 1;
}

/* ── Hover State: Default Hover ───────────────────────────── */
.cursor.is-hover {
  width: 60px;
  height: 60px;
  border-color: rgba(254, 0, 3, 0.8);
  background: rgba(254, 0, 3, 0.06);
}

/* ── Hover State: Clickable (buttons, links) ──────────────── */
.cursor.is-clickable {
  width: 50px;
  height: 50px;
  border-color: rgba(254, 0, 3, 1);
  background: rgba(254, 0, 3, 0.08);
  box-shadow: 0 0 20px rgba(254, 0, 3, 0.2);
}

/* ── Hover State: View Label ──────────────────────────────── */
.cursor.is-view {
  width: 80px;
  height: 80px;
  border-color: rgba(254, 0, 3, 0.6);
  background: rgba(254, 0, 3, 0.1);
}

/* ── Hover State: Open / Explore ──────────────────────────── */
.cursor.is-open,
.cursor.is-explore {
  width: 88px;
  height: 88px;
  border-color: rgba(251, 103, 3, 0.7);
  background: rgba(251, 103, 3, 0.08);
}

/* ── Active (Clicked) State ───────────────────────────────── */
.cursor.is-active {
  width: 32px;
  height: 32px;
  background: rgba(254, 0, 3, 0.15);
  border-color: rgba(254, 0, 3, 1);
  transition:
    width 0.1s ease,
    height 0.1s ease;
}

/* Dot shrinks on click */
.cursor-dot.is-active {
  width: 3px;
  height: 3px;
}

/* ── Magnetic Zone Visual ─────────────────────────────────── */
.cursor.is-magnetic {
  width: 72px;
  height: 72px;
  border-color: rgba(251, 103, 3, 0.5);
  background: rgba(251, 103, 3, 0.06);
  mix-blend-mode: screen;
}

/* ── Text Selection Cursor ────────────────────────────────── */
.cursor.is-text {
  width: 3px;
  height: 30px;
  border-radius: 2px;
  border-color: rgba(254, 0, 3, 0.8);
  background: rgba(254, 0, 3, 0.7);
}

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

/* ── Hidden State ─────────────────────────────────────────── */
.cursor.is-hidden,
.cursor-dot.is-hidden {
  opacity: 0;
}

/* ── Cursor Trail (optional decorative dots) ──────────────── */
.cursor-trail {
  position: fixed;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(254, 0, 3, 0.4);
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease;
}
