/* Minimal custom cursor; js/systems/cursor.js drives its shape and position. */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-cursor);
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #ffffff;
  mix-blend-mode: difference;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease-out;
}

/* ---- Cursor-Vector (js/systems/cursor-vector.js): Factory and Universe ----------------- */
.cursor-vector {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-cursor);
  width: 96px;
  height: 96px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease-out;
}

/* Caret and answers live in the world above the scene; only the caret takes input. */
.cursor-layer {
  position: fixed;
  inset: 0;
  z-index: var(--z-world-input);
  pointer-events: none;
}

.cursor-answer {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 18rem;
  margin: 0;
  padding: 0.55rem 0.85rem;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: 0 6px 20px rgb(17 17 17 / 0.08);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
  text-wrap: pretty;
}

.cursor-answer--thinking {
  color: var(--ink-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

/* A question as particles (js/systems/absorb.js): each letter turns into a dot and is pulled into a Vector. */
.absorb-particle {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  translate: -50% -50%;
}

.absorb-particle > * {
  grid-area: 1 / 1;
}

.absorb-particle__glyph {
  white-space: pre;
}

.absorb-particle__dot {
  width: 5px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
}

/* Invisible mirror, used once per question to read where each letter sits */
.absorb-mirror {
  position: fixed;
  white-space: pre;
  visibility: hidden;
  pointer-events: none;
}
