/* ===== Shared infinite marquee (Gallery + Testimonials) =====
 * Each .marquee holds its set twice (or --copies times); shifting by one set loops seamlessly.
 */

.marquee-stack { position: relative; display: flex; flex-direction: column; gap: 24px; margin-top: 72px; overflow: hidden; }
.marquee { --gap: 24px; display: flex; gap: var(--gap); width: max-content; animation: marquee var(--duration, 60s) linear infinite; }
.marquee--reverse { animation-direction: reverse; }
.marquee__set { display: flex; gap: var(--gap); }
.marquee-stack:not(.marquee-stack--solo):hover .marquee { animation-play-state: paused; }
/* --solo (Gallery): only the hovered row stops — it eases down via marquee_row_controller.js */
/* one loop = one set + one gap; --copies is how many times the set is repeated (default 2) */
@keyframes marquee { to { transform: translateX(calc((-100% - var(--gap)) / var(--copies, 2))); } }
@media (prefers-reduced-motion: reduce) { .marquee { animation: none; } }

/* Soft white edges (Figma "Rectangle 39/40", 122px wide). */
.marquee-stack__fade { position: absolute; top: 0; bottom: 0; z-index: 1; width: 122px; pointer-events: none; }
.marquee-stack__fade--left { left: 0; background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0)); }
.marquee-stack__fade--right { right: 0; background: linear-gradient(270deg, #fff, rgba(255, 255, 255, 0)); }

/* ===== (12) Gallery — Figma 3326:10542 ===== */

.gallery { padding: 140px 0 70px; overflow: hidden; }
.gallery__lead { max-width: 770px; }
.gallery .btn-cta { margin-top: 24px; }

/* Every tile has the same height (319px in Figma, scaled down on smaller screens)
   and its own width from its image's proportions (--ar, set inline). */
.gallery-tile {
  flex: none;
  height: clamp(228px, 16.615vw, 319px);
  aspect-ratio: var(--ar, 252 / 319);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; }
.gallery-tile:hover { transform: translateY(-6px) scale(1.03); box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.45); }

@media (max-width: 1024px) {
  .gallery { padding-top: 96px; }
  .marquee-stack { margin-top: 48px; gap: 16px; }
  .marquee { --gap: 16px; }
  .marquee-stack__fade { width: 48px; }
}
