/* ============================================
   PAGES.CSS — componentes de las páginas generadas
   Solo se enlaza desde /servicios/, /tips/, /apps/ y /soluciones/. Los tokens (--bg, --fg, --brand, --s-*,
   --tx-*) vienen de styles.css, así que el tema claro/oscuro funciona solo.
   ============================================ */

.svc-page { padding-top: calc(var(--header-offset) + var(--s-8)); }

/* Ruta de navegación */
.crumbs ol {
  display: flex; flex-wrap: wrap; gap: var(--s-2);
  list-style: none; margin: 0 0 var(--s-6); padding: 0;
  font-family: var(--font-mono); font-size: var(--tx-xs); color: var(--fg-faint);
}
.crumbs a { color: var(--fg-muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs [aria-current="page"] { color: var(--fg); }

/* Cabecera de la página */
.svc-hero { max-width: 62ch; }
.svc-hero .section-title { margin-top: var(--s-3); }
.svc-hero__lead { font-size: var(--tx-lg); line-height: 1.7; color: var(--fg-muted); margin-top: var(--s-5); }
.svc-hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }

.svc-facts {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  list-style: none; margin: var(--s-10) 0 0; padding: var(--s-6) 0 0;
  border-top: 1px solid var(--line);
  font-size: var(--tx-sm); color: var(--fg);
}
.svc-facts__k {
  display: block; margin-bottom: var(--s-1);
  font-family: var(--font-mono); font-size: var(--tx-xs);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted);
}

/* Bloques: `section` (styles.css) ya aporta el padding vertical del diseño,
   así que no se suma un segundo ritmo con margen propio. */
.svc-block .section-title { margin-bottom: var(--s-6); }

/* Qué incluye */
.svc-includes {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.svc-includes li {
  position: relative; padding: var(--s-4) var(--s-4) var(--s-4) var(--s-8);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md);
  font-size: var(--tx-sm); line-height: 1.55; box-shadow: var(--shadow-1);
}
.svc-includes li::before {
  content: ""; position: absolute; left: var(--s-4); top: calc(var(--s-4) + 0.45em);
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}

/* Situaciones */
.svc-symptoms { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.svc-symptom {
  margin: 0; padding: var(--s-6);
  background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--r-md);
}
.svc-symptom h3 { margin: 0 0 var(--s-2); font-size: var(--tx-base); font-weight: 600; color: var(--fg); }
.svc-symptom p { margin: 0; font-size: var(--tx-sm); line-height: 1.6; color: var(--fg-muted); }

/* Icono y capturas de la app (pagina /apps/saldo/) */
.app-icon {
  display: block; width: 5rem; height: 5rem; margin: 0 0 var(--s-5);
  border: 1px solid var(--line); border-radius: 1.15rem;
}
.app-shots { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.app-shot { margin: 0; }
.app-shot img {
  display: block; width: 100%; height: auto;
  background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--r-md);
}
.app-shot figcaption { margin-top: var(--s-3); font-size: var(--tx-xs); line-height: 1.5; color: var(--fg-muted); }
.app-shots + .tip-prose { margin-top: var(--s-8); }

/* Planes de la app (pagina /apps/saldo/) */
.app-plans { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.app-plan {
  margin: 0; padding: var(--s-6);
  background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--r-md);
}
.app-plan__name { margin: 0; font-size: var(--tx-sm); font-weight: 600; color: var(--fg-muted); }
.app-plan__price { margin: var(--s-2) 0 0; font-size: var(--tx-xl); font-weight: 700; color: var(--fg); }
.app-plan__note { margin: var(--s-1) 0 0; font-family: var(--font-mono); font-size: var(--tx-xs); color: var(--fg-muted); }
.app-plan ul { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-2); font-size: var(--tx-sm); color: var(--fg); }
.app-plan ul li::before { content: '·'; margin-right: var(--s-2); color: var(--accent-ink); }

/* Hero de /apps/saldo/: panel navy con el BG de la app. Como los tiles navy del
   kit de marca, el panel no sigue al tema claro/oscuro y el texto se fija a blanco. */
.svc-hero--app {
  position: relative;
  max-width: none;
  margin-top: var(--s-4);
  padding: var(--s-10) var(--s-8);
  border-radius: var(--r-xl);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(6,16,28,0.94) 0%, rgba(6,16,28,0.78) 42%, rgba(6,16,28,0.38) 100%),
    url('/img/apps/saldo-bg.webp') right center / cover no-repeat,
    linear-gradient(135deg, var(--navy-700), var(--navy-600));
}
.svc-hero--app__inner { position: relative; max-width: 62ch; }
.svc-hero--app .app-icon { border-color: rgba(255, 255, 255, 0.22); }
.svc-hero--app .section-kicker { color: var(--teal-300); background: rgba(143, 166, 192, 0.16); }
.svc-hero--app .section-title { color: #fff; }
.svc-hero--app .svc-hero__lead { color: rgba(255, 255, 255, 0.78); }
.svc-hero--app .svc-facts { border-top-color: rgba(255, 255, 255, 0.18); color: #fff; }
.svc-hero--app .svc-facts__k { color: rgba(255, 255, 255, 0.6); }
.svc-hero--app .btn--ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.35); box-shadow: none; }
.svc-hero--app .btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }
@media (max-width: 640px) {
  .svc-hero--app { padding: var(--s-8) var(--s-5); }
}

/* Soluciones (pagina /soluciones/kioskcast/) */
/* Las capturas del panel son panorámicas: una por fila, no en mosaico. */
.sol-shots { display: grid; gap: var(--s-6); }
.sol-shot { margin: 0; }
.sol-shot img {
  display: block; width: 100%; height: auto;
  background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--r-md);
}
.sol-shot figcaption { margin-top: var(--s-2); font-size: var(--tx-xs); line-height: 1.5; color: var(--fg-muted); }
.sol-shots + .tip-prose { margin-top: var(--s-6); }

/* Video de presentación: póster visible y descarga solo al pulsar reproducir. */
.sol-video { margin: 0; }
.sol-video video {
  display: block; width: 100%; height: auto;
  background: var(--bg-subtle); border: 1px solid var(--line); border-radius: var(--r-md);
}
.sol-video figcaption { margin-top: var(--s-2); font-size: var(--tx-xs); line-height: 1.5; color: var(--fg-muted); }

/* El video no lleva locución: la transcripción hace de subtítulo. */
.sol-transcript { margin-top: var(--s-5); border-top: 1px solid var(--line); padding-top: var(--s-4); }
.sol-transcript summary { cursor: pointer; font-size: var(--tx-sm); font-weight: 600; color: var(--accent-ink); }
.sol-transcript summary::marker { color: var(--accent-ink); }
.sol-transcript ol { margin: var(--s-4) 0 0; padding-left: var(--s-6); display: grid; gap: var(--s-2); font-size: var(--tx-sm); line-height: 1.6; color: var(--fg-muted); }
.sol-transcript .tip-prose { margin-top: var(--s-3); }

.sol-parts { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.sol-part {
  margin: 0; padding: var(--s-6);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-1);
}
.sol-part__icon { display: block; margin-bottom: var(--s-4); color: var(--accent-ink); font-size: 26px; }
.sol-part__icon .hic { width: 1em; height: 1em; }
.sol-part h3 { margin: 0 0 var(--s-2); font-size: var(--tx-base); font-weight: 600; }
.sol-part p { margin: 0; font-size: var(--tx-sm); line-height: 1.6; color: var(--fg-muted); }

/* La ficha técnica son datos, no promesas: se lee como una tabla, sin viñetas de adorno. */
.svc-facts--sol { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Lo que el producto todavía no hace. */
.sol-notyet li::before { background: var(--teal-500); }
.tip-index--one { grid-template-columns: minmax(0, 640px); }
@media (max-width: 640px) {
  .tip-index--one { grid-template-columns: 1fr; }
}

/* Pasos */
.svc-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5); counter-reset: paso; }
.svc-steps li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-4); align-items: start; }
.svc-steps__n {
  font-family: var(--font-mono); font-size: var(--tx-sm); font-weight: 700;
  color: var(--brand); background: var(--brand-soft);
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: var(--s-2) var(--s-3);
}
.svc-steps h3 { margin: 0 0 var(--s-1); font-size: var(--tx-base); font-weight: 600; }
.svc-steps p { margin: 0; font-size: var(--tx-sm); line-height: 1.6; color: var(--fg-muted); }
/* En oscuro --brand es claro sobre --brand-soft: el número se pinta con --fg. */
[data-theme="dark"] .svc-steps__n { color: var(--fg); }

/* Relacionados */
.svc-related { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
/* En las paginas de tip solo hay un servicio relacionado: auto-fit lo estiraria a todo el ancho. */
.svc-related--one { grid-template-columns: minmax(0, 340px); }
.svc-related__card {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-5); text-decoration: none; color: var(--fg);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.svc-related__card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-3); }
.svc-related__icon { font-size: 1.4rem; line-height: 1; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.svc-related__label { font-size: var(--tx-sm); font-weight: 600; }

/* Tips: prosa suelta e índice del hub */
.tip-prose { max-width: 70ch; margin: 0; font-size: var(--tx-base); line-height: 1.75; color: var(--fg-muted); }
.tip-prose--warn {
  padding: var(--s-5) var(--s-6);
  border-left: 3px solid var(--teal-500);
  background: var(--bg-subtle);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.tip-cat + .tip-cat { margin-top: var(--s-8); }
.tip-cat > .section-title { margin-bottom: var(--s-4); }
.tip-index { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tip-index__card {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-5); text-decoration: none; color: var(--fg);
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-md);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.tip-index__card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-3); }
.tip-index__icon { font-size: 1.5rem; line-height: 1; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.tip-index__card h3 { margin: 0; font-size: var(--tx-base); font-weight: 600; }
.tip-index__card p { margin: 0; font-size: var(--tx-sm); line-height: 1.6; color: var(--fg-muted); }
.tip-index__k { margin-top: auto; padding-top: var(--s-2); font-size: var(--tx-xs); font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }
/* Defecto preexistente: en oscuro --brand sobre el fondo de tarjeta da 3.9:1. */
[data-theme="dark"] .tip-index__k { color: var(--fg-muted); }

/* Cierre */
.svc-cta__panel {
  padding: var(--s-10);
  background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--r-xl);
  color: #fff; text-align: center;
}
.svc-cta__panel .section-title { color: #fff; margin-bottom: var(--s-3); }
.svc-cta__text { max-width: 52ch; margin: 0 auto var(--s-6); font-size: var(--tx-base); color: rgba(255, 255, 255, 0.72); }

@media (max-width: 640px) {
  .svc-page { padding-top: calc(var(--header-offset) + var(--s-5)); }
  .svc-cta__panel { padding: var(--s-8) var(--s-5); }
}

/* ── /marca/ · kit de marca ─────────────────────────────────────────────
   Todo en tokens: esta hoja no debe traer ningún hex, que es lo que permite
   que el tema oscuro se herede sin reglas propias. */
.svc-block__lead { margin: 0 0 var(--s-5); font-size: var(--tx-base); line-height: 1.7; color: var(--fg-muted); }
.kit-grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.kit-grid--wide { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.kit-card {
  margin: 0; display: flex; flex-direction: column; gap: var(--s-3);
  padding: var(--s-4); background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.kit-card__fig {
  display: flex; align-items: center; justify-content: center;
  min-height: 148px; padding: var(--s-4);
  background: var(--bg-subtle); border-radius: var(--r-sm);
}
/* El navy del tile no sigue al tema: es el fondo sobre el que existe la variante
   inversa, así que se fija a propósito. */
.kit-card__fig--navy { background: var(--navy-600); }
.kit-card__fig img { display: block; max-width: 100%; }
.kit-card__titulo { margin: 0 0 var(--s-2); font-size: var(--tx-base); font-weight: 700; }
.kit-card__nota { margin: 0 0 var(--s-2); font-size: var(--tx-sm); line-height: 1.6; color: var(--fg-muted); }
.kit-card__regla { margin: 0 0 var(--s-2); font-size: var(--tx-sm); line-height: 1.6; color: var(--accent-ink); font-weight: 600; }
/* --n-600 y no --fg-faint: sobre la tira clara (#EDF1F4) el secundario del sitio se
   queda en 4,06:1 y axe lo marca; el grafito de la guía llega a 5,28:1. */
.kit-card__file { display: block; margin-top: var(--s-1); font-family: var(--font-mono); font-size: var(--tx-xs); color: var(--n-600); word-break: break-all; }
[data-theme="dark"] .kit-card__file { color: var(--n-300); }
.kit-card__dl {
  display: inline-block; margin-top: var(--s-3); padding: var(--s-2) var(--s-4);
  font-size: var(--tx-sm); font-weight: 700; text-decoration: none;
  color: var(--brand); border: 1px solid var(--line); border-radius: var(--r-pill);
}
.kit-card__dl:hover { border-color: var(--brand); background: var(--brand-soft); }
.kit-strip { display: grid; gap: var(--s-4); margin-bottom: var(--s-5); }
.kit-strip__fila {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4);
  padding: var(--s-5); background: var(--bg-subtle); border-radius: var(--r-md);
}
.kit-strip__fila--navy { background: var(--navy-600); }
.kit-strip__fila--navy .kit-card__file { color: var(--n-400); }
.kit-strip__fila--navy .kit-card__dl { color: var(--n-50); border-color: var(--navy-soft); }
.kit-strip__fila--navy .kit-card__dl:hover { background: var(--navy-soft); }
.kit-pal { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.kit-pal__fila {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-4); background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.kit-pal__muestra { width: 56px; height: 34px; border-radius: var(--r-xs); border: 1px solid var(--line); }
.kit-pal__dato b { display: block; font-size: var(--tx-sm); font-weight: 700; }
.kit-pal__dato code { font-family: var(--font-mono); font-size: var(--tx-xs); color: var(--fg-muted); }
.kit-pal__contraste { font-size: var(--tx-xs); color: var(--fg-muted); text-align: right; }
.kit-reglas { list-style: decimal; margin: 0; padding-left: var(--s-6); display: grid; gap: var(--s-3); font-size: var(--tx-base); line-height: 1.7; }
.kit-reglas li::marker { color: var(--accent-ink); font-weight: 700; }
.kit-pngs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.kit-pngs__fila {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-4); background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.kit-pngs__muestra { width: 48px; height: 48px; border-radius: var(--r-xs); }
.kit-pngs__dato b { display: block; font-size: var(--tx-sm); font-weight: 700; }
.kit-pngs__dato code { font-family: var(--font-mono); font-size: var(--tx-xs); color: var(--n-600); }
.kit-pngs__dato small { display: block; margin-top: 3px; font-size: var(--tx-xs); color: var(--fg-muted); line-height: 1.55; }
[data-theme="dark"] .kit-pngs__dato code { color: var(--n-300); }
@media (max-width: 640px) {
  .kit-pal__fila { grid-template-columns: 44px 1fr; }
  .kit-pal__muestra { width: 44px; }
  .kit-pal__contraste { grid-column: 1 / -1; text-align: left; }
  .kit-pngs__fila { grid-template-columns: 48px 1fr; }
  .kit-pngs__fila .kit-card__dl { grid-column: 1 / -1; justify-self: start; }
}
