/* cursor.css
   Custom cursor for adamcagle.com ALPHA rebuild.
   Hidden on touch devices and when reduced motion is requested. */

@media (pointer: coarse) {
  .cursor { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor { display: none !important; }
}

/* Hide the native cursor only when our custom one is active */
@media (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor [data-cursor] { cursor: none; }
}

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  transition:
    width .35s cubic-bezier(.2,.7,.2,1),
    height .35s cubic-bezier(.2,.7,.2,1),
    margin .35s cubic-bezier(.2,.7,.2,1),
    background .25s;
}

/* Separate orange ring, top-level sibling so it is NOT inside the
   difference-blended cursor. Hidden by default. */
.cursor-ring {
  position: fixed;
  top: 0; left: 0;
  width: 96px; height: 96px;
  margin: -48px 0 0 -48px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: scale(0);
  transition: opacity .25s, transform .35s cubic-bezier(.2,.7,.2,1), width .35s, height .35s, margin .35s;
}

/* ─── EXPANDED STATES ─── */

.cursor.is-view,
.cursor.is-drag {
  width: 96px; height: 96px;
  margin: -48px 0 0 -48px;
  background: #fff;
  mix-blend-mode: difference;
}

.cursor.is-external,
.cursor.is-email {
  width: 84px; height: 84px;
  margin: -42px 0 0 -42px;
  background: #fff;
  mix-blend-mode: difference;
}

.cursor.is-hover {
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  background: #fff;
  mix-blend-mode: difference;
}

/* Ring sizes track the cursor sizes */
.cursor-ring.is-view,
.cursor-ring.is-drag {
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  opacity: 1; transform: scale(1);
}
.cursor-ring.is-external,
.cursor-ring.is-email {
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  opacity: 1; transform: scale(1);
}
.cursor-ring.is-hover {
  width: 36px; height: 36px; margin: -18px 0 0 -18px;
  opacity: 1; transform: scale(1);
}

/* ─── CANVAS PARTICLE TRAIL ─── */

.cursor-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 9998;
  mix-blend-mode: screen;
}
/* Light theme: screen on cream-coloured bg has nothing to brighten so the
   particles disappear. Multiply darkens, which makes orange visible. */
html[data-theme="light"] .cursor-canvas {
  mix-blend-mode: multiply;
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-canvas { display: none !important; }
}
