/* ═══════════════════════════════════════════════════
   Atomi — Statistics Section
   ═══════════════════════════════════════════════════ */

.statistics {
  position: relative;
  padding: clamp(64px, 9vh, 100px) clamp(var(--space-24), 5vw, var(--space-96));
  background:
    radial-gradient(ellipse 50% 48% at 50% 44%, oklch(0.72 0.16 294 / 0.06), transparent 58%),
    linear-gradient(180deg, var(--rhythm-paper) 0%, var(--ivory-clean) 50%, var(--ivory) 100%);
}

.statistics-inner {
  width: min(1480px, 100%);
  margin: 0 auto;
}

.statistics .section-head {
  margin-bottom: clamp(var(--space-48), 7vh, var(--space-64));
  text-align: center;
}

/* ── Stats row ────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.4vw, 36px);
}

/* ── Stat card ────────────────────────────────────── */
.stat-card {
  position: relative;
  text-align: center;
  padding: clamp(32px, 4.5vw, 48px) clamp(16px, 2vw, 28px);
  border: 1px solid oklch(0.78 0.04 76 / 0.14);
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 50% 22%, oklch(0.99 0.01 84 / 0.42), transparent 48%),
    linear-gradient(165deg, oklch(0.994 0.01 82 / 0.38), oklch(0.966 0.018 76 / 0.1));
  backdrop-filter: blur(12px) saturate(1.04);
  -webkit-backdrop-filter: blur(12px) saturate(1.04);
  box-shadow:
    0 8px 28px oklch(0.32 0.05 288 / 0.03),
    inset 0 1px 0 oklch(0.99 0.01 82 / 0.38);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 18px 46px oklch(0.32 0.05 288 / 0.07),
    0 0 24px oklch(0.78 0.12 72 / 0.06),
    inset 0 1px 0 oklch(0.99 0.01 82 / 0.54);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 22px; right: 22px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: oklch(0.78 0.1 74 / 0.32);
  box-shadow: 0 0 10px oklch(0.82 0.12 72 / 0.14);
}

/* ── Stat value ───────────────────────────────────── */
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 3.8vw, 4.2rem);
  font-weight: 650;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 8px;
  background: linear-gradient(
    135deg,
    oklch(0.48 0.12 294),
    oklch(0.28 0.08 286)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.88rem;
  font-weight: 560;
  color: var(--ink-soft);
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

/* Approved design alignment: slim metric rail */
@media (min-width: 1121px) {
  .statistics {
    padding: 16px clamp(24px, 5vw, 96px) 30px;
    background:
      radial-gradient(ellipse 44% 36% at 50% 8%, oklch(0.84 0.12 72 / 0.055), transparent 62%),
      linear-gradient(180deg, var(--rhythm-paper) 0%, var(--ivory-clean) 100%);
  }

  .statistics-inner {
    width: min(1060px, 100%);
  }

  .statistics .section-head {
    display: none;
  }

  .stats-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid oklch(0.74 0.052 70 / 0.16);
    border-radius: 16px;
    background:
      linear-gradient(180deg, oklch(0.994 0.01 82 / 0.62), oklch(0.972 0.018 76 / 0.18)),
      oklch(0.99 0.012 82 / 0.42);
    box-shadow:
      0 10px 26px oklch(0.34 0.04 286 / 0.04),
      inset 0 1px 0 oklch(0.99 0.01 82 / 0.5);
    backdrop-filter: blur(10px) saturate(1.02);
    -webkit-backdrop-filter: blur(10px) saturate(1.02);
  }

  .stat-card {
    min-height: 62px;
    padding: 13px 20px;
    border: 0;
    border-right: 1px solid oklch(0.74 0.052 70 / 0.16);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
    align-items: center;
    text-align: left;
  }

  .stat-card:last-child {
    border-right: 0;
  }

  .stat-card:hover {
    transform: none;
    box-shadow: none;
  }

  .stat-card::before {
    position: static;
    width: 24px;
    height: 24px;
    grid-row: 1 / span 2;
    align-self: center;
    background:
      radial-gradient(circle at 36% 28%, oklch(0.99 0.01 84 / 0.9), transparent 34%),
      oklch(0.82 0.12 72 / 0.12);
    box-shadow: 0 0 0 1px oklch(0.82 0.12 72 / 0.16);
  }

  .stat-value {
    grid-column: 2;
    margin: 0;
    font-size: clamp(1.34rem, 1.75vw, 1.72rem);
    line-height: 0.96;
    background: none;
    color: var(--violet-deep);
    -webkit-text-fill-color: currentColor;
  }

  .stat-label {
    grid-column: 2;
    margin: 2px 0 0;
    font-size: 0.66rem;
    line-height: 1.2;
    color: var(--ink-soft);
  }

  .stat-desc {
    display: none;
  }
}
