/* ==========================================================================
   NURREVER — glitch text on the primary CTA (M6)
   Phase 2 rebuild. Loaded after site.css / pages.css on every page.

   Source: Madar Platform public/styles-WA6VQTFY.css — the @keyframes
   flicker-in / flicker-text below are LIFTED VERBATIM (reformatted from
   the minified original; stops and values unchanged). In Madar they are
   applied by the Angular button component (effect="glitch" /
   class="btn btn--glitch", 23 occurrences in ssr/en.html) via per-char
   flicker-text; no standalone .btn--glitch rule exists in Madar's
   shipped CSS — the class is a component hook, so the portable lift is
   the keyframes + a hover/focus trigger, written here.

   Use: SPARINGLY — primary "Talk to us" CTA only (index + about +
   services). Opacity-only animation (audit §8.4: transform/opacity-only).
   Disabled entirely under prefers-reduced-motion.
   ========================================================================== */

/* LIFTED VERBATIM from Madar styles-WA6VQTFY.css (reformatted only). */
@keyframes flicker-in {
  0% {
    opacity: 0;
  }
  1%,
  19.9% {
    opacity: 0.5;
  }
  20%,
  39.9% {
    opacity: 0.214;
  }
  40%,
  59.9% {
    opacity: 0.844;
  }
  60%,
  79.9% {
    opacity: 0.288;
  }
  80%,
  to {
    opacity: 1;
  }
}

/* LIFTED VERBATIM from Madar styles-WA6VQTFY.css (reformatted only). */
@keyframes flicker-text {
  0% {
    opacity: 0;
  }
  1%,
  25% {
    opacity: 0.5;
  }
  24.9%,
  50% {
    opacity: 1;
  }
  50.1%,
  75% {
    opacity: 0.5;
  }
  75.1%,
  to {
    opacity: 1;
  }
}

/* One short flicker when the CTA is hovered or keyboard-focused — a
   single pass, then it rests at full opacity. No looping: the effect
   must read as premium, not noisy. */
.btn--glitch:hover,
.btn--glitch:focus-visible {
  animation: flicker-text cubic-bezier(0.7, 0, 0.3, 1) 0.35s both;
}

@media (prefers-reduced-motion: reduce) {
  .btn--glitch:hover,
  .btn--glitch:focus-visible {
    animation: none;
  }
}
