/* ===========================================================
   Triveni Power - "Precision in Numbers"
   Stripe-inspired clean grid. No tiles, no boxes, no scatter -
   6 stats in a 3-col x 2-row layout separated by 1px hairlines,
   big bold orange numbers, restrained labels, lots of whitespace.
   Section fills 100vh and centres the content.
   =========================================================== */

.stats {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(88px, 10vh, 136px) 0 clamp(64px, 7vh, 104px);
  background: #0A0809;
  color: #FFFFFF;
}

/* Liquid-ether canvas + vignette as the textured backdrop. Kept
   subtle so the numbers carry the foreground. */
.stats__liquid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
  touch-action: none;
  opacity: 0.35;
}
.stats::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(10,8,9,0.85) 100%),
    linear-gradient(180deg, rgba(10,8,9,0.55) 0%, transparent 12%, transparent 88%, rgba(10,8,9,0.55) 100%);
}

.stats__container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container, 1320px);
  margin: 0 auto;
  padding: 0 clamp(20px, 3vw, 48px);
}

/* =========================================================
   HEADER
   ========================================================= */
.stats__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(40px, 6vh, 72px);
}
.stats__headline {
  font-family: var(--font-display);
  font-size: var(--fs-l);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #FFFFFF;
  margin: 0 0 clamp(10px, 1.4vh, 18px);
}
.stats__headline em {
  font-style: normal;
  color: var(--accent, #F58220);
}
.stats__lede {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-m);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.65);
}
.stats__lede-brand {
  color: var(--accent, #F58220);
  font-weight: 600;
}

/* =========================================================
   GRID - clean Stripe-style with hairline dividers
   Mobile  : single col, horizontal hairlines only
   Tablet  : 2-col with vertical + horizontal hairlines
   Desktop : 3-col x 2-row
   ========================================================= */
.stats__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
@media (min-width: 720px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .stats__grid { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================================
   CELL - just typography on whitespace
   ========================================================= */
.stats__cell {
  position: relative;
  padding: clamp(28px, 4vh, 48px) clamp(20px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.6vh, 22px);
  /* Bottom hairline divider between rows. Removed from the last
     row at each viewport via nth-child overrides below. */
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  /* Initial state for the reveal animation */
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 800ms cubic-bezier(.16, 1, .3, 1),
    transform 900ms cubic-bezier(.16, 1, .3, 1);
}
.stats__cell.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
/* Vertical hairlines between columns - painted via nth-child
   rules so they appear only on the correct cells per breakpoint. */
@media (min-width: 720px) {
  .stats__cell { border-right: 1px solid rgba(255, 255, 255, 0.10); }
  .stats__cell:nth-child(2n) { border-right: 0; }
  /* No bottom border on the last row (last 2 cells) */
  .stats__cell:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (min-width: 1024px) {
  .stats__cell:nth-child(2n) { border-right: 1px solid rgba(255, 255, 255, 0.10); }
  .stats__cell:nth-child(3n) { border-right: 0; }
  /* No bottom border on the last row (last 3 cells) */
  .stats__cell:nth-last-child(-n+3) { border-bottom: 0; }
  .stats__cell:nth-last-child(-n+2) { border-bottom: 0; }
}

/* =========================================================
   NUMBERS - all same size, big, brand orange, Inter
   ========================================================= */
.stats__num,
.stats__sep {
  font-family: var(--font-sans);
  font-weight: 700;
  /* Capped at 35px and scaling down on smaller windows (was up to 72px,
     which floored at 40px and read too large on narrow laptops). */
  font-size: clamp(28px, 3.2vw, 35px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--accent, #F58220);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  display: inline-block;
}
.stats__sep {
  color: rgba(255, 255, 255, 0.30);
  margin: 0 0.12em;
  font-weight: 400;
}
.stats__num-row {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.05em;
}
/* The compound 90 MW / 70,000 RPM cell shares the same number size
   as every other cell; .stats__num-row wraps the pair when needed. */

/* =========================================================
   LABEL
   ========================================================= */
.stats__label {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-m);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  max-width: 34ch;
}
.stats__label b {
  color: #FFFFFF;
  font-weight: 600;
}

/* Hide unused legacy bits */
.stats__icon { display: none; }
.stats__cta-wrap { display: none; }

/* =========================================================
   LIGHT-MODE FLIP
   ========================================================= */
[data-theme="light"] .stats {
  background: #FAFAF8;
  color: var(--ink, #231F20);
}
[data-theme="light"] .stats__liquid { opacity: 0.15; }
[data-theme="light"] .stats::after { display: none; }
[data-theme="light"] .stats__headline { color: var(--ink, #231F20); }
[data-theme="light"] .stats__lede { color: rgba(35, 31, 32, 0.58); }
[data-theme="light"] .stats__label { color: rgba(35, 31, 32, 0.8); }
[data-theme="light"] .stats__label b { color: var(--ink, #231F20); }
[data-theme="light"] .stats__sep { color: rgba(35, 31, 32, 0.30); }
[data-theme="light"] .stats__grid,
[data-theme="light"] .stats__cell { border-color: rgba(35, 31, 32, 0.10); }

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .stats__cell {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
