/* ============================================================
   Eclipse cursor — Option A from motion-feel.md
   Two elements: dot (4px solid) + ring (20px outlined)
   ============================================================ */

.cursor {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  pointer-events: none;
  z-index: 9999;
  display: none;
}

@media (pointer: fine) {
  .cursor { display: block; }
  html.cursor-active { cursor: none; }
  html.cursor-active a,
  html.cursor-active button,
  html.cursor-active [role="button"],
  html.cursor-active input,
  html.cursor-active textarea,
  html.cursor-active select,
  html.cursor-active label { cursor: none; }
}

.cursor-dot,
.cursor-ring {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  pointer-events: none;
  will-change: transform;
}

.cursor-dot {
  inline-size: 4px;
  block-size: 4px;
  margin-inline-start: -2px;
  margin-block-start: -2px;
  background: var(--c-navy);
  border-radius: 50%;
  transition: background-color 220ms var(--ease-out),
              opacity 220ms var(--ease-out);
}

.cursor-ring {
  inline-size: 20px;
  block-size: 20px;
  margin-inline-start: -10px;
  margin-block-start: -10px;
  border: 1.5px solid var(--c-navy);
  background: transparent;
  border-radius: 50%;
  transition: inline-size 280ms var(--ease-out),
              block-size 280ms var(--ease-out),
              margin 280ms var(--ease-out),
              background-color 280ms var(--ease-out),
              border-color 280ms var(--ease-out),
              opacity 280ms var(--ease-out);
}

/* Surface flip — bone over dark surfaces */
.cursor[data-surface="dark"] .cursor-dot { background: var(--c-bone); }
.cursor[data-surface="dark"] .cursor-ring { border-color: var(--c-bone); }

/* Hover over interactive (links, buttons, nav, lang switcher) */
.cursor[data-state="hovering"] .cursor-dot { opacity: 0; }
.cursor[data-state="hovering"] .cursor-ring {
  inline-size: 56px;
  block-size: 56px;
  margin-inline-start: -28px;
  margin-block-start: -28px;
  background: rgba(247, 148, 29, 0.3);
  border-color: rgba(247, 148, 29, 0.3);
}

/* Hover over project tiles — bigger fill + "View →" label inside */
.cursor[data-state="hovering-tile"] .cursor-dot { opacity: 0; }
.cursor[data-state="hovering-tile"] .cursor-ring {
  inline-size: 96px;
  block-size: 96px;
  margin-inline-start: -48px;
  margin-block-start: -48px;
  background: rgba(18, 63, 109, 0.85);
  border-color: rgba(18, 63, 109, 0);
}
.cursor-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--ff-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--c-bone);
  opacity: 0;
  transition: opacity 220ms var(--ease-out);
  pointer-events: none;
  white-space: nowrap;
}
.cursor[data-state="hovering-tile"] .cursor-label { opacity: 1; }

/* Disable on touch and reduced motion */
@media (pointer: coarse) {
  .cursor { display: none !important; }
  html.cursor-active,
  html.cursor-active a,
  html.cursor-active button { cursor: auto !important; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor { display: none !important; }
  html.cursor-active,
  html.cursor-active a,
  html.cursor-active button { cursor: auto !important; }
}
