.cm-ai-models {
  position: relative;
  isolation: isolate;
  background: var(--cm-bg);
  color: var(--cm-text);
  padding-top: var(--cm-section-padding-y);
  padding-bottom: var(--cm-section-padding-y);
}

.cm-ai-models::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(6rem, 12vh, 10rem);
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--cm-color-ember-900) 2%, var(--cm-bg)) 0%,
    var(--cm-bg) 100%
  );
}

.cm-ai-models__header {
  max-width: 36rem;
  margin: 0 auto clamp(2rem, 3.5vw, 2.75rem);
  padding: 0 var(--cm-site-container-gutter);
  text-align: center;
}

.cm-ai-models__title {
  margin: 0;
  font-size: clamp(0.875rem, 1.05vw, 0.9375rem);
  font-weight: var(--cm-font-weight-medium);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.48);
}

.cm-ai-models .cm-laptop-container {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.cm-ai-models__track {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.cm-ai-models__track.is-animating {
  overflow: hidden;
  touch-action: none;
}

.cm-ai-models__track::-webkit-scrollbar {
  display: none;
}

.cm-ai-models__marquee {
  display: flex;
  width: max-content;
  animation: cm-ai-models-marquee var(--cm-ai-models-marquee-duration, 60s) linear infinite;
  will-change: transform;
}

.cm-ai-models__track.is-animating:hover .cm-ai-models__marquee {
  animation-play-state: paused;
}

@keyframes cm-ai-models-marquee {
  to {
    transform: translateX(-50%);
  }
}

.cm-ai-models__logos {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  gap: clamp(2rem, 4.5vw, 3.5rem);
  margin: 0;
  padding: 0 var(--cm-site-container-gutter);
  list-style: none;
}

.cm-ai-models__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.72);
  white-space: nowrap;
}

.cm-ai-models__logo img {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  object-fit: contain;
}

.cm-ai-models__logo span {
  font-size: 0.875rem;
  font-weight: var(--cm-font-weight-medium);
  letter-spacing: -0.01em;
  line-height: 1;
}

@media (max-width: 767px) {
  .cm-ai-models__header {
    margin-bottom: clamp(1.5rem, 5vw, 2rem);
  }

  .cm-ai-models__logos {
    gap: clamp(1.25rem, 4vw, 2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-ai-models__marquee {
    animation: none;
  }
}
