/* ============================================================
   Bump Chromatic Text — v2 (fork of Mouse Repel)
   ============================================================ */

.bump-field {
  /* Tuning interface — override per instance */
  --bump-blend-mode: screen;      /* confirmed correct: solid bg only.
                                      Flip to multiply if bg goes light. */
  --bump-hue-offset: 10;          /* degrees, neighbor-inherited hue */
  --bump-hold-duration: 1500ms;   /* colour hold before fade starts */
  --bump-fade-duration: 600ms;    /* colour + ghost fade-back duration */
}

.bump-item {
  position: relative;             /* anchors absolutely-positioned ghosts */
  display: inline-block;
  will-change: transform, color;
}

.bump-ghost {
  display:none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  white-space: pre;
  opacity: 0;
  will-change: transform, opacity;
  mix-blend-mode: var(--bump-blend-mode, screen);
  transition: opacity calc(var(--bump-fade-duration, 600ms) * 1) ease;
}

/* Ghost channel colors (bump-ghost-r/g/b) are no longer set here —
   they're derived per-bump from the assigned hue in JS via
   HSL→RGB channel isolation, so ghosts reconstruct the correct
   colour at zero offset instead of the fixed-primary version
   washing to white under mix-blend-mode:screen. */

@media (prefers-reduced-motion: reduce) {
  .bump-item,
  .bump-ghost {
    transition: none;
    transform: none;
  }
}
