/* ---------- Hero visual: glowing hub with the module cards arranged round it ---------- */
/* Everything is placed in percent of a square box and sized in cqw, so the composition scales as one. */
/* it fills its column, but never grows taller than the space below the header */
.eco-wrap {
  position: relative; min-width: 0; width: 100%; max-width: min(820px, max(560px, calc(100svh - var(--head-h) - 3.5rem)));
  margin-inline: auto; container-type: inline-size;
}
.eco { position: relative; width: 100%; aspect-ratio: 1; }

/* ---------- Rings, spokes, waves and particles ---------- */
.eco-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 1; }
.eco-art .orbit-outer { fill: none; stroke: rgba(245, 215, 131, 0.3); stroke-width: 1; stroke-dasharray: 1.5 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.eco-art .orbit-outer2 { fill: none; stroke: rgba(147, 127, 203, 0.16); stroke-width: 1; vector-effect: non-scaling-stroke; }
.eco-art .orbit-mid { fill: none; stroke: rgba(178, 158, 232, 0.32); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.eco-art .orbit-inner { fill: none; stroke: rgba(248, 227, 168, 0.35); stroke-width: 1; stroke-dasharray: 1 4; vector-effect: non-scaling-stroke; }
.eco-art .spoke { stroke: rgba(245, 200, 110, 0.42); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.eco-art .ring-dot { fill: #efbe39; filter: drop-shadow(0 0 1.2px rgba(241, 199, 83, 0.95)); }
.eco-art .spoke-dot { fill: #ffb13b; filter: drop-shadow(0 0 1.4px rgba(255, 168, 40, 1)); }
.eco-art .wave {
  fill: none; stroke: rgba(247, 223, 158, 0.5); stroke-width: 1.2; vector-effect: non-scaling-stroke;
  transform-box: fill-box; transform-origin: center; opacity: 0;
}
.eco-art .particles > g { transform-box: view-box; transform-origin: 50px 50px; }
.eco-art .particle { fill: #faedc7; opacity: 0; filter: drop-shadow(0 0 0.6px rgba(244, 211, 121, 0.9)); }

/* ---------- The hub ---------- */
.eco-corona {
  position: absolute; left: 50%; top: 50%; width: 70%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(251, 240, 209, 0.32) 0%, rgba(245, 215, 131, 0.15) 30%, rgba(237, 181, 29, 0.06) 48%, rgba(237, 181, 29, 0) 68%);
}
.eco-rays {
  position: absolute; left: 50%; top: 50%; width: 58%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(249, 229, 175, 0.12) 0deg 1.4deg, rgba(249, 229, 175, 0) 1.4deg 12deg);
  -webkit-mask: radial-gradient(circle, transparent 46%, #000 54%, transparent 72%);
  mask: radial-gradient(circle, transparent 46%, #000 54%, transparent 72%);
}
.eco-core {
  position: absolute; left: 50%; top: 50%; width: 33%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 2;
  border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1cqw;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #fefbf2 38%, #fcf3da 68%, #f9e6b1 100%);
  border: 0.3cqw solid rgba(237, 181, 29, 0.6);
  box-shadow:
    0 0 0 1cqw rgba(252, 242, 215, 0.14),
    0 0 0 2.2cqw rgba(249, 229, 175, 0.07),
    0 0 4cqw 0.8cqw rgba(248, 227, 168, 0.55),
    0 0 10cqw 3cqw rgba(237, 181, 29, 0.24),
    inset 0 0 3cqw rgba(237, 181, 29, 0.2);
}
.eco-core::before { content: ''; position: absolute; inset: 5%; border-radius: 50%; pointer-events: none; border: 1px solid rgba(237, 181, 29, 0.28); }
.core-badge {
  width: 40%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #fff;
  box-shadow: 0 0 0 0.45cqw #fff, 0 0 0 0.75cqw rgba(237, 181, 29, 0.35), 0 1.2cqw 2.2cqw -1cqw rgba(46, 31, 89, 0.55);
}
.eco-core .core-logo { width: 84%; height: auto; }
.eco-core .cap {
  margin: 0; font-family: var(--f-head); font-weight: 700; font-size: 2.8cqw; max-width: 82%;
  color: var(--navy); text-align: center; line-height: 1.12; letter-spacing: -0.01em;
}
.eco-core .cap span {
  display: block; margin-top: 0.4em; font-family: var(--f-body); font-weight: 600; font-size: 0.5em;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Module cards ---------- */
.eco-orbit { position: absolute; inset: 0; z-index: 3; margin: 0; padding: 0; list-style: none; }
.eo {
  position: absolute; left: var(--x); top: var(--y); width: 21%; translate: -50% -50%;
  display: flex; align-items: center; justify-content: center; min-height: 11.4cqw; padding: 5.2cqw 1.2cqw 1.8cqw;
  border-radius: 2.4cqw; background: #fff; text-align: center;
  box-shadow: 0 0 0 0.35cqw rgba(255, 255, 255, 0.14), 0 2.2cqw 4cqw -1.6cqw rgba(10, 5, 30, 0.75);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}
.eo:hover { transform: translateY(-0.8cqw); box-shadow: 0 0 0 0.35cqw color-mix(in srgb, var(--g1) 45%, transparent), 0 2.8cqw 5cqw -1.6cqw rgba(10, 5, 30, 0.8); }
.eo-ic {
  position: absolute; left: 50%; top: 0; width: 7.6cqw; height: 7.6cqw; translate: -50% -48%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: radial-gradient(circle at 35% 28%, var(--g1), var(--g2) 75%);
  box-shadow: 0 0 0 0.55cqw #fff, 0 0 0 0.9cqw color-mix(in srgb, var(--g1) 30%, transparent), 0 1cqw 2.4cqw -0.4cqw color-mix(in srgb, var(--g2) 80%, transparent);
}
.eo-ic .i { width: 46%; height: 46%; stroke-width: 2; }
.eo b {
  font-family: var(--f-head); font-weight: 700; font-size: 2.05cqw; line-height: 1.22; letter-spacing: -0.01em;
  color: var(--navy); text-wrap: balance;
}
.eo.t-indigo { --g1: #6a6be0; --g2: #2c2d7a; }
.eo.t-pink   { --g1: #ff86b8; --g2: #db2f78; }
.eo.t-green  { --g1: #7cc79d; --g2: #2f7d56; }
.eo.t-rose   { --g1: #ff8f8f; --g2: #d93c58; }
.eo.t-orange { --g1: #ffb547; --g2: #e8780c; }
.eo.t-cyan   { --g1: #4fd3ea; --g2: #0d8db0; }
.eo.t-gold   { --g1: #ffd257; --g2: #d99a00; }
.eo.t-red    { --g1: #ff7a7f; --g2: #cf2f3b; }
.eo.t-violet { --g1: #b98bff; --g2: #6f43d9; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .eco-core { animation: core-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both, sun-pulse 5s ease-in-out 1.2s infinite; }
  .eco-corona { animation: corona 5s ease-in-out 1.2s infinite; }
  .eco-rays { animation: rays-turn 90s linear infinite; }
  .eco-art .orbit-outer { animation: ring-turn 60s linear infinite; transform-origin: 50px 50px; }
  .eco-art .wave { animation: wave-out 7.5s cubic-bezier(0.25, 0.6, 0.35, 1) calc(var(--k) * -2.5s) infinite; }
  .eco-art .ring-dot, .eco-art .spoke-dot { animation: dot-glow 3.2s ease-in-out calc(var(--k) * -0.4s) infinite; }
  .eco-art .particle { animation: particle-out var(--t) linear var(--d) infinite; }

  /* cards pop in one after another round the ring, then bob gently on their own rhythm */
  .eo { animation: pop-in 0.7s cubic-bezier(0.3, 1.4, 0.4, 1) calc(0.6s + var(--i) * 0.08s) both, card-float calc(6s + var(--i) * 0.5s) ease-in-out calc(1.8s + var(--i) * -0.9s) infinite; }
  .eo-ic { animation: icon-glow 4s ease-in-out calc(var(--i) * -0.6s) infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .eco-art .wave:first-child { opacity: 0.35; transform: scale(1.35); }
}
@keyframes core-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes sun-pulse {
  0%, 100% { box-shadow: 0 0 0 1cqw rgba(252, 242, 215, 0.14), 0 0 0 2.2cqw rgba(249, 229, 175, 0.07), 0 0 4cqw 0.8cqw rgba(248, 227, 168, 0.55), 0 0 10cqw 3cqw rgba(237, 181, 29, 0.24), inset 0 0 3cqw rgba(237, 181, 29, 0.2); }
  50% { box-shadow: 0 0 0 1.3cqw rgba(252, 242, 215, 0.2), 0 0 0 2.8cqw rgba(249, 229, 175, 0.09), 0 0 5.4cqw 1.2cqw rgba(248, 227, 168, 0.65), 0 0 13cqw 4cqw rgba(237, 181, 29, 0.3), inset 0 0 3.4cqw rgba(237, 181, 29, 0.24); }
}
@keyframes corona { 0%, 100% { opacity: 0.8; scale: 1; } 50% { opacity: 1; scale: 1.04; } }
@keyframes rays-turn { to { rotate: 360deg; } }
@keyframes ring-turn { to { rotate: 360deg; } }
@keyframes wave-out { 0% { transform: scale(1); opacity: 0; } 12% { opacity: 0.5; } 100% { transform: scale(2.4); opacity: 0; } }
@keyframes dot-glow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes particle-out { 0% { transform: translateX(14px); opacity: 0; } 15% { opacity: 0.9; } 100% { transform: translateX(38px); opacity: 0; } }
@keyframes pop-in { from { opacity: 0; scale: 0.6; } to { opacity: 1; scale: 1; } }
@keyframes card-float { 0%, 100% { margin-top: 0; } 50% { margin-top: -0.7cqw; } }
@keyframes icon-glow {
  0%, 100% { box-shadow: 0 0 0 0.55cqw #fff, 0 0 0 0.9cqw color-mix(in srgb, var(--g1) 30%, transparent), 0 1cqw 2.4cqw -0.4cqw color-mix(in srgb, var(--g2) 80%, transparent); }
  50% { box-shadow: 0 0 0 0.55cqw #fff, 0 0 0 1.3cqw color-mix(in srgb, var(--g1) 24%, transparent), 0 0 3.4cqw 0.4cqw color-mix(in srgb, var(--g1) 75%, transparent); }
}

/* ---------- Narrow screens: hub on top, module cards in a grid below ---------- */
@container (max-width: 520px) {
  .eco { aspect-ratio: auto; display: flex; flex-direction: column; align-items: center; gap: 2rem; padding-top: 0.6rem; }
  .eco-art, .eco-corona, .eco-rays { display: none; }
  .eco-core {
    position: relative; left: auto; top: auto; transform: none; width: 52%; max-width: 220px; border-width: 2px; gap: 8px;
    box-shadow: 0 0 0 8px rgba(252, 242, 215, 0.14), 0 0 26px 6px rgba(248, 227, 168, 0.45), 0 0 70px 18px rgba(237, 181, 29, 0.2), inset 0 0 20px rgba(237, 181, 29, 0.2);
  }
  .core-badge { box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(237, 181, 29, 0.35); }
  .eco-core .cap { font-size: 0.92rem; }
  .eco-orbit { position: relative; inset: auto; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem 0.6rem; padding-top: 0.9rem; }
  .eo { position: relative; left: auto; top: auto; width: auto; translate: none; min-height: 0; padding: 26px 6px 10px; border-radius: 12px; }
  .eo-ic { width: 40px; height: 40px; box-shadow: 0 0 0 3px #fff, 0 6px 14px -4px color-mix(in srgb, var(--g2) 80%, transparent); }
  .eo b { font-size: 0.72rem; }
}
@media (prefers-reduced-motion: no-preference) {
  @container (max-width: 520px) {
    /* the hub sits in normal flow here, so it must not keep the centring transform from its entrance */
    .eco-core { animation: none; }
    .eo { animation: pop-in 0.6s cubic-bezier(0.3, 1.4, 0.4, 1) calc(0.3s + var(--i) * 0.06s) both; }
    .eo-ic { animation: none; }
  }
}
