/* v3 platforms. Figma: Collaborate 12089:21789 (1440), Collaborate_Mobile 12122:31315 (430), Platform card 12113:27809. */
.v3-platforms {
  --pl-dash: repeating-linear-gradient(180deg, var(--v3-gray-400) 0 3px, transparent 3px 5px);
  --pl-col: 320px;                /* label / tab list column (the card starts at 62 + 320 + 12 = 394) */
  background: var(--v3-dark);
  color: var(--v3-white);
  overflow-x: clip;
  isolation: isolate;
}

/* ---- background: noise 4% + dashed guide lines (5 on desktop, 2 on mobile) ---- */
.v3-platforms::before,
.v3-platforms::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.v3-platforms::before {
  max-width: var(--v3-container-max);
  margin-inline: auto;
  background:
    var(--pl-dash) 3.47% 0 / 1px 100% no-repeat,
    var(--pl-dash) 26.94% 0 / 1px 100% no-repeat,
    var(--pl-dash) 50% 0 / 1px 100% no-repeat,
    var(--pl-dash) 73.06% 0 / 1px 100% no-repeat,
    var(--pl-dash) 96.53% 0 / 1px 100% no-repeat;
}
.v3-platforms::after {
  opacity: 0.04;
  background: url("../../../images/v3/hero/noise.webp") 0 0 / 256px;
}

/* ---- layout: header on top, tab list (col 1) + card (col 2) below ---- */
.v3-platforms__grid {
  display: grid;
  grid-template-columns: var(--pl-col) minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 80px;
  align-items: start;
}
.v3-platforms__header { display: contents; }
.v3-platforms__label {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  font-size: var(--v3-fs-caption);
  font-weight: 700;
  line-height: var(--v3-lh-tight);
  text-transform: uppercase;
}
.v3-platforms__label::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--v3-primary); }
.v3-platforms__title {
  grid-column: 2;
  grid-row: 1;
  max-width: 652px;
  color: var(--v3-gray-50);
  text-wrap: balance;
}
.v3-platforms__muted { color: var(--v3-gray-100); }

/* ---- tabs (hidden without JS: all cards are shown stacked) ---- */
.v3-platforms__tabs {
  display: none;
  grid-column: 1;
  grid-row: 2;
  flex-direction: column;
  gap: 8px;
  width: min(232px, 100%);
}
.v3-platforms.is-js .v3-platforms__tabs { display: flex; }
.v3-platforms__tab {
  position: relative;           /* contains the visually-hidden name inside the scrolling row */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: none;
  height: 56px;
  padding: 0 20px;
  border: 1px solid var(--v3-gray-300);
  border-radius: var(--v3-radius-sm);
  color: var(--v3-gray-100);
  text-align: left;
  transition: border-color 0.25s ease, color 0.25s ease;
}
.v3-platforms__tab:hover { border-color: var(--v3-gray-200); }
.v3-platforms__tab.is-active { border-color: var(--v3-white); color: var(--v3-white); }
.v3-platforms__tab:focus-visible { outline-offset: 3px; }
.v3-platforms__tab-logo {
  flex: none;
  max-width: 96px;
  height: auto;
  transition: filter 0.25s ease;
}
.v3-platforms__tab.is-active .v3-platforms__tab-logo { filter: brightness(0) invert(1); }   /* grey source logo -> white */
.v3-platforms__chevron {
  flex: none;
  width: 15px;
  height: 8px;
  background: currentColor;
  -webkit-mask: url("../../../images/v3/platforms/chevron.svg") center / contain no-repeat;
  mask: url("../../../images/v3/platforms/chevron.svg") center / contain no-repeat;
  transform: rotate(-90deg);
}

/* ---- panels: one grid cell, so the card never changes height between tabs ---- */
.v3-platforms__panels {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  gap: 12px;
}
.v3-platforms__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54.07%;     /* text 452 | photo 532 of 984 */
  min-height: 428px;
  overflow: hidden;
  border-radius: var(--v3-radius-lg);
  background: var(--v3-white);
  color: var(--v3-gray-300);
}
.v3-platforms.is-js .v3-platforms__panels > .v3-platforms__panel { grid-area: 1 / 1; }
.v3-platforms.is-js .v3-platforms__panel:not(.is-active) {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0s 0.25s;
}
.v3-platforms.is-js .v3-platforms__panel.is-active { transition: opacity 0.25s ease; }

.v3-platforms__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 40px;
}
.v3-platforms__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  max-width: 372px;
}
.v3-platforms__logo { height: auto; max-height: 32px; width: auto; }
.v3-platforms__count { font-size: var(--v3-fs-caption); line-height: var(--v3-lh-tight); color: var(--v3-gray-300); }
.v3-platforms__card-title {
  max-width: 372px;
  margin-top: 40px;
  font-size: var(--v3-fs-h2);
  font-weight: 700;
  line-height: var(--v3-lh-h2);
  letter-spacing: var(--v3-ls-display);
  color: var(--v3-dark);
}
.v3-platforms__text {
  max-width: 372px;
  margin-top: 28px;
  font-size: var(--v3-fs-body-m);
  line-height: var(--v3-lh-body-m);
}
.v3-platforms__link { margin-top: auto; padding-top: 24px; }
.v3-platforms__link img { width: 11px; height: 11px; }

.v3-platforms__photo { position: relative; min-height: 0; background: var(--v3-bg-light); }
.v3-platforms__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---- <=1280: narrower tab column ---- */
@media (max-width: 1280px) {
  .v3-platforms { --pl-col: 220px; }
  .v3-platforms__grid { column-gap: 24px; row-gap: 64px; }
}

/* ---- <=1024: tabs become a horizontally scrollable row above the card ---- */
@media (max-width: 1024px) {
  .v3-platforms__grid { grid-template-columns: minmax(0, 1fr); row-gap: 24px; }
  .v3-platforms__label { grid-row: 1; height: 20px; }
  .v3-platforms__title { grid-column: 1; grid-row: 2; margin-top: -12px; }
  .v3-platforms__tabs {
    grid-column: 1;
    grid-row: 3;
    flex-direction: row;
    width: auto;
    margin-top: 12px;
    padding: 3px;               /* room for the focus ring inside the scroll box */
    margin-inline: -3px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .v3-platforms__tabs::-webkit-scrollbar { display: none; }
  .v3-platforms__tab { flex: 1 0 134px; }
  .v3-platforms__panels { grid-column: 1; grid-row: 4; }
  .v3-platforms__panel { grid-template-columns: minmax(0, 1fr) 46%; }
  .v3-platforms__body { padding: 32px; }
  .v3-platforms__card-title { margin-top: 32px; }
  .v3-platforms__text { margin-top: 20px; }
}

/* ---- <=768: card stacked (text above the photo) ---- */
@media (max-width: 768px) {
  .v3-platforms__panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 276px;
    min-height: 0;
    border-radius: var(--v3-radius-md);
  }
  .v3-platforms__body { padding: 20px 20px 0; }
  .v3-platforms__head, .v3-platforms__card-title, .v3-platforms__text { max-width: none; }
  .v3-platforms__card-title { margin-top: 32px; }
  .v3-platforms__text { margin-top: 16px; }
  .v3-platforms__link { padding-block: 24px; margin-top: 0; }
  .v3-platforms__photo { border-radius: var(--v3-radius-md); }
  .v3-platforms::before {
    background:
      var(--pl-dash) 3.72% 0 / 1px 100% no-repeat,
      var(--pl-dash) 96.28% 0 / 1px 100% no-repeat;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v3-platforms__tab,
  .v3-platforms__tab-logo,
  .v3-platforms.is-js .v3-platforms__panel,
  .v3-platforms.is-js .v3-platforms__panel:not(.is-active),
  .v3-platforms.is-js .v3-platforms__panel.is-active { transition: none; }
}
