/**
 * Evolabs — Connected Ecosystem Diagram
 * Hub-and-spoke interactive diagram (official partner/product logos).
 * No unverified deployment/availability metrics.
 */

.evo-eco {
  --eco-ink: #0f172a;
  --eco-muted: #64748b;
  --eco-line: #94a3b8;
  --eco-platform: #0ea5e9;
  --eco-technology: #06b6d4;
  --eco-erp: #64748b;
  --eco-erp-soft: #38bdf8;
  --eco-hardware: #22c55e;
  --eco-workforce: #9333ea;
  --eco-stage-w: 1180;
  --eco-stage-h: 680;
}

.evo-eco-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px 40px;
  margin-bottom: 28px;
}

.evo-eco-intro {
  flex: 1 1 420px;
  max-width: 560px;
}

.evo-eco-intro h2 {
  margin: 0;
  max-width: 18ch;
  color: var(--eco-ink);
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(24px, 2.2vw, 28px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
}

.evo-eco-intro p {
  margin: 14px 0 0;
  max-width: 52ch;
  color: var(--eco-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.evo-eco-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  max-width: 100%;
  padding: 5px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: #fff;
}

.evo-eco-filters button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.evo-eco-filters button:hover,
.evo-eco-filters button:focus-visible {
  color: var(--eco-ink);
  background: rgba(14, 165, 233, 0.06);
  outline: none;
}

.evo-eco-filters button.is-active {
  color: #0369a1;
  background: #f8fafc;
  border-color: rgba(14, 165, 233, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.evo-eco-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.evo-eco-dot--platform { background: var(--eco-platform); }
.evo-eco-dot--technology { background: var(--eco-technology); }
.evo-eco-dot--erp { background: var(--eco-erp); }
.evo-eco-dot--hardware { background: var(--eco-hardware); }
.evo-eco-dot--workforce { background: var(--eco-workforce); }

.evo-eco-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.evo-eco-card {
  min-width: min(1180px, 100%);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 20px;
  background: #fff;
  box-shadow: none;
}

.evo-eco-stage {
  position: relative;
  width: 100%;
  min-width: 980px;
  aspect-ratio: 1180 / 680;
  overflow: hidden;
}

.evo-eco-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.evo-eco-path {
  fill: none;
  stroke: #cbd5e1;
  stroke-width: 1.6;
  stroke-linecap: butt;
  stroke-linejoin: miter;
  opacity: 0.85;
  transition: opacity 200ms ease, stroke 200ms ease, stroke-width 200ms ease;
}

.evo-eco-path--platform { stroke: #7dd3fc; stroke-width: 1.85; }
.evo-eco-path--technology { stroke: #67e8f9; }
.evo-eco-path--erp-soft { stroke: #93c5fd; }
.evo-eco-path--workforce { stroke: #c4b5fd; }
.evo-eco-path--hardware { stroke: #86efac; }
.evo-eco-path--neutral { stroke: #cbd5e1; }
.evo-eco-path--bus { stroke: #cbd5e1; stroke-width: 1.5; }

.evo-eco-origin {
  fill: #64748b;
  stroke: #fff;
  stroke-width: 1.25;
  transition: opacity 200ms ease, fill 200ms ease;
}

.evo-eco-origin--platform { fill: #38bdf8; }
.evo-eco-origin--technology { fill: #22d3ee; }
.evo-eco-origin--erp-soft { fill: #60a5fa; }
.evo-eco-origin--workforce { fill: #a78bfa; }
.evo-eco-origin--hardware { fill: #4ade80; }
.evo-eco-origin--neutral,
.evo-eco-origin--bus { fill: #94a3b8; }

.evo-eco-path.is-highlighted {
  opacity: 1;
  stroke-width: 2.15;
}

.evo-eco-path.is-dim,
.evo-eco-origin.is-dim {
  opacity: 0.14;
}

.evo-eco-origin.is-highlighted {
  opacity: 1;
}

.evo-eco-hub-ring {
  position: absolute;
  left: calc(590 / 1180 * 100%);
  top: calc(300 / 680 * 100%);
  z-index: 2;
  width: calc(188 / 1180 * 100%);
  aspect-ratio: 1;
  border: 1.5px dashed rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(186, 230, 253, 0.35);
}

.evo-eco-node {
  position: absolute;
  left: calc(var(--x) / 1180 * 100%);
  top: calc(var(--y) / 680 * 100%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background: #fff;
  color: var(--eco-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition:
    opacity 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    transform 200ms ease,
    background 200ms ease;
}

.evo-eco-node:focus-visible {
  outline: 2px solid rgba(14, 165, 233, 0.45);
  outline-offset: 3px;
}

.evo-eco-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
}

.evo-eco-icon svg {
  width: 15px;
  height: 15px;
}

.evo-eco-node--platform .evo-eco-icon--logo {
  padding: 4px;
  border: 0;
  box-shadow: none;
}

.evo-eco-icon--logo {
  background: #fff;
  padding: 3px;
  overflow: hidden;
  border: 0;
}

.evo-eco-icon--logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center 54%;
  transform: scale(1.15);
  transform-origin: center center;
}

.evo-eco-icon--zebra,
.evo-eco-icon--honeywell {
  background: #fff;
  padding: 3px;
}

.evo-eco-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.evo-eco-copy strong,
.evo-eco-node > strong {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.evo-eco-copy small {
  color: var(--eco-muted);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.3;
}

/* Hub — white glass so Evolabs wordmark stays prominent */
.evo-eco-node--hub {
  z-index: 4;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: calc(156 / 1180 * 100%);
  aspect-ratio: 1;
  padding: 18px 14px;
  border: 1.5px solid rgba(148, 163, 184, 0.42);
  border-radius: 999px;
  background:
    radial-gradient(circle at 42% 34%, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
  color: var(--eco-ink);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 0 0 4px rgba(226, 232, 240, 0.7),
    0 0 0 7px rgba(186, 230, 253, 0.22);
}

.evo-eco-hub-logo {
  display: block;
  width: min(78%, 96px);
  height: auto;
  max-height: 30px;
  object-fit: contain;
  margin: 0 auto 2px;
}

.evo-eco-node--hub strong {
  color: var(--eco-ink);
  font-size: clamp(12px, 1.15vw, 15px);
  font-weight: 750;
}

.evo-eco-node--hub small {
  display: block;
  max-width: 14ch;
  color: var(--eco-muted);
  font-size: clamp(7.5px, 0.7vw, 9px);
  font-weight: 550;
  line-height: 1.35;
  text-align: center;
}

.evo-eco-node--platform .evo-eco-icon.evo-eco-icon--logo {
  width: 30px;
  height: 30px;
  padding: 3px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.evo-eco-node--platform .evo-eco-icon--logo {
  border-radius: 8px;
  background: #fff;
}

/* Core platforms — identical tier (~30% smaller than 236×74) */
.evo-eco-node--platform {
  gap: 7px;
  width: 165px;
  height: 52px;
  padding: 8px 11px 8px 8px;
  border-color: rgba(56, 189, 248, 0.55);
  border-radius: 11px;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.08);
}

.evo-eco-node--platform .evo-eco-icon {
  width: 28px;
  height: 28px;
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
}

.evo-eco-node--platform .evo-eco-icon svg {
  width: 14px;
  height: 14px;
}

.evo-eco-node--platform .evo-eco-copy {
  gap: 1px;
}

.evo-eco-node--platform .evo-eco-copy strong {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.evo-eco-node--platform .evo-eco-copy small {
  font-size: 9px;
  line-height: 1.25;
}

/* Partner / satellite pills — identical tier */
.evo-eco-node--pill {
  height: 44px;
  min-width: 128px;
  padding: 6px 14px 6px 7px;
  border-radius: 999px;
  background: #fff;
}

.evo-eco-node--pill .evo-eco-icon {
  width: 28px;
  height: 28px;
}

.evo-eco-node--pill > strong {
  font-size: 13px;
  font-weight: 650;
}

.evo-eco-node--pill-sm {
  height: 38px;
  min-width: 104px;
  padding: 5px 12px 5px 6px;
}

.evo-eco-node--pill-sm .evo-eco-icon {
  width: 24px;
  height: 24px;
}

.evo-eco-node--pill-sm > strong {
  font-size: 12px;
}

.evo-eco-node--technology {
  border-color: rgba(6, 182, 212, 0.4);
}
.evo-eco-node--technology .evo-eco-icon {
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
}

.evo-eco-node--erp-soft {
  border-color: rgba(56, 189, 248, 0.4);
}
.evo-eco-node--erp-soft .evo-eco-icon {
  background: rgba(56, 189, 248, 0.14);
}

.evo-eco-node--workforce {
  border-color: rgba(147, 51, 234, 0.35);
}
.evo-eco-node--workforce .evo-eco-icon {
  background: rgba(147, 51, 234, 0.1);
  color: #7c3aed;
}

.evo-eco-node--hardware {
  border-color: rgba(34, 197, 94, 0.4);
}
.evo-eco-node--hardware .evo-eco-icon {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.evo-eco-node--neutral {
  border-color: rgba(148, 163, 184, 0.4);
  background: #f8fafc;
}

.evo-eco-node--bus {
  height: 40px;
  min-width: 112px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  border-color: rgba(148, 163, 184, 0.32);
  background: #fff;
}

.evo-eco-node--bus .evo-eco-icon {
  width: 26px;
  height: 26px;
  background: rgba(148, 163, 184, 0.12);
  color: #475569;
}

.evo-eco-node--bus > strong {
  font-size: 12.5px;
  font-weight: 650;
  color: #334155;
}

/* Interaction states */
.evo-eco-node.is-active:not(.evo-eco-node--hub),
.evo-eco-node.is-related {
  border-color: rgba(14, 165, 233, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.evo-eco-node--platform.is-active,
.evo-eco-node--platform.is-related {
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}

.evo-eco-node.is-dim {
  opacity: 0.28;
}

.evo-eco-node.is-filtered-out {
  opacity: 0.12;
  pointer-events: none;
}

.evo-eco-node--hub.is-hub-lit {
  border-color: rgba(125, 211, 252, 0.65);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 0 0 4px rgba(224, 242, 254, 0.85),
    0 0 0 8px rgba(186, 230, 253, 0.35);
}

/* Description card */
.evo-eco-note {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 5;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: min(220px, calc(100% - 28px));
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: #fff;
}

.evo-eco-note-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
}

.evo-eco-note-icon svg {
  width: 12px;
  height: 12px;
}

.evo-eco-note h3 {
  margin: 0;
  color: var(--eco-ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.evo-eco-note p {
  margin: 4px 0 0;
  color: var(--eco-muted);
  font-size: 11px;
  line-height: 1.4;
}

.evo-eco-note a {
  display: inline-block;
  margin-top: 6px;
  color: #0284c7;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}

.evo-eco-note a:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .evo-eco-header {
    flex-direction: column;
    gap: 18px;
  }

  .evo-eco-filters {
    justify-content: flex-start;
    max-width: 100%;
  }

  .evo-eco-intro h2 {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .evo-eco-intro h2 {
    font-size: 22px;
  }

  .evo-eco-intro p {
    font-size: 13.5px;
  }

  .evo-eco-filters {
    border-radius: 16px;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .evo-eco-note {
    left: 8px;
    bottom: 7px;
    width: min(180px, calc(100% - 16px));
    padding: 8px 10px;
    gap: 6px;
  }

  .evo-eco-note-icon {
    width: 18px;
    height: 18px;
  }

  .evo-eco-note h3 {
    font-size: 11px;
  }

  .evo-eco-note p,
  .evo-eco-note a {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .evo-eco-node,
  .evo-eco-path,
  .evo-eco-origin,
  .evo-eco-filters button {
    transition: none;
  }
}
