/* =====================
   IMPACT METRICS SECTION
   ===================== */
.impact-metrics {
  background: var(--light-grey);
  width: 100%;
  color: var(--navy, rgb(30, 37, 104));
}

/* Header ----------------- */
.impact-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-bottom: 80px;
}

.impact-eyebrow {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 18px;
  margin-top: 0;
  animation: impact-fade-up 0.6s ease both;
}

.impact-title {
  max-width: 480px;
  margin-bottom: 0;
  animation: impact-fade-up 0.6s 0.1s ease both;
}

.impact-intro {
  background: #fff;
  padding: 25px;
  @media (min-width: 50em) {
    padding: 32px 36px;
  }
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(30, 37, 104, 0.06);
  animation: impact-fade-up 0.6s 0.2s ease both;
}

.impact-intro p {
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 14px;
  &:first-of-type {
    margin-top: 0;
  }
  &:last-of-type {
    margin-bottom: 0;
  }
}

.impact-intro p:last-child {
  margin-bottom: 0;
}
.impact-intro strong {
  font-weight: 700;
}

/* Donut cards ----------------- */
.impact-donuts {
  margin-bottom: 1.875rem;
  row-gap: 1.875rem;
}

.impact-donut {
  background: #fff;
  border: 3px solid var(--red, #d51317);
  border-radius: 10px;
  padding: 15px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  animation: impact-fade-up 0.6s ease both;
  @media (min-width: 64em) {
    flex-direction: row;
    text-align: left;
    align-items: center;
    padding: 25px;
  }
}

.impact-donut-svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
}

.impact-donut-track {
  fill: none;
  stroke: #a9d1ee;
  stroke-width: 12;
}

.impact-donut-fill {
  fill: none;
  stroke: var(--rose, #dd817d);
  stroke-width: 12;
  stroke-linecap: butt;
  transform: rotate(-90deg);
  transform-origin: center;
  stroke-dasharray: 339.29;
  stroke-dashoffset: 339.29;
  animation: impact-donut-fill 1.6s 0.4s ease-out forwards;
}

/* When JS controls the donut animation, suppress the CSS-only auto-fill
   so it does not race the in-viewport playback. */
.impact-metrics.is-js-anim .impact-donut-fill {
  animation: none;
}

.impact-donut--rose .impact-donut-fill {
  stroke: var(--rose, #dd817d);
}
.impact-donut--light-blue .impact-donut-fill {
  stroke: var(--light-blue, #a9d1ee);
}
.impact-donut--light-blue .impact-donut-track {
  stroke: var(--rose, #dd817d);
}
.impact-donut--complete .impact-donut-fill {
  opacity: 0;
}

.impact-donut-value-svg {
  font-family: var(--font-display, 'Bureau GrotThreeSeven', 'Barlow Condensed', sans-serif);
  font-weight: 700;
  font-size: 30px;
  fill: var(--navy, rgb(30, 37, 104));
}

.impact-donut-label {
  margin: 0;
}

/* Bar chart card ----------------- */
.impact-bar-card {
  background: #fff;
  border: 3px solid var(--red, #d51317);
  border-radius: 10px;
  padding: 32px 36px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  animation: impact-fade-up 0.6s 0.7s ease both;
}

.impact-bar-text {
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
  margin-top: 0;
}

.impact-bar-text strong {
  font-weight: 700;
}

.impact-bar-rows {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.impact-bar-row {
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  align-items: center;
  gap: 16px;
}

.impact-bar-label {
  font-weight: 700;
  font-size: 16px;
}

.impact-bar-track {
  height: 24px;
  background: var(--rose, #dd817d);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.impact-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: #a9d1ee;
  transform: scaleX(0);
  transform-origin: left center;
  animation: impact-bar-grow 1.2s 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.impact-bar-value {
  font-family: var(--font-display, 'Bureau GrotThreeSeven', 'Barlow Condensed', sans-serif);
  font-weight: 700;
  font-size: 36px;
  text-align: right;
}

.impact-bar-source {
  grid-column: 1 / -1;
  font-size: 12px;
  font-style: italic;
  opacity: 0.7;
  text-align: right;
  margin-top: 4px;
}

/* Pull quote ----------------- */
.impact-quote {
  margin: 90px auto 0;
  padding: 80px 180px 30px;
  text-align: center;
  position: relative;
  max-width: 960px;
  animation: impact-fade-up 0.6s 0.9s ease both;
}

.impact-quote-mark--open {
  top: 10px;
  left: 0;
  color: #dd817d;
  opacity: 0.47;
}

.impact-quote-mark--close {
  right: 0;
  bottom: -200px;
  color: #a9d1ee;
  opacity: 0.47;
}

.impact-quote-text {
  font-weight: 600;
  font-size: 36px;
  line-height: 40px;
  max-width: 832px;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
}

.impact-quote-cite {
  font-size: 16px;
  font-style: normal;
  position: relative;
  z-index: 1;
}

/* Animations ----------------- */
@keyframes impact-fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes impact-donut-fill {
  to {
    stroke-dashoffset: var(--target-offset, 0);
  }
}

@keyframes impact-bar-grow {
  to {
    transform: scaleX(var(--bar-scale, 1));
  }
}

@media (prefers-reduced-motion: reduce) {
  .impact-donut-fill,
  .impact-bar-fill {
    animation: none;
  }
  .impact-donut-fill {
    stroke-dashoffset: var(--target-offset, 0);
  }
  .impact-bar-fill {
    transform: scaleX(var(--bar-scale, 1));
  }
}

/* Responsive ----------------- */
@media (max-width: 1024px) {
  .impact-header {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 2.2rem;
  }
  .impact-donuts {
    row-gap: 1.875rem;
  }
  .impact-bar-card {
    grid-template-columns: 220px 1fr;
    gap: 28px;
  }
  .impact-quote {
    padding-right: 110px;
    padding-left: 110px;
  }
}

@media (max-width: 720px) {
  .impact-bar-card {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .impact-donuts {
    row-gap: 1.1rem;
    margin-bottom: 1.1rem;
  }
  .impact-donuts.grid-padding-x > .cell:nth-child(odd) {
    padding-right: 0.55rem;
  }
  .impact-donuts.grid-padding-x > .cell:nth-child(even) {
    padding-left: 0.55rem;
  }
  .impact-donut-value-svg {
    font-size: 22px;
  }
  .impact-donut-label {
    font-size: 12px;
  }
  .impact-bar-card {
    padding: 24px 20px;
  }
  .impact-bar-row {
    grid-template-columns: 100px 1fr 50px;
    gap: 10px;
  }
  .impact-bar-label {
    font-size: 13px;
  }
  .impact-bar-value {
    font-size: 22px;
  }
  .impact-quote {
    padding: 30px;
    margin-top: 60px;
  }
  .impact-quote-text {
    font-size: 22px;
    line-height: 26px;
  }
  .impact-quote-mark--open {
    top: -0px;
  }
  .impact-quote-mark--close {
    bottom: -150px;
  }
}
