/* =========================================================
   CompañIA · diagramas simples (una forma distinta por idea)
   radial (agente) · capas (sistema operativo) · hub (entorno
   de trabajo) · carriles (tu producto) · convergencia (contexto)
   · línea de tiempo (compra) · cifras (capacidades)
   ========================================================= */

.dg { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--font); }
.dg text { fill: var(--ink); }
.dg .t { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.dg .s { font-size: 13.5px; fill: var(--muted); }
.dg .lbl { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--faint); }
.dg .box { fill: var(--card); stroke: rgba(13, 13, 13, 0.14); stroke-width: 1; }
.dg .box.hot { fill: rgba(255, 79, 0, 0.06); stroke: rgba(255, 79, 0, 0.6); }
.dg .ln { fill: none; stroke: rgba(13, 13, 13, 0.22); stroke-width: 1.2; }
.dg .ln.hot { stroke: var(--accent); stroke-width: 1.5; }
.dg .ln.dash { stroke-dasharray: 4 5; }
.dg .core { fill: var(--ink); }
.dg .core-t { fill: #fff; font-size: 24px; font-weight: 600; }
.dg .core-s { fill: rgba(255, 255, 255, 0.72); font-size: 12.5px; }
.dg .chip { fill: var(--bg); stroke: var(--accent); stroke-width: 1; }
.dg .chip-t { fill: var(--accent-ink); font-size: 13.5px; font-weight: 600; }
.dg .ac { fill: var(--accent); }
.dg .ac-t { fill: var(--accent-ink); }

.dg-caption { font-size: clamp(16px, 1.25vw, 19px); color: var(--muted); text-align: center; text-wrap: balance; }
.dg-caption strong { color: var(--ink); font-weight: 600; }

/* ---------- 1 · Del chat al agente (radial) ---------- */
.agent-vs { display: grid; grid-template-columns: 0.72fr 1.28fr; gap: 56px; align-items: center; width: 100%; }
.chat-mini { border-right: 1px solid var(--hair); padding-right: 44px; display: flex; flex-direction: column; gap: 14px; }
.chat-mini .k, .agent-side .k { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.agent-side .k { color: var(--accent-ink); text-align: center; }
.bubble { max-width: 92%; padding: 13px 18px; border-radius: 18px; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.3; }
.bubble.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.bubble.ai { align-self: flex-start; background: var(--card); border: 1px solid var(--hair); border-bottom-left-radius: 6px; }
.chat-mini .end { font-size: 15px; color: var(--faint); margin-top: 6px; }
.agent-side { display: flex; flex-direction: column; gap: 6px; }
.agent-side .dg { max-width: 600px; margin: 0 auto; }

/* ---------- 2 · Sistema operativo (capas) ---------- */
.os2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; width: 100%; }
.layers { display: flex; flex-direction: column; gap: 10px; }
.layer { border-radius: 16px; padding: 18px 22px; display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 18px; border: 1px solid var(--hair); background: var(--card); }
.layer .lk { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.layer .lv { font-size: clamp(18px, 1.5vw, 22px); font-weight: 500; letter-spacing: -0.01em; }
.layer.apps .lv { display: flex; gap: 8px; flex-wrap: wrap; }
.layer.apps .lv span { border: 1px solid var(--hair); border-radius: 10px; padding: 7px 12px; font-size: 16px; background: var(--bg); }
.layer.os { border-color: rgba(255, 79, 0, 0.6); background: rgba(255, 79, 0, 0.06); }
.layer.os .lk { color: var(--accent-ink); }
.layer.hw { background: transparent; }
.layer.hw .lv { color: var(--muted); font-weight: 400; }
.mac-story .k { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; margin-bottom: 18px; display: block; }
.mac-story ol { list-style: none; display: flex; flex-direction: column; gap: 14px; counter-reset: m; }
.mac-story li { counter-increment: m; font-size: clamp(22px, 2vw, 30px); letter-spacing: -0.02em; line-height: 1.15; display: grid; grid-template-columns: 38px 1fr; }
.mac-story li::before { content: counter(m, decimal-leading-zero); font-size: 14px; color: var(--accent-ink); padding-top: 8px; font-variant-numeric: tabular-nums; }

/* ---------- 3 · Entorno de trabajo (hub) ---------- */
.hub-wrap { width: 100%; max-width: 1000px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ask { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.ask .k { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.ask .bubble.me { align-self: center; font-size: clamp(17px, 1.4vw, 21px); }
.analogy { display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: center; width: 100%; max-width: 860px; padding-top: 18px; border-top: 1px solid var(--hair); }
.analogy div { font-size: clamp(16px, 1.25vw, 19px); color: var(--muted); }
.analogy div:first-child { text-align: right; }
.analogy b { color: var(--ink); font-weight: 600; }
.analogy .vs { color: var(--accent-ink); font-size: 20px; }

/* ---------- 6 · Capacidades (cifras) ---------- */
.proof2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0; width: 100%; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.proof2 article { padding: 30px 36px 28px 0; display: flex; flex-direction: column; gap: 10px; }
.proof2 article + article { padding: 30px 0 28px 36px; border-left: 1px solid var(--hair); }
.proof2 .big { font-size: clamp(52px, 5.6vw, 84px); font-weight: 500; letter-spacing: -0.05em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.proof2 .big small { font-size: 0.38em; letter-spacing: -0.01em; color: var(--accent-ink); font-weight: 400; margin-left: 6px; }
.proof2 h3 { font-size: clamp(20px, 1.7vw, 25px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; }
.proof2 .who { font-size: 14px; color: var(--faint); }

@media (max-width: 900px) {
  .agent-vs, .os2, .proof2 { grid-template-columns: 1fr; gap: 28px; }
  .chat-mini { border-right: 0; padding-right: 0; border-bottom: 1px solid var(--hair); padding-bottom: 24px; }
  .proof2 article + article { border-left: 0; border-top: 1px solid var(--hair); padding-left: 0; }
  .layer { grid-template-columns: 1fr; gap: 8px; }
  .analogy { grid-template-columns: 1fr; text-align: center; }
  .analogy div:first-child { text-align: center; }
}
@media (max-height: 800px) and (min-width: 901px) {
  .agent-side .dg { max-width: 520px; }
  .mac-story li { font-size: 24px; }
  .layer { padding: 14px 20px; }
  .proof2 article, .proof2 article + article { padding-top: 22px; padding-bottom: 20px; }
}

/* ajustes tras revisión */
.proof2 .big small { margin-left: 0; }
.agent-vs { grid-template-columns: 0.58fr 1.42fr; gap: 44px; }
.agent-side .dg { max-width: 680px; }
.agent-side .dg .t { font-size: 19px; }
.agent-side .dg .s { font-size: 14.5px; }
.ask .bubble.me { white-space: nowrap; max-width: none; }
.hub-wrap { gap: 14px; }
@media (max-height: 800px) and (min-width: 901px) { .agent-side .dg { max-width: 600px; } }
@media (max-height: 800px) and (min-width: 901px) { .agent-side .dg { max-width: 540px; } }

/* =========================================================
   Animaciones explicativas (arrancan al entrar a la slide)
   Si .is-active no llega, todo queda visible y estático.
   ========================================================= */
.dg .pk { fill: var(--accent); filter: drop-shadow(0 0 5px rgba(255, 79, 0, 0.55)); }
.dg .pk.slow { fill: rgba(13, 13, 13, 0.45); filter: none; }
.dg .ring { fill: none; stroke: var(--accent); stroke-width: 1.2; }

/* revelado en secuencia */
.is-active .rv { animation: dg-rise .8s cubic-bezier(.16, 1, .3, 1) both; animation-delay: var(--d, 0s); }
@keyframes dg-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* capas del sistema operativo: se apilan desde abajo */
.is-active .layers .rv { animation-name: dg-stack; }
@keyframes dg-stack { from { opacity: 0; transform: translateY(26px) scale(.98); } to { opacity: 1; transform: none; } }

/* reporte que "llega": pulso suave sincronizado con el paquete (4 s) */
.dg .out-pulse { transform-box: fill-box; transform-origin: center; animation: dg-out 4s ease-in-out infinite; }
@keyframes dg-out { 0%, 74% { transform: scale(1); } 82% { transform: scale(1.035); } 92%, 100% { transform: scale(1); } }

/* línea de tiempo de la compra: el progreso se llena 01 → 04 */
.dg .prog { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 760; stroke-dashoffset: 0; }
.dg .step { fill: var(--card); stroke: var(--accent); stroke-width: 1.4; }
.is-active .dg .prog { animation: dg-prog 2.2s cubic-bezier(.45, 0, .2, 1) .15s both; }
@keyframes dg-prog { from { stroke-dashoffset: 760; } to { stroke-dashoffset: 0; } }
.is-active .dg .step { animation: dg-step .5s ease both; animation-delay: var(--d, 0s); }
@keyframes dg-step { from { fill: var(--card); } to { fill: var(--accent); } }
.dg .step { fill: var(--accent); }
.dg .step-n { fill: #fff; }
.is-active .dg .step-n { animation: dg-stepn .5s ease both; animation-delay: var(--d, 0s); }
@keyframes dg-stepn { from { fill: var(--accent-ink); } to { fill: #fff; } }

@media (prefers-reduced-motion: reduce) {
  .dg .pk, .dg .ring { display: none; }
  .is-active .rv, .is-active .dg .prog, .is-active .dg .step, .is-active .dg .step-n, .dg .out-pulse { animation: none !important; }
}

/* ---------- Ontología (grafo de objetos + acción gobernada) ---------- */
.onto-grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 48px; align-items: center; width: 100%; }
.onto-defs { list-style: none; display: flex; flex-direction: column; gap: 22px; counter-reset: od; }
.onto-defs li { counter-increment: od; display: grid; grid-template-columns: 34px 1fr; row-gap: 4px; }
.onto-defs li::before { content: counter(od, decimal-leading-zero); grid-row: span 2; font-size: 14px; color: var(--accent-ink); padding-top: 6px; font-variant-numeric: tabular-nums; }
.onto-defs b { font-size: clamp(20px, 1.7vw, 25px); font-weight: 500; letter-spacing: -0.015em; }
.onto-defs span { font-size: clamp(15.5px, 1.2vw, 18px); color: var(--muted); line-height: 1.4; }
@media (max-width: 900px) { .onto-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Slides con imagen (como Naval) ---------- */
.media-split { max-width: 1180px; width: 100%; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.media-copy h2 { font-size: clamp(32px, 3.5vw, 50px); font-weight: 400; letter-spacing: -0.034em; line-height: 1.04; margin-bottom: 20px; }
.media-lead { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; color: var(--muted); max-width: 34ch; }
.media-q { font-size: clamp(22px, 2vw, 30px); line-height: 1.2; letter-spacing: -0.02em; margin: 22px 0 26px; max-width: 26ch; }
.media-stat { display: flex; gap: 40px; padding-top: 18px; border-top: 1px solid var(--hair); }
.media-stat b { display: block; font-size: clamp(40px, 4.2vw, 62px); font-weight: 500; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.media-stat span { display: block; font-size: 15px; color: var(--muted); margin-top: 8px; max-width: 18ch; }
.media-note { font-size: 14px; color: var(--faint); margin-top: 18px; }
.media-fig { margin: 0; }
.media-fig img { width: 100%; height: min(56vh, 520px); object-fit: cover; border-radius: 20px; display: block; background: #eee; }
.media-fig figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
.media-fig.is-empty, .bio-img.is-empty { display: none; }

.bio3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; width: 100%; }
.bio3 article { display: flex; flex-direction: column; gap: 10px; }
.bio-img { margin: 0 0 8px; }
.bio-img img { width: 100%; height: min(24vh, 210px); object-fit: cover; border-radius: 16px; display: block; background: #eee; }
.bio-img figcaption { display: none; }
.bio3 h3 { font-size: clamp(21px, 1.8vw, 27px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.bio3 p { font-size: clamp(15.5px, 1.2vw, 18px); line-height: 1.45; color: var(--muted); }
.bio3 p strong { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) { .media-split, .bio3 { grid-template-columns: 1fr; } .media-fig img { height: 40vh; } }
@media (max-height: 800px) and (min-width: 901px) { .bio-img img { height: 150px; } .media-q { margin: 16px 0 18px; } }

/* retrato (Ilya) y comparación personas/agentes */
.ilya-split { grid-template-columns: 1.35fr 0.65fr; }
.ilya-split .ilya-quote { font-size: clamp(26px, 2.6vw, 38px); margin: 22px 0 12px; }
.ilya-split .platform-punch { margin-top: 22px; }
.media-fig.portrait img { height: min(62vh, 560px); }
.sell2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sell2 > div { border: 1px solid var(--hair); border-radius: 16px; padding: 16px 18px; background: var(--card); }
.sell2 > div.hot { border-color: rgba(255, 79, 0, 0.6); background: rgba(255, 79, 0, 0.05); }
.sell2 b { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.sell2 .hot b { color: var(--accent-ink); }
.sell2 span { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.35; }
.bio-num { height: min(24vh, 210px); border-radius: 16px; margin-bottom: 8px; background: rgba(255, 79, 0, 0.06); border: 1px solid rgba(255, 79, 0, 0.35); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 6px; }
.bio-num b { font-size: clamp(64px, 6vw, 96px); font-weight: 500; letter-spacing: -0.05em; line-height: .9; color: var(--accent-ink); }
.bio-num span { font-size: 14.5px; color: var(--muted); line-height: 1.3; }
.bio-img img[src*="proteina"] { object-fit: contain; background: #fff; border: 1px solid var(--hair); }
@media (max-height: 800px) and (min-width: 901px) { .bio-num { height: 150px; } }
@media (max-width: 900px) { .ilya-split, .sell2 { grid-template-columns: 1fr; } }
