/*
 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
*/

/*
 * Styling is being rebuilt in Bricks native fields and global variables.
 * The former child-theme stylesheet is retained locally for reference at:
 * /reference/child-theme-style.css
 */

/* Template 256: native horizontal scrolling below the desktop GSAP breakpoint. */
@media (max-width: 991px) {
  #gallery-slider {
    height: auto;
    min-height: 0;
  }

  #gallery-slider .gallery-slider-pin {
    position: static;
    height: auto;
    top: auto;
  }

  #gallery-slider .gallery-slider-track {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    max-width: max-content;
    min-width: max-content;
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 16px 12px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    -webkit-overflow-scrolling: touch;
  }

  #gallery-slider .gallery-slider-track > .g-item {
    flex: 0 0 auto;
    width: min(390px, 76vw);
    height: auto;
    scroll-snap-align: start;
  }
}

/* Keep the small set of scroll-driven surfaces on compositor-friendly layers. */
@media (prefers-reduced-motion: no-preference) {
  .story-video-wrap { will-change: transform, opacity, filter; }
  .story-panel, .service-card, .why-feature, .portfolio-reference .project {
    will-change: transform, opacity;
    backface-visibility: hidden;
  }

  /* The exit-blur hook wraps template copy in these spans as it approaches the viewport top. */
  #brx-content .hv-exit-word { will-change: filter, opacity; }
}

/* Add data-in-view to any non-heading wrapper that needs the shared entrance. */
[data-in-view] {
  opacity: 0;
  transform: translate3d(0, 3.125rem, 0);
  transition: transform var(--in-view-duration, .5s) var(--in-view-delay, 0s) ease-in-out,
    opacity var(--in-view-duration, .5s) var(--in-view-delay, 0s) ease-in-out;
  will-change: transform, opacity;
}

[data-in-view].in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Why cards remain hidden until the eyebrow + heading reveal reaches its trigger point. */
.why-reference-motion:not(.why-cards-ready) .why-feature {
  visibility: hidden;
}

body[data-builder-window] .why-reference-motion .why-feature {
  visibility: visible;
}

/* Bricks loads the frontend markup in an editor iframe; keep it inspectable there. */
body[data-builder-window] [data-in-view] {
  opacity: 1;
  transform: none;
  transition: none;
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  [data-in-view], [data-in-view].in-view {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .why-reference-motion .why-feature {
    visibility: visible;
  }
}


