/* ================================================================
   CURSOR.CSS — Elegant Simple Cursor
   ================================================================ */

/* On touch/mobile devices — hide custom cursor entirely and restore default */
@media (hover: none) and (pointer: coarse) {
  #cursor-ring, #cursor-dot, #cursor-label { display: none !important; }
  body, body *, body *::before, body *::after { cursor: auto !important; }
}

/* Only hide default cursor after JS has initialized */
body.js-loaded *, body.js-loaded *::before, body.js-loaded *::after {
  cursor: none !important;
}

/* ── Outer circle ── */
#cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--text-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out),
              height 0.3s var(--ease-out),
              background 0.3s,
              border-color 0.3s,
              opacity 0.2s;
  will-change: left, top;
  opacity: 0.85;
  mix-blend-mode: normal;
}

/* ── Inner dot ── */
#cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  will-change: left, top;
  transition: width 0.15s, height 0.15s, opacity 0.2s;
}

/* ── Label ── */
#cursor-label {
  position: fixed;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  font-weight: 600;
}

/* ── Hover state ── */
body.cursor-hover #cursor-ring {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid var(--accent);
  opacity: 1;
  mix-blend-mode: normal;
}
body.cursor-hover #cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  opacity: 1;
}

/* ── Click ── */
body.cursor-click #cursor-ring {
  transform: translate(-50%, -50%) scale(0.8);
  transition: transform 0.08s;
}

/* ── Project VIEW ── */
body.cursor-view #cursor-ring {
  width: 72px;
  height: 72px;
  background: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}
body.cursor-view #cursor-label { opacity: 1; }
body.cursor-view #cursor-dot   { opacity: 0; }

/* ── DRAG ── */
body.cursor-drag #cursor-ring {
  width: 56px;
  height: 56px;
  background: rgba(79,124,130,0.18);
  opacity: 1;
  mix-blend-mode: normal;
}
body.cursor-drag #cursor-label { opacity: 1; color: var(--accent); }
