/* ==========================================================================
   Blok „Ekologia – izotyp z liczbami” (.eco): nagłówek z krokami refabrykacji, wiersze
   piktogramów połączone pomarańczowymi łącznikami (dymki z przeliczeniami), granatowy panel
   „1 kg plastiku”, w tle pomarańczowe fale.
   Źródło (prototyp): assets/css/style.css – „Ecology”, odstęp sekcji + Responsive (900, 560 px).
   ========================================================================== */

.eco {
  padding: clamp(4rem, 8vw, 7.5rem) 0;
  background-color: #fff;
  color: var(--navy-900); position: relative; overflow: hidden; isolation: isolate;
  border-top: 1px solid var(--line);
}
.eco__wave { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 320px; z-index: -1; color: var(--orange); opacity: .55; }
.eco h2 { color: var(--navy-900); max-width: 18ch; margin: 0; }
.eco__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.5rem 4rem; align-items: start; }
.eco__intro > p { color: var(--muted); max-width: 60ch; margin: 0; font-size: 1.0625rem; }
.refab { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; counter-reset: refab; }
.refab li { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; color: var(--muted); font-size: .9375rem; line-height: 1.45; }
.refab li > span { padding-top: .15rem; }
.refab li::before {
  content: counter(refab); counter-increment: refab;
  font-family: var(--font-ui); font-weight: 600; font-size: .8125rem;
  width: 26px; height: 26px; border-radius: 50%; background: var(--navy-900); color: #fff;
  display: grid; place-items: center; align-self: start;
}
.refab strong { display: block; font-weight: 600; color: var(--navy-900); }
.eco .link-more { color: var(--navy-900); }
.eco .link-more:hover { color: var(--navy-900); text-decoration-color: var(--navy-900); }

/* infographic: one isotype row per figure, joined by the operation that links them */
.eco-graph__hint {
  margin: clamp(3rem, 6vw, 4.5rem) 0 0; display: inline-flex; align-items: center; gap: .5rem;
  font: 500 .8125rem/1.2 var(--font-ui); letter-spacing: .01em; color: var(--muted);
}
.eco-graph__hint .icon { width: 1rem; height: 1rem; color: var(--orange-600); }
.eco-graph { margin-top: 1rem; border-bottom: 1px solid var(--line-strong); }
.eco-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: 1.25rem 3rem; align-items: center; padding: 2.25rem 0 2rem; border-top: 1px solid var(--line-strong);
  transition: background .3s;
}
.eco-row.is-active { background: linear-gradient(90deg, var(--orange-50), transparent 70%); }
.eco-row__op {
  position: absolute; top: 0; left: 0; transform: translateY(-50%);
  background: var(--orange); color: var(--navy-900); border-radius: 3px; padding: .45em .8em;
  font: 500 .75rem/1.2 var(--font-ui); letter-spacing: .02em; white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.eco-row.is-active .eco-row__op { transform: translateY(-50%) translateX(6px); box-shadow: 0 8px 18px -10px rgba(236, 110, 40, .9); }
.eco-row__op sub, .eco-row__num sub, .eco-row__legend sub { font-size: .7em; }
.eco-row__num { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .55rem; color: var(--navy-900); }
.eco-row__pre { flex-basis: 100%; font: 500 .8125rem/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; margin-bottom: .2rem; }
.eco-row__num b {
  display: inline-block; font-weight: 300; font-size: clamp(2.75rem, 2rem + 2.3vw, 3.875rem); line-height: .95;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .3s;
}
.eco-row.is-active .eco-row__num b { color: var(--orange-600); }
.eco-row__num small { font-size: 1.125rem; font-weight: 500; line-height: 1.2; }
.eco-row__label { margin: .45rem 0 0; color: var(--muted); font-size: 1rem; line-height: 1.4; max-width: 28ch; }
.eco-row__visual { display: grid; gap: .85rem; max-width: 690px; position: relative; }
.eco-icons { display: flex; flex-wrap: wrap; gap: 10px; color: var(--navy-900); cursor: pointer; touch-action: manipulation; }
.eco-ico {
  width: 40px; height: 26px; fill: currentColor; flex: none;
  transition: opacity .5s var(--ease), transform .6s var(--ease), color .25s;
  transition-delay: calc(var(--i, 0) * 26ms);
}
.eco-ico.is-lit, .eco-ticks span.is-lit { color: var(--orange-600); transition-delay: 0s; }
.eco-ico.is-echo, .eco-ticks span.is-echo { color: var(--orange); transition-delay: 0s; }
.eco-ico.is-hot { transform: scale(1.32) translateY(-3px); color: var(--orange-600); transition-delay: 0s; filter: drop-shadow(0 6px 8px rgba(236, 110, 40, .35)); }
.eco-ticks span { color: var(--navy-900); background: currentColor; }
.eco-ticks span.is-hot { transform: scaleY(1.35); transform-origin: bottom; }
.eco-tip {
  position: absolute; z-index: 6; left: 0; top: 0; pointer-events: none;
  background: var(--navy-900); color: #fff; border-radius: 6px; padding: .6rem .8rem .65rem;
  font: 400 .75rem/1.35 var(--font-ui); letter-spacing: .01em; white-space: nowrap;
  box-shadow: 0 18px 36px -16px rgba(22, 42, 67, .6);
  transform: translate(-50%, calc(-100% - 14px)) scale(.94); opacity: 0;
  transition: opacity .2s var(--ease), transform .3s var(--ease);
}
.eco-tip.is-on { opacity: 1; transform: translate(-50%, calc(-100% - 14px)) scale(1); }
.eco-tip::after {
  content: ""; position: absolute; left: var(--ax, 50%); top: 100%; width: 10px; height: 10px;
  background: var(--navy-900); transform: translate(-50%, -50%) rotate(45deg);
}
.eco-tip strong { display: block; font: 600 1rem/1.2 var(--font-ui); color: #fff; margin-bottom: .2rem; font-variant-numeric: tabular-nums; }
.eco-tip span { color: #c9d4e2; }
.eco-tip em { font-style: normal; color: var(--orange-400); }
.eco-row__legend {
  margin: 0; display: flex; align-items: center; gap: .45rem; color: var(--navy-900);
  font: 500 .75rem/1.3 var(--font-ui); letter-spacing: .03em;
}
.eco-ico--key { width: 24px; height: 16px; transition: none; }
.eco-row__legend--ruler { justify-content: space-between; }
.eco-ticks {
  display: flex; justify-content: space-between; align-items: flex-end;
  height: 44px; border-bottom: 2px solid var(--navy-900); padding: 0 1px; cursor: pointer; touch-action: manipulation;
}
.eco-ticks span {
  width: 3px; height: 16px; border-radius: 1px 1px 0 0; transition: color .25s;
  transform-origin: bottom; transition: transform .55s var(--ease), opacity .4s, color .25s; transition-delay: calc(var(--i, 0) * 38ms);
}
.eco-ticks span:nth-child(5n) { height: 28px; }
.eco-ticks span:last-child { height: 42px; width: 4px; }

/* armed by view.js: rows start empty and fill once they scroll into view */
.eco-graph.is-armed .eco-row:not(.is-filled) .eco-icons .eco-ico { opacity: .16; transform: scale(.8); }
.eco-graph.is-armed .eco-row:not(.is-filled) .eco-ticks span { transform: scaleY(.15); opacity: .35; }

.eco-kg {
  margin-top: clamp(2.5rem, 5vw, 3.5rem); background: url("../../assets/img/siatka-granat.svg") center / cover no-repeat, var(--navy-ground); color: #fff;
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2.5rem);
  display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: center;
  box-shadow: 0 26px 50px -30px rgba(22, 42, 67, .8);
}
.eco-kg__title { margin: 0; font-size: 1.25rem; line-height: 1.35; font-weight: 400; color: #fff; text-wrap: balance; }
.eco-kg__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.eco-kg__list li { display: grid; align-content: start; gap: .2rem; padding: 0 1.25rem; border-left: 1px solid rgba(255, 255, 255, .14); }
.eco-kg__list li:first-child { border-left: 0; padding-left: 0; }
.eco-kg__list .icon { width: 1.5rem; height: 1.5rem; color: var(--orange-400); margin-bottom: .45rem; }
.eco-kg__list b { font-weight: 300; font-size: clamp(1.5rem, 1.15rem + 1vw, 2rem); line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.eco-kg__list span { font: 400 .875rem/1.3 var(--font-ui); color: #c9d4e2; }
.eco-kg__list sub { font-size: .7em; }
.eco-kg__note { grid-column: 1 / -1; margin: 0; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .14); color: #c9d4e2; font-size: .9375rem; }
.eco-kg__note span { display: block; max-width: 82ch; }

@media (max-width: 900px) {
  .eco__head { grid-template-columns: 1fr; }
  .eco-row { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .eco-kg { grid-template-columns: 1fr; }
  .eco-kg__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.5rem; }
  .eco-kg__list li:nth-child(3) { border-left: 0; padding-left: 0; }
  .refab { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .eco-ico { width: 34px; height: 22px; }
  .eco-icons { gap: 8px; }
  .eco-row__op { white-space: normal; max-width: calc(100% - 1rem); }
  .eco-tip { white-space: normal; max-width: 220px; }
  .eco-kg__list b { font-size: 1.5rem; }
}
