/* ==========================================================================
   DESIGN PARTNERS (structured, 13 Oct; 14 Oct inside the hero; 4 Nov its
   own band for a day, then back in as the cutout plinth)
   --------------------------------------------------------------------------
   The hero's last row, on a plinth of the next band's colour — night-2,
   as in the original (4 Nov; stone for an hour) — that rises into the
   bottom of the hero with 45° shoulders (the old notched tab upside down,
   14 Oct). Its bottom edge runs into Problems (same night-2), so the logos
   read as the start of the page while they stay on the first screen.
   "Design partners" on the left, the logos spaced evenly across the rest.
   Phones: a plain night-2 band, label on top, logos in a 2 × 2 grid of
   equal cells split by hairlines (10 Nov, user).
   The one-day own-band version: web/versions/unlock-4-nov/.
   ========================================================================== */

.partners {
  position: relative; z-index: 1; margin-top: auto;
  /* One size for every logo (10 Nov, user: "improve the scaling"): a base
     unit that grows with the screen, 22px at tablet to 28px on wide
     desktops (22px up to about 1000px), times each logo's own factor (below). */
  --logo-unit: clamp(22px, 1vw + 12px, 28px);
}
.partners__row {
  --shoulder: calc(var(--space-5) * 2 + var(--logo-unit) * 1.8);   /* = the plinth's height (24px padding, the tallest logo), so the shoulders are 45° */
  display: flex; align-items: center; gap: var(--space-8);
  width: min(1200px, 100%); margin-inline: auto;
  padding: var(--space-5) calc(var(--shoulder) + var(--space-4));
  background: var(--night-2);
  clip-path: polygon(var(--shoulder) 0, calc(100% - var(--shoulder)) 0, 100% 100%, 0 100%);
}
.partners__label {
  flex: none; margin: 0; max-width: none;
  font-family: var(--font-label); font-size: var(--size-label);
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted);
}
.partners__list {
  flex: 1; list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: space-evenly; align-items: center;
  gap: var(--space-5) var(--space-7);
}
@media (max-width: 1279px) {              /* tighter, so the logos stay on one line in the plinth */
  .partners__row { gap: var(--space-6); }
  .partners__list { gap: var(--space-4) var(--space-5); }
}
@media (max-width: 860px) {
  .partners { background: var(--night-2); }
  .partners__row {
    flex-direction: column; align-items: stretch; gap: var(--space-5);
    width: auto; padding: var(--space-5) 0; clip-path: none; background: none;
  }
  .partners__label { text-align: center; }
  .partners__list { justify-content: center; }
}

/* Logos (24 Nov, Rohit: Shell · IndiGo · SessionM · Capillary Technologies):
   all white, dimmed to sit with the muted label, full white on hover (25
   Nov, client: all white; for a day they showed in their own colours, the
   test pages in web/explorations/partners-colour/). The files are white:
   IndiGo's and SessionM's from the client; Shell's (its yellow ribs, the red
   outline dropped, cropped to the ribs) and Capillary's (the mark's
   gradients set to white) made from the client's colour files until their
   official one-colour logos come in. Sizing (10 Nov, user: "improve the
   scaling"): each logo's height is the base unit times a factor that gives
   every logo about the same area — the square root of IndiGo's
   width-to-height ratio over its own — then trimmed by eye: Shell's solid
   mark comes down from 2.13, IndiGo's tall capitals down a little,
   SessionM up for its small tagline. */
.partners__logo {
  display: block; width: auto; max-width: 100%; height: calc(var(--logo-unit) * var(--logo-k, 1));
  opacity: 0.62; transition: opacity var(--motion-base) var(--motion-ease);
}
@media (hover: hover) { .partners__list li:hover .partners__logo { opacity: 1; } }   /* full white on hover (14 Oct) */
.partners__logo--shell     { --logo-k: 1.55; }   /* 1.1 : 1, by area 2.13; the pecten alone */
.partners__logo--indigo    { --logo-k: 0.85; }   /* 4.9 : 1; down from 1 at full white, its tall heavy letters outweighed the lowercase words (24 Nov, user) */
.partners__logo--sessionm  { --logo-k: 1.25; }   /* 3.7 : 1, by area 1.14 */
.partners__logo--capillary { --logo-k: 1.05; }   /* 4.6 : 1, by area 1.03 */

/* Phones: 2 × 2, equal cells split by a hairline cross, the logos centred
   in them at a fixed base unit. */
@media (max-width: 640px) {
  .partners { --logo-unit: 22px; }
  .partners__list {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  }
  .partners__list li {
    display: grid; place-items: center; min-height: calc(var(--logo-unit) * 1.8 + var(--space-5) * 2);
    padding: var(--space-5) var(--space-4);
  }
  .partners__list li:nth-child(odd) { border-right: var(--border-w) solid var(--line); }
  .partners__list li:nth-child(-n + 2) { border-bottom: var(--border-w) solid var(--line); }
}
