/* 04 Customers (without Peak Demand, Albert's pick): two dark tiles of one size side by side, Freshworks and Thryv, each its photograph on top (3:2) and the
   midnight foot under it with the headline, the quote and the second figure, the two feet ending level. Each photo
   carries the customer's logo (the Freshworks frame shows its own) and its key figure in display size, on a shade in the
   photo's lower left corner only, so the rest of the photo stays as it is.

   Sharpness: each image's `sizes` is the width it is drawn at once cropped, so the browser loads a copy that big; on a
   2x screen Freshworks has 2 or more source pixels per CSS pixel, Thryv's portrait (Rob Hayden's press photo, 900 px
   wide, 4 Nov) about 1.5 on desktop until a full-size original replaces it. Tablet (600-999): the two side by side at
   6:5. Phone: one column, 5:4. Hover brings the photo a little closer; nothing moves on its own. */

.customers { padding-block: var(--space-9); background: var(--surface-page); }
.customers-inner { display: flex; flex-direction: column; gap: var(--space-7); }
.customers-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-3) var(--space-6); }
.customers-more { flex: none; }

/* The two tiles, side by side and as high as each other */
.customers-mosaic {
  --tile-pad: var(--space-6);
  --key-size: 72px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}
.customers-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-inverse);
  color: var(--ink-on-dark);
  isolation: isolate;
}
/* Each tile opens its customer's story (Albert's pick): the link's box covers the whole tile, one stop for the
   keyboard, its focus ring inside the tile's edge, light on the dark tile */
.customers-link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.customers-link:focus-visible { outline: 2px solid var(--accent-line); outline-offset: -4px; }

/* Photo */
.customers-photo { position: relative; flex: none; overflow: hidden; aspect-ratio: 3 / 2; }
.customers-photo-img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: var(--focus, 50% 50%);
  transition: transform 700ms var(--ease-settle);
}
/* The figure's shade (lower left) and the seam into the foot */
.customers-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(130% 115% at 0% 100%, rgb(var(--c-midnight-rgb) / 0.86) 0, rgb(var(--c-midnight-rgb) / 0.62) 24%, rgb(var(--c-midnight-rgb) / 0.22) 46%, rgb(var(--c-midnight-rgb) / 0) 64%),
    linear-gradient(to bottom, rgb(var(--c-midnight-rgb) / 0) 72%, rgb(var(--c-midnight-rgb) / 0.5) 90%, var(--c-midnight) 100%);
}
/* The lockup, in the photo's lower left: the customer's logo over its key figure (the Freshworks frame shows its own
   logo, so its lockup is the figure alone). Down there it stays clear of faces, signs and the photo's own words. */
.customers-lockup {
  position: absolute; left: var(--tile-pad); right: var(--tile-pad); bottom: var(--space-5); z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4);
}
.customers-logo { display: block; width: var(--logo-w, 96px); height: auto; filter: brightness(0) invert(1); }

/* Key figure: the system's KeyFigure, at --key-size (72, 56 and 52 px) */
.customers-key-pre { display: block; margin-bottom: 0.12em; font-size: 0.3em; line-height: 1.1; letter-spacing: -0.01em; font-weight: 500; }   /* "Up to", on its own line over the number */

/* Words: the headline, the quote (the system's Quote), the second figure */
.customers-words { position: relative; display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--space-4); padding: var(--space-5) var(--tile-pad) var(--tile-pad); }
.customers-headline { font: var(--t-headline); letter-spacing: var(--t-headline-tracking); text-wrap: pretty; }
.customers-second {
  display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; align-self: stretch; gap: var(--space-3);
  margin: auto 0 0; padding-top: var(--space-4); border-top: 1px solid var(--border-on-dark);
}
.customers-second dd { margin: 0; font: var(--t-figure-s); letter-spacing: var(--t-figure-s-tracking); white-space: nowrap; }
.customers-second dt { font: var(--t-caption); color: var(--ink-on-dark-tertiary); }

/* Hover: the photo comes a little closer */
@media (hover: hover) {
  .customers-tile:hover .customers-photo-img { transform: scale(1.03); }
}

/* Small desktop and wide tablet: the same two tiles, closer */
@media (max-width: 1199px) {
  .customers { padding-block: var(--space-8); }
  .customers-inner { gap: var(--space-6); }
  .customers-mosaic { --tile-pad: var(--space-5); --key-size: 56px; gap: 20px; }
  .customers-headline { font-size: 20px; line-height: 28px; }
  .customers-lockup { bottom: var(--space-4); gap: var(--space-3); }
  .customers-logo { width: calc(var(--logo-w, 96px) * 0.86); }
}

/* Tablet: the two side by side, their photos 6:5 */
@media (max-width: 999px) {
  .customers-photo { aspect-ratio: 6 / 5; }
}

/* Phone: one column */
@media (max-width: 599px) {
  .customers-inner { gap: var(--space-5); }
  .customers-head { flex-direction: column; align-items: flex-start; }
  .customers-mosaic { --tile-pad: 20px; --key-size: 52px; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .customers-photo { aspect-ratio: 5 / 4; }
  .customers-tile--freshworks .customers-photo-img { object-position: 4% 50%; }   /* the left part: the figure beside the podium, under the faces */
  .customers-lockup { bottom: var(--space-4); gap: var(--space-3); }
  .customers-words { gap: var(--space-3); padding-top: var(--space-4); }
  .customers-second { margin-top: var(--space-2); }
  .customers-logo { width: calc(var(--logo-w, 96px) * 0.84); }
}
