/* ==========================================================================
   00 — EDITORIAL CONTEXTUAL CURSOR (Desktop Only · Raju Studio v2 · v2)
   - 100% isolado (pointer-events: none, não bloqueia cliques nem scroll)
   - Mantém o cursor nativo visível e livre — pílula de rótulo ancorada fora
     da área do ponteiro (sem nunca cobrir o texto "SOUND", "VIEW ↗", etc.)
   - Flip automático perto das bordas direita/inferior da viewport
   - Desativado automaticamente em mobile/touch
   ========================================================================== */

.raju-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 220;
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.raju-cursor.is-visible {
  opacity: 1;
}

.raju-cursor.is-hidden {
  opacity: 0 !important;
}

.raju-cursor-pill {
  --pill-tx: -50%;
  --pill-ty: -50%;
  --pill-scale: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background-color: #a8c639;
  color: #0a0518;
  border: 1px solid rgba(10, 5, 24, 0.14);
  box-shadow: 0 8px 22px rgba(10, 5, 24, 0.22);
  transform: translate3d(var(--pill-tx), var(--pill-ty), 0) scale(var(--pill-scale));
  transition:
    min-width 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    padding 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.26s ease,
    color 0.26s ease,
    border-color 0.26s ease,
    transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.28s ease;
}

.raju-cursor-label {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition:
    max-width 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.22s ease;
}

/* Estado sutil sobre links/botões comuns (anel centrado na ponta do ponteiro) */
.raju-cursor.is-pointer .raju-cursor-pill {
  min-width: 24px;
  height: 24px;
  background-color: rgba(168, 198, 57, 0.2);
  border-color: #a8c639;
  box-shadow: 0 4px 14px rgba(10, 5, 24, 0.14);
}

/* Estado contextual com rótulo: ancorado limpo à direita/abaixo do ponteiro nativo */
.raju-cursor.is-labeled .raju-cursor-pill {
  --pill-tx: 18px;
  --pill-ty: 22px;
  min-width: 78px;
  height: 32px;
  padding: 0 0.85rem;
  background-color: #a8c639;
  color: #0a0518;
  border-color: rgba(10, 5, 24, 0.16);
  box-shadow: 0 12px 30px rgba(10, 5, 24, 0.28);
  transform: translate3d(18px, 22px, 0) scale(var(--pill-scale));
}

.raju-cursor.is-labeled.is-flip-x .raju-cursor-pill {
  transform: translate3d(calc(-100% - 14px), 22px, 0) scale(var(--pill-scale));
}

.raju-cursor.is-labeled.is-flip-y .raju-cursor-pill {
  transform: translate3d(18px, calc(-100% - 14px), 0) scale(var(--pill-scale));
}

.raju-cursor.is-labeled.is-flip-x.is-flip-y .raju-cursor-pill {
  transform: translate3d(calc(-100% - 14px), calc(-100% - 14px), 0) scale(var(--pill-scale));
}

.raju-cursor.is-labeled .raju-cursor-label {
  max-width: 140px;
  opacity: 1;
}

/* Variante Violeta para vídeos com áudio (SOUND / WATCH ↗) */
.raju-cursor[data-tone="violet"].is-labeled .raju-cursor-pill {
  background-color: #5e35ff;
  color: #e5e4de;
  border-color: rgba(229, 228, 222, 0.24);
}

/* Variante Deep Indigo para ações de fechar / lightbox */
.raju-cursor[data-tone="dark"].is-labeled .raju-cursor-pill {
  background-color: #0a0518;
  color: #a8c639;
  border-color: rgba(168, 198, 57, 0.42);
}

/* Micro-compressão tátil ao clicar */
.raju-cursor.is-pressed .raju-cursor-pill {
  --pill-scale: 0.9;
}

/* Desativado 100% em touch, mobile e dispositivos sem hover fino */
@media (hover: none), (pointer: coarse), (max-width: 900px) {
  .raju-cursor {
    display: none !important;
  }
}