/* kinetic-text-reveal — vanilla port of componentry.dev/kinetic-text-reveal (MIT, Harsh Jadhav). */

.cy-ktr {
  --cy-ktr-pad-top: .08em;
  --cy-ktr-pad-bottom: .16em;
}

/* Screen-reader copy of the full text; the split visual copy is aria-hidden. */
.cy-ktr-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.cy-ktr-vis {
  display: inline;
}

.cy-ktr-vis--lines {
  display: block;
}

.cy-ktr-line {
  display: block;
}

/* Clip mask: extra padding gives room for Persian dots / descenders, negative margin keeps line metrics. */
.cy-ktr-mask {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  max-width: 100%;
  padding: var(--cy-ktr-pad-top) 0 var(--cy-ktr-pad-bottom);
  margin: calc(-1 * var(--cy-ktr-pad-top)) 0 calc(-1 * var(--cy-ktr-pad-bottom));
}

/* Characters of one Latin word stay on one line. */
.cy-ktr-word {
  display: inline-block;
  vertical-align: top;
  white-space: nowrap;
}

.cy-ktr-run {
  unicode-bidi: isolate;
}

.cy-ktr-seg {
  display: inline-block;
}

.cy-ktr-animating .cy-ktr-seg {
  will-change: transform, opacity, filter;
}

.cy-ktr-pending .cy-ktr-seg {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .cy-ktr-pending .cy-ktr-seg {
    opacity: 1;
  }
}
