/* EXPERIMENT (2026-10-24, Kyle: "add a mouse tracker that has a ripple effect").
   A dot on the pointer, a ring that glides after it, a ripple on every click and faint ripples trailing the
   movement. Mouse and trackpad only, never with reduced motion. Self-contained: to undo, remove this file's <link>
   in includes/header.php and the "Mouse tracker" block in assets/js/main.js (it creates the elements itself). */

.cursor { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.cursor__dot, .cursor__ring, .cursor__ripple { position: absolute; left: 0; top: 0; border-radius: 50%; pointer-events: none; }
.cursor__dot {
  width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--orange);
  transition: opacity 0.2s, scale 0.25s var(--ease-out);
}
.cursor__ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1.5px solid rgba(255, 244, 232, 0.5);
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), margin 0.35s var(--ease-out),
    border-color 0.3s, background-color 0.3s, opacity 0.3s;
}
.cursor__ripple {
  border: 2px solid var(--orange);
  background: radial-gradient(circle, rgba(248, 100, 0, 0) 55%, rgba(248, 100, 0, 0.1) 100%);
  animation: cursor-ripple 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.cursor__ripple--echo { border-width: 1.5px; border-color: rgba(248, 100, 0, 0.6); background: none; animation-delay: 0.14s; scale: 0.1; }
.cursor__ripple--trail { border: 1px solid rgba(255, 244, 232, 0.4); background: none; animation-duration: 1.2s; }
@keyframes cursor-ripple {
  0% { scale: 0.1; opacity: 0.95; }
  45% { opacity: 0.6; }
  100% { scale: 1; opacity: 0; }
}

/* Over something you can click: the ring opens up and turns orange, the dot steps back */
.cursor.is-link .cursor__ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; border-color: var(--orange); background: rgba(248, 100, 0, 0.08); }
.cursor.is-link .cursor__dot { scale: 0.5; }
.cursor.is-down .cursor__ring { width: 26px; height: 26px; margin: -13px 0 0 -13px; }

/* Hidden until the first movement, when the pointer leaves the window, and over text fields */
.cursor:not(.is-ready) .cursor__dot, .cursor:not(.is-ready) .cursor__ring,
.cursor.is-away .cursor__dot, .cursor.is-away .cursor__ring,
.cursor.is-text .cursor__dot, .cursor.is-text .cursor__ring { opacity: 0; }

/* The system cursor is hidden only while the tracker is running, and comes back for typing and the lightbox */
html.has-cursor, html.has-cursor * { cursor: none !important; }
html.has-cursor input, html.has-cursor textarea, html.has-cursor select,
html.has-cursor [contenteditable], html.has-cursor .zoom, html.has-cursor .zoom * { cursor: auto !important; }
html.has-cursor input[type="radio"], html.has-cursor .choice { cursor: none !important; }
html.cursor-off .cursor { display: none; }
html.has-cursor.cursor-off, html.has-cursor.cursor-off * { cursor: auto !important; }
