/* "Trusted by Fortune 500 carriers" logo marquee.
   Same infinite horizontal loop as the old site's Trusted By track
   (framer-motion x: [0, -1000], 20s linear infinite) — CSS version. */

.fl-trusted {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 41px 0;
  font-family: var(--fl-font-sans);
  text-align: center;
}

.fl-trusted::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(1180px, 100%);
  border-top: 1px solid #cbced3;
  border-bottom: 1px solid #cbced3;
  pointer-events: none;
  transform: translateX(-50%);
  content: "";
}

.fl-trusted__label {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100% - 80px));
  margin: 0;
  color: #828690;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.2px;
  font-weight: 400;
  letter-spacing: 1.68px;
  line-height: 16.8px;
  text-transform: uppercase;
}

.fl-trusted__viewport {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  align-self: stretch;
  width: 100%;
  height: 56px;
  padding: 0;
  /* Fade the logos themselves. Overlay + backdrop-filter drew a visible box
     at the top/bottom of each edge as marks entered and left. */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 96px,
    #000 calc(100% - 96px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0,
    #000 96px,
    #000 calc(100% - 96px),
    transparent 100%
  );
}

/* Spacing lives on each logo rather than as a flex `gap`, so one repeat is
   exactly (logos + one gap each) and translating by 25% of a 4x track lands
   perfectly on the next copy. A flex gap also sits between copies, which made
   the shift fall ~13px short of a full period and jump every loop. */
.fl-trusted__track {
  display: flex;
  width: max-content;
  height: 56px;
  align-items: center;
  animation: fl-trusted-marquee 30s linear infinite;
}

.fl-trusted__track:hover {
  animation-play-state: paused;
}

.fl-trusted__logo {
  flex: none;
  box-sizing: content-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: var(--fl-logo-w);
  height: 56px;
  margin-right: 52px;
}

.fl-trusted__logo img {
  display: block;
  width: var(--fl-logo-w);
  height: 56px;
  max-width: none;
  object-fit: contain;
  object-position: center;
}

/* Sit Faye on the same baseline as the other wordmarks: the f rests on the
   strip's bottom line; the y can hang a little below. */
.fl-trusted__logo--faye {
  overflow: visible;
  align-items: flex-end;
}

.fl-trusted__logo--faye img {
  object-position: left bottom;
  transform: translateY(6px);
}

/* The row is repeated 4x and the track shifts by exactly one copy (25%), so
   the loop is seamless and the strip still covers the viewport at the end of
   the cycle. Travel per cycle is one row width — the same distance the old
   2x/-50% version moved in the same 30s, so the speed is unchanged. */
@keyframes fl-trusted-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-25%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fl-trusted__track {
    animation: none;
  }

  .fl-trusted__viewport {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 600px) {
  .fl-trusted {
    gap: 40px;
    padding: 41px 0;
  }

  .fl-trusted::before {
    width: min(1180px, calc(100% - 48px));
  }

  .fl-trusted__label {
    width: calc(100% - 48px);
  }

  .fl-trusted__viewport {
    height: 56px;
    padding: 0;
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 56px,
      #000 calc(100% - 56px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 56px,
      #000 calc(100% - 56px),
      transparent 100%
    );
  }
}
