/* A lightweight paw cursor for devices that have a real hover pointer. */
@media (hover: hover) and (pointer: fine) {
  html.cursor-ring-enabled,
  html.cursor-ring-enabled * {
    cursor: none !important;
  }

  .cursor-ring {
    position: fixed;
    z-index: 2147483647;
    top: 0;
    left: 0;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    background: transparent;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    transition: opacity 160ms ease;
    will-change: transform;
  }

  .cursor-ring::backdrop {
    background: transparent;
    pointer-events: none;
  }

  .cursor-ring::before,
  .cursor-ring::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: url("/assets/images/cursor-mecha-paw-114.png") center / contain no-repeat;
    filter: grayscale(1);
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-45deg);
    transition: opacity 120ms ease;
  }

  html.cursor-ring-enabled .cursor-ring.is-visible {
    opacity: 1;
  }

  .cursor-ring::before {
    background-image: url("/assets/images/cursor-mecha-paw-grab-114.png");
    opacity: 0;
  }

  .cursor-ring.is-hovering::before {
    opacity: 1;
    animation: cursor-paw-grab 0.5s ease-in-out 3 forwards;
  }

  .cursor-ring.is-hovering::after {
    opacity: 0;
    animation: cursor-paw-release 0.5s ease-in-out 3 forwards;
  }

  .cursor-ring.is-clicked::before {
    animation: none;
    opacity: 0;
  }

  .cursor-ring.is-clicked::after {
    animation: none;
    opacity: 1;
  }

  .cursor-ring.is-pressed::before {
    animation: none;
    opacity: 1;
  }

  .cursor-ring.is-pressed::after {
    animation: none;
    opacity: 0;
  }

  @keyframes cursor-paw-grab {
    0%, 15%, 85%, 100% { opacity: 0; }
    35%, 65% { opacity: 1; }
  }

  @keyframes cursor-paw-release {
    0%, 15%, 85%, 100% { opacity: 1; }
    35%, 65% { opacity: 0; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor-ring::before, .cursor-ring::after { transition: none; }
  .cursor-ring.is-hovering::before, .cursor-ring.is-hovering::after { animation: none; }
}
