/* Codiji Site — custom cursor. Native cursor is hidden and replaced by
   #custom-cursor, positioned/scaled by cursor.js (rAF lerp, no framer-motion). */

body {
  cursor: none;
}
a, button, input, select, textarea {
  cursor: none;
}

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 1rem;
  height: 1rem;
  background: var(--color-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  mix-blend-mode: screen;
  opacity: 0;
  transform: translate(-100px, -100px) scale(1);
  will-change: transform, opacity;
}

/* Accessibility: any device without a fine (mouse-like) pointer — touch,
   and keyboard-only navigation — gets the native cursor + a real focus ring
   back, instead of silently losing all cursor/focus feedback. */
@media (pointer: coarse), (max-width: 768px) {
  body, input, select, textarea {
    cursor: auto !important;
  }
  a, button {
    cursor: pointer !important;
  }
  .cursor { display: none !important; }
}

/* Keyboard users tabbing through the page always get a visible focus ring,
   regardless of the custom cursor (fixes a real gap in the original design). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .cursor { display: none !important; }
  body, input, select, textarea { cursor: auto !important; }
  a, button { cursor: pointer !important; }
}
