/* ============================================================
   Selected Work — cursor (Figma: Portfolio, Section 11, "Cursor / Project
   hover v2")
   Over an open project panel the pointer becomes the backspace-key eyes
   together with a flat yellow "View case study" label — both appear at once
   with a quick fade and a tiny pop (no two-step reveal). A click or Enter
   blinks the eyes and deepens the yellow.
   js/work-cursor.js builds it; mouse/trackpad only. The native cursor is
   hidden only once the script is running (html.work-cursor-on).
   (The earlier "morph" reveal is commit 39b98ea if it's ever wanted back.)
   ============================================================ */

.work-cursor-on .work-item.is-open .work-panel {
  cursor: none;
}

.work-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease;
  will-change: transform;
}

.work-cursor.is-visible {
  opacity: 1;
}

/* The eyes sit centred on the pointer: left padding 11 (1 border + 10) +
   half the eyes (22). The pill pops in around that point. */
.work-cursor__pill {
  position: absolute;
  left: -33px;
  top: -18px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  height: 36px;
  padding: 0 15px 0 11px;
  font-family: var(--font-body);
  font-size: var(--text-key);
  letter-spacing: var(--tracking-key);
  color: var(--color-text);
  white-space: nowrap;
  transform-origin: 33px 50%;
}

.work-cursor.is-visible .work-cursor__pill {
  animation: work-cursor-pop 170ms cubic-bezier(0.25, 1.2, 0.4, 1);
}

@keyframes work-cursor-pop {
  from { transform: scale(0.88); }
  to   { transform: scale(1); }
}

.work-cursor__bg {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  background: var(--color-accent-yellow);
  border: var(--border-thin) solid var(--color-border);
  border-radius: 4px;
  transition: background-color 120ms ease;
}

.work-cursor.is-pressed .work-cursor__bg {
  background: #f8c20d; /* a touch deeper than the resting yellow */
}

.work-cursor__eyes {
  position: relative;
  display: block;
  width: 44px;
  height: auto;
  flex: none;
  transform-origin: 50% 50%;
  transition: transform 140ms ease;
}

.work-cursor.is-blink .work-cursor__eyes {
  transform: scaleY(0.12);
}

.work-cursor__label {
  position: relative;
  padding-left: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .work-cursor,
  .work-cursor__bg,
  .work-cursor__eyes {
    transition: none;
  }

  .work-cursor.is-visible .work-cursor__pill {
    animation: none;
  }
}
