:root {
  --page-bg: 244 244 241;
  --ink: 23 23 26;
  --muted: 110 110 118;

  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: rgb(var(--page-bg));
  color: rgb(var(--ink));
  font-family: 'Manrope', system-ui, sans-serif;
  padding: 3.5rem 1.5rem 5rem;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
}

.page-header {
  max-width: 42ch;
  margin-bottom: 3rem;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(var(--muted));
  margin-bottom: 0.6rem;
}

h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.3rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

.lede {
  color: rgb(var(--muted));
  font-size: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  position: relative;
  background: rgb(var(--card-r) var(--card-g) var(--card-b));
  color: rgb(255 255 255 / 0.95);
  border-radius: 20px;
  padding: 1.6rem 1.6rem 1.4rem;
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px);
  transition:
    transform 250ms var(--ease-out-quad),
    box-shadow 250ms ease;
}

.stat-card.is-visible {
  animation: rise 650ms var(--ease-out-expo) forwards;
}

/* Una vez que la animación de entrada terminó, el estado final queda fijado
   por una regla normal (no por el fill-forward de la animación). Solo así se
   puede quitar `animation` de forma segura después — quitar una animación con
   fill:forwards revierte al estado ANTERIOR a ella (opacity:0), no al final;
   eso era lo que hacía "desaparecer" la tarjeta al hacer hover. */
.stat-card.has-landed {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat-card {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

@media (hover: hover) and (pointer: fine) {
  .stat-card.has-landed:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgb(var(--card-r) var(--card-g) var(--card-b) / 0.6);
  }
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgb(255 255 255 / 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
  stroke: white;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgb(255 255 255 / 0.75);
  margin-bottom: 1.4rem;
}

.sparkline {
  width: 100%;
  height: 34px;
  display: block;
  overflow: visible;
}

.sparkline path {
  fill: none;
  stroke: rgb(255 255 255 / 0.85);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline .fill {
  stroke: none;
  fill: rgb(255 255 255 / 0.12);
}
