/* Stats — was Stats.module.css. The bundler's hashed class names are
   replaced by a plain c-Stats_ prefix so the stylesheet stands alone. */

.c-Stats_stats {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  background-color: var(--base-1000);
  color: var(--base-100);
}

.c-Stats_inner {
  display: flex;
  flex-direction: column;
  gap: 6rem;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.c-Stats_header {
  width: 100%;
  padding: 0 4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.c-Stats_header h2 {
  font-size: clamp(2.5rem, 7vw, 7rem);
  position: relative;
  max-width: 14ch;
}

.c-Stats_callout {
  z-index: 10;
}

/* Equal columns — tall card matches projects shipped card width */
.c-Stats_grid {
  width: min(100%, 44rem);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: start;
  perspective: 1600px;
  perspective-origin: 50% 0%;
}

.c-Stats_col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  transform-style: preserve-3d;
}

/* Drop left column so tall right card starts higher */
.c-Stats_colLeft {
  padding-top: 2.75rem;
}

.c-Stats_card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform;
}

.c-Stats_overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* First left — wide landscape (~3:2), shorter than tall card */
.c-Stats_cardMedia {
  position: relative;
  aspect-ratio: 3 / 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.15rem;
  color: var(--base-100);
}

.c-Stats_cardMedia > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-Stats_cardMedia::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--base-1000) 100%, transparent) 0%,
    transparent 75%
  );
  pointer-events: none;
}

/* Square-ish white metric under landscape */
.c-Stats_cardLight {
  aspect-ratio: 1 / 1;
  width: 85%;
  align-self: flex-end;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.15rem;
  background-color: var(--base-100);
  color: var(--base-1000);
}

.c-Stats_meta {
  align-self: flex-end;
  text-align: right;
}

.c-Stats_card h2 {
  font-size: clamp(1.5rem, 4vw, 4rem);
  font-size: 4rem;
}

.c-Stats_cardAccent {
  aspect-ratio: 0.65 / 1;
  min-height: 22rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.15rem;
  background-color: var(--base-400);
  color: var(--base-100);
}

/* First right — tall portrait, full-bleed image + top gradient */
.c-Stats_cardTall {
  aspect-ratio: 1 / 1.85;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 1.15rem;
  color: var(--base-100);
}

.c-Stats_cardTall > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.c-Stats_cardTall::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    color-mix(in srgb, var(--base-1000) 90%, transparent) 0%,
    color-mix(in srgb, var(--base-1000) 25%, transparent) 50%,
    transparent 75%
  );
  pointer-events: none;
}

.c-Stats_cardTall .c-Stats_overlay {
  z-index: 1;
}

.c-Stats_cardDark {
  aspect-ratio: auto;
  min-height: 16rem;
  width: 82%;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem;
  background-color: var(--base-800);
  color: var(--base-1000);
  overflow: visible;
}

.c-Stats_list {
  list-style: none;
  align-self: flex-end;
  text-align: right;
}

@media (max-width: 1000px) {
  .c-Stats_inner {
    gap: 2.5rem;
    padding-top: 8rem;
    padding-bottom: 8rem;
  }

  .c-Stats_header {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .c-Stats_callout {
    display: none;
  }

  .c-Stats_grid {
    width: min(100%, 24rem);
    grid-template-columns: 1fr;
  }

  .c-Stats_colLeft {
    padding-top: 0;
  }

  .c-Stats_cardLight {
    width: 100%;
    align-self: stretch;
  }

  .c-Stats_cardDark {
    width: 100%;
    align-self: stretch;
  }
}
