/* Kimgraf — prova 2. Built on the current site (css/kimgraf.css): only the ecosystem explorer is new. */

/* ---------- ecosystem explorer ---------- */
.eco-explorer {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: var(--spacing-60);
  align-items: start;
  margin-top: var(--spacing-60);
}

.eco-stage {
  position: sticky;
  top: 112px;
  aspect-ratio: 4 / 5;
  max-height: calc(100vh - 150px);
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #050807;
  isolation: isolate;
}

.eco-stage__pic {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 1200ms cubic-bezier(0.22, 1, 0.36, 1);
}
.eco-stage__pic.is-on { opacity: 1; transform: none; z-index: 1; }
.eco-stage__pic img { width: 100%; height: 100%; object-fit: cover; }
.eco-stage__pic[data-node="plugin"] img,
.eco-stage__pic[data-node="gaming"] img { object-fit: contain; padding: 28px; }

@media (prefers-reduced-motion: no-preference) {
  .eco-stage__pic.is-on img { animation: eco-drift 9s ease-out both; }
}
@keyframes eco-drift { from { transform: scale(1.08); } to { transform: scale(1); } }

/* panels drawn from real content (Media Cleaner's first screen, llms.txt) */
.eco-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 40px;
  background: #0b100d;
  color: #d9e6df;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
.eco-panel__app { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; color: #00F59B; }
.eco-panel__big { font-family: var(--font-display); font-size: clamp(26px, 2.6vw, 38px); line-height: 1.1; color: #ffffff; font-weight: var(--weight-display-bold); }
.eco-panel__note { font-size: 13px; color: #8fa39a; }
.eco-panel--code { justify-content: flex-start; }
.eco-panel--code pre { margin: 0; white-space: pre-wrap; font-family: var(--font-mono); font-size: 13px; line-height: 1.65; color: #cfe3d8; overflow: hidden; }

/* the list */
.eco-nodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.eco-node {
  border-radius: 20px;
  padding: 6px 22px;
  background: radial-gradient(ellipse 95% 90% at 50% 50%, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.6) 60%, rgba(255, 255, 255, 0.12) 100%);
  transition: background-color 400ms ease, transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}
.eco-node.is-on { background: rgba(255, 255, 255, 0.96); transform: translateX(-6px); }
.eco-node__h { margin: 0; }
.eco-node__head {
  display: block;
  width: 100%;
  padding: 16px 0 14px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.eco-node__head .pillar-tag { margin-bottom: 6px; }
.eco-node__head .pillar-title {
  display: block;
  color: var(--color-ink-muted);
  transition: color 300ms ease;
}
.eco-node.is-on .eco-node__head .pillar-title,
.eco-node__head:hover .pillar-title { color: var(--color-ink-monolith); }
.eco-node__head:focus-visible { outline: 2px solid var(--color-kimgraf-emerald); outline-offset: 4px; border-radius: 8px; }

.eco-node__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 500ms cubic-bezier(0.22, 1, 0.36, 1); }
.eco-node__body > div { overflow: hidden; }
.eco-node.is-on .eco-node__body { grid-template-rows: 1fr; }
.eco-node__body .pillar-desc { margin-bottom: 14px; }
.eco-node__body .pillar-meta { margin-bottom: 18px; }
.eco-node__link { display: inline-block; margin-bottom: 18px; }
.eco-node__mpic { display: none; }

[data-theme="dark"] .eco-node {
  background: radial-gradient(ellipse 95% 90% at 50% 50%, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.15) 100%);
}
[data-theme="dark"] .eco-node.is-on { background: rgba(6, 12, 9, 0.94); }
[data-theme="dark"] .eco-stage { box-shadow: 0 0 0 1px rgba(0, 255, 135, 0.18); }

/* tablet and phone: the picture opens inside its own node */
@media (max-width: 900px) {
  .eco-explorer { grid-template-columns: 1fr; gap: 0; }
  .eco-stage { display: none; }
  .eco-node.is-on { transform: none; }
  .eco-node__head .pillar-title { font-size: 24px; line-height: 1.2; }
  .eco-node.is-on .eco-node__head .pillar-title { font-size: 28px; }
  .eco-node__mpic { display: block; position: relative; margin: 4px 0 18px; border-radius: 16px; overflow: hidden; background: #050807; aspect-ratio: 4 / 3; }
  .eco-node__mpic img { width: 100%; height: 100%; object-fit: cover; }
  .eco-node[data-node="plugin"] .eco-node__mpic img,
  .eco-node[data-node="gaming"] .eco-node__mpic img { object-fit: contain; padding: 14px; }
  .eco-node__mpic .eco-panel { padding: 22px; gap: 10px; }
  .eco-node__mpic .eco-panel__big { font-size: 24px; }
}

/* shot mode: a clean still of the particle Möbius */
.shot-mode body > *:not(#torus-canvas):not(.shot-still) { display: none !important; }
.shot-mode, .shot-mode body { background: #ffffff !important; }
