/* Presentación de entrega — Sistema RIES
   Paleta tomada de la marca (assets/css/site.css): tinta #282758, azul #2D6FB3,
   celeste #267FB4, lavanda #b6c3f2, fondo #eef0fb. Tipografía: Poppins + Inter.
   CSS plano a propósito: el CDN de Tailwind no procesa @apply en archivos externos. */

:root {
  --tinta: #282758;
  --tinta-900: #1b1a42;
  --azul: #2D6FB3;
  --azul-50: #eef4fb;
  --azul-100: #d8e6f5;
  --celeste: #267FB4;
  --lavanda: #b6c3f2;
  --fondo: #eef0fb;
  --linea: #e3e5f3;
  --verde: #1c7a4a;
  --verde-50: #e9f6ef;
  --ambar: #b5730f;
  --ambar-50: #fbf3e4;
  --rojo: #c0362c;
  --texto: #475569;
  --suave: #64748b;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --sombra: 0 1px 2px rgba(40, 39, 88, .05), 0 10px 30px -12px rgba(40, 39, 88, .18);
  --sombra-alta: 0 2px 6px rgba(40, 39, 88, .06), 0 24px 48px -16px rgba(45, 111, 179, .32);
  --nav-h: 64px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { background: #fff; overflow-x: hidden; }
img { max-width: 100%; }

/* ── Tipografía ─────────────────────────────────────────── */
.font-display, .display-1, .display-2, h3 { font-family: 'Poppins', 'Inter', sans-serif; }
.display-1 { font-size: clamp(2.6rem, 6.4vw, 4.75rem); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; color: var(--tinta); }
.display-2 { font-size: clamp(1.85rem, 3.6vw, 2.85rem); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; color: var(--tinta); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.65; color: var(--texto); }
.lead-sm { margin-top: 1rem; font-size: 1.075rem; line-height: 1.7; color: var(--texto); }
.kicker { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--azul); }
.kicker-light { color: var(--lavanda); }
.text-grad { background: linear-gradient(100deg, var(--tinta) 0%, var(--azul) 55%, var(--celeste) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head { max-width: 46rem; }
.section-head .display-2 { margin-top: .6rem; }

/* ── Estructura de secciones ────────────────────────────── */
.wrap { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 2rem; } }
.slide { position: relative; padding: clamp(4.5rem, 9vw, 7rem) 0; }
.bg-fondo { background: var(--fondo); }

/* ── Barra superior ─────────────────────────────────────── */
#nav { position: fixed; inset: 0 0 auto 0; z-index: 60; transition: background .3s, box-shadow .3s, transform .35s var(--ease); }
.nav-logo { transition: opacity .3s; }
#nav:not(.is-scrolled) .nav-logo { opacity: 0; pointer-events: none; }
#nav.is-scrolled { background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 1px 0 var(--linea); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 76rem; height: var(--nav-h); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .nav-inner { padding: 0 2rem; } }
.nav-links { display: none; gap: .25rem; }
@media (min-width: 900px) { .nav-links { display: flex; } }
.nav-links a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .75rem; border-radius: .6rem; font-size: .875rem; font-weight: 500; color: var(--texto); transition: color .2s, background .2s; }
.nav-links a span { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: .4rem; background: var(--fondo); font-size: .7rem; font-weight: 700; color: var(--tinta); transition: inherit; }
.nav-links a:hover, .nav-links a.is-active { color: var(--tinta); background: var(--azul-50); }
.nav-links a.is-active span { background: var(--azul); color: #fff; }
.nav-progress { height: 2px; }
#scroll-progress { height: 100%; width: 0; background: linear-gradient(90deg, var(--azul), var(--celeste)); }

.pill-btn { display: inline-flex; align-items: center; gap: .45rem; height: 2.35rem; padding: 0 .85rem; border-radius: 999px; border: 1px solid var(--linea); background: #fff; font-size: .85rem; font-weight: 600; color: var(--tinta); transition: all .2s; }
.pill-btn svg { width: 1rem; height: 1rem; }
.pill-btn:hover { border-color: var(--azul-100); color: var(--azul); }
.pill-btn-dark { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.pill-btn-dark:hover { background: var(--azul); border-color: var(--azul); color: #fff; }
#timer-btn.is-running { border-color: var(--azul-100); color: var(--azul); }
#timer-btn.is-running #timer-label::before { content: ""; display: inline-block; width: .45rem; height: .45rem; margin-right: .4rem; border-radius: 999px; background: #22c55e; vertical-align: middle; animation: pulse 1.6s ease-in-out infinite; }
#timer-btn.is-over { border-color: #f3c9c5; color: var(--rojo); }

/* ── Índice lateral ─────────────────────────────────────── */
#rail { position: fixed; right: 1.1rem; top: 50%; z-index: 50; display: none; flex-direction: column; gap: .55rem; transform: translateY(-50%); }
@media (min-width: 1280px) { #rail { display: flex; } }
#rail a { position: relative; display: block; width: .55rem; height: .55rem; border-radius: 999px; background: rgba(40, 39, 88, .18); transition: all .3s var(--ease); }
#rail a.is-divider { width: .55rem; height: .55rem; background: rgba(40, 39, 88, .35); }
#rail a:hover, #rail a.is-active { background: var(--azul); transform: scale(1.35); }
#rail a span { position: absolute; right: 1.2rem; top: 50%; transform: translate(6px, -50%); white-space: nowrap; padding: .25rem .6rem; border-radius: .45rem; background: var(--tinta); color: #fff; font-size: .72rem; font-weight: 600; opacity: 0; pointer-events: none; transition: all .2s; }
#rail a:hover span { opacity: 1; transform: translate(0, -50%); }
body.on-dark #rail a { background: rgba(255, 255, 255, .3); }
body.on-dark #rail a.is-active, body.on-dark #rail a:hover { background: #fff; }

/* ── Botones ────────────────────────────────────────────── */
.btn-primary, .btn-ghost, .btn-light, .btn-outline-light { display: inline-flex; align-items: center; gap: .55rem; padding: .95rem 1.5rem; border-radius: .9rem; font-weight: 600; transition: all .25s var(--ease); }
.btn-primary svg, .btn-ghost svg { width: 1.1rem; height: 1.1rem; }
.btn-primary { background: var(--tinta); color: #fff; box-shadow: var(--sombra-alta); }
.btn-primary:hover { background: var(--azul); transform: translateY(-2px); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary svg { transition: transform .25s; }
.btn-ghost { color: var(--tinta); border: 1px solid var(--linea); background: rgba(255, 255, 255, .7); }
.btn-ghost:hover { border-color: var(--azul-100); color: var(--azul); }
.btn-light { background: #fff; color: var(--tinta); }
.btn-light:hover { transform: translateY(-2px); }
.btn-outline-light { border: 1px solid rgba(255, 255, 255, .35); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .08); }

/* ── Portada ────────────────────────────────────────────── */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: calc(var(--nav-h) + 3rem); overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--fondo) 100%); }
.hero-shapes { position: absolute; inset: 0; pointer-events: none; }
.hero-wave { position: absolute; right: -18vw; top: -10vh; width: 70vw; height: 120vh; border-radius: 0 0 50% 50% / 0 0 30% 30%;
  background: linear-gradient(160deg, var(--celeste) 0%, var(--azul) 40%, var(--tinta) 100%); opacity: .1; transform: rotate(-12deg); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(40, 39, 88, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(40, 39, 88, .05) 1px, transparent 1px); background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 75% 35%, #000 5%, transparent 65%); mask-image: radial-gradient(ellipse at 75% 35%, #000 5%, transparent 65%); }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; max-width: 46rem; margin-top: 4rem; }
@media (min-width: 640px) { .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hero-stats > div { padding: 1rem 1.15rem; border-radius: 1rem; background: rgba(255, 255, 255, .85); border: 1px solid var(--linea); box-shadow: var(--sombra); }
.hero-stats dt { font-size: .75rem; font-weight: 500; color: var(--suave); }
.hero-stats dd { margin-top: .2rem; font-family: 'Poppins', sans-serif; font-size: 1.75rem; font-weight: 700; color: var(--tinta); }
.scroll-cue { position: absolute; left: 50%; bottom: 1.75rem; width: 1.6rem; height: 2.6rem; border: 2px solid rgba(40, 39, 88, .25); border-radius: 999px; transform: translateX(-50%); }
.scroll-cue span { position: absolute; left: 50%; top: .45rem; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--azul); animation: cue 1.8s ease-in-out infinite; }

/* ── Separadores de bloque ──────────────────────────────── */
.divider { min-height: 78vh; display: flex; align-items: center; overflow: hidden; color: #fff;
  background: radial-gradient(60rem 40rem at 90% 10%, rgba(38, 127, 180, .35), transparent 60%), linear-gradient(135deg, var(--tinta) 0%, var(--tinta-900) 100%); }
.divider .wrap { position: relative; }
.divider-num { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-family: 'Poppins', sans-serif; font-size: clamp(9rem, 26vw, 20rem); font-weight: 800; line-height: 1; color: rgba(255, 255, 255, .06); pointer-events: none; }
.divider .display-2 { margin-top: .75rem; font-size: clamp(2.3rem, 5vw, 3.8rem); }
.divider .lead { margin-top: 1.25rem; max-width: 40rem; }

/* ── Temario ────────────────────────────────────────────── */
.agenda-track { display: flex; gap: 4px; height: .7rem; margin-top: 2.75rem; }
.agenda-bar { border-radius: 999px; background: var(--azul-100); cursor: pointer; transition: background .3s, transform .2s; }
.agenda-bar:hover { background: var(--azul); }
.agenda-bar.is-current { background: var(--azul); }
.agenda-scale { display: flex; justify-content: space-between; margin-top: .5rem; font-size: .75rem; font-weight: 600; color: var(--suave); font-variant-numeric: tabular-nums; }
.agenda-card { position: relative; display: flex; flex-direction: column; padding: 1.6rem; border-radius: 1.25rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.agenda-card:hover { transform: translateY(-4px); box-shadow: var(--sombra-alta); }
.agenda-card:focus-visible { outline: 2px solid var(--azul); outline-offset: 3px; }
.agenda-card.is-current { border-color: var(--azul); box-shadow: 0 0 0 4px rgba(45, 111, 179, .14), var(--sombra-alta); }
.agenda-card.is-current::after { content: "En curso"; position: absolute; top: -.7rem; right: 1rem; padding: .2rem .65rem; border-radius: 999px; background: var(--azul); color: #fff; font-size: .7rem; font-weight: 700; }
.agenda-top { display: flex; align-items: baseline; justify-content: space-between; }
.agenda-num { font-family: 'Poppins', sans-serif; font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; color: var(--azul-100); }
.agenda-time { padding: .2rem .65rem; border-radius: 999px; background: var(--fondo); font-size: .8rem; font-weight: 700; color: var(--tinta); }
.agenda-card h3 { margin-top: 1rem; font-size: 1.1rem; font-weight: 600; line-height: 1.3; color: var(--tinta); }
.agenda-card ul { margin-top: .9rem; flex: 1; display: grid; gap: .35rem; }
.agenda-card li { position: relative; padding-left: 1rem; font-size: .9rem; color: var(--texto); }
.agenda-card li::before { content: ""; position: absolute; left: 0; top: .55rem; width: .35rem; height: .35rem; border-radius: 999px; background: var(--azul); }
.agenda-go { margin-top: 1.25rem; font-size: .85rem; font-weight: 600; color: var(--azul); }
.agenda-go::after { content: " →"; display: inline-block; transition: transform .2s; }
.agenda-card:hover .agenda-go::after { transform: translateX(4px); }

/* ── Pilares ────────────────────────────────────────────── */
.pillar { padding: 1.75rem; border-radius: 1.25rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); transition: transform .3s var(--ease), box-shadow .3s; }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--sombra-alta); }
.pillar-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .95rem; background: linear-gradient(135deg, var(--azul), var(--tinta)); color: #fff; }
.pillar-icon svg { width: 1.4rem; height: 1.4rem; }
.pillar h3 { margin-top: 1.25rem; font-size: 1.15rem; font-weight: 600; color: var(--tinta); }
.pillar p { margin-top: .6rem; font-size: .95rem; line-height: 1.6; color: var(--texto); }

/* ── Ecosistema ─────────────────────────────────────────── */
.eco { display: grid; gap: 1rem; margin-top: 3rem; }
@media (min-width: 1024px) { .eco { grid-template-columns: 1fr 2.5rem 1.15fr 2.5rem 1fr; align-items: center; } }
.eco-col { display: grid; gap: .75rem; }
.eco-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--suave); }
.eco-node { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem; border-radius: 1rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.eco-node strong { display: block; font-size: .95rem; font-weight: 600; color: var(--tinta); }
.eco-node small { display: block; margin-top: .15rem; font-size: .82rem; line-height: 1.45; color: var(--suave); }
.eco-ico { flex: none; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .75rem; }
.eco-ico svg { width: 1.2rem; height: 1.2rem; }
.eco-arrow { height: 2rem; position: relative; }
.eco-arrow::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: repeating-linear-gradient(var(--azul) 0 6px, transparent 6px 11px); }
.eco-arrow::after { content: ""; position: absolute; left: 50%; bottom: -2px; width: .6rem; height: .6rem; border-right: 2px solid var(--azul); border-bottom: 2px solid var(--azul); transform: translateX(-50%) rotate(45deg); }
@media (min-width: 1024px) {
  .eco-arrow { height: 2px; }
  .eco-arrow::before { left: 0; right: 0; top: 0; bottom: auto; width: auto; height: 2px; background: repeating-linear-gradient(90deg, var(--azul) 0 6px, transparent 6px 11px); }
  .eco-arrow::after { left: auto; right: 0; bottom: auto; top: -.27rem; transform: rotate(-45deg); }
}
.eco-core { position: relative; padding: 2rem 1.5rem; border-radius: 1.5rem; text-align: center; color: #fff; background: radial-gradient(30rem 20rem at 80% 0%, rgba(38, 127, 180, .45), transparent 60%), linear-gradient(150deg, var(--tinta), var(--tinta-900)); box-shadow: var(--sombra-alta); }
.eco-logo { height: 2.6rem; margin: 0 auto; padding: .45rem .7rem; border-radius: .7rem; background: #fff; }
.eco-core-title { margin-top: 1rem; font-family: 'Poppins', sans-serif; font-size: 1.3rem; font-weight: 700; }
.eco-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 1.1rem; }
.eco-chips span { padding: .3rem .7rem; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .15); font-size: .78rem; font-weight: 500; }
.eco-core-foot { margin-top: 1.1rem; font-size: .78rem; color: var(--lavanda); }
.eco-ext { margin-top: .5rem; padding: 1.25rem; border-radius: 1.25rem; border: 1px dashed #c9cfe8; background: rgba(255, 255, 255, .6); }
@media (min-width: 1024px) { .eco-ext { grid-column: 1 / -1; } }
.eco-ext-row { display: grid; gap: .6rem; margin-top: .75rem; }
@media (min-width: 640px) { .eco-ext-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .eco-ext-row { grid-template-columns: repeat(4, 1fr); } }
.eco-ext-row span { font-size: .85rem; line-height: 1.45; color: var(--suave); }
.eco-ext-row strong { display: block; color: var(--tinta); }

/* ── Módulos ────────────────────────────────────────────── */
.module { padding: 1.4rem; border-radius: 1.15rem; background: #fff; border: 1px solid var(--linea); transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.module:hover { border-color: var(--azul-100); box-shadow: var(--sombra-alta); transform: translateY(-3px); }
.module header { display: flex; align-items: center; gap: .7rem; }
.module-ico { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: .75rem; background: var(--fondo); font-size: 1.15rem; }
.module h3 { font-size: 1.05rem; font-weight: 600; color: var(--tinta); }
.module p { margin-top: .75rem; font-size: .88rem; line-height: 1.5; color: var(--texto); }
.module ul { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--linea); display: grid; gap: .3rem; }
.module li { font-size: .82rem; color: var(--suave); }
.module li::before { content: "› "; color: var(--azul); font-weight: 700; }
.module em { font-style: normal; color: var(--ambar); }

/* ── Roles ──────────────────────────────────────────────── */
.role { padding: 1.4rem; border-radius: 1.15rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.role-tag { display: inline-block; padding: .3rem .75rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.role p { margin-top: .85rem; font-size: .9rem; line-height: 1.55; color: var(--texto); }

/* ── Listas con check ───────────────────────────────────── */
.check-list { display: grid; gap: .65rem; align-content: start; }
.check-list li { position: relative; padding-left: 1.85rem; font-size: .97rem; line-height: 1.55; color: #334155; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .22rem; width: 1.15rem; height: 1.15rem; border-radius: 999px;
  background: var(--azul) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 68% no-repeat; }

/* ── Pipeline de estados ────────────────────────────────── */
.pipeline { display: grid; gap: .75rem; margin-top: 3rem; counter-reset: p; }
@media (min-width: 1024px) { .pipeline { grid-template-columns: repeat(5, 1fr); gap: 0; } }
.pipeline li { position: relative; padding: 1.4rem 1.25rem; border-radius: 1.1rem; background: var(--fondo); }
@media (min-width: 1024px) {
  .pipeline li { margin-right: 1.25rem; }
  .pipeline li:not(:last-child)::after { content: ""; position: absolute; right: -1.05rem; top: 2.15rem; width: .8rem; height: .8rem; border-top: 2px solid var(--azul); border-right: 2px solid var(--azul); transform: rotate(45deg); }
}
.pipe-dot { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--tinta); color: #fff; font-weight: 700; font-size: .85rem; }
.pipeline strong { display: block; margin-top: .9rem; font-family: 'Poppins', sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--tinta); }
.pipeline small { display: block; margin-top: .3rem; font-size: .85rem; line-height: 1.45; color: var(--suave); }
.pipe-warn { background: var(--ambar-50) !important; }
.pipe-warn .pipe-dot { background: var(--ambar); }
.pipe-ok { background: var(--verde-50) !important; }
.pipe-ok .pipe-dot { background: var(--verde); }

/* ── Stepper (horizontal: deja todo el ancho a la captura) ─ */
.stepper { position: relative; display: flex; gap: .5rem; overflow-x: auto; padding: .25rem .1rem .5rem; scroll-snap-type: x mandatory; }
@media (min-width: 1024px) { .stepper { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; padding-bottom: 0; } }
@media (min-width: 1024px) { .stepper-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* El avance se ve en los círculos (verde = paso ya visto). */
.stepper-line { display: none; }
.step { position: relative; flex: 0 0 auto; display: flex; align-items: center; gap: .75rem; padding: .75rem .85rem; border-radius: 1rem; border: 1px solid var(--linea); background: rgba(255, 255, 255, .55); text-align: left; scroll-snap-align: start; transition: background .25s, border-color .25s, box-shadow .25s; }
.step:hover { background: #fff; }
.step:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; }
.step-dot { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: #fff; border: 2px solid var(--linea); font-size: .85rem; font-weight: 700; color: var(--suave); transition: all .3s var(--ease); }
.step-text { display: flex; flex-direction: column; min-width: 0; }
.step-text strong { font-weight: 600; color: var(--texto); }
.step-text small { font-size: .76rem; line-height: 1.3; color: var(--suave); }
@media (max-width: 1023px) { .step-text small { display: none; } }
.step.is-done .step-dot { background: var(--verde); border-color: var(--verde); color: #fff; }
.step[aria-selected="true"] { background: #fff; border-color: var(--linea); box-shadow: var(--sombra); }
.step[aria-selected="true"] .step-dot { background: var(--tinta); border-color: var(--tinta); color: #fff; box-shadow: 0 0 0 5px rgba(45, 111, 179, .16); }
.step[aria-selected="true"] .step-text strong { color: var(--tinta); }

.panel { padding: clamp(1.25rem, 3vw, 2rem); border-radius: 1.5rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.panel.is-entering { animation: panelIn .5s var(--ease) both; }
.panel-grid { display: grid; gap: 1.75rem; }
@media (min-width: 1024px) { .panel-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; } }
.panel-kicker { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--azul); }
.panel h3 { margin-top: .5rem; font-size: 1.5rem; font-weight: 700; line-height: 1.25; color: var(--tinta); }
.panel h3 + p { margin: .75rem 0 1.25rem; line-height: 1.65; color: var(--texto); }
.panel.is-entering .check-list li { animation: slideUp .5s var(--ease) both; }
.panel.is-entering .check-list li:nth-child(2) { animation-delay: 60ms; }
.panel.is-entering .check-list li:nth-child(3) { animation-delay: 120ms; }
.panel.is-entering .check-list li:nth-child(4) { animation-delay: 180ms; }
.demo-tip { margin-top: 1.5rem; padding: .85rem 1rem; border-radius: .85rem; background: var(--ambar-50); border-left: 3px solid var(--ambar); font-size: .88rem; line-height: 1.5; color: #5b4310; }
.stepper-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 1.25rem; }
.nav-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .65rem 1.05rem; border-radius: .8rem; border: 1px solid var(--linea); background: #fff; font-size: .9rem; font-weight: 600; color: var(--texto); transition: all .2s; }
.nav-btn svg { width: 1rem; height: 1rem; }
.nav-btn:hover:not(:disabled) { border-color: var(--azul-100); color: var(--azul); }
.nav-btn:disabled { visibility: hidden; }
.nav-btn-primary { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.nav-btn-primary:hover:not(:disabled) { background: var(--azul); border-color: var(--azul); color: #fff; }
.step-dots { display: flex; gap: .4rem; }
.step-dots span { width: .5rem; height: .5rem; border-radius: 999px; background: var(--linea); transition: all .3s var(--ease); }
.step-dots span.is-active { width: 1.6rem; background: var(--azul); }

/* ── Capturas de pantalla ───────────────────────────────── */
.shot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; aspect-ratio: 16 / 10; width: 100%; border-radius: 1.1rem; border: 2px dashed #c9cfe8; color: var(--suave); font-size: .9rem; font-weight: 600; text-align: center;
  background: repeating-linear-gradient(135deg, #f3f5fc 0 14px, #eceffa 14px 28px); }
.shot-tall { aspect-ratio: 4 / 3; }
.shot-ico { font-size: 2rem; filter: grayscale(1); opacity: .6; }
.shot small { font-size: .72rem; font-weight: 500; color: #94a3b8; font-family: ui-monospace, monospace; }
.shot-img { width: 100%; border-radius: 1.1rem; border: 1px solid var(--linea); box-shadow: var(--sombra-alta); cursor: zoom-in; transition: transform .3s var(--ease); }
.shot-img:hover { transform: scale(1.01); }

/* Visor ampliado de capturas */
#visor { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 2rem; background: rgba(15, 14, 40, .88); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s; cursor: zoom-out; }
#visor.is-open { opacity: 1; pointer-events: auto; }
#visor img { max-width: min(96vw, 1800px); max-height: 86vh; border-radius: .9rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); transform: scale(.96); transition: transform .35s var(--ease); }
#visor.is-open img { transform: none; }
#visor p { color: #fff; font-size: .9rem; font-weight: 500; opacity: .85; }

/* Lo que alimentan los aliados */
.feeds { display: grid; gap: .65rem; }
.feeds li { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 1rem; background: #fff; border: 1px solid var(--linea); }
.feeds li > span { flex: none; display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: .7rem; background: var(--fondo); font-size: 1.1rem; }
.feeds strong { display: block; color: var(--tinta); }
.feeds small { font-size: .86rem; line-height: 1.45; color: var(--suave); }

/* ── Postventa ──────────────────────────────────────────── */
.feature { padding: 1.75rem; border-radius: 1.4rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.feature header { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1.5rem; }
.feature-ico { flex: none; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .95rem; font-size: 1.4rem; }
.feature h3 { font-size: 1.3rem; font-weight: 700; color: var(--tinta); }
.feature header p { margin-top: .3rem; font-size: .95rem; color: var(--texto); }
.feature-foot { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--linea); font-size: .88rem; color: var(--suave); }
.mini-flow { display: grid; gap: .6rem; counter-reset: mf; }
.mini-flow li { position: relative; padding: .85rem 1rem .85rem 3.1rem; border-radius: .9rem; background: var(--fondo); counter-increment: mf; }
.mini-flow li::before { content: counter(mf); position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--azul); color: #fff; font-size: .78rem; font-weight: 700; }
.mini-flow strong { display: block; color: var(--tinta); }
.mini-flow small { font-size: .85rem; color: var(--suave); }

/* ── Cadena del dinero ──────────────────────────────────── */
.chain { display: grid; gap: .75rem; margin-top: 3rem; }
@media (min-width: 900px) { .chain { grid-template-columns: repeat(5, 1fr); } }
.chain li { position: relative; padding: 1.5rem 1.25rem; border-radius: 1.15rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); }
@media (min-width: 900px) {
  .chain li:not(:last-child)::after { content: ""; position: absolute; right: -.62rem; top: 50%; z-index: 1; width: 1rem; height: 1rem; border-radius: 999px; transform: translateY(-50%);
    background: var(--azul) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / 70% no-repeat; }
}
.chain-n { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .7rem; background: linear-gradient(135deg, var(--azul), var(--tinta)); color: #fff; font-weight: 700; font-size: .9rem; }
.chain h3 { margin-top: 1rem; font-size: 1.1rem; font-weight: 600; color: var(--tinta); }
.chain p { margin-top: .4rem; font-size: .88rem; line-height: 1.5; color: var(--texto); }
.state-card { padding: 1.15rem 1.25rem; border-radius: 1rem; background: var(--fondo); }
.state-card p { margin-top: .6rem; font-size: .9rem; color: var(--texto); }
.state { display: inline-block; padding: .3rem .75rem; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.state-wait { background: #e2e8f0; color: #334155; }
.state-due { background: var(--ambar-50); color: var(--ambar); }
.state-ok { background: var(--verde-50); color: var(--verde); }

/* ── Simulador ──────────────────────────────────────────── */
.sim { display: grid; gap: 1.5rem; margin-top: 2.75rem; }
@media (min-width: 1024px) { .sim { grid-template-columns: 320px 1fr; } }
.sim-form { display: grid; gap: 1rem; align-content: start; padding: 1.5rem; border-radius: 1.25rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.sim-form label { display: grid; gap: .35rem; font-size: .82rem; font-weight: 600; color: var(--tinta); }
.sim-form input, .sim-form select { width: 100%; padding: .7rem .85rem; border-radius: .7rem; border: 1px solid #d5daee; background: #fbfcff; font-size: 1rem; font-weight: 500; color: var(--tinta); transition: border-color .2s, box-shadow .2s; }
.sim-form input:focus, .sim-form select:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 4px rgba(45, 111, 179, .14); }
.sim-note { font-size: .8rem; line-height: 1.5; color: var(--suave); }
.sim-out { padding: 1.5rem; border-radius: 1.25rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); min-width: 0; }
.sim-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.sim-kpis div { padding: .9rem 1rem; border-radius: .9rem; background: var(--fondo); }
.sim-kpis span { display: block; font-size: .75rem; font-weight: 600; color: var(--suave); }
.sim-kpis strong { display: block; margin-top: .2rem; font-family: 'Poppins', sans-serif; font-size: clamp(1.1rem, 2.4vw, 1.6rem); font-weight: 700; color: var(--tinta); font-variant-numeric: tabular-nums; }
.sim-table-wrap { margin-top: 1.25rem; max-height: 22rem; overflow: auto; border-radius: .9rem; border: 1px solid var(--linea); }
.sim-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.sim-table th { position: sticky; top: 0; padding: .65rem 1rem; background: #f6f7fd; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--suave); }
.sim-table td { padding: .6rem 1rem; border-top: 1px solid var(--linea); color: #334155; }
.sim-table tbody tr { animation: slideUp .35s var(--ease) both; }
.sim-table tbody tr.is-last td { background: #fbfcff; }
.sim-table tfoot td { position: sticky; bottom: 0; background: var(--tinta); color: #fff; font-weight: 700; }
.sim-table .num { text-align: right; }

/* ── Cobranza (línea de tiempo) ─────────────────────────── */
.timeline { position: relative; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .25rem; margin-top: 3.5rem; padding-top: 1.5rem; }
.tl-line { position: absolute; left: 4%; right: 4%; top: 2.05rem; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--azul) 0%, var(--azul) 38%, var(--rojo) 50%, var(--ambar) 85%, var(--verde) 100%); }
.tl-point { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tl-point::before { content: ""; position: relative; z-index: 1; width: 1.15rem; height: 1.15rem; border-radius: 999px; border: 3px solid #fff; box-shadow: 0 0 0 2px currentColor; background: currentColor; }
.tl-point span { margin-top: .85rem; font-size: .78rem; font-weight: 600; line-height: 1.3; color: var(--tinta); }
.tl-pre { color: var(--azul); }
.tl-due { color: var(--rojo); }
.tl-due::before { width: 1.5rem !important; height: 1.5rem !important; margin-top: -.18rem; }
.tl-post { color: var(--ambar); }
.tl-human { color: var(--verde); }
@media (max-width: 767px) {
  .timeline { grid-template-columns: 1fr; gap: .9rem; padding: 0 0 0 .25rem; }
  .tl-line { left: .78rem; right: auto; top: .5rem; bottom: .5rem; width: 3px; height: auto; background: linear-gradient(var(--azul), var(--rojo), var(--ambar), var(--verde)); }
  .tl-point { flex-direction: row; gap: .9rem; text-align: left; }
  .tl-point span { margin-top: 0; font-size: .9rem; }
  .tl-due::before { margin-top: 0; margin-left: -.18rem; }
}
.legend { display: flex; gap: .6rem; align-items: flex-start; color: var(--texto); }
.legend i { flex: none; width: .8rem; height: .8rem; margin-top: .3rem; border-radius: 999px; }
.lg-pre { background: var(--azul); }
.lg-post { background: var(--ambar); }
.lg-human { background: var(--verde); }

/* ── Comisiones ─────────────────────────────────────────── */
.rule { display: flex; flex-direction: column; padding: 1.6rem; border-radius: 1.25rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.rule-tag { align-self: flex-start; padding: .25rem .7rem; border-radius: 999px; background: var(--azul-50); font-size: .75rem; font-weight: 700; color: var(--azul); }
.rule h3 { margin-top: 1rem; font-size: 1.2rem; font-weight: 700; color: var(--tinta); }
.rule p { margin-top: .5rem; font-size: .92rem; line-height: 1.6; color: var(--texto); }
.rule .rule-ex { margin-top: auto; padding-top: 1rem; border-top: 1px dashed var(--linea); font-size: .85rem; color: var(--suave); }
.rule-ex strong { color: var(--tinta); }
.pay-card { padding: 1.75rem; border-radius: 1.25rem; background: #fff; border: 1px solid var(--linea); box-shadow: var(--sombra); }
.pay-card h3 { font-size: 1.25rem; font-weight: 700; color: var(--tinta); }
.pay-methods { display: grid; gap: .6rem; margin-top: 1.1rem; }
@media (min-width: 640px) { .pay-methods { grid-template-columns: repeat(3, 1fr); } }
.pay-methods div { padding: .85rem 1rem; border-radius: .9rem; background: var(--fondo); }
.pay-methods strong { display: block; color: var(--tinta); }
.pay-methods small { font-size: .8rem; color: var(--suave); }

/* ── Estadísticas ───────────────────────────────────────── */
.stat-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.stat-tags span { padding: .45rem .8rem; border-radius: .7rem; background: var(--fondo); font-size: .85rem; font-weight: 500; color: var(--tinta); }

/* ── Cartera (sección oscura) ───────────────────────────── */
.dark { color: #fff; background: radial-gradient(50rem 30rem at 10% 0%, rgba(38, 127, 180, .3), transparent 60%), linear-gradient(160deg, var(--tinta) 0%, var(--tinta-900) 100%); }
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .9rem; margin-top: 3rem; }
@media (min-width: 768px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .kpi-grid { grid-template-columns: repeat(6, 1fr); } }
.kpi { padding: 1.25rem; border-radius: 1.1rem; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.kpi strong { display: block; font-family: 'Poppins', sans-serif; font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { display: block; margin-top: .35rem; font-size: .82rem; color: var(--lavanda); }
.dark-card { padding: 1.5rem; border-radius: 1.25rem; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.dark-card h3 { font-size: 1rem; font-weight: 600; color: #fff; }
.dark-card-accent { background: linear-gradient(135deg, rgba(45, 111, 179, .55), rgba(38, 127, 180, .25)); border-color: rgba(182, 195, 242, .3); }
.bars { display: grid; gap: .65rem; margin-top: 1.25rem; }
.bar-row { display: grid; grid-template-columns: 6.5rem 1fr 2.5rem; gap: .75rem; align-items: center; font-size: .85rem; }
.bar-row span { color: var(--lavanda); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-track { height: .7rem; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--celeste), var(--lavanda)); transition: width 1.1s var(--ease); }
.split { display: flex; gap: 3px; height: 1rem; margin-top: 1.1rem; border-radius: 999px; overflow: hidden; }
.split span { min-width: 4px; }
.sp-a { background: var(--lavanda); }
.sp-t { background: var(--celeste); }
.sp-m { background: #7fb3e0; }
.sp-s { background: #ffffff; }
.split-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; margin-top: 1rem; font-size: .85rem; color: var(--lavanda); }
.split-legend i { display: inline-block; width: .65rem; height: .65rem; margin-right: .45rem; border-radius: 3px; }
.split-legend b { color: #fff; margin-left: .25rem; }

/* ── Automatizaciones ───────────────────────────────────── */
.auto { padding: 1.5rem; border-radius: 1.15rem; background: var(--fondo); border: 1px solid transparent; transition: border-color .25s, background .25s; }
.auto:hover { background: #fff; border-color: var(--linea); }
.auto-time { display: inline-block; padding: .2rem .6rem; border-radius: 999px; background: var(--tinta); color: #fff; font-size: .72rem; font-weight: 700; }
.auto h3 { margin-top: .9rem; font-size: 1.05rem; font-weight: 600; color: var(--tinta); }
.auto p { margin-top: .4rem; font-size: .9rem; line-height: 1.55; color: var(--texto); }

/* ── Entrega ────────────────────────────────────────────── */
.deliver { display: grid; gap: .75rem; }
.deliver li { display: flex; gap: .9rem; align-items: flex-start; padding: 1rem 1.1rem; border-radius: 1rem; background: var(--fondo); }
.deliver li > span { flex: none; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 999px; background: var(--verde); color: #fff; font-size: .8rem; font-weight: 700; }
.deliver strong { display: block; color: var(--tinta); }
.deliver small { font-size: .86rem; color: var(--suave); }
.next { display: grid; gap: .75rem; counter-reset: nx; }
.next li { position: relative; padding: 1rem 1.1rem 1rem 3.4rem; border-radius: 1rem; border: 1px solid var(--linea); counter-increment: nx; }
.next li::before { content: counter(nx, decimal-leading-zero); position: absolute; left: 1.05rem; top: 1rem; font-family: 'Poppins', sans-serif; font-weight: 700; color: var(--azul); }
.next strong { display: block; color: var(--tinta); }
.next small { font-size: .86rem; line-height: 1.5; color: var(--suave); }

/* ── Cierre ─────────────────────────────────────────────── */
.closing { min-height: 90vh; display: flex; align-items: center; background: radial-gradient(50rem 30rem at 50% 0%, rgba(38, 127, 180, .4), transparent 65%), linear-gradient(160deg, var(--tinta), var(--tinta-900)); }

/* ── Ayuda del modo presentación ────────────────────────── */
#deck-hint { position: fixed; left: 50%; bottom: 1.25rem; z-index: 70; padding: .55rem 1rem; border-radius: 999px; background: rgba(27, 26, 66, .92); color: #fff; font-size: .8rem; opacity: 0; transform: translate(-50%, 1rem); pointer-events: none; transition: all .35s var(--ease); }
#deck-hint.is-visible { opacity: 1; transform: translate(-50%, 0); }
#deck-hint kbd { display: inline-block; min-width: 1.4rem; margin: 0 .1rem; padding: .05rem .35rem; border-radius: .3rem; background: rgba(255, 255, 255, .15); font-family: inherit; font-size: .75rem; text-align: center; }

/* Modo presentación: cada sección ocupa la pantalla y la barra superior se esconde. */
html.deck { scroll-snap-type: y proximity; scroll-padding-top: 0; }
html.deck .slide { min-height: 100vh; display: flex; align-items: center; scroll-snap-align: start; }
html.deck #nav { transform: translateY(-100%); }
html.deck #nav:hover, html.deck #nav:focus-within { transform: none; }
html.deck .scroll-cue { display: none; }

/* ── Animaciones ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .75s var(--ease), transform .75s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes panelIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .panel, .panel *, .sim-table tbody tr, .bar-fill { animation: none !important; transition: none !important; }
}

/* Impresión / PDF: todo visible, una sección por página */
@media print {
  #nav, #rail, #deck-hint, .scroll-cue, .stepper-nav { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .slide { break-after: page; }
  .panel[hidden] { display: block !important; margin-top: 1rem; }
}
