/* Motion supports the editorial photography; all content is visible by default. */
.ba-storefront {
  --ba-motion-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Lenis 1.3.26 integration. Native anchor scrolling remains Horizon's default. */
html.lenis,
html.lenis body {
  height: auto;
}

html.lenis.lenis-smooth {
  scroll-behavior: auto;
}

html.lenis.lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent] {
  overscroll-behavior: contain;
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.shopify-design-mode) .ba-storefront[data-ba-motion='true'] {
    .ba-link .ba-icon,
    .ba-category__label .ba-icon {
      transition: transform 240ms var(--ba-motion-ease);
    }

    .ba-category__image img {
      transition: transform 650ms var(--ba-motion-ease);
    }

    .ba-editorial__image,
    .ba-collection-story__image {
      overflow: clip;
    }
  }

  @media (hover: hover) and (pointer: fine) {
    .ba-storefront[data-ba-motion='true'] {
      .ba-category__link:hover img {
        transform: scale(1.045);
      }

      .ba-category__link:hover .ba-icon,
      .ba-link:hover .ba-icon {
        transform: translate(3px, -3px);
      }
    }
  }

  /* The photograph moves gently inside its frame as the page passes it.
     Unsupported browsers retain the original, static composition. */
  @supports (animation-timeline: view()) {
    html:not(.shopify-design-mode) .ba-storefront[data-ba-motion='true'] {
      .ba-hero__media,
      .ba-editorial__image,
      .ba-collection-story__image {
        view-timeline-name: --ba-photograph;
        view-timeline-axis: block;
      }

      .ba-hero__media img,
      .ba-editorial__image img,
      .ba-collection-story__image img {
        animation: ba-photograph-drift linear both;
        animation-timeline: --ba-photograph;
        animation-range: entry 0% exit 100%;
      }
    }
  }
}

@keyframes ba-photograph-drift {
  from { transform: translateY(-3%) scale(1.08); }
  to { transform: translateY(3%) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.ba-storefront) {
    scroll-behavior: auto;
  }
}
