/* Fixes for running the exported Squarespace markup off Squarespace.

   Squarespace's image loader fades each image in by setting opacity 1 on
   .fluid-image-animation-wrapper once its own loader reports success. That
   loader talks to Squarespace's CDN pipeline, so self-hosted it never
   completes and every image stays invisible (and, being lazy, never even
   gets fetched). We render them immediately instead. */

.fluid-image-animation-wrapper {
  opacity: 1 !important;
}

.fluid-image-container img,
.sqs-image-content img {
  opacity: 1 !important;
  visibility: visible !important;
}

/* The loader also relies on a JS-set height; keep intrinsic sizing sane. */
.js-content-mode-element.content-fit {
  min-height: 0;
}

/* ---------------------------------------------------------------------
   Scroll-reveal (.preFade -> .fadeIn).

   The template hides text with .preFade{opacity:0} and relies on a
   Squarespace controller to add .fadeIn. That controller does not complete
   off-platform, so headings and body copy stayed invisible.

   Default here is VISIBLE, so with JavaScript off or broken the copy still
   reads. sprout-fixes.js stamps .sprout-fx on <html> before first paint and
   then drives the reveal itself, restoring the intended fade.
   --------------------------------------------------------------------- */
.preFade {
  opacity: 1;
}

html.sprout-fx .preFade {
  opacity: 0;
  transition-property: opacity;
  transition-duration: .7s;
}

html.sprout-fx .preFade.fadeIn,
html.sprout-fx .preFade.sprout-revealed {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  html.sprout-fx .preFade {
    opacity: 1;
    transition: none;
  }
}
