/* ==========================================================================
   Blok „Podsumowanie z liczbami”
   Źródło (prototyp): assets/css/podstrony/dlaczego-dts.css (10–11. Liczby i podsumowanie)
   ========================================================================== */

/* wspólne klocki strony Dlaczego DTS (te same reguły w każdym bloku dl-*, który ich używa) */
.dl-sum { --dl-gap: clamp(2rem, 6vw, 6rem); }
.dl-sect { padding: var(--section-y) 0; }

/* operator chip: joins two figures into one sentence (the isotype chain) */
.dl-op {
  white-space: nowrap; background: var(--orange); color: var(--navy-900); border-radius: 6px; padding: .45em .8em;
  font-family: var(--font-ui); font-weight: 500; font-size: .75rem; line-height: 1;
}

/* --------------------------------------------------------------------------
   10–11. Liczby i podsumowanie: four isotype rows chained by operator chips, then the claim
   -------------------------------------------------------------------------- */

.dl-sum__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem var(--dl-gap); align-items: start; }
.dl-sum__intro { position: sticky; top: calc(var(--nav-h) + 2.5rem); }
.dl-sum__intro h2 { margin: 0 0 1.1rem; }
.dl-sum__intro p:last-child { margin: 0; max-width: 46ch; color: var(--muted); font-size: 1.0625rem; }
.dl-iso { border-bottom: 1px solid var(--line-strong); }
.dl-iso__row {
  position: relative; display: grid; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); gap: 1rem clamp(1.25rem, 3vw, 2.25rem);
  align-items: center; padding: 2.1rem 0 1.75rem; border-top: 1px solid var(--line-strong);
}
.dl-iso__op { position: absolute; left: 0; top: 0; transform: translateY(-50%); }
.dl-iso__fig { margin: 0; display: grid; gap: .45rem; }
.dl-iso__line {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1rem auto;
  column-gap: .4rem; align-items: baseline; color: var(--navy-900);
}
.dl-iso__pre { grid-column: 1 / -1; grid-row: 1; align-self: end; line-height: 1; font-family: var(--font-ui); font-weight: 500; font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); }
.dl-iso__num { grid-column: 1; grid-row: 2; font-weight: 300; font-size: clamp(2.5rem, 1.9rem + 1.8vw, 3.25rem); line-height: 1; letter-spacing: -.035em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dl-iso__unit { grid-column: 2; grid-row: 2; font-size: 1.125rem; font-weight: 500; }
.dl-iso__label { max-width: 22ch; color: var(--muted); font-size: .9375rem; line-height: 1.4; }
.dl-iso__vis { min-width: 0; }
.dl-iso__key {
  margin: .65rem 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .35rem 1rem;
  font-family: var(--font-ui); font-weight: 500; font-size: .75rem; color: var(--muted-2);
}
.dl-iso__key > span { display: inline-flex; align-items: center; gap: .45rem; }
/* one tick a year since 2004, every fifth taller, the current year tallest */
.dl-ruler { display: flex; align-items: flex-end; justify-content: space-between; height: 44px; border-bottom: 2px solid var(--navy-900); }
.dl-ruler i { width: 3px; height: 14px; border-radius: 1px 1px 0 0; background: var(--navy-900); }
.dl-ruler i:nth-child(5n + 1) { height: 26px; }
.dl-ruler i:last-child { width: 4px; height: 42px; }
/* one row per figure, always: the units shrink with the column instead of wrapping */
.dl-picto { display: grid; grid-template-columns: repeat(12, minmax(0, 30px)); gap: 8px; }
.dl-picto--cart { grid-template-columns: repeat(10, minmax(0, 36px)); }
.dl-picto svg { width: 100%; height: auto; aspect-ratio: 40 / 26; fill: var(--navy-900); }
.dl-dots { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 5px; max-width: 21rem; }
.dl-dots i { aspect-ratio: 1; border-radius: 50%; background: var(--navy-100); }
.dl-dots i.is-lit { background: var(--orange-600); }
/* units fill in on a stagger once the rows are in view; the four lit dots pop once */
.dl-iso.is-armed .dl-iso__vis :is(.dl-ruler i, .dl-picto svg, .dl-dots i) { opacity: .12; transform: scale(.8); }
.dl-iso.is-armed.is-on .dl-iso__vis :is(.dl-ruler i, .dl-picto svg, .dl-dots i) {
  opacity: 1; transform: none; transition: opacity .35s ease, transform .5s var(--ease); transition-delay: calc(var(--k, 0) * 22ms);
}
.dl-iso.is-armed.is-on .dl-dots i.is-lit { animation: dl-pop .6s var(--ease) calc(var(--k, 0) * 22ms + .5s) both; }
.dl-ruler i { transform-origin: 50% 100%; }
@keyframes dl-pop { 0% { transform: scale(.8); } 45% { transform: scale(1.5); } 100% { transform: none; } }

.dl-claim {
  position: relative; margin: clamp(3.5rem, 7vw, 5.5rem) 0 0; padding-top: calc(26px + clamp(2.5rem, 5vw, 3.5rem));
  text-align: center; text-wrap: balance; color: var(--navy-900);
  font-size: clamp(2.25rem, 1.25rem + 3.4vw, 4rem); font-weight: 600; line-height: 1.05; letter-spacing: -.038em;
}
.dl-claim::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26px;
  background:
    radial-gradient(circle, var(--orange) 0 4px, var(--orange-50) 4.5px 7px, #fff 7.5px 12px, transparent 12.5px) center / 26px 26px no-repeat,
    linear-gradient(90deg, rgba(203, 213, 224, 0), var(--line-strong) 28%, var(--line-strong) 72%, rgba(203, 213, 224, 0)) center / 100% 1px no-repeat;
}

@media (max-width: 900px) {
  .dl-sum__grid { grid-template-columns: minmax(0, 1fr); }
  .dl-sum__intro { position: static; }
}

@media (max-width: 760px) {
  .dl-iso__row { grid-template-columns: minmax(0, 1fr); padding-top: 2.25rem; }
}

@media (max-width: 560px) {
  .dl-picto { gap: 5px; }
  .dl-dots { gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .dl-iso.is-armed .dl-iso__vis :is(.dl-ruler i, .dl-picto svg, .dl-dots i) { opacity: 1; transform: none; }
  .dl-iso.is-armed.is-on .dl-dots i.is-lit { animation: none; }
}
