/* Dolf Agency — FX: scroll-scrubbed word reveal (see fx/scrub-words.js).
   Only styles the spans the module injects; the target keeps its own type. */

.fx-scrub--pos { position: relative; }

/* Ghosted word; GSAP scrubs opacity to 1. Final colour = the element's own. */
.fx-scrub-word {
  color: inherit;
  opacity: 0.16;
  transition: none;
}

/* Full sentence for assistive tech on non-heading targets */
.fx-scrub-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  /* Copying the paragraph must not paste the sentence twice */
  -webkit-user-select: none;
  user-select: none;
}

/* Hairline progress rail on the left of the text block */
.fx-scrub-rail {
  position: absolute;
  left: -1.25rem;
  top: 0.2em;
  bottom: 0.2em;
  width: 1px;
  background: var(--line);
  overflow: hidden;
  pointer-events: none;
}
.fx-scrub-fill {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--fg);
  transform: scaleY(0);
  transform-origin: 50% 0;
  will-change: transform;
}

@media (max-width: 899px) {
  .fx-scrub-rail { left: -0.75rem; }
}
@media (max-width: 599px) {
  .fx-scrub-rail { display: none; }
}

/* Never leave words ghosted where the effect cannot be followed: reduced
   motion, Windows high-contrast (forced colours) and print. The !important
   beats GSAP's inline opacity. */
@media (prefers-reduced-motion: reduce), (forced-colors: active), print {
  .fx-scrub-word { opacity: 1 !important; }
  .fx-scrub-rail { display: none !important; }
}
