/**
 * Platforms marquee — Figma desktop 1920, mobile 390.
 * Mobile: 122×60 cards, 14px = 3.589vw gaps, CSS infinite marquee both directions.
 */

.home-v2 .v2-section--platforms,
.v2-section--platforms {
  --platforms-marquee-gap: calc(100vw * 14 / 390);
  position: relative;
  z-index: 3;
  padding-top: var(--v2-section-gap);
  padding-bottom: 0;
  overflow: hidden;
}

.v2-platforms__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(100vw * 16 / 390); /* 16 / 390 */
  margin-bottom: calc(100vw * 24 / 390); /* 24 / 390 */
  text-align: center;
}

.v2-platforms__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100vw * 40 / 390); /* 40 / 390 */
  height: calc(100vw * 40 / 390);
  border-radius: 50%;
  background: #64db69;
}

.v2-platforms__badge-num {
  font-size: calc(100vw * 20 / 390); /* 20 / 390 */
  font-weight: 500;
  line-height: 1;
  color: #ffffff;
}

.v2-platforms__title {
  margin: 0;
  font-size: calc(100vw * 36 / 390); /* 36 / 390 */
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0;
}

.v2-platforms__title-line,
.v2-platforms__title-rest {
  display: block;
  white-space: nowrap;
}

.v2-platforms__title-line {
  color: #64db69;
}

.v2-platforms__title-rest {
  color: #202020;
}

.v2-platforms__track {
  margin-inline: calc(-1 * var(--container-pad));
  width: calc(100% + 2 * var(--container-pad));
  overflow: hidden;
}

.v2-platforms__rows {
  display: flex;
  flex-direction: column;
  gap: var(--platforms-marquee-gap);
}

/* Infinite CSS marquee — row 1 forward, row 2 reverse */
.v2-platforms__marquee {
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.v2-platforms__marquee-track {
  display: flex;
  width: max-content;
  gap: var(--platforms-marquee-gap);
  will-change: transform;
  animation: v2-platforms-marquee 28s linear infinite;
  pointer-events: none;
}

.v2-platforms__marquee-track--reverse {
  animation-direction: reverse;
}

.v2-platforms__marquee-group {
  display: flex;
  flex-shrink: 0;
  gap: var(--platforms-marquee-gap);
}

@keyframes v2-platforms-marquee {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(calc(-50% - var(--platforms-marquee-gap) / 2), 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .v2-platforms__marquee-track {
    animation: none;
  }
}

/* Mobile card: 122×60 ref */
.v2-platforms__card {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: max-content;
  gap: calc(100vw * 8 / 390); /* 8 / 390 */
  height: calc(100vw * 60 / 390); /* 60 / 390 */
  padding-inline: calc(100vw * 10 / 390); /* 10 / 390 */
  border-radius: calc(100vw * 5 / 390);
  background: rgba(194, 194, 194, 0.2);
  white-space: nowrap;
}

.v2-platforms__card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: calc(100vw * 40 / 390);
  height: calc(100vw * 40 / 390);
  border-radius: calc(100vw * 5 / 390);
  background: #ffffff;
}

.v2-platforms__card-icon img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw * 30 / 390); /* 30 / 390 */
  max-height: calc(100vw * 30 / 390);
  object-fit: contain;
}

.v2-platforms__card-name {
  margin: 0;
  padding-right: calc(100vw * 10 / 390);
  font-size: calc(100vw * 20 / 390); /* 20 / 390 */
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  color: #202020;
}

@media (min-width: 1024px) {
  .home-v2 .v2-section--platforms,
  .v2-section--platforms {
    --platforms-marquee-gap: clamp(14px, 1.458vw, 28px);
    padding-block: clamp(48px, 6.25vw, 120px);
  }

  .v2-platforms__header {
    gap: clamp(16px, 1.25vw, 24px);
    margin-bottom: clamp(32px, 3.125vw, 60px);
  }

  .v2-platforms__badge {
    width: clamp(40px, 3.646vw, 70px);
    height: clamp(40px, 3.646vw, 70px);
  }

  .v2-platforms__badge-num {
    font-size: clamp(20px, 1.563vw, 30px);
  }

  .v2-platforms__title {
    max-width: min(57.55vw, 1105px);
    font-size: clamp(36px, 4.688vw, 90px);
    line-height: 1;
  }

  .v2-platforms__title-line,
  .v2-platforms__title-rest {
    white-space: normal;
  }

  .v2-platforms__track {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: 0;
  }

  .v2-platforms__card {
    gap: clamp(12px, 1.875vw, 36px);
    height: clamp(60px, 7.292vw, 140px);
    padding-inline: clamp(12px, 1.25vw, 24px);
    border-radius: clamp(10px, 0.625vw, 12px);
  }

  .v2-platforms__card-icon {
    width: clamp(52px, 4.896vw, 94px);
    height: clamp(51px, 4.844vw, 93px);
    border-radius: clamp(10px, 0.625vw, 12px);
  }

  .v2-platforms__card-icon img {
    max-width: clamp(28px, 4.896vw, 94px);
    max-height: clamp(28px, 4.844vw, 93px);
  }

  .v2-platforms__card-name {
    padding-right: clamp(8px, 1.25vw, 24px);
    font-size: clamp(16px, 2.344vw, 45px);
  }
}
