/* ==========================================================================
   MIT App Inventor — impact figures (the four green circles)
   --------------------------------------------------------------------------
   Used by the homepage and the About Us page. The markup is
   _includes/impact-figures.html; edit the figures there.

   Requires ai2-tokens.css to be loaded first.
   ========================================================================== */

/* Green circles matching the set on appinventor.org, drawn in CSS with the
   figures as live text in _includes/impact-figures.html. (The old PNGs are
   still in /landing_page_assets/green_circles/ but nothing uses them.) */

.ai2-impact {
  padding: var(--ai2-space-xl) var(--ai2-space-sm);
  text-align: center;
}

/* The measure, not the type size, is what was making this headline feel
   cramped: at 30ch it broke into three short lines in a very wide band. The
   font-size below is unchanged; only the line length is. min() keeps it from
   running edge to edge on a wide monitor. */
.ai2-impact__heading {
  max-width: min(78ch, 92%);
  margin: 0 auto var(--ai2-space-lg);
  color: var(--ai2-ink);
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2rem);
  font-family: var(--ai2-display-font);
  font-weight: var(--ai2-display-weight);
  line-height: 1.25;
  text-wrap: balance;
}

.ai2-impact__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The stat circles are text, not images, so the figures are easy to update
   and browser translation reaches the labels. One size knob, --impact-size;
   the type inside scales from it, keeping the proportions of the old PNGs
   (figure about a fifth of the diameter). The green is the one on the
   appinventor.org circles, a lighter step than --ai2-brand-lime. */
.ai2-impact__circle {
  --impact-size: clamp(9.5rem, 17vw, 13rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--impact-size) * 0.04);
  flex: none;
  width: var(--impact-size);
  aspect-ratio: 1 / 1;
  /* Side padding keeps a wrapped label inside the curve. */
  padding: 0 calc(var(--impact-size) * 0.1);
  border-radius: 50%;
  background-color: var(--ai2-impact-green);
  color: var(--ai2-ink);
  text-align: center;
}

.ai2-impact__figure {
  font-family: var(--ai2-display-font);
  font-size: calc(var(--impact-size) * 0.21);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.ai2-impact__label {
  font-family: var(--ai2-display-font);
  font-size: max(0.8rem, calc(var(--impact-size) * 0.072));
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* "Our mission and impact" under the circles on the homepage. */
.ai2-impact__more {
  margin: var(--ai2-space-md) 0 0;
  font-family: var(--ai2-display-font);
  font-size: 1.1rem;
  font-weight: 600;
}

.ai2-impact__more a {
  color: var(--ai2-brand-magenta);
  text-decoration: none;
  border-bottom: 2px solid currentColor;
}

.ai2-impact__more a:hover,
.ai2-impact__more a:focus-visible {
  color: var(--ai2-ink);
}
