
.ecosystem-section {
  position: relative;
  padding: 96px 0 100px;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(102,126,234,0.14) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 90%, rgba(118,75,162,0.12) 0%, transparent 45%),
    linear-gradient(135deg, #0b1021 0%, #111827 50%, #0b1220 100%);
  overflow: hidden;
}
.ecosystem-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 70%);
  pointer-events: none;
}

.ecosystem-section .eco-container {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  z-index: 2;
}

.ecosystem-section .eco-header {
  text-align: center;
  margin-bottom: 52px;
}
.ecosystem-section .eco-header .section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56,189,248,0.08);
  border: 1px solid rgba(56,189,248,0.18);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.ecosystem-section .eco-header h2 {
  font-size: clamp(32px, 5.5vw, 48px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.12;
}
.ecosystem-section .eco-header p {
  color: #94a3b8;
  max-width: 640px;
  margin: 0 auto;
  font-size: 16.5px;
  line-height: 1.6;
}

/* Animated flow diagram */
.ecosystem-section .eco-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 54px;
  flex-wrap: wrap;
}
.ecosystem-section .eco-pipeline-node {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.ecosystem-section .eco-pipeline-node .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: eco-pulse 2.4s ease-in-out infinite;
}
.ecosystem-section .eco-pipeline-node:nth-child(5) .dot { background: #a78bfa; box-shadow: 0 0 10px #a78bfa; animation-delay: 0.4s; }
.ecosystem-section .eco-pipeline-node:nth-child(9) .dot { background: #34d399; box-shadow: 0 0 10px #34d399; animation-delay: 0.8s; }
.ecosystem-section .eco-pipeline-node:nth-child(13) .dot { background: #f97316; box-shadow: 0 0 10px #f97316; animation-delay: 1.2s; }
@keyframes eco-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.55; }
}

.ecosystem-section .eco-pipeline-arrow {
  width: 34px;
  height: 12px;
  position: relative;
  opacity: 0.35;
}
.ecosystem-section .eco-pipeline-arrow svg {
  width: 100%;
  height: 100%;
  stroke: #94a3b8;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ecosystem-section .eco-pipeline-arrow .arrow-orb {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  top: 50%;
  left: 0;
  transform: translate3d(0, -50%, 0);
  box-shadow: 0 0 8px #38bdf8;
  animation: eco-arrow-flow 2.2s linear infinite;
}
.ecosystem-section .eco-pipeline-arrow:nth-of-type(4) .arrow-orb { animation-delay: 0.3s; }
.ecosystem-section .eco-pipeline-arrow:nth-of-type(8) .arrow-orb { animation-delay: 0.6s; }
.ecosystem-section .eco-pipeline-arrow:nth-of-type(12) .arrow-orb { animation-delay: 0.9s; }
@keyframes eco-arrow-flow {
  0% { transform: translate3d(0, -50%, 0); opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translate3d(29px, -50%, 0); opacity: 0; }
}

/* Grid of 4 ecosystem cards */
.ecosystem-section .eco-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 48px;
}
.ecosystem-section .eco-card {
  position: relative;
  text-decoration: none;
  border-radius: 22px;
  padding: 26px 22px 24px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.09);
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.25, 0.1, 0.25, 1),
              box-shadow 0.45s ease,
              border-color 0.45s ease;
}
.ecosystem-section .eco-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--eco-accent), transparent 55%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.ecosystem-section .eco-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 22px 50px rgba(0,0,0,0.28);
  border-color: rgba(255,255,255,0.18);
}
.ecosystem-section .eco-card:hover::before { opacity: 1; }
.ecosystem-section .eco-card[data-accent="blue"] { --eco-accent: #38bdf8; }
.ecosystem-section .eco-card[data-accent="purple"] { --eco-accent: #a78bfa; }
.ecosystem-section .eco-card[data-accent="green"] { --eco-accent: #34d399; }
.ecosystem-section .eco-card[data-accent="orange"] { --eco-accent: #f97316; }

.ecosystem-section .eco-card .glow-bg {
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at 50% 50%, var(--eco-accent), transparent 65%);
  opacity: 0.08;
  filter: blur(24px);
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.ecosystem-section .eco-card:hover .glow-bg { opacity: 0.18; }

.ecosystem-section .eco-card .icon-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.45s ease, background 0.45s ease;
}
.ecosystem-section .eco-card:hover .icon-wrap {
  transform: scale(1.08) rotate(-3deg);
  background: rgba(255,255,255,0.1);
}
.ecosystem-section .eco-card .icon-wrap svg {
  width: 30px;
  height: 30px;
  color: var(--eco-accent);
}
.ecosystem-section .eco-card .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eco-accent);
  margin-bottom: 6px;
}
.ecosystem-section .eco-card h3 {
  font-size: 18.5px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.25;
}
.ecosystem-section .eco-card p {
  font-size: 13.5px;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0 0 16px;
}
.ecosystem-section .eco-card .card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 0.35s ease;
}
.ecosystem-section .eco-card:hover .card-cta {
  background: var(--eco-accent);
  border-color: var(--eco-accent);
  color: #0b1021;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.ecosystem-section .eco-card .card-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.35s ease;
}
.ecosystem-section .eco-card:hover .card-cta svg { transform: translateX(3px); }

/* Bottom stats strip */
.ecosystem-section .eco-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-bottom: 38px;
}
.ecosystem-section .eco-stat {
  text-align: center;
  padding: 16px 24px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  min-width: 140px;
}
.ecosystem-section .eco-stat .number {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  display: block;
  line-height: 1;
}
.ecosystem-section .eco-stat .number .suffix {
  font-size: 18px;
  color: #94a3b8;
}
.ecosystem-section .eco-stat .label {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 6px;
}

/* Main CTA */
.ecosystem-section .eco-main-cta {
  text-align: center;
}
.ecosystem-section .eco-main-cta a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #0b1021;
  background: linear-gradient(90deg, #38bdf8, #a78bfa);
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(56,189,248,0.25);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.ecosystem-section .eco-main-cta a:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 42px rgba(56,189,248,0.35);
}

/* Mobile */
@media (max-width: 1024px) {
  .ecosystem-section .eco-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ecosystem-section { padding: 72px 0 80px; }
  .ecosystem-section .eco-grid { grid-template-columns: 1fr; gap: 18px; }
  .ecosystem-section .eco-pipeline { gap: 8px; }
  .ecosystem-section .eco-pipeline-node { font-size: 12px; padding: 8px 14px; }
  .ecosystem-section .eco-pipeline-arrow { width: 22px; }
}

/* Light theme adjustments */
html[data-theme="light"] .ecosystem-section {
  background:
    radial-gradient(ellipse at 20% 10%, rgba(102,126,234,0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 90%, rgba(118,75,162,0.08) 0%, transparent 45%),
    linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
}
html[data-theme="light"] .ecosystem-section::before {
  background-image:
    linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
}
html[data-theme="light"] .ecosystem-section .eco-header h2 { color: #0f172a; }
html[data-theme="light"] .ecosystem-section .eco-header p { color: #475569; }
html[data-theme="light"] .ecosystem-section .eco-card {
  background: rgba(255,255,255,0.65);
  border-color: rgba(15,23,42,0.08);
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
}
html[data-theme="light"] .ecosystem-section .eco-card:hover {
  box-shadow: 0 20px 46px rgba(0,0,0,0.12);
  border-color: rgba(15,23,42,0.14);
}
html[data-theme="light"] .ecosystem-section .eco-card h3 { color: #0f172a; }
html[data-theme="light"] .ecosystem-section .eco-card p { color: #475569; }
html[data-theme="light"] .ecosystem-section .eco-card .card-cta {
  background: rgba(15,23,42,0.05);
  border-color: rgba(15,23,42,0.1);
  color: #0f172a;
}
html[data-theme="light"] .ecosystem-section .eco-pipeline-node {
  background: rgba(255,255,255,0.7);
  border-color: rgba(15,23,42,0.08);
  color: #334155;
}
html[data-theme="light"] .ecosystem-section .eco-stat {
  background: rgba(255,255,255,0.6);
  border-color: rgba(15,23,42,0.08);
}
html[data-theme="light"] .ecosystem-section .eco-stat .number { color: #0f172a; }
html[data-theme="light"] .ecosystem-section .eco-pipeline-arrow svg { stroke: #64748b; }
html[data-theme="light"] .ecosystem-section .eco-pipeline-arrow .arrow-orb { background: #64748b; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ecosystem-section .eco-pipeline-arrow .arrow-orb,
  .ecosystem-section .eco-pipeline-node .dot {
    animation: none !important;
  }
}
