/* ============================================================================
   SIGVIN — Block 4: Liczby  (Figma node 444:6253, 1440×448)
   Карточка-баннер со статистикой: фото склада + затемнение, 4 ячейки-цифры
   в шахматном порядке, разделённые пунктирными вертикалями. Уголки на ячейках.
   ========================================================================== */

.stats {
  position: relative;
  z-index: 2;                 /* над наезжающим белым блоком projects (#7) */
  width: var(--frame-w);
  max-width: 100%;
  height: 448px;
  margin: 0 auto;
  border-radius: var(--r-card);
  overflow: hidden;
  isolation: isolate;
}
/* обводку (gframe-кольцо) поднимаем над фото/затемнением */
.stats::before { z-index: 5; }

.stats__bg {
  position: absolute;
  top: -25%;
  left: 0;
  right: 0;
  width: 100%;
  height: 150%;                /* выше блока → сильный параллакс не открывает края */
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
}
.stats__overlay {
  position: absolute;
  inset: 0;
  background: var(--dark-48);
  z-index: 1;
  pointer-events: none;
}

/* верхний пунктир-сепаратор (как в Hero) */
.stats__sep {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  z-index: 4;
  background-image: url('/assets/ui/dash-line.svg');
  background-size: 1440px 16px;
  background-repeat: no-repeat;
  background-position: center top;
  pointer-events: none;
}

/* сетка 4 колонок с пунктирными вертикалями */
.stats__grid {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1254px;
  max-width: 100%;
  display: flex;
  z-index: 2;
}
.stats__col {
  position: relative;
  flex: 1 0 0;
  border-left: 1px solid var(--light-16);
}
.stats__col:last-child { border-right: 1px solid var(--light-16); }

/* уголки ячеек статистики случайно «мерцают» (анимацию рандомит stats.js) */
@keyframes corner-twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ячейка-цифра (border-light 12% + уголки от .gframe), шахматка top/bottom */
.stats__cell {
  position: absolute;
  left: 0;
  right: 0;
  height: 138px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  padding: 0 31px;
  color: var(--light-white);
  --glass-border: var(--border-light);
}
.stats__cell--top { top: 64px; }
.stats__cell--bottom { bottom: 59px; }

.stats__num {
  font: 700 72px/72px "adineue PRO Cyr", sans-serif;
  letter-spacing: -0.01em;
}
.stats__label { color: var(--light-white); max-width: 254px; }

/* ---- мобайл (≤767, фрейм 375 — node 444:5791): 4 карточки в колонку ----
   Pixel-perfect: затемнённое фото (есть) + верхний пунктир (есть) + 2 сплошные
   вертикали white 12% по краям карточек (x=16/359) + 4 карточки border light/8%
   с уголками, число 48/56 + лейбл 18/26 — БЕЛЫЕ. Шаг карточек 146 (h114 + gap32),
   сверху/снизу по 44 → блок 640. */
@media (max-width: 1024px) {
  .stats { width: 100%; height: auto; border-radius: 32px; }
  .stats__sep { background-size: 1976px 16px; }

  .stats__grid {
    position: relative; left: auto; top: auto; bottom: auto; transform: none;
    width: 100%;
    flex-direction: column; gap: 32px;
    padding: 44px 16px;
  }
  /* вертикальные сплошные линии white 12% (Figma Line 77/78), на всю высоту блока */
  .stats__grid::before, .stats__grid::after {
    content: ""; position: absolute; top: 0; bottom: 0; width: 1px;
    background: var(--border-light); pointer-events: none;
  }
  .stats__grid::before { left: 16px; }
  .stats__grid::after  { right: 16px; }

  .stats__col { flex: none; border: 0; }
  .stats__col:last-child { border: 0; }
  .stats__col + .stats__col { background: none; }   /* убрать гориз. пунктир между колонками */

  /* карточка-блок: border light/8% (gframe-кольцо) + уголки + текст белый */
  .stats__cell {
    position: static; top: auto; bottom: auto; height: auto;
    padding: 16px 24px; gap: 0;
    --glass-border: var(--light-8);
  }
  .stats__cell--top, .stats__cell--bottom { top: auto; bottom: auto; }
  /* на мобайле уголки статичные (без мерцания stats.js) — pixel-perfect */
  .stats .corner { animation: none !important; opacity: 1 !important; }
  .stats__num { font-size: 48px; line-height: 56px; letter-spacing: 0; }
  .stats__label {
    font: 700 18px/26px "adineue PRO Cyr", sans-serif;
    letter-spacing: 0.02em; max-width: none;
  }
}
