/* Partners redesign preview, style «Bento Box Grid» (2026-11-04).
   Page body: modules/partners-v2/bento.php (body.pv2-bento).
   Homepage strip: modules/partners-v2/bento-band.php (section.pv2band-bento).
   Everything is scoped under those two roots. */

/* ============ tokens ============ */
.pv2-bento,
.pv2band-bento {
  --pvb-gap: 16px;
  --pvb-radius: 24px;
  --pvb-card: #ffffff;
  --pvb-card-2: #ffffff;
  --pvb-edge: rgba(0, 0, 0, .06);
  --pvb-shadow: 0 4px 6px rgba(0, 0, 0, .05);
  --pvb-shadow-2: none;
  --pvb-shadow-hover: 0 10px 24px rgba(0, 0, 0, .08);
  --pvb-scale: 1.02;
}
.dark .pv2-bento,
.dark .pv2band-bento {
  --pvb-card: #19191b;
  --pvb-card-2: #121214;
  --pvb-edge: rgba(255, 255, 255, .07);
  --pvb-shadow: 0 4px 6px rgba(0, 0, 0, .3);
  --pvb-shadow-hover: 0 10px 24px rgba(0, 0, 0, .45);
}

/* ============ logos (shared by page and strip) ============
   pv_logo() prints the <img>; bento.php wraps it in .pvb-fit with --ar
   (width/height) and --sq (sqrt of --ar). Each tier sets --u, the side of a
   square of equal area, so a wide wordmark (wide, short) and a square badge
   (narrower, taller) carry the same weight. The <img> itself is the light
   chip (white, or the partner's --logo-bg), so dark logos survive dark mode. */
.pv2-bento .pvb-fit,
.pv2band-bento .pvb-fit { display: contents; }

.pv2-bento .pvb-logo,
.pv2band-bento .pvb-logo {
  display: block;
  box-sizing: content-box;
  width: min(calc(var(--u) * var(--k, 1) * var(--sq, 1.6)), calc(100% - 2 * var(--px)), calc(var(--hmax) * var(--k, 1) * var(--ar, 2.5)));
  max-width: none;
  height: auto;
  padding: var(--py) var(--px);
  border-radius: var(--pr);
  background: var(--logo-bg, #fff);
  object-fit: contain;
  flex: 0 0 auto;
}

/* Partners without a logo file: their name, set as a tidy text tile. */
.pv2-bento .pv-textlogo,
.pv2band-bento .pv-textlogo {
  display: block;
  max-width: 100%;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--tl, 1rem);
  line-height: 1.25;
  letter-spacing: .1px;
  text-align: center;
  overflow-wrap: break-word;
}

/* ============ page frame ============ */
.pv2-bento .pvb {
  max-width: var(--container, 1360px);
  margin: 0 auto;
  padding-bottom: 72px;
  color: var(--ink);
}
/* Undo the site's global section/heading rules at zero extra specificity. */
.pv2-bento :where(.pvb section) { padding: 0; border-bottom: 0; }
.pv2-bento :where(.pvb h1, .pvb h2, .pvb p) { margin: 0; }

/* ============ tiles ============ */
.pv2-bento .pvb-tile {
  position: relative;
  min-width: 0;
  background: var(--pvb-card);
  border: 1px solid var(--pvb-edge);
  border-radius: var(--pvb-radius);
  box-shadow: var(--pvb-shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pv2-bento .pvb-tile.is-link:hover {
  transform: scale(var(--pvb-scale));
  box-shadow: var(--pvb-shadow-hover);
}
.pv2-bento a.pvb-tile:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* The top bento: the title row, then two tiers per row at every width
   (Diamond | Strategic, then Platinum | Gold), 2026-11-05 his call. */
.pv2-bento .pvb-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: var(--pvb-gap);
}
.pv2-bento .pvb-intro {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 24px 18px 2px;
}
.pv2-bento .pvb-kicker {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .3px;
}
.pv2-bento .pvb-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 1rem + 2.5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: 0;
  max-width: 17ch;
  text-wrap: balance;
}

.pv2-bento .pvb-feature {
  grid-column: span 1;
  display: flex;
  padding: 48px 24px;
}

.pv2-bento .pvb-label {
  position: absolute;
  top: 18px;
  left: 24px;
  right: 24px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .2px;
}
.pv2-bento .pvb-hit {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}
.pv2-bento a.pvb-hit { outline: none; }
/* The whole tile is the link target. */
.pv2-bento a.pvb-hit::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--pvb-radius);
}
.pv2-bento a.pvb-hit:focus-visible::after { outline: 3px solid var(--red); outline-offset: 3px; }

/* Tile and logo size (desktop): lead = Diamond + Strategic (equal, side by side),
   pair = Platinum and small = Gold (side by side in the row below, shorter). */
.pv2-bento .pvb-s-lead  { height: 200px; --u: 150px; --hmax: 92px; --px: 18px; --py: 12px; --pr: 14px; --tl: 1.75rem; }
.pv2-bento .pvb-s-pair  { height: 176px; --u: 118px; --hmax: 68px; --px: 14px; --py: 10px; --pr: 12px; --tl: 1.375rem; }
.pv2-bento .pvb-s-small { height: 176px; --u: 96px; --hmax: 60px; --px: 14px; --py: 10px; --pr: 12px; --tl: 1.25rem; }

/* ============ tile groups (Silver and below) ============ */
.pv2-bento .pvb-group { margin-top: 48px; }
.pv2-bento .pvb-gh {
  margin: 0 0 16px 2px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink);
}
.pv2-bento .pvb-cells {
  --cols: 5;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--pvb-gap);
}
.pv2-bento .pvb-cells > li {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--pvb-gap)) / var(--cols));
  min-width: 0;
  margin: 0;
}
.pv2-bento .pvb-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--h);
  padding: 12px;
}

.pv2-bento .pvb-g-silver .pvb-cells { --cols: 5; }
.pv2-bento .pvb-silver { --h: 168px; --u: 84px; --hmax: 88px; --px: 12px; --py: 8px; --pr: 10px; --tl: 1.125rem; }

.pv2-bento .pvb-g-inkind .pvb-cells { --cols: 7; }
.pv2-bento .pvb-inkind { --h: 112px; --u: 62px; --hmax: 60px; --px: 9px; --py: 6px; --pr: 8px; --tl: .9375rem; padding: 10px; }

/* In-Kind partners with an official title (2026-11-05): one row of three above
   the In-Kind tiles, the title as the tile's label, logos a step above In-Kind. */
.pv2-bento .pvb-titled {
  list-style: none;
  margin: 0 0 var(--pvb-gap);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--pvb-gap);
}
.pv2-bento .pvb-tt {
  display: flex;
  margin: 0;
  height: 148px;
  padding: 50px 16px 14px;
  --u: 70px; --hmax: 58px; --px: 10px; --py: 7px; --pr: 9px; --tl: 1rem;
}
.pv2-bento .pvb-tt .pvb-label { top: 16px; left: 20px; right: 16px; font-size: .875rem; line-height: 1.4; }

/* Media and community: side by side, flat tiles, the quietest level. */
.pv2-bento .pvb-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px var(--pvb-gap);
  margin-top: 64px;
}
.pv2-bento .pvb-secondary .pvb-group { margin-top: 0; }
.pv2-bento .pvb-secondary .pvb-cells { --cols: 4; }
.pv2-bento .pvb-media,
.pv2-bento .pvb-community {
  --h: 84px; --u: 48px; --hmax: 50px; --px: 7px; --py: 5px; --pr: 7px; --tl: .8125rem;
  padding: 10px;
  background: var(--pvb-card-2);
  box-shadow: var(--pvb-shadow-2);
}

/* ============ closing row: CTA + past editions ============ */
.pv2-bento .pvb-end {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--pvb-gap);
  margin-top: 64px;
}
.pv2-bento .pvb-cta {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  min-height: 200px;
  padding: 32px;
  background: var(--red);
  border-color: transparent;
  color: #fff;
}
.pv2-bento .pvb-cta-h {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1rem + 1.2vw, 2.125rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  color: #fff;
}
.pv2-bento .pvb-cta-p {
  max-width: 56ch;
  font-size: 1rem;
  line-height: 1.6;
  color: #fff;
}
.pv2-bento .pvb-cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #fff;
  color: #0b0b0b;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: .2px;
  text-decoration: none;
  transition: background-color .2s ease;
}
.pv2-bento .pvb-cta-btn:hover { background: #f1f1f1; }
.pv2-bento .pvb-cta-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.pv2-bento .pvb-past {
  display: flex;
  align-items: flex-end;
  min-height: 200px;
  padding: 56px 24px 26px;
}
.pv2-bento .pvb-past-link {
  flex: 0 1 auto;
  justify-content: flex-start;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink);
}

/* ============ responsive ============ */
@media (max-width: 1199px) {
  .pv2-bento .pvb-g-inkind .pvb-cells { --cols: 6; }
  .pv2-bento .pvb-secondary { grid-template-columns: minmax(0, 1fr); }
  .pv2-bento .pvb-secondary .pvb-cells { --cols: 7; }
}

@media (max-width: 899px) {
  .pv2-bento .pvb-intro { padding: 8px 0 16px 2px; }
  .pv2-bento .pvb-s-lead { height: 200px; --u: 120px; --hmax: 72px; }
  .pv2-bento .pvb-s-pair { height: 176px; --u: 100px; --hmax: 60px; }
  .pv2-bento .pvb-s-small { height: 176px; --u: 82px; --hmax: 54px; }
  .pv2-bento .pvb-feature { padding: 46px 20px; }
  .pv2-bento .pvb-label { left: 20px; right: 20px; }

  .pv2-bento .pvb-g-silver .pvb-cells { --cols: 3; }
  .pv2-bento .pvb-silver { --h: 150px; --u: 76px; --hmax: 80px; }
  .pv2-bento .pvb-g-inkind .pvb-cells { --cols: 4; }
  .pv2-bento .pvb-secondary .pvb-cells { --cols: 5; }

  .pv2-bento .pvb-end { grid-template-columns: minmax(0, 1fr); }
  .pv2-bento .pvb-cta { grid-column: auto; min-height: 0; }
  .pv2-bento .pvb-past { min-height: 150px; }
  .pv2-bento .pvb-tt { height: 156px; padding-top: 62px; --u: 62px; --hmax: 52px; }
}

@media (max-width: 560px) {
  /* Phones: the top tiers stay two per row (Diamond | Strategic, Platinum | Gold);
     the small tiles stay at two (three for media and community) so 65 logos
     do not become 65 rows. */
  .pv2-bento,
  .pv2band-bento { --pvb-gap: 12px; }
  .pv2-bento .pvb { padding-top: 4px; padding-bottom: 48px; }
  .pv2-bento .pvb-intro { padding: 4px 0 12px 0; gap: 8px; }
  .pv2-bento .pvb-title { font-size: clamp(1.75rem, 1.1rem + 3vw, 2.25rem); }
  .pv2-bento .pvb-s-lead { height: 156px; --u: 64px; --hmax: 48px; --px: 10px; --py: 7px; --pr: 10px; --tl: 1.125rem; }
  .pv2-bento .pvb-s-pair,
  .pv2-bento .pvb-s-small { height: 136px; --px: 8px; --py: 6px; --pr: 8px; --tl: 1rem; }
  /* Narrow tiles cap the wide wordmarks first, so --u is set for equal area
     (Enerwave = NBG) and Gold below Platinum. */
  .pv2-bento .pvb-s-pair { --u: 60px; --hmax: 38px; }
  .pv2-bento .pvb-s-small { --u: 48px; --hmax: 34px; }
  .pv2-bento .pvb-feature { padding: 52px 8px 14px; }
  .pv2-bento .pvb-label { top: 12px; left: 14px; right: 10px; font-size: .8125rem; line-height: 1.35; }
  .pv2-bento .pvb-tile { --pvb-radius: 20px; }

  .pv2-bento .pvb-group { margin-top: 36px; }
  .pv2-bento .pvb-gh { font-size: 1.125rem; margin-bottom: 12px; }
  .pv2-bento .pvb-titled { grid-template-columns: minmax(0, 1fr); }
  .pv2-bento .pvb-tt { height: 116px; padding: 40px 14px 10px; --u: 58px; --hmax: 46px; }
  .pv2-bento .pvb-tt .pvb-label { top: 12px; left: 16px; right: 14px; font-size: .8125rem; }
  .pv2-bento .pvb-g-silver .pvb-cells { --cols: 2; }
  .pv2-bento .pvb-silver { --h: 124px; --u: 66px; --hmax: 70px; --px: 10px; --py: 7px; padding: 10px; }
  .pv2-bento .pvb-g-inkind .pvb-cells { --cols: 2; }
  .pv2-bento .pvb-inkind { --h: 96px; --u: 54px; --hmax: 46px; }
  .pv2-bento .pvb-secondary { margin-top: 44px; gap: 36px; }
  .pv2-bento .pvb-secondary .pvb-cells { --cols: 3; }
  .pv2-bento .pvb-media,
  .pv2-bento .pvb-community { --h: 76px; --u: 42px; --hmax: 42px; --px: 6px; --py: 4px; --pr: 6px; --tl: .71875rem; padding: 8px 6px; --pvb-radius: 16px; }

  .pv2-bento .pvb-end { margin-top: 44px; }
  .pv2-bento .pvb-cta { padding: 24px 20px; }
  .pv2-bento .pvb-cta-btn { width: 100%; justify-content: center; }
  .pv2-bento .pvb-past { min-height: 128px; padding: 48px 20px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .pv2-bento .pvb-tile,
  .pv2-bento .pvb-cta-btn,
  .pv2band-bento .pvbb-tile { transition: none; }
  .pv2-bento .pvb-tile.is-link:hover,
  .pv2band-bento .pvbb-tile.is-link:hover { transform: none; }
}

/* ============ homepage strip (bento-band.php) ============ */
.pv2band-bento .pvbb-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.pv2band-bento .pvbb-h {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1rem + 2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--ink);
}
.pv2band-bento .pvbb-line {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}
.pv2band-bento .pvbb-all {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--red);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .2px;
  text-decoration: none;
}
.pv2band-bento .pvbb-all:hover { text-decoration: underline; text-underline-offset: 4px; }
.pv2band-bento .pvbb-all:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 6px; }

.pv2band-bento .pvbb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 132px 108px;
  gap: var(--pvb-gap);
}
.pv2band-bento .pvbb-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--pvb-gap);
  min-width: 0;
}
.pv2band-bento .pvbb-list > li { flex: 1 1 0; min-width: 0; margin: 0; display: flex; }
.pv2band-bento .pvbb-tile {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--pvb-card);
  border: 1px solid var(--pvb-edge);
  border-radius: var(--pvb-radius);
  box-shadow: var(--pvb-shadow);
  color: var(--ink);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pv2band-bento .pvbb-tile.is-link:hover { transform: scale(var(--pvb-scale)); box-shadow: var(--pvb-shadow-hover); }
.pv2band-bento a.pvbb-tile:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.pv2band-bento .pvbb-top .pvbb-tile { --u: 82px; --hmax: 60px; --px: 11px; --py: 8px; --pr: 10px; --tl: 1.125rem; }
.pv2band-bento .pvbb-t-gold .pvbb-tile { --u: 74px; }
.pv2band-bento .pvbb-top > li.pvbb-t-diamond,
.pv2band-bento .pvbb-top > li.pvbb-t-strategic { flex-grow: 1.4; }
.pv2band-bento .pvbb-t-diamond .pvbb-tile,
.pv2band-bento .pvbb-t-strategic .pvbb-tile { --u: 104px; --hmax: 74px; }
.pv2band-bento .pvbb-silver .pvbb-tile { --u: 62px; --hmax: 64px; --px: 9px; --py: 6px; --pr: 8px; --tl: .9375rem; }

@media (max-width: 899px) {
  .pv2band-bento .pvbb-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  /* Two per row from here down: Diamond | Strategic, then Platinum | Gold
     (2026-11-05), so no wordmark is squeezed by a narrow tile. */
  .pv2band-bento .pvbb-top > li,
  .pv2band-bento .pvbb-top > li.pvbb-t-diamond,
  .pv2band-bento .pvbb-top > li.pvbb-t-strategic { flex: 1 1 calc((100% - var(--pvb-gap)) / 2); }
  .pv2band-bento .pvbb-top .pvbb-tile { height: 104px; }
  .pv2band-bento .pvbb-silver .pvbb-tile { height: 92px; }
}
@media (max-width: 560px) {
  .pv2band-bento .pvbb-head { margin-bottom: 16px; }
  .pv2band-bento .pvb-tile, .pv2band-bento .pvbb-tile { --pvb-radius: 20px; }
  .pv2band-bento .pvbb-top .pvbb-tile { --hmax: 46px; --px: 10px; --py: 7px; }
  .pv2band-bento .pvbb-t-diamond .pvbb-tile,
  .pv2band-bento .pvbb-t-strategic .pvbb-tile { height: 96px; --u: 59px; --hmax: 50px; }
  .pv2band-bento .pvbb-t-platinum .pvbb-tile { height: 80px; --u: 70px; --hmax: 40px; }
  .pv2band-bento .pvbb-t-gold .pvbb-tile { height: 80px; --u: 46px; --hmax: 38px; }
  .pv2band-bento .pvbb-silver > li { flex: 0 0 calc((100% - 2 * var(--pvb-gap)) / 3); }
  .pv2band-bento .pvbb-silver .pvbb-tile { height: 76px; padding: 8px; --u: 46px; --hmax: 46px; --px: 6px; --py: 4px; --pr: 6px; }
}
