/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* ==========================================================================
   Scroll-in animations
   Apply `.animate` + one modifier to any element. JS adds `.is-visible`
   when the element scrolls into view.
   Optional: --animate-delay, --animate-duration on the element.
   ========================================================================== */

.animate {
  --animate-duration: 0.7s;
  --animate-delay: 0s;
  --animate-distance: 40px;
  transition:
    opacity var(--animate-duration) ease var(--animate-delay),
    transform var(--animate-duration) ease var(--animate-delay);
}

/* Only hide when JS is available. Prevents stuck-hidden elements in the
   Bricks builder canvas or when scripts fail to load. */
.js-animate .animate {
  opacity: 0;
  will-change: opacity, transform;
}

.js-animate .animate--fade-up    { transform: translateY(var(--animate-distance)); }
.js-animate .animate--fade-down  { transform: translateY(calc(var(--animate-distance) * -1)); }
.js-animate .animate--fade-left  { transform: translateX(var(--animate-distance)); }
.js-animate .animate--fade-right { transform: translateX(calc(var(--animate-distance) * -1)); }
.js-animate .animate--zoom       { transform: scale(0.92); }
.js-animate .animate--zoom-out   { transform: scale(1.08); }

.animate.is-visible {
  opacity: 1;
  transform: none;
}

/* Optional delay helpers for staggering siblings */
.animate--d1 { --animate-delay: 0.1s; }
.animate--d2 { --animate-delay: 0.2s; }
.animate--d3 { --animate-delay: 0.3s; }
.animate--d4 { --animate-delay: 0.4s; }
.animate--d5 { --animate-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .animate {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
