/* Custom cursor — dot + ring with magnetic behavior.
   Disabled on touch devices (no hover). */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  pointer-events: none;
  z-index: 1000;
  transform: translate3d(-50%, -50%, 0);
  mix-blend-mode: difference;
  will-change: transform;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.cursor.is-ready {
  opacity: 1;
}

.cursor__ring {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--color-white);
  border-radius: 50%;
  transform: scale(1);
  transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
}

.cursor__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-white);
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

/* Hover over interactive elements — ring expands, dot shrinks */
.cursor.is-hovering .cursor__ring {
  transform: scale(1.8);
}

.cursor.is-hovering .cursor__dot {
  transform: translate(-50%, -50%) scale(0);
}

/* Over a tile — ring gets a labelled center */
.cursor.is-tile .cursor__ring {
  transform: scale(2.2);
  border-width: 1px;
}

.cursor.is-tile .cursor__dot {
  transform: translate(-50%, -50%) scale(0);
}

.cursor__label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-sans);
  font-weight: var(--fw-bold);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-white);
  opacity: 0;
  transition: opacity 0.25s var(--ease-out);
  white-space: nowrap;
  pointer-events: none;
}

.cursor.is-tile .cursor__label {
  opacity: 1;
}

/* Hide system cursor when custom cursor is active */
@media (hover: hover) and (pointer: fine) {
  html.has-cursor,
  html.has-cursor * {
    cursor: none !important;
  }
}

/* Touch / coarse pointer — hide custom cursor, show system */
@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}

/* Reduced motion — simpler cursor, no scale tweens */
@media (prefers-reduced-motion: reduce) {
  .cursor__ring,
  .cursor__dot {
    transition: none;
  }
}
