/* SEO Impact: four cards in the footer/Figma container (min(73.4vw, 1410px)). Everything inside a card is sized in
   cqw (1cqw = 1% of the card width), so each card scales as a whole. 1 Figma px (card = 298px) = 0.3356cqw. */
.impact { padding-top: 6.67vw; padding-bottom: 5vw; }

.impact__head { text-align: center; }
.impact__title {
  margin-top: .8vw; font-size: clamp(1.9rem, 2.5vw, 3rem); line-height: 1.18; font-weight: 600; letter-spacing: -.02em; color: var(--c-ink);
}

.impact__grid {
  width: min(73.4vw, 1410px); margin: 2.7vw auto 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(.75rem, 1.56vw, 1.9rem); align-items: end;   /* staggered heights, bottoms aligned */
}

.impact-card {
  container-type: inline-size; position: relative; overflow: hidden;
  background: #f5f5f5; color: var(--c-ink);
  border-radius: min(1.15vw, 22px);      /* cqw can't be used on the container itself, so the card radius uses vw (20px at 1920) */
}
/* NOTE: cqw only works on things INSIDE a card, never on the card itself, so card padding uses % (of the card width). */
.impact-card--search { aspect-ratio: 298 / 474; padding: 3.36%; }
.impact-card--stat   { aspect-ratio: 298 / 300; background: #e74430 center / cover no-repeat; color: #fff; }
.impact-card--quote  { aspect-ratio: 298 / 410; }
.impact-card--pills  { aspect-ratio: 298 / 450; }
.impact-card { color: #101828; }
.impact-card--stat { color: #fff; }

/* shared type (Figma: card = 298px, so 20px = 6.71cqw and 16px = 5.37cqw) */
.impact-card__photo { display: block; width: 100%; height: auto; border-radius: 4.7cqw; }
.impact-card__name { font-size: 6.71cqw; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.impact-card__text { font-size: 5.37cqw; line-height: 1.6; font-weight: 400; color: rgba(16,24,40,.6); }

/* 1 · Increased Search */
.impact-card__avatars { display: block; width: 36.9cqw; height: auto; margin: 6.7cqw 0 0 6.7cqw; }
.impact-card--search .impact-card__name { margin: 6.7cqw 0 0 6.7cqw; }
.impact-card--search .impact-card__text { margin: 3.4cqw 0 0 6.7cqw; width: 72.5cqw; }

/* 2 · red stat card (the rocket is part of the background image) */
.impact-card--stat .impact-card__big { position: absolute; left: 10cqw; top: 10.4cqw; font-size: 10.7cqw; line-height: 1; font-weight: 600; letter-spacing: -.01em; }
.impact-card--stat .impact-card__name { position: absolute; left: 10cqw; top: 49.8cqw; letter-spacing: 0; }
.impact-card--stat .impact-card__text { position: absolute; left: 10cqw; top: 64.8cqw; width: 76cqw; color: rgba(255,255,255,.92); }

/* 3 · quote: no white box in the design, the text sits on the grey card */
.impact-quote { display: contents; }
.impact-quote__text { position: absolute; left: 10cqw; top: 9.7cqw; width: 74cqw; font-size: 6.71cqw; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.impact-quote__link {
  position: absolute; left: 10cqw; right: 10cqw; top: 44.3cqw; padding-top: 10cqw;
  border-top: 1px solid rgba(16,24,40,.12); display: flex; align-items: center; gap: 2.7cqw;
  font-size: 5.37cqw; line-height: 6.71cqw; font-weight: 600; width: auto;
}
.impact-quote__icon { width: 6.71cqw; height: 6.71cqw; border-radius: 50%; background: var(--c-primary); display: grid; place-items: center; transition: transform .4s var(--ease); }
.impact-quote__icon img { width: 4.4cqw; height: auto; filter: brightness(0) invert(1); transform: rotate(-45deg); transition: transform .4s var(--ease); }   /* arrow points up-right, as in the design */
.impact-quote__link:hover .impact-quote__icon { transform: scale(1.12); }
.impact-quote__link:hover .impact-quote__icon img { transform: rotate(-90deg); }
.impact-card--quote .impact-card__photo { position: absolute; left: 3.36cqw; bottom: 3.36cqw; width: 93.28cqw; height: auto; }   /* explicit width: an absolutely positioned <img> would otherwise keep its natural size */

/* 4 · text + physics pills */
.impact-card__lead { position: absolute; left: 10cqw; top: 9.4cqw; width: 76cqw; font-size: 6.71cqw; line-height: 1.2; font-weight: 600; letter-spacing: -.01em; z-index: 1; }
.pills { position: absolute; inset: 0; pointer-events: none; }
.pill {
  position: absolute; left: 0; top: 0; width: var(--w); height: var(--h); border-radius: 99px;
  display: grid; place-items: center; font-size: 5.37cqw; font-weight: 500; line-height: 1; color: #fff; white-space: nowrap;
  pointer-events: auto; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; will-change: transform; z-index: 2;
  /* resting layout from the design; the script takes over with physics (and this is the fallback without JS) */
  transform: translate(calc(var(--x) - var(--w) / 2), calc(var(--y) - var(--h) / 2)) rotate(var(--r));
}
.pill--dark { background: #101828; }
.pill--red  { background: var(--c-primary); }
.pill.is-dragging { cursor: grabbing; z-index: 3; box-shadow: 0 1.2cqw 3cqw rgba(16,24,40,.22); }
.pills.is-armed .pill { visibility: hidden; }       /* hidden until the section scrolls into view and they drop */

/* ---------- Footer line ---------- */
.impact__foot { margin-top: 2.7vw; text-align: center; }
.impact__tag { font-size: max(13px, .83vw); font-weight: 500; color: rgba(30,30,30,.65); }
.impact__trust { margin-top: .8vw; display: flex; align-items: center; justify-content: center; gap: 1.1vw; font-size: max(13px, .83vw); font-weight: 600; }
.impact__rating { display: flex; align-items: center; gap: .55vw; padding-left: 1.1vw; border-left: 1px solid rgba(30,30,30,.15); }
.impact__stars { display: flex; gap: .15vw; color: var(--c-primary); }
.impact__stars svg { width: max(15px, .94vw); height: auto; }

@media (max-width: 1000px) {
  .impact { padding-top: 4rem; }
  .impact__title { margin-top: .6rem; }
  .impact__grid { width: calc(100% - 2 * var(--gutter)); margin-top: 1.75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: end; }
  .impact__foot { margin-top: 2rem; padding-inline: var(--gutter); }
  .impact__tag, .impact__trust { font-size: .9rem; }
  .impact__trust { margin-top: .6rem; gap: .9rem; flex-wrap: wrap; }
  .impact__rating { gap: .5rem; padding-left: .9rem; }
  .impact__stars svg { width: 15px; }
}
@media (max-width: 560px) {
  .impact__grid { grid-template-columns: minmax(0, 1fr); }
}
