* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #ffffff;
  color: #171717;
}

.metrics {
  padding: 4rem 1rem;
}

.metrics__inner {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.5rem;
}

.text {
  order: 2;
}

.heading {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #171717;
}

.copy {
  max-width: 28rem;
  margin: 1rem 0 0;
  font-size: 0.875rem;
  line-height: 1.625;
  color: #737373;
}

.stats {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat {
  border-left: 2px solid #39ff14;
  padding-left: 1rem;
}

.stat__value {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #171717;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  color: #737373;
}

.photo {
  order: 1;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #f5f5f5;
}

.photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  --x: 0px;
  --y: 0px;
  transform: translate(var(--x), var(--y)) scale(1.08);
  transition: transform 300ms ease-out;
}

@media (min-width: 640px) {
  .heading {
    font-size: 1.875rem;
  }

  .stats {
    flex-direction: row;
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .metrics {
    padding: 6rem 2rem;
  }

  .metrics__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
  }

  .text {
    order: 1;
  }

  .photo {
    order: 2;
    aspect-ratio: 3 / 4;
  }

  .stats {
    flex-direction: column;
    gap: 1rem;
  }
}

/*
 * Metrics 02 — "soft entrance + mouse-tracked image pan" animation
 * identity. Same canonical keyframes as `Metrics02.tailwind.css`. The pan
 * (see script.js) is direct-manipulation feedback driven by the user's
 * own pointer, not autoplaying motion, so it stays active under reduced
 * motion — only the on-mount entrance is disabled there. Scoped so this
 * never collides with another Resource's own animation layer.
 */
@keyframes al-metrics02-text-in {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes al-metrics02-photo-in {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .text-in {
    animation: al-metrics02-text-in 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .photo-in {
    animation: al-metrics02-photo-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
