/* Integration marquee - Figma frame 2088:826 (1280px desktop reference). */

.integration-marquee {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.integration-marquee__rows {
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
}

.integration-marquee__row {
  display: flex;
  width: max-content;
  gap: 56px;
}

/* Each row renders its track twice, so a -50% shift (minus the inter-track
   gap) lands on an identical frame and the loop reads as continuous. */
.integration-marquee__row--1 {
  animation: integration-marquee-start 122s linear infinite;
}

/* No head start on this row: both rows lead with supported integrations, and
   an offset would push that opening run off the left edge. The rows travel in
   opposite directions, so they stagger on their own. */
.integration-marquee__row--2 {
  animation: integration-marquee-end 128s linear infinite;
}

.integration-marquee__track {
  display: flex;
  gap: 56px;
}

/* Held before the strip scrolls into frame, paused while a logo is hovered. */
.integration-marquee--held .integration-marquee__row,
.integration-marquee--paused .integration-marquee__row {
  animation-play-state: paused;
}

.integration-marquee__logo {
  display: block;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 8px;
  transition: transform 180ms ease;
}

.integration-marquee__logo:hover {
  transform: scale(1.14);
}

.integration-marquee__logo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: contain;
}

.integration-marquee__fade {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: 200px;
  pointer-events: none;
}

.integration-marquee__fade--start {
  left: 0;
  background: linear-gradient(90deg, #020200 0%, rgba(2, 2, 0, 0) 100%);
}

.integration-marquee__fade--end {
  right: 0;
  background: linear-gradient(270deg, #020200 0%, rgba(2, 2, 0, 0) 100%);
}

.integration-marquee__tooltip {
  position: absolute;
  z-index: 2;
  padding: 7px 12px;
  border-radius: 8px;
  background: #fff;
  color: #141414;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 12px));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  animation: integration-marquee-tooltip-in 140ms ease-out;
}

.integration-marquee__tooltip::after {
  position: absolute;
  top: 100%;
  left: clamp(10px, calc(50% + var(--tooltip-caret-shift, 0px)), calc(100% - 10px));
  width: 0;
  height: 0;
  margin-left: -5px;
  border-top: 5px solid #fff;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  content: '';
}

@keyframes integration-marquee-tooltip-in {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 4px));
  }
}

@keyframes integration-marquee-start {
  to {
    transform: translateX(calc(-50% - 28px));
  }
}

@keyframes integration-marquee-end {
  from {
    transform: translateX(calc(-50% - 28px));
  }
}

@media (max-width: 640px) {
  .integration-marquee__fade {
    width: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .integration-marquee__row--1,
  .integration-marquee__row--2 {
    animation: none;
  }

  .integration-marquee__logo {
    transition: none;
  }

  .integration-marquee__tooltip {
    animation: none;
  }
}
