/* MFOL Stats: options on top of the theme's Stats, Impact Stat, and Stats With Media styles */

/* Row on a color */
.mfol-st.mfol-st--filled {
  padding: var(--block-margin) var(--outer-padding);
}
.mfol-st.mfol-st--filled .grid-control {
  margin-left: auto;
  margin-right: auto;
  max-width: 1400px;
}

/* Number color */
.mfol-st--row.mfol-st--num .stats__stat-text {
  background: var(--mfol-st-num);
}
.mfol-st--single.mfol-st--num .impact-stat__stat-text,
.mfol-st--media.mfol-st--num .stats-with-media__stat-number {
  color: var(--mfol-st-num);
}

/* Photo on the right (Stats beside a photo) */
@media (min-width: 992px) {
  .mfol-st.mfol-st--photo-right .stats-with-media__content {
    order: 2;
  }
}

/* Text color: words only, never the numbers (they have their own color) */
.mfol-st.mfol-look--text-white .stats__stat-description,
.mfol-st.mfol-look--text-white .impact-stat__text-small,
.mfol-st.mfol-look--text-white .stats-with-media__heading,
.mfol-st.mfol-look--text-white .stats-with-media__deck,
.mfol-st.mfol-look--text-white .stats-with-media__stat-description {
  color: var(--color-white);
}
.mfol-st.mfol-look--text-black .stats__stat-description,
.mfol-st.mfol-look--text-black .impact-stat__text-small,
.mfol-st.mfol-look--text-black .stats-with-media__heading,
.mfol-st.mfol-look--text-black .stats-with-media__deck,
.mfol-st.mfol-look--text-black .stats-with-media__stat-description {
  color: var(--color-black);
}

/* Heading size: the numbers (Large is the theme's standard) */
.mfol-st--row.mfol-look--head-xlarge .stats__stat-text {
  font-size: clamp(5.5rem, 15vw, 14rem);
}
.mfol-st--row.mfol-look--head-medium .stats__stat-text {
  font-size: clamp(3rem, 6vw, 6.5rem);
}
.mfol-st--row.mfol-look--head-small .stats__stat-text {
  font-size: clamp(2.25rem, 4vw, 4rem);
}
.mfol-st--row.mfol-look--head-xsmall .stats__stat-text {
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
}
.mfol-st--single.mfol-look--head-medium .impact-stat__stat-text {
  font-size: clamp(5rem, 20vw, 16rem);
}
.mfol-st--single.mfol-look--head-small .impact-stat__stat-text {
  font-size: clamp(4rem, 14vw, 11rem);
}
.mfol-st--single.mfol-look--head-xsmall .impact-stat__stat-text {
  font-size: clamp(3rem, 9vw, 7rem);
}
.mfol-st--media.mfol-look--head-xlarge .stats-with-media__heading {
  font-size: clamp(3rem, 6.5vw, 6.5rem);
}
.mfol-st--media.mfol-look--head-medium .stats-with-media__heading {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
}
.mfol-st--media.mfol-look--head-small .stats-with-media__heading {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}
.mfol-st--media.mfol-look--head-xsmall .stats-with-media__heading {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
}
.mfol-st.mfol-look--head-condensed .stats__stat-text,
.mfol-st.mfol-look--head-condensed .impact-stat__stat-text,
.mfol-st.mfol-look--head-condensed .stats-with-media__heading,
.mfol-st.mfol-look--head-condensed .stats-with-media__stat-number {
  font-family: var(--f-trim-slender);
  font-weight: var(--f-trim-slender-weight, 700);
}
.mfol-st.mfol-look--intro-small .stats__stat-description,
.mfol-st.mfol-look--intro-small .impact-stat__text-small,
.mfol-st.mfol-look--intro-small .stats-with-media__deck {
  font-size: 0.9375rem;
}
.mfol-st.mfol-look--intro-large .stats__stat-description,
.mfol-st.mfol-look--intro-large .impact-stat__text-small,
.mfol-st.mfol-look--intro-large .stats-with-media__deck {
  font-size: clamp(1.25rem, 2.3vw, 2rem);
  line-height: 1.35;
}

/* Editor */
.mfol-st__placeholder {
  align-items: center;
  background: var(--color-gray);
  border: 2px dashed var(--color-black);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 120px;
  padding: 24px;
  text-align: center;
}

/* ===== Photo and stats ===== */
.mfol-st-photo {
  color: var(--color-black);
  padding: var(--block-margin) var(--outer-padding);
}
.mfol-st-photo.mfol-st-photo--standard {
  background: var(--color-black);
}
.mfol-st-photo.mfol-look--text-white {
  color: var(--color-white);
}
.mfol-st-photo.mfol-look--text-black {
  color: var(--color-black);
}
.mfol-st-photo__inner {
  align-items: center;
  display: grid;
  gap: clamp(32px, 5vw, 80px);
  grid-template-columns: minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1400px;
}
@media (min-width: 992px) {
  .mfol-st-photo:not(.mfol-st-photo--no-image) .mfol-st-photo__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
  .mfol-st-photo--right:not(.mfol-st-photo--no-image) .mfol-st-photo__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
  .mfol-st-photo--right .mfol-st-photo__media {
    order: 2;
  }
}
.mfol-st-photo--no-image .mfol-st-photo__inner {
  max-width: 860px;
}
.mfol-st-photo__img {
  aspect-ratio: 4 / 5;
  border: 2px solid currentColor;
  border-radius: 14px;
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}
@media (max-width: 991px) {
  .mfol-st-photo__img {
    aspect-ratio: 4 / 3;
  }
}
.mfol-st-photo__heading {
  color: inherit;
  font-family: var(--f-trim);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.9;
  margin: 0;
  text-transform: uppercase;
}
.mfol-st-photo__deck {
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.45;
  margin: 16px 0 0;
  max-width: 560px;
}
.mfol-st-photo__list {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
}
/* Wider screens: the number column fits the longest number, and every description lines up */
@media (min-width: 600px) {
  .mfol-st-photo__list {
    column-gap: 28px;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
  }
  .mfol-st-photo__list .mfol-st-photo__stat {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
  }
}
.mfol-st-photo__stat {
  align-items: center;
  border-top: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  display: grid;
  gap: 4px 28px;
  grid-template-columns: minmax(0, 1fr);
  margin: 0;
  padding: 18px 0;
}
.mfol-st-photo__stat:last-child {
  border-bottom: 1px solid color-mix(in srgb, currentColor 30%, transparent);
}

.mfol-st-photo__number {
  white-space: nowrap;
  color: var(--mfol-st-num, currentColor);
  font-family: var(--f-trim);
  font-size: clamp(3rem, 5.5vw, 4.75rem);
  line-height: 0.9;
}
.mfol-st-photo--standard:not(.mfol-st--num) .mfol-st-photo__number {
  color: var(--color-blue);
}
.mfol-st-photo__desc {
  font-size: clamp(1rem, 1.3vw, 1.125rem);
  line-height: 1.4;
  text-transform: none;
}
.mfol-st-photo.mfol-look--head-xlarge .mfol-st-photo__heading {
  font-size: clamp(3.25rem, 7vw, 6.5rem);
}
.mfol-st-photo.mfol-look--head-medium .mfol-st-photo__heading {
  font-size: clamp(2rem, 3.6vw, 3.25rem);
}
.mfol-st-photo.mfol-look--head-small .mfol-st-photo__heading {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}
.mfol-st-photo.mfol-look--head-xsmall .mfol-st-photo__heading {
  font-size: clamp(1.375rem, 2.2vw, 1.75rem);
}
.mfol-st-photo.mfol-look--head-condensed .mfol-st-photo__heading,
.mfol-st-photo.mfol-look--head-condensed .mfol-st-photo__number {
  font-family: var(--f-trim-slender);
  font-weight: var(--f-trim-slender-weight, 700);
}
.mfol-st-photo.mfol-look--intro-small .mfol-st-photo__deck {
  font-size: 0.9375rem;
}
.mfol-st-photo.mfol-look--intro-large .mfol-st-photo__deck {
  font-size: clamp(1.25rem, 2.3vw, 2rem);
}

/* A number like 300+ always stays on one line */
.stats__stat-text {
  white-space: nowrap;
}

/* One giant stat: the scribble's swoosh is wider than the number on purpose; keep it inside the block so it never widens the page */
.mfol-st.mfol-st--single {
  overflow-x: clip;
}
/* The big number stays on one line (the fitter shrinks it if a phone is too narrow) */
.mfol-st .impact-stat__stat-text {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
}

/* Big numbers in a row of stats never spill into the next column: each one is capped at its
   column's width, and the fitter shrinks it if it doesn't fit */
.mfol-st .stats__stat-text {
  max-width: 100%;
  white-space: nowrap;
}
