/* ==========================================================================
   Custom cursor
   A small difference-blended dot that swells over anything clickable and
   sprouts an orbiting label over elements carrying data-cursor="word".
   Ported from breakthruuent.com so the parent company and its properties
   share one pointer behaviour. Pairs with cursor.js; no other dependency.
   ========================================================================== */

/* Hidden unless the script opts the body in, so touch devices, no-JS
   readers and reduced-motion users keep their native pointer. */
#cursor { display: none; }

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

  /* Controls that carry their own meaning keep their real affordance —
     typing, selecting, and video scrubbing all need a visible pointer. */
  body.has-cursor input,
  body.has-cursor textarea { cursor: text !important; }
  body.has-cursor select   { cursor: pointer !important; }
  body.has-cursor video    { cursor: auto !important; }

  #cursor {
    display: block;
    position: fixed; top: 0; left: 0; z-index: 8000;
    pointer-events: none;
    /* Inverts whatever sits beneath, so it reads on light and dark alike. */
    mix-blend-mode: difference;
    will-change: transform;
  }

  #cursor .dot {
    position: absolute; left: -3px; top: -3px;
    width: 6px; height: 6px; border-radius: 50%;
    background: #fff;
    transition: width .35s cubic-bezier(.22,1,.36,1), height .35s cubic-bezier(.22,1,.36,1),
                left  .35s cubic-bezier(.22,1,.36,1), top   .35s cubic-bezier(.22,1,.36,1);
  }
  #cursor.is-wide .dot { width: 54px; height: 54px; left: -27px; top: -27px; }

  #cursor .ring {
    position: absolute; left: -58px; top: -58px;
    width: 116px; height: 116px;
    opacity: 0; transform: scale(.7);
    transition: opacity .4s ease, transform .5s cubic-bezier(.22,1,.36,1);
  }
  #cursor.is-label .ring { opacity: 1; transform: scale(1); }
  #cursor .ring svg { width: 100%; height: 100%; animation: cursor-spin 9s linear infinite; }
  #cursor .ring text {
    /* Falls through each site's own mono token before the stack. */
    font-family: var(--mono, var(--font-mono, "JetBrains Mono", ui-monospace, monospace));
    font-size: 10.5px; letter-spacing: .22em;
    fill: #fff; text-transform: uppercase;
  }
}

@keyframes cursor-spin { to { transform: rotate(1turn); } }

@media (prefers-reduced-motion: reduce) {
  #cursor { display: none !important; }
  #cursor .ring svg { animation: none; }
}
