/* =========================================================
   CUSTOM SPHERE CURSOR
   The home page's glowing sphere, now shared by every page.
   Built by /common/cursor.js, which only runs on devices with
   a real pointer (mouse or trackpad).
   ========================================================= */

/* Hide the system pointer only once the sphere is live, so a
   browser that cannot run the script keeps its own. */
html.vp-cursor-on,
html.vp-cursor-on body,
html.vp-cursor-on a,
html.vp-cursor-on button {
  cursor: none;
}

/* Typing needs the real caret, so form fields keep theirs
   (cursor.js hides the sphere while it is over one). */
html.vp-cursor-on input,
html.vp-cursor-on textarea,
html.vp-cursor-on select {
  cursor: auto;
}


/* =========================
   SPHERE
========================= */

.cursor-sphere {

  position: fixed;

  left: 0;
  top: 0;

  width: 18px;
  height: 18px;

  border-radius: 50%;

  pointer-events: none;

  z-index: 10000;

  transform:
    translate(-50%, -50%);

  opacity: 0;

  background:
    radial-gradient(
      circle at 30% 25%,
      #ffffff 0%,
      #dce5ff 18%,
      #8da8ff 42%,
      #486cff 68%,
      #172c91 100%
    );

  box-shadow:

    0 0 8px
    rgba(120, 150, 255, 0.8),

    0 0 22px
    rgba(75, 110, 255, 0.55),

    0 0 45px
    rgba(55, 90, 255, 0.25);

  transition:
    opacity 0.2s ease,
    width 0.18s ease,
    height 0.18s ease;

}


.cursor-sphere::before {

  content: "";

  position: absolute;

  left: 50%;
  top: 50%;

  width: 34px;
  height: 34px;

  border-radius: 50%;

  transform:
    translate(-50%, -50%);

  border:
    1px solid
    rgba(130, 155, 255, 0.28);

  box-shadow:
    0 0 18px
    rgba(80, 120, 255, 0.25);

}


.cursor-sphere::after {

  content: "";

  position: absolute;

  left: 27%;
  top: 20%;

  width: 4px;
  height: 4px;

  border-radius: 50%;

  background: white;

  filter:
    blur(0.5px);

  opacity: 0.9;

}


.cursor-sphere.active {

  opacity: 1;

}


.cursor-sphere.clicking {

  animation:
    sphereClick
    420ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    );

}


@keyframes sphereClick {

  0% {

    width: 18px;
    height: 18px;

    box-shadow:

      0 0 8px
      rgba(120, 150, 255, 0.8),

      0 0 22px
      rgba(75, 110, 255, 0.55),

      0 0 45px
      rgba(55, 90, 255, 0.25);

  }

  30% {

    width: 11px;
    height: 11px;

    box-shadow:

      0 0 12px
      rgba(150, 175, 255, 1),

      0 0 35px
      rgba(75, 110, 255, 0.8);

  }

  55% {

    width: 25px;
    height: 25px;

    box-shadow:

      0 0 15px
      rgba(150, 175, 255, 1),

      0 0 45px
      rgba(75, 110, 255, 0.75);

  }

  100% {

    width: 18px;
    height: 18px;

    box-shadow:

      0 0 8px
      rgba(120, 150, 255, 0.8),

      0 0 22px
      rgba(75, 110, 255, 0.55),

      0 0 45px
      rgba(55, 90, 255, 0.25);

  }

}


/* =========================
   CLICK RIPPLE
========================= */

.cursor-ripple {

  position: fixed;

  width: 20px;
  height: 20px;

  border-radius: 50%;

  pointer-events: none;

  z-index: 9999;

  border:
    1px solid
    rgba(150, 175, 255, 0.8);

  transform:
    translate(-50%, -50%)
    scale(0);

  opacity: 0;

}


.cursor-ripple.active {

  animation:
    cursorRipple
    500ms
    cubic-bezier(
      0.2,
      0.8,
      0.2,
      1
    );

}


@keyframes cursorRipple {

  0% {

    transform:
      translate(-50%, -50%)
      scale(0);

    opacity: 0.9;

  }

  100% {

    transform:
      translate(-50%, -50%)
      scale(4);

    opacity: 0;

  }

}
