/* ==========================================================================
   Blok „Ekologia: zielona karta CTA z krajobrazem” (.cta.eko-cta).
   Źródło: karta .cta ze style.css prototypu (zawężona przez :where(.eko-cta), ta sama
   specyficzność; bez zdjęcia) + podstrony/ekologia.css (zielony grunt, krajobraz .eko-land).
   ========================================================================== */

.eko-cta {
  --eko-900: #233a1c; --eko-300: #8fbb5e; --eko-mist: #cddcc0;
  --eko-ground:
    radial-gradient(60% 90% at 0% 0%, rgba(54, 85, 42, .9), rgba(54, 85, 42, 0) 70%),
    linear-gradient(135deg, #2a4421 0%, #233a1c 60%, #19290f 100%);
}

/* --------------------------------------------------------------------------
   Karta CTA (wspólny wygląd prototypu)
   -------------------------------------------------------------------------- */

:where(.eko-cta).cta { padding: clamp(1rem, 3vw, 2rem) 0 clamp(4rem, 8vw, 7.5rem); }
:where(.eko-cta) .cta__card {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center;
  min-height: clamp(380px, 34vw, 460px);
  border-radius: var(--radius-xl);
  color: #fff;
  background: url("../../assets/img/siatka-granat.svg") center / cover no-repeat, var(--navy-ground);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 6px rgba(22, 42, 67, .1), 0 36px 70px -34px rgba(22, 42, 67, .7);
}
:where(.eko-cta) .cta__text { position: relative; z-index: 1; min-width: 0; padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4.5vw, 3.75rem); }
/* jak karta .cta od 1.1.14 (użytkownik, 4.11.2026: „w każdym CTA ta h2 jest za duża”) */
:where(.eko-cta).cta h2 {
  font-size: clamp(1.75rem, 1.1rem + 1.6vw, 2.5rem); line-height: 1.08; margin: 0 0 .8rem;
  color: #fff; letter-spacing: -.03em; text-wrap: balance;
}
:where(.eko-cta).cta h2 strong { font-weight: 700; color: var(--orange-400); }
:where(.eko-cta).cta p { margin: 0 0 1.85rem; color: #c9d4e2; max-width: 50ch; font-size: 1.0625rem; }
:where(.eko-cta) .cta__actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; }
/* on the ground the two actions are the orange pill and a light outline */
:where(.eko-cta).cta .btn--navy {
  color: #fff; font-weight: 600; text-shadow: 0 1px 1px rgba(150, 52, 8, .35);
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0) 41%, rgba(255, 255, 255, .45) 50%, rgba(255, 255, 255, 0) 59%) no-repeat,
    linear-gradient(180deg, #fa8746 0%, #f2711f 52%, #e35e16 100%);
  background-size: 250% 100%, 100% 100%; background-position: 110% 0, 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 14px 28px -14px rgba(236, 110, 40, .9);
}
:where(.eko-cta).cta .btn--navy:hover {
  color: #fff; background-position: -10% 0, 0 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 18px 32px -14px rgba(236, 110, 40, 1);
}
:where(.eko-cta).cta .btn--ghost-navy { color: #fff; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .38); }
:where(.eko-cta).cta .btn--ghost-navy:hover { background: #fff; color: var(--navy-900); border-color: #fff; }

/* komputery i laptopy: dwa przyciski obok siebie, jak w karcie .cta */
@media (min-width: 901px) {
  :where(.eko-cta) .cta__card { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); min-height: clamp(320px, 28vw, 400px); }
  :where(.eko-cta) .cta__actions .btn--lg { font-size: .9375rem; padding: 1em 1.45em; white-space: nowrap; }
}

@media (max-width: 900px) {
  :where(.eko-cta) .cta__card { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  :where(.eko-cta) .cta__text { padding: 0 clamp(1.25rem, 5vw, 2.25rem) clamp(1.75rem, 6vw, 2.5rem); }
}
@media (max-width: 560px) {
  :where(.eko-cta) .cta__actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* --------------------------------------------------------------------------
   Zielona karta z krajobrazem
   -------------------------------------------------------------------------- */

.eko-cta .cta__card {
  background: url("../../assets/img/siatka-granat.svg") center / cover no-repeat, var(--eko-ground);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2px 6px rgba(25, 41, 15, .1), 0 36px 70px -34px rgba(25, 41, 15, .7);
}
.eko-cta .hl, .eko-cta h2 strong { color: var(--eko-300); }
.eko-cta p { color: var(--eko-mist); }
.eko-cta .cta__card :focus-visible { outline-color: #fff; box-shadow: 0 0 0 3px var(--eko-900); }

.eko-cta .cta__text { padding-bottom: clamp(3.25rem, 6vw, 5rem); }
.eko-cta .cta__actions { position: relative; z-index: 1; }
.eko-cta .eko-land {
  position: absolute; z-index: 0; left: 0; right: 0; bottom: 0; width: 100%; height: clamp(170px, 21vw, 260px); pointer-events: none;
}
.eko-cta .eko-land .ln { fill: none; stroke: rgba(255, 255, 255, .34); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.eko-cta .eko-land .faint { stroke: rgba(255, 255, 255, .14); }
.eko-cta .eko-land .thin { stroke-width: 1; stroke: rgba(255, 255, 255, .26); }
.eko-cta .eko-land .soil { fill: rgba(16, 28, 10, .32); }
.eko-cta .eko-land .soil-line { stroke: rgba(203, 224, 176, .55); }
.eko-cta .eko-land :is(.roof, .wall, .crown, .panel) { stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.eko-cta .eko-land .roof { fill: rgba(143, 187, 94, .3); stroke: rgba(203, 224, 176, .6); }
.eko-cta .eko-land .wall { fill: rgba(255, 255, 255, .06); stroke: rgba(255, 255, 255, .34); }
.eko-cta .eko-land .crown { fill: rgba(143, 187, 94, .24); stroke: rgba(203, 224, 176, .5); }
.eko-cta .eko-land .panel { fill: rgba(255, 255, 255, .1); stroke: rgba(255, 255, 255, .34); }
.eko-cta .eko-land .blade { fill: rgba(255, 255, 255, .62); }
.eko-cta .eko-land .hub { fill: #fff; fill-opacity: .85; }
.eko-cta .eko-land__blades { transform-box: view-box; }
/* the blades turn slowly while the card is in view (view.js toggles .is-spinning) */
@media (prefers-reduced-motion: no-preference) {
  .eko-cta .eko-land__blades { animation: eko-spin 18s linear infinite paused; }
  .eko-cta .eko-land__turb:nth-of-type(2) .eko-land__blades { animation-duration: 23s; }
  .eko-cta .eko-land__turb:nth-of-type(3) .eko-land__blades { animation-duration: 14s; }
  .eko-cta.is-spinning .eko-land__blades { animation-play-state: running; }
}
@keyframes eko-spin { to { transform: rotate(360deg); } }

/* mniejsze laptopy: przyciski stoją obok siebie, więc pierwszy wiatrak wchodziłby na tekst i przycisk, a drzewo pod przycisk */
@media (min-width: 901px) and (max-width: 1100px) {
  .eko-cta .cta__text { padding-bottom: 4.75rem; }
  .eko-cta .eko-land__turb:nth-of-type(1) { display: none; }
}
@media (max-width: 900px) {
  /* the card has no photograph on top here, so the copy needs its own top padding; the landscape sits under it */
  .eko-cta .cta__text { padding-top: clamp(2rem, 6vw, 3rem); padding-bottom: calc(clamp(150px, 36vw, 210px) + .5rem); }
  .eko-cta .eko-land { height: clamp(150px, 36vw, 210px); }
}
@media (prefers-reduced-motion: reduce) {
  .eko-cta .eko-land__blades { animation: none !important; }
}
