/*  BLUE BANDS — clients and footer, on every page
 *  ------------------------------------------------------------------
 *  One stylesheet for both bands, so they look the same everywhere
 *  (Ernest, 2026-10-13). Markup: _includes/clients.html (the logos) and
 *  _includes/site-footer.html (email and LinkedIn). The homepage puts the
 *  logos under the hero and the footer at the end; every other page puts
 *  them together at the bottom, with a hairline in between.
 *  Needs type.css first (--heading-xs, --body-m, --head).
 */

/* Below the footer. iOS Safari paints the strip under its floating toolbar,
   and the bounce past either end, in the page's own background colour: the
   root's. Cream there left a cream strip under the blue footer (Ernest's
   iPhone, 2026-10-14). The root turns blue over the second half of the
   scroll, so the bottom matches the footer and a pull at the top still
   shows cream. Without scroll timelines it stays cream; a page too short to
   scroll has no active timeline and stays cream too. */
html { background-color: var(--cream); }

@supports (animation-timeline: scroll()) {
  html {
    animation: canvas-end linear both;
    animation-timeline: scroll(root block);
  }
}

@keyframes canvas-end {
  0%, 50%      { background-color: var(--cream); }
  50.01%, 100% { background-color: var(--blue); }
}

.proof {
  background-color: var(--blue);
  color: var(--cream);
  padding: round(clamp(40px, 5.5vw, 80px), 8px) 48px round(clamp(48px, 6vw, 88px), 8px);
  display: flex;
  flex-direction: column;
}

.proof__label {
  font: var(--heading-xs);
  text-align: center;
  /* Centred and wrapping, it left "FOR" alone on the second line at phone
     widths; balance splits it evenly instead. */
  text-wrap: balance;
  margin-bottom: round(clamp(24px, 2.6vw, 40px), 8px);
}

/* The client strip: cream marks on the blue, justified across the full
   band. Five logos packed left read as a huddle with half the band empty,
   and capping the measure put the last mark at an arbitrary right edge.
   An entry with no logo falls back to a wordmark. */
.proof__list {
  --logo: clamp(52px, 5.4vw, 76px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: round(clamp(24px, 3vw, 48px), 8px);
  row-gap: round(clamp(24px, 2.6vw, 40px), 8px);
  list-style: none;
}

.proof__list li { display: flex; }

.proof__link {
  display: flex;
  align-items: center;
  min-height: var(--logo);
  color: inherit;
  text-decoration: none;
  transition: opacity .18s ease;
}

.proof__link:hover { opacity: .62; }

.proof__link:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 6px;
}

/* The sources are 120px rasters, so --logo stays at or under 76px: at 2x
   DPR that asks for 152px of a 120px original and the marks are already at
   the edge of staying crisp. object-fit keeps wide marks (Greenchoice's
   two-line wordmark) shorter than the square icons. */
.proof__logo {
  width: var(--logo);
  height: var(--logo);
  object-fit: contain;
  display: block;
}

/* Sized down off the logo box so a long wordmark doesn't outweigh a
   compact mark: cap height sits well below the box height. */
.proof__wordmark {
  font-family: var(--head);
  font-weight: 600;
  font-size: calc(var(--logo) * 0.46);
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* The footer: email left, LinkedIn right. */
.proof__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  font: var(--body-m);
}

.proof__foot a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.proof__foot a:hover { opacity: .68; }

/* Footer straight under the logos (every page but the homepage): a
   hairline inside the gutters keeps the two bands apart. */
.proof--clients + .proof--end { position: relative; }
.proof--clients + .proof--end::before {
  content: "";
  position: absolute;
  top: 0;
  left: 48px;
  right: 48px;
  border-top: 1px solid rgba(245, 244, 236, .22);
}

@media (max-width: 700px) {
  .proof { padding: 40px 24px 48px; }
  .proof--clients + .proof--end::before { left: 24px; right: 24px; }

  /* Below 700 a justified row spreads the marks too thin and any wrap
     strands the last one. A grid gives a tidy block: three columns, two
     rows of six logos, each mark centred in its column (Ernest, 2026-10-15;
     two columns with a straight left edge before). */
  .proof__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
    column-gap: 16px;
    row-gap: 32px;
  }
  .proof__label { margin-bottom: 24px; }
}
