.custom-cursor-layer,
.custom-cursor {
  display: none;
}

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

  body.space-cursor-enabled.space-cursor-ready,
  body.space-cursor-enabled.space-cursor-ready * {
    cursor: none !important;
  }

  .custom-cursor-layer {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    pointer-events: none;
    background: transparent;
    border: 0;
    color: inherit;
  }

  .custom-cursor-layer::backdrop {
    display: none;
    background: transparent;
  }

  .custom-cursor {
    --space-cursor-accent-current: var(--accent, var(--signal, #f0f0eb));
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2147483647;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    pointer-events: none;
    opacity: 0;
    border: 0;
    border-radius: 0;
    contain: layout style paint;
    isolation: isolate;
    mix-blend-mode: normal;
    transform:
      translate3d(var(--space-cursor-x, -80px), var(--space-cursor-y, -80px), 0)
      translate3d(-50%, -50%, 0);
    transition: opacity 110ms ease;
    will-change: transform, opacity;
  }

  body.space-cursor-ready .custom-cursor {
    opacity: 1;
  }

  .custom-cursor::before {
    display: none !important;
    content: none !important;
  }

  .custom-cursor::after {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    width: 3px;
    height: 3px;
    content: "";
    background: var(--space-cursor-accent-current);
    border: 1px solid rgba(0, 0, 0, 0.78);
    border-radius: 50%;
    box-shadow: 0 0 8px color-mix(in srgb, var(--space-cursor-accent-current) 48%, transparent);
    transform: translate(-50%, -50%);
    transition: opacity 100ms ease, transform 130ms cubic-bezier(0.2, 0.9, 0.2, 1);
  }

  .custom-cursor-ring {
    position: absolute;
    inset: 3px;
    z-index: 0;
    display: block;
    pointer-events: none;
    background: rgba(5, 5, 5, 0.82);
    border: 1px solid color-mix(in srgb, var(--space-cursor-accent-current) 72%, #f0f0eb);
    border-radius: 50%;
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.68),
      0 5px 14px rgba(0, 0, 0, 0.3);
    transform: scale(0.88);
    transition:
      background 120ms ease,
      border-color 120ms ease,
      border-radius 140ms ease,
      box-shadow 140ms ease,
      transform 140ms cubic-bezier(0.2, 0.9, 0.2, 1);
  }

  .custom-cursor-dot {
    display: none;
  }

  .custom-cursor img,
  .custom-cursor-mark {
    position: relative;
    inset: auto;
    z-index: 2;
    display: block;
    width: 15px;
    height: 15px;
    opacity: 0.9;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.82));
    transform: none;
    transition: opacity 100ms ease, transform 140ms cubic-bezier(0.2, 0.9, 0.2, 1);
  }

  .custom-cursor.is-interactive .custom-cursor-ring {
    border-color: var(--space-cursor-accent-current);
    box-shadow:
      0 0 0 1px rgba(0, 0, 0, 0.74),
      0 0 0 3px color-mix(in srgb, var(--space-cursor-accent-current) 13%, transparent),
      0 7px 18px rgba(0, 0, 0, 0.34);
    transform: scale(1.13);
  }

  .custom-cursor.is-media .custom-cursor-ring {
    border-radius: 33%;
    transform: scale(1.22);
  }

  .custom-cursor.is-drag .custom-cursor-ring {
    border-style: dashed;
    transform: scale(1.2);
  }

  .custom-cursor.is-zoom .custom-cursor-ring {
    border-radius: 4px;
    transform: scale(1.24);
  }

  .custom-cursor.is-zoom::after {
    width: 9px;
    height: 9px;
    background:
      linear-gradient(var(--space-cursor-accent-current), var(--space-cursor-accent-current)) 50% 0 / 1px 100% no-repeat,
      linear-gradient(var(--space-cursor-accent-current), var(--space-cursor-accent-current)) 0 50% / 100% 1px no-repeat;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .custom-cursor.is-text .custom-cursor-ring {
    top: 5px;
    right: auto;
    bottom: auto;
    left: 15px;
    width: 2px;
    height: 22px;
    background: var(--space-cursor-accent-current);
    border: 0;
    border-radius: 1px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.72);
    transform: none;
  }

  .custom-cursor.is-text .custom-cursor-ring::before,
  .custom-cursor.is-text .custom-cursor-ring::after {
    position: absolute;
    left: -3px;
    width: 8px;
    height: 1px;
    content: "";
    background: var(--space-cursor-accent-current);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.64);
  }

  .custom-cursor.is-text .custom-cursor-ring::before {
    top: 0;
  }

  .custom-cursor.is-text .custom-cursor-ring::after {
    bottom: 0;
  }

  .custom-cursor.is-text img,
  .custom-cursor.is-text .custom-cursor-mark,
  .custom-cursor.is-text::after {
    opacity: 0;
  }

  .custom-cursor.is-disabled .custom-cursor-ring {
    background:
      linear-gradient(135deg, transparent 46%, #ff806f 47% 53%, transparent 54%),
      rgba(5, 5, 5, 0.88);
    border-color: #ff806f;
    transform: scale(0.98);
  }

  .custom-cursor.is-disabled img,
  .custom-cursor.is-disabled .custom-cursor-mark {
    opacity: 0.42;
  }

  .custom-cursor.is-pressing .custom-cursor-ring {
    background: color-mix(in srgb, var(--space-cursor-accent-current) 26%, #050505);
    transform: scale(0.72);
  }

  .custom-cursor.is-pressing img,
  .custom-cursor.is-pressing .custom-cursor-mark {
    opacity: 0.68;
    transform: scale(0.72);
  }

  .custom-cursor-label {
    position: absolute;
    top: -18px;
    left: 26px;
    z-index: 4;
    display: block;
    min-width: max-content;
    padding: 4px 7px 3px;
    color: #050505;
    background: var(--space-cursor-accent-current);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 2px;
    font-family: "Russo One", "Exo 2", sans-serif;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    transform: translate3d(-3px, 4px, 0);
    transition: opacity 110ms ease, transform 150ms cubic-bezier(0.2, 0.9, 0.2, 1);
  }

  .custom-cursor.has-label .custom-cursor-label {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  body.cursor-demoing .custom-cursor {
    transition:
      opacity 110ms ease,
      transform 620ms cubic-bezier(0.16, 0.94, 0.18, 1);
  }
}

html.a11y-mode .custom-cursor-layer,
html.a11y-mode .custom-cursor,
body.accessibility-mode .custom-cursor-layer,
body.voice-accessibility-mode .custom-cursor-layer {
  display: none !important;
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce), (forced-colors: active), print {
  .custom-cursor-layer,
  .custom-cursor {
    display: none !important;
  }
}
