/*
 * ef11 key facts band (Figma "Case Study Rahmendaten", 1440 frame): two
 * surfaces from edge to edge on the page grid. Client up to column 8 (logo
 * 1-4, facts from 6), project from column 9 (facts from 10). Stacked below
 * 64rem. The surfaces reach the page edges through a shadow that clip-path
 * cuts to the outer side (no horizontal scroll).
 */
.ef-facts__grid {
  display: grid;
}

.ef-facts__client,
.ef-facts__project {
  display: grid;
  gap: 2rem;
  padding-block: 2.5rem;
  box-shadow: 0 0 0 100vmax var(--ef-facts-bg);
  clip-path: inset(0 -100vmax);
}

.ef-facts__client {
  --ef-facts-bg: var(--color-base-100);
}

.ef-facts__client--brand {
  --ef-facts-bg: var(--ef-facts-brand);
  background-color: var(--ef-facts-brand);
  color: #fffbf7;
  --color-heading: #fffbf7;
  --logo-filter: url(#ef-logo-white);
}

.ef-facts__client--navy {
  color: #1b2842;
  --color-heading: #1b2842;
  --logo-filter: brightness(0) invert(0.1);
}

.ef-facts__client--black {
  color: #000;
  --color-heading: #000;
  --logo-filter: url(#ef-logo-black);
}

.ef-facts__project {
  --ef-facts-bg: var(--color-base-100);
}

/* Logo: one-colour file, coloured by --logo-filter; at most 384 x 234 (Figma). */
.ef-facts__logo {
  display: flex;
  align-items: center;
}

.ef-facts__logo img {
  width: auto;
  max-width: min(100%, 24rem);
  height: auto;
  max-height: 6rem;
  object-fit: contain;
  filter: var(--logo-filter);
}

.ef-facts__title {
  margin-bottom: 1.5rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.5625rem;
  color: var(--color-heading);
}

.ef-facts__list {
  display: grid;
  gap: 1.5rem;
}

.ef-facts__list :where(div:not([class])) {
  display: contents;
}

/* Facts: value h4, description body (Figma "01 - Base" sizes). */
.ef-facts .ef-stat__value {
  font-size: 1.25rem;
  line-height: 1.625rem;
}

.ef-facts .ef-stat {
  padding-block: 0;
}

.ef-facts .ef-stat__desc {
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.625rem;
}

@media (min-width: 64rem) {
  .ef-facts__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 1.5rem;
  }

  .ef-facts__client,
  .ef-facts__project {
    grid-template-columns: subgrid;
    align-items: start;
    padding-block: 5rem;
  }

  /* Side by side each surface reaches only its own page edge; the project
     also fills the gutter, so the two colours meet at the end of column 8. */
  .ef-facts__client {
    grid-column: 1 / 9;
    clip-path: inset(0 0 0 -100vmax);
  }

  /* Without a project group the client takes the whole width. */
  .ef-facts__client:only-child {
    grid-column: 1 / -1;
    clip-path: inset(0 -100vmax);
  }

  .ef-facts__logo {
    grid-column: 1 / 5;
    align-self: center;
    min-height: 6rem;
  }

  .ef-facts__client .ef-facts__cell {
    grid-column: 6 / -1;
  }

  .ef-facts__project {
    grid-column: 9 / -1;
    clip-path: inset(0 -100vmax 0 -1.5rem);
  }

  .ef-facts__project .ef-facts__cell {
    grid-column: 2 / -1;
  }

  .ef-facts__title {
    margin-bottom: 3rem;
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .ef-facts__list {
    gap: 2rem;
  }

  .ef-facts .ef-stat__value {
    font-size: 1.5rem;
    line-height: 1.9375rem;
  }

  .ef-facts .ef-stat__desc {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }
}

/* Dark text on the colour, but the logo (a graphic, 3:1) still white. */
.ef-facts__client--logo-light {
  --logo-filter: url(#ef-logo-white);
}
