.space-cursor { display: none; }

@media (hover: hover) and (pointer: fine) {
  html.space-cursor-ready,
  html.space-cursor-ready body,
  html.space-cursor-ready body * { cursor: none !important; }

  .space-cursor {
    position: fixed;
    z-index: 2147483647;
    top: 0;
    left: 0;
    display: block;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }

  .space-cursor[data-visible] { opacity: 1; }
  .space-cursor * { pointer-events: none; }

  .space-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 88px;
    height: 76.421px;
    margin: -50.947px 0 0 -44px;
    transform-origin: 50% 66.6667%;
    transform: translate3d(-100px, -100px, 0) scale(.46);
    will-change: transform;
    transition: opacity .2s ease;
  }

  .space-cursor-glass {
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    background:
      radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 45%),
      rgba(255, 255, 255, .02);
    box-shadow:
      inset 0 1.5px 1px rgba(255, 255, 255, .55),
      inset 0 -6px 14px rgba(255, 255, 255, .05);
    /* Keep the real text and images sharp beneath the transparent highlight. */
    backdrop-filter: none;
    transition: background-color .3s ease;
  }

  .space-cursor[data-contrast] .space-cursor-glass { background-color: rgba(8, 10, 24, .28); }

  .space-cursor-outline {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    fill: none;
    stroke: url("#space-cursor-edge");
    stroke-width: 1;
    stroke-linejoin: round;
    filter: drop-shadow(0 4px 8px #0007);
  }

  .space-cursor-outline .space-cursor-edge-shadow {
    stroke: rgba(4, 7, 18, .75);
    stroke-width: 3;
  }

  .space-cursor[data-contrast] .space-cursor-outline { stroke: rgba(255, 255, 255, .94); }

  .space-cursor-arrow {
    position: absolute;
    top: 51%;
    left: 35%;
    width: 30%;
    height: 34%;
    stroke: #fff;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 2px #000);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .25s ease, transform .35s cubic-bezier(.16, 1, .3, 1);
  }

  .space-cursor[data-media] .space-cursor-arrow { opacity: 1; transform: none; }
  .space-cursor[data-lens] .space-cursor-ring { opacity: 0; }

  .space-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background: #fff;
    mix-blend-mode: difference;
    transform: translate3d(-100px, -100px, 0);
    will-change: transform;
    transition:
      width .35s cubic-bezier(.16, 1, .3, 1),
      height .35s cubic-bezier(.16, 1, .3, 1),
      margin .35s cubic-bezier(.16, 1, .3, 1);
  }

  .space-cursor[data-action] .space-cursor-dot,
  .space-cursor[data-media] .space-cursor-dot {
    width: 0;
    height: 0;
    margin: 0;
  }

  .space-cursor[data-lens] .space-cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; }
}

@media (prefers-reduced-motion: reduce) {
  .space-cursor,
  .space-cursor-ring,
  .space-cursor-dot { transition: none; }
}
