/* ============================================
   Ecosystem Page — light / 1px visual language
   ============================================ */

/* Hero */

.ecosystem-hero {
  --ecosystem-section-padding: 88px;
  padding: var(--ecosystem-section-padding) 0 0;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.ecosystem-hero > .container {
  position: relative;
}

.ecosystem-hero > .container::before {
  left: 32px;
}

.ecosystem-hero > .container::after {
  right: 32px;
}

.ecosystem-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: center;
  padding-bottom: 88px;
}

.ecosystem-hero-copy {
  position: relative;
  max-width: 760px;
}

.ecosystem-eyebrow {
  margin: 0 0 16px;
  color: var(--label-ink);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ecosystem-hero h1 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-family-editorial);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.ecosystem-lead {
  margin: 24px 0 0;
  max-width: 720px;
  color: var(--muted-ink);
  font-size: 1.04rem;
  line-height: 1.85;
}

.ecosystem-hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* Hero panel */

.ecosystem-hero-panel {
  min-width: 0;
}

.ecosystem-hero-surface {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-panel-kicker {
  margin: 0 0 18px;
  color: var(--label-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-panel-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-flow-card {
  flex: 1;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-flow-card.accent {
  background: var(--ink);
  border-color: var(--ink);
}

.hero-flow-card.accent small,
.hero-flow-card.accent strong {
  color: #fff;
}

.hero-flow-card small,
.hero-panel-grid small {
  display: block;
  margin-bottom: 6px;
  color: var(--label-ink);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-flow-card strong,
.hero-panel-grid strong {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.3;
}

.hero-flow-arrow {
  color: var(--muted-ink);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hero-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.hero-panel-grid div {
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0;
}

/* Overview section */

.ecosystem-overview {
  --ecosystem-overview-padding: 88px;
  padding: var(--ecosystem-overview-padding) 0;
  background: rgba(248, 250, 252, 0.94);
  border-bottom: 1px solid var(--line);
}

.ecosystem-overview > .container {
  position: relative;
}

.ecosystem-overview > .container::before {
  left: 32px;
}

.ecosystem-overview > .container::after {
  right: 32px;
}

.overview-header {
  max-width: 760px;
  margin-bottom: 40px;
}

.overview-eyebrow {
  margin: 0 0 14px;
  color: var(--label-ink);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.overview-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.overview-lead {
  margin-top: 18px;
  color: var(--muted-ink);
  font-size: 1rem;
  line-height: 1.85;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding-left: max(32px, calc((100vw - 1400px) / 2 + 32px));
  padding-right: max(32px, calc((100vw - 1400px) / 2 + 32px));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.overview-card {
  padding: 28px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.overview-card h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.2rem;
}

.overview-card p {
  margin: 0;
  color: var(--muted-ink);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* Map / nav grid section */

.ecosystem-map {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}

.map-header {
  max-width: 760px;
  margin-bottom: 40px;
}

.map-eyebrow {
  margin: 0 0 14px;
  color: var(--label-ink);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.map-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.map-lead {
  margin-top: 18px;
  color: var(--muted-ink);
  font-size: 1rem;
  line-height: 1.85;
}

.ecosystem-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.ecosystem-nav-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s ease;
}

.ecosystem-nav-card-core {}

.ecosystem-nav-card:hover {
  border-color: rgba(31, 122, 87, 0.36);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--muted-ink);
  transition: color 0.2s ease;
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

.ecosystem-nav-card:hover .card-icon {
  color: var(--accent-green);
}

.nav-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.3;
  font-family: var(--font-family-title);
}

.nav-card-description {
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--muted-ink);
  flex-grow: 1;
}

.nav-card-cta {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease, color 0.2s ease;
}

.ecosystem-nav-card:hover .nav-card-cta {
  gap: 10px;
  color: var(--accent-green);
}

/* Module sections */

.ecosystem-section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}

.ecosystem-section + .ecosystem-section {
  scroll-margin-top: 120px;
}

.ecosystem-section h2 {
  margin: 0;
  font-size: clamp(2rem, 2.6vw, 2.6rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.ecosystem-section .section-eyebrow {
  margin: 0 0 14px;
  color: var(--label-ink);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.ecosystem-section .section-lead {
  margin-top: 16px;
  max-width: 760px;
  color: var(--muted-ink);
  font-size: 1rem;
  line-height: 1.85;
}

.module-top {
  display: flex;
  gap: 56px;
  margin: 48px 0 0;
  align-items: stretch;
}

.module-copy {
  flex: 1 1 50%;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.module-highlight {
  padding: 24px 28px;
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.94);
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--muted-ink);
}

.module-metrics {
  list-style: none;
  margin: 30px 0 0;
  padding: 12px 0 12px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.module-metrics::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 6px;
  width: 1px;
  background: var(--line);
}

.module-metrics li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.module-metrics li::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 4px;
  width: 10px;
  height: 10px;
  background: var(--ink);
}

.metric-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.metric-detail {
  color: var(--muted-ink);
  font-size: 0.95rem;
  line-height: 1.5;
}

.module-visual {
  flex: 1 1 50%;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.module-visual-img {
  width: 100%;
  height: auto;
  max-width: 480px;
}

/* Section utility patterns */

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.section-grid .info-card {
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--ink);
}

.info-card p {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted-ink);
}

.info-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-card li {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--muted-ink);
  display: flex;
  gap: 12px;
}

.info-card li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 6px;
  flex-shrink: 0;
  background: var(--line);
}

.feature-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  margin: 32px 0 36px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.feature-card {
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease;
}

.feature-card:hover {
  border-color: rgba(31, 122, 87, 0.36);
}

.feature-card h3,
.feature-card h4 {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0;
}

.feature-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-card li {
  font-size: 0.96rem;
  line-height: 1.5;
  color: var(--muted-ink);
}

.cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.94);
}

.cta-panel p {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
}

.cta-panel .cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.module-related {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.94);
  margin-bottom: 32px;
}

.module-related p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

.module-related .cta-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.section-highlight {
  border-left: 1px solid var(--accent-green);
  padding: 16px 24px;
  background: rgba(248, 250, 252, 0.94);
  margin-bottom: 32px;
  color: var(--muted-ink);
  font-size: 1rem;
  line-height: 1.6;
}

.kpi-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.kpi-table thead th {
  text-align: left;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--label-ink);
  padding-bottom: 12px;
  font-weight: 800;
}

.kpi-table tbody td {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
  color: var(--muted-ink);
}

.kpi-table tbody td:first-child {
  font-weight: 600;
  color: var(--ink);
  width: 32%;
}

/* Closing section */

.ecosystem-closing {
  padding: 88px 0;
  background: rgba(248, 250, 252, 0.94);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.closing-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.closing-eyebrow {
  display: inline-block;
  margin: 0 0 20px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  color: var(--label-ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--surface);
}

.ecosystem-closing h2 {
  margin: 0 0 24px;
  font-family: var(--font-family-editorial);
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.ecosystem-closing > .container > .closing-content > p {
  margin: 0 0 56px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted-ink);
  font-size: 1.08rem;
  line-height: 1.8;
}

.closing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  margin-bottom: 56px;
  text-align: left;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.closing-feature {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.2s ease;
}

.closing-feature:hover {
  border-color: rgba(31, 122, 87, 0.36);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  color: var(--muted-ink);
}

.closing-feature h3 {
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--ink);
  margin-bottom: 10px;
}

.closing-feature p {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted-ink);
  margin: 0;
}

.closing-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */

@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ecosystem-hero-grid {
    grid-template-columns: 1fr;
    padding-bottom: 64px;
  }

  .ecosystem-hero,
  .ecosystem-overview,
  .ecosystem-map,
  .ecosystem-section,
  .ecosystem-closing {
    padding: 64px 0;
  }

  .ecosystem-hero > .container::before,
  .ecosystem-hero > .container::after {
    display: none;
  }

  .module-top {
    flex-direction: column;
    gap: 36px;
  }

  .module-copy,
  .module-visual {
    max-width: 100%;
    flex: none;
  }

  .hero-panel-flow {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-flow-arrow {
    align-self: center;
    transform: rotate(90deg);
  }

  .ecosystem-hero-cta .button {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel-grid {
    grid-template-columns: 1fr;
  }

  .ecosystem-nav-grid {
    grid-template-columns: 1fr;
  }

  .section-grid,
  .feature-matrix {
    grid-template-columns: 1fr;
  }

  .ecosystem-hero,
  .ecosystem-overview,
  .ecosystem-map,
  .ecosystem-section,
  .ecosystem-closing {
    padding: 48px 0;
  }
}

@media (max-width: 576px) {
  .ecosystem-hero h1 {
    font-size: clamp(2.4rem, 12vw, 3.6rem);
    max-width: 12ch;
  }

  .ecosystem-hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .ecosystem-hero-cta .button {
    width: 100%;
  }

  .closing-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
