/* ===========================================================
   Partner ecosystem + platforms, main page band
   =========================================================== */

.partners {
  color: inherit;
  padding: clamp(16px, 2vw, 28px) 0 clamp(56px, 7vw, 100px);
}
.partners .sect-head .lede { color: inherit; opacity: 0.62; }
.partners .eyebrow { color: inherit; opacity: 0.55; }

/* ---- Logo wall ---- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-top: clamp(8px, 2vw, 20px);
}
.partner-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(96px, 11vw, 132px);
  padding: clamp(18px, 2.4vw, 30px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: background .35s var(--ease-out);
}
.partner-cell img {
  max-height: 30px;
  max-width: 78%;
  width: auto;
  height: auto;
  opacity: 0.72;
  transition: opacity .35s ease, transform .5s var(--ease-out);
}
/* Stacked (square) logos need more height to match the visual weight of wide lockups */
.partner-cell[title="Order Editing"] img {
  max-height: 58px;
  max-width: 64%;
  will-change: transform;
}
/* accent wipe that reveals on hover */
.partner-cell::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .45s var(--ease-out);
}
.partner-cell:hover {
  background: rgba(255, 255, 255, 0.04);
}
.partner-cell:hover img {
  opacity: 1;
  transform: translateY(-3px) scale(1.05);
}
.partner-cell:hover::after { transform: scaleX(1); }

/* ---- Platforms strip ---- */
.platforms {
  margin-top: clamp(44px, 5.5vw, 76px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2.6vw, 30px);
  align-items: center;
  text-align: center;
}
.platforms-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.platforms-label .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.platform-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 72px);
}
.platform {
  display: flex;
  align-items: center;
  justify-content: center;
}
.platform img {
  height: calc(clamp(24px, 2.7vw, 34px) * var(--s, 1));
  width: auto;
  max-width: 190px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.78;
  transition: filter .4s ease, opacity .35s ease, transform .4s var(--ease-out);
  will-change: transform;
}
.platform:hover img {
  filter: grayscale(0);
  opacity: 1;
  transform: translateY(-3px);
}
/* During the paper→ink scroll transition the body theme class flips at the
   perceptual midpoint; invert the ink-monochrome logos so they stay visible
   against the dark background. */
body.theme-ink .platform img,
body.theme-ink .partner-cell img {
  filter: grayscale(1) invert(1) brightness(1.45);
}
body.theme-ink .platform:hover img {
  filter: grayscale(1) invert(1);
  opacity: 1;
}

@media (max-width: 1024px) {
  .partner-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .partner-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-cell img { max-height: 26px; }
}
