/* Duda clone - scroll-animation repair.
 *
 * THE BIG ONE. Duda hides every animated element with
 *   .dmDesktopBody:not(.editGrid) [data-anim-desktop] { visibility: hidden !important }
 * and depends on its runtime to reveal them. Off-platform that reveal never
 * completes, so headings, stat counters, news excerpts and whole feature blocks
 * sit in the DOM and paint nowhere - the page looks "very close but missing a
 * lot of written content". Duda's own dashboard export has exactly the same
 * defect, so this is not a mirroring artefact.
 *
 * These selectors deliberately mirror Duda's specificity and load after it, so
 * they win the cascade with no JavaScript at all. clone-anim.js then re-adds
 * the animation properly on scroll.
 *
 * A DOM text diff cannot see this fault. Verify with getComputedStyle().
 */

.dmDesktopBody:not(.editGrid) [data-anim-desktop]:not([data-anim-desktop="none"]),
.dmDesktopBody:not(.editGrid) [data-anim-extended],
.dmDesktopBody:not(.editGrid) .dmNewParagraph[data-anim-desktop]:not([data-anim-desktop="none"]),
.dmDesktopBody:not(.editGrid) .dmNewParagraph[data-anim-extended],
.dmMobileBody:not(.editGrid) [data-anim-mobile]:not([data-anim-mobile="none"]),
.dmMobileBody:not(.editGrid) .dmNewParagraph[data-anim-mobile]:not([data-anim-mobile="none"]),
.dmTabletBody:not(.editGrid) [data-anim-tablet]:not([data-anim-tablet="none"]),
.dmTabletBody:not(.editGrid) .dmNewParagraph[data-anim-tablet]:not([data-anim-tablet="none"]),
[data-clone-anim] {
  visibility: visible !important;
}

/* Pre-animation state, applied by JS only so a JS failure still leaves the
   content readable rather than invisible. */
[data-clone-anim].clone-anim-pending {
  opacity: 0 !important;
}

[data-clone-anim].clone-anim-run {
  animation-duration: 0.9s;
  animation-fill-mode: both;
  animation-timing-function: ease;
}

/* Duda's full animation set, mapped onto the keyframes its own CSS ships. */
[data-clone-anim="zoomIn"].clone-anim-run       { animation-name: zoomIn; }
[data-clone-anim="fadeIn"].clone-anim-run       { animation-name: fadeIn; }
[data-clone-anim="fadeInLeft"].clone-anim-run   { animation-name: fadeInLeft; }
[data-clone-anim="fadeInRight"].clone-anim-run  { animation-name: fadeInRight; }
[data-clone-anim="fadeInUp"].clone-anim-run     { animation-name: fadeInUp; }
[data-clone-anim="fadeInDown"].clone-anim-run   { animation-name: fadeInDown; }
[data-clone-anim="bounceIn"].clone-anim-run     { animation-name: bounceIn; }
[data-clone-anim="slideInLeft"].clone-anim-run  { animation-name: fadeInLeft; }
[data-clone-anim="slideInRight"].clone-anim-run { animation-name: fadeInRight; }
[data-clone-anim="slideInUp"].clone-anim-run    { animation-name: fadeInUp; }
[data-clone-anim="flipInX"].clone-anim-run      { animation-name: fadeIn; }
[data-clone-anim="flipInY"].clone-anim-run      { animation-name: fadeIn; }

@media (prefers-reduced-motion: reduce) {
  [data-clone-anim].clone-anim-pending { opacity: 1 !important; }
  [data-clone-anim].clone-anim-run { animation: none !important; }
}
