/* ═══════════════════════════════════════════════════════════════
   Liczby pod headerem: każda ma własną miarę w tej samej skali.
   Jeden domek to jeden projekt, więc 450 i 120 można porównać okiem.
   ═══════════════════════════════════════════════════════════════ */
.st {
  --ink: #032d90;
  --c: clamp(12px, 1.35vw, 20px);
  /* style.css limits every <section> to 1200px with padding */
  max-width: 1440px;
  margin: 0 auto;
  padding: 88px 48px;
  background: var(--bg);
}
.st-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: stretch;
}

.st-kicker { display: block; margin: 0 0 4px; font-size: 16px; color: var(--text-soft); }
.st-num { display: block; font-weight: 700; line-height: .95; letter-spacing: -0.045em; color: var(--ink); font-variant-numeric: tabular-nums; }
.st-label { display: block; margin: 6px 0 0; font-size: 18px; font-weight: 500; line-height: 1.3; color: var(--text); }

.st-main .st-num { font-size: clamp(96px, 12.5vw, 190px); }
.st-main .st-label { font-size: 22px; }
.st-main .st-reveal { margin-top: 28px; }

.st-side { display: grid; grid-template-rows: repeat(3, 1fr); }
.st-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--border-md);
}
.st-row:first-child { border-top: 2px solid var(--text); }
.st-row:last-child { border-bottom: 1px solid var(--border-md); }
.st-row .st-num { font-size: clamp(52px, 5.4vw, 84px); }

/* Miary rysowane jednym tłem, więc liczba elementów zawsze zgadza się z siatką */
.st-reveal { width: fit-content; }
.st-field {
  background-repeat: repeat;
}
.st-field.is-450 {
  width: calc(var(--c) * 30);
  height: calc(var(--c) * 15);
  background-size: calc(100% / 30) calc(100% / 15);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23032d90' d='M10 3.500l6.500 5.800V16.500h-13V9.300z'/%3E%3C/svg%3E");
}
.st-field.is-120 {
  width: calc(var(--c) * 20);
  height: calc(var(--c) * 6);
  background-size: calc(100% / 20) calc(100% / 6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23032d90' stroke-width='1.700' d='M10 3.500l7 6.100V17H3V9.600z'/%3E%3C/svg%3E");
}
/* Linijka: 15 działek, co piąta dłuższa */
.st-ruler {
  position: relative;
  width: calc(var(--c) * 20);
  height: calc(var(--c) * 3);
  border-bottom: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  background-image:
    linear-gradient(90deg, var(--ink) 2px, transparent 2px),
    linear-gradient(90deg, var(--ink) 2px, transparent 2px);
  background-size: calc((100% + 0px) / 3) 100%, calc((100% + 0px) / 15) 45%;
  background-position: left bottom, left bottom;
  background-repeat: repeat-x;
}
/* 100 pól: pierwsze 98 wypełnione, dwa ostatnie w samym obrysie */
.st-field.is-98 {
  position: relative;
  width: calc(var(--c) * 20);
  height: calc(var(--c) * 5);
  background-size: calc(100% / 20) calc(100% / 5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='2.700' y='2.700' width='14.600' height='14.600' fill='none' stroke='%23032d90' stroke-width='1.400'/%3E%3C/svg%3E");
}
.st-field.is-98::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: calc(100% / 20) calc(100% / 5);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='2' y='2' width='16' height='16' fill='%23032d90'/%3E%3C/svg%3E");
  clip-path: polygon(0 0, 100% 0, 100% 80%, 90% 80%, 90% 100%, 0 100%);
}

/* Jedno odsłonięcie przy wejściu: miary rosną kolumna po kolumnie, razem z licznikiem */
.st.is-live .st-reveal { clip-path: inset(0 100% 0 0); }
.st.is-live.is-in .st-reveal { clip-path: inset(0 -2px 0 0); transition: clip-path 1.8s steps(30); }

@media (max-width: 960px) {
  .st { --c: 15px; padding: 72px 32px; }
  .st-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .st-main .st-num { font-size: clamp(96px, 22vw, 170px); }
}
@media (max-width: 640px) {
  .st { --c: calc((100vw - 40px) / 30); padding: 64px 20px; }
  .st-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .st-row .st-num { font-size: 64px; }
  .st-row .st-field.is-98, .st-row .st-ruler { --c: calc((100vw - 40px) / 20); }
  /* Same house size as the 450 field: 30 × 4 is still exactly 120 */
  .st-field.is-120 { width: calc(var(--c) * 30); height: calc(var(--c) * 4); background-size: calc(100% / 30) 25%; }
}
