/* Only the homepage opts into this motion language; no initial hiding rules. */
body.home[data-cfa-home-motion="ready"] {
  --cfa-motion-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --cfa-motion-fast: 180ms;
}
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  body.home[data-cfa-home-motion="ready"] main :is(a.button, button.button, .text-link) {
    transition: transform var(--cfa-motion-fast) var(--cfa-motion-ease-out), background-color var(--cfa-motion-fast) var(--cfa-motion-ease-out), color var(--cfa-motion-fast) var(--cfa-motion-ease-out);
  }
  body.home[data-cfa-home-motion="ready"] main :is(a.button, button.button):hover {
    transform: translate3d(0, -1px, 0);
  }
  body.home[data-cfa-home-motion="ready"] main .text-link:hover {
    transform: translate3d(2px, 0, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  body.home main [data-cfa-reveal] { animation: none !important; transition: none !important; }
}

/* Keep the watercolor softly behind the content, including with reduced motion. */
body.home #stories::before { filter: blur(2px); }

/* Scroll-driven watercolor only: preserve the original image, opacity and layout. */
@media (prefers-reduced-motion: no-preference) {
  body.home #stories[data-cfa-watercolor-motion="ready"]::before {
    transform: translate3d(0, var(--cfa-stories-drift, 0px), 0)
      rotate(var(--cfa-stories-turn, 0deg)) scale(var(--cfa-stories-zoom, 1));
    /* Leave room for the rotated/expanded image inside the viewport. */
    right: 0;
    transform-origin: 55% 45%;
    will-change: transform;
  }
}
