/* ════════════════════════════════════════════════════════════════
   PreRev · Landing Page
   Sistema de diseño "Azul-Plano" (blueprint / ingeniería)
   Consistente con la app web existente (Trámites Ágiles)
   ════════════════════════════════════════════════════════════════ */

/* ─── 1. Design Tokens ─── */
:root {
  /* Brand Colors (heredados de web/src/app/globals.css) */
  --azul-plano: #12314d;
  --azul-plano-deep: #0b2236;
  --cian-linea: #dcefff;
  --cian-acento: #9cc9e8;
  --papel-manila: #f0ead8;
  --papel-alt: #e5dfcc;
  --sello-verde: #2f5233;
  --sello-verde-bg: #dce8dc;
  --sello-rojo: #8b2635;
  --sello-rojo-bg: #f0dcdc;
  --grafito: #232323;
  --borde-superficie: #c8c2ae;
  --borde-subtle: rgba(35, 35, 35, 0.12);

  /* Semantic roles (estructura pitch-deck §1.2) */
  --bg-base: var(--papel-manila);
  --bg-alt: var(--papel-alt);
  --bg-emphasis: var(--azul-plano);
  --text-on-light: var(--grafito);
  --text-on-dark: var(--cian-linea);
  --text-muted: #5c5748;
  --accent-primary: var(--azul-plano);
  --accent-positive: var(--sello-verde);
  --accent-alert: var(--sello-rojo);

  /* Typography */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* Spacing rhythm (8px scale) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Layout */
  --container-max: 1120px;
  --header-h: 68px;
  --radius: 2px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-med: 250ms;
  --dur-slow: 500ms;
}

/* ─── 2. Reset & Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-on-light);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
  color: inherit;
}

/* ─── 3. Accessibility base ─── */
:focus-visible {
  outline: 2px solid var(--azul-plano);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.slide--emphasis :focus-visible,
.site-header :focus-visible {
  outline-color: var(--cian-linea);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0.5rem;
  z-index: 1000;
  background: var(--azul-plano);
  color: var(--cian-linea);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  transition: top var(--dur-fast) ease;
}

.skip-link:focus {
  top: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ─── 4. Layout containers ─── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-8);
  }
}

/* ─── 5. Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--azul-plano);
  border-bottom: 1px solid rgba(220, 239, 255, 0.14);
  transition: box-shadow var(--dur-med) ease;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(11, 34, 54, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--cian-linea);
}

.brand-mark {
  width: 32px;
  height: 32px;
  color: var(--cian-linea);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}

.main-nav {
  display: none;
}

.main-nav ul {
  display: flex;
  gap: var(--space-6);
}

.main-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(220, 239, 255, 0.72);
  transition: color var(--dur-fast) ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--cian-linea);
}

.header-cta {
  display: none;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(220, 239, 255, 0.25);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--cian-linea);
  transition: transform var(--dur-med) var(--ease-out), opacity var(--dur-med) ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Menú móvil */
.menu-movil {
  background: var(--azul-plano-deep);
  border-bottom: 1px solid rgba(220, 239, 255, 0.14);
  padding: var(--space-4) var(--space-6) var(--space-6);
}

.menu-movil[hidden] {
  display: none;
}

.menu-movil ul {
  display: flex;
  flex-direction: column;
}

.menu-movil a {
  display: block;
  padding: var(--space-3) 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(220, 239, 255, 0.85);
  border-bottom: 1px solid rgba(220, 239, 255, 0.08);
}

.menu-movil a:hover,
.menu-movil a:focus-visible {
  color: var(--cian-linea);
}

@media (min-width: 1024px) {
  .main-nav {
    display: block;
  }
  .header-cta {
    display: inline-flex;
  }
  .nav-toggle {
    display: none;
  }
}

/* ─── 6. Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease,
    border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) ease;
  text-align: center;
}

.btn:active {
  transform: scale(0.98);
}

.btn--sm {
  min-height: 40px;
  padding: 0 var(--space-4);
  font-size: 0.75rem;
}

.btn--primary {
  background: var(--cian-linea);
  color: var(--azul-plano-deep);
  box-shadow: 0 2px 0 rgba(11, 34, 54, 0.2);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(220, 239, 255, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--cian-linea);
  border-color: rgba(220, 239, 255, 0.45);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--cian-linea);
  background: rgba(220, 239, 255, 0.08);
}

/* ─── 7. Sections / slides ─── */
.slide {
  position: relative;
  padding-block: var(--space-16);
  scroll-margin-top: var(--header-h);
}

.slide--alt {
  background: var(--bg-alt);
}

.slide--emphasis {
  background: var(--bg-emphasis);
  color: var(--text-on-dark);
  padding-block: var(--space-24);
}

.bg-grid-engineering {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(220, 239, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220, 239, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center center;
}

.slide--emphasis > .container,
.slide--emphasis > .bg-grid-engineering + .container {
  position: relative;
  z-index: 1;
}

/* ─── 8. Typography helpers ─── */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.kicker--claro {
  color: rgba(220, 239, 255, 0.7);
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
  max-width: 20ch;
}

.slide--emphasis .section-title {
  color: var(--cian-linea);
}

.lead {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--text-on-light);
  margin-bottom: var(--space-8);
  max-width: 46ch;
}

.lead--claro {
  color: var(--cian-linea);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(220, 239, 255, 0.7);
  margin-bottom: var(--space-6);
}

/* ─── 9. Hero ─── */
.hero {
  min-height: min(88vh, 900px);
  display: flex;
  align-items: center;
  padding-block: var(--space-16);
}

.hero-inner {
  text-align: left;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--cian-linea);
  max-width: 26ch;
  margin-bottom: var(--space-6);
}

.metric-accent {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 6px;
  font-weight: 700;
}

.hero-sub {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: rgba(220, 239, 255, 0.9);
  max-width: 42ch;
  margin-bottom: var(--space-12);
}

.hero-metrics {
  display: flex;
  align-items: stretch;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.metric-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.metric {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.metric-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: rgba(220, 239, 255, 0.75);
  max-width: 22ch;
}

.metric-sep {
  width: 1px;
  background: rgba(220, 239, 255, 0.25);
  flex-shrink: 0;
}

.hero-close {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--cian-linea);
  max-width: 42ch;
  margin-bottom: var(--space-12);
}

/* Variante para fondos claros: texto oscuro sobre manila + panel destacado.
   Corrige el caso "texto claro sobre fondo claro" (slides 06, 07, 10, 11). */
.hero-close--claro {
  color: var(--azul-plano);
  background: linear-gradient(
    90deg,
    rgba(18, 49, 77, 0.08),
    rgba(18, 49, 77, 0.02) 70%
  );
  border-left: 4px solid var(--sello-verde);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-4) var(--space-6);
  font-size: 1.375rem;
  max-width: 60ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

@media (max-width: 560px) {
  .hero-metrics {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }
  .metric-sep {
    width: 48px;
    height: 1px;
  }
}

/* ─── 10. Bullets ─── */
.bullets {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  max-width: 60ch;
}

.bullets li {
  position: relative;
  padding-left: var(--space-6);
  font-size: 1rem;
}

.bullets--dot li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  background: var(--azul-plano);
  transform: rotate(45deg);
}

.bullets--check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--sello-verde);
}

.bullets--cross li::before {
  content: "×";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--sello-rojo);
}

/* ─── 11. Quote ─── */
.quote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.375rem, 3vw, 2rem);
  line-height: 1.3;
  color: var(--azul-plano);
  border-left: 4px solid var(--azul-plano);
  padding-left: var(--space-6);
  margin-block: var(--space-8) var(--space-8);
  max-width: 32ch;
}

/* ─── 12. Capturas (placeholders visuales) ─── */
.captura {
  margin-block: var(--space-8);
}

.captura-frame {
  border: 1px solid var(--borde-superficie);
  background: #fbf8ef;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 0 rgba(35, 35, 35, 0.08);
  width: 100%;
  max-width: 640px;
}

.captura-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: var(--azul-plano);
}

.captura-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(220, 239, 255, 0.35);
}

.captura-bar span:first-child {
  background: var(--sello-rojo);
}

.captura-bar span:nth-child(2) {
  background: #b8860b;
}

.captura-bar span:nth-child(3) {
  background: var(--sello-verde);
}

.captura-body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 180px;
}

.captura-body--centrado {
  align-items: center;
  justify-content: center;
}

.captura-line {
  height: 10px;
  background: rgba(35, 35, 35, 0.12);
  border-radius: 2px;
  width: 100%;
}

.captura-line.short {
  width: 40%;
}

.captura-field {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--sello-rojo);
  background: var(--sello-rojo-bg);
}

.checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid var(--sello-rojo);
  background: #fff;
  flex-shrink: 0;
}

.captura-frame--oscuro {
  background: var(--azul-plano);
  border-color: var(--azul-plano);
}

.captura-frame--oscuro .captura-line {
  background: rgba(220, 239, 255, 0.14);
}

.captura-frame--papel {
  background: #ffffff;
}

.sello {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 3px solid var(--sello-verde);
  color: var(--sello-verde);
  padding: var(--space-2) var(--space-4);
  border-radius: 50%;
  transform: rotate(-7deg);
}

.score {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  color: var(--cian-linea);
}

.cert-linea {
  width: 220px;
  height: 8px;
  background: rgba(35, 35, 35, 0.12);
  border-radius: 2px;
}

.cert-linea.ancha {
  width: 220px;
  height: 14px;
  background: rgba(35, 35, 35, 0.25);
}

.cert-linea.corta {
  width: 120px;
}

.qr-placeholder {
  width: 72px;
  height: 72px;
  margin-top: var(--space-4);
  background-image:
    linear-gradient(45deg, transparent 42%, #232323 42%, #232323 58%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, #232323 42%, #232323 58%, transparent 58%),
    linear-gradient(#232323 0 0);
  background-size: 16px 16px, 16px 16px, 4px 4px;
  background-position: center;
  border: 1px solid rgba(35, 35, 35, 0.2);
}

.trazado {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.trazado-etiqueta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(220, 239, 255, 0.75);
  width: 110px;
  flex-shrink: 0;
}

.captura figcaption {
  margin-top: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 640px;
}

.demo-grid {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 900px) {
  .demo-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

/* ─── 13. Tablas ─── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--borde-superficie);
  border-radius: var(--radius);
  background: #fbf8ef;
  box-shadow: 0 2px 0 rgba(35, 35, 35, 0.06);
  margin-block: var(--space-8);
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 480px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--borde-subtle);
  vertical-align: top;
}

.data-table thead th {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--azul-plano);
  color: var(--cian-linea);
}

.data-table tbody th {
  font-weight: 600;
  color: var(--azul-plano);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .num {
  text-align: right;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.data-table tr.total th,
.data-table tr.total td {
  font-weight: 700;
  border-top: 3px solid var(--azul-plano);
  border-bottom: 3px solid var(--azul-plano);
  background: rgba(18, 49, 77, 0.05);
}

.estado {
  font-family: var(--font-mono);
  font-weight: 700;
  text-align: center;
  font-size: 1rem;
}

.estado--si {
  color: var(--sello-verde);
}

.estado--no {
  color: var(--sello-rojo);
}

/* Reflow a tarjetas en móvil (slide 03) */
@media (max-width: 640px) {
  .data-table.audiencias thead {
    display: none;
  }

  .data-table.audiencias,
  .data-table.audiencias tbody,
  .data-table.audiencias tr,
  .data-table.audiencias th,
  .data-table.audiencias td {
    display: block;
    width: 100%;
  }

  .data-table.audiencias tbody tr {
    border: 1px solid var(--borde-superficie);
    border-radius: var(--radius);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    background: #fbf8ef;
  }

  .data-table.audiencias tbody tr:last-child {
    margin-bottom: 0;
  }

  .data-table.audiencias tbody th {
    font-size: 1.125rem;
    font-family: var(--font-display);
    color: var(--azul-plano);
    margin-bottom: var(--space-3);
    border-bottom: 2px solid var(--azul-plano);
    padding: 0 0 var(--space-2);
  }

  .data-table.audiencias td {
    border: none;
    padding: var(--space-2) 0;
  }

  .data-table.audiencias td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 2px;
  }
}

/* ─── 14. Pasos (cómo funciona, slide 04) ─── */
.pasos {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-block: var(--space-8);
}

.paso {
  background: #fbf8ef;
  border: 1px solid var(--borde-superficie);
  border-radius: var(--radius);
  padding: var(--space-6);
  flex: 1;
  position: relative;
}

.paso-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--cian-linea);
  background: var(--azul-plano);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

.paso h3 {
  font-size: 1.375rem;
  margin-bottom: var(--space-2);
}

.paso p {
  color: var(--text-muted);
}

/* Conector CSS (sin caracteres → en el DOM) */
.paso-connector {
  position: relative;
  height: 40px;
  width: 2px;
  margin-inline: auto;
  flex-shrink: 0;
  background: repeating-linear-gradient(
    to bottom,
    var(--azul-plano) 0 8px,
    transparent 8px 16px
  );
  opacity: 0.4;
}

.paso-connector::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--azul-plano);
  opacity: 0.5;
}

@media (min-width: 900px) {
  .pasos {
    flex-direction: row;
    align-items: stretch;
  }

  .paso-connector {
    width: 48px;
    height: 2px;
    margin-block: var(--space-16) 0;
    background: repeating-linear-gradient(
      to right,
      var(--azul-plano) 0 10px,
      transparent 10px 20px
    );
  }

  .paso-connector::after {
    top: 50%;
    bottom: auto;
    left: auto;
    right: 0;
    transform: translateY(-50%);
    border-left: 8px solid var(--azul-plano);
    border-right: none;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
  }
}

/* ─── 15. Cadena (trazabilidad, slide 06) ─── */
.cadena {
  display: grid;
  gap: var(--space-4);
  margin-block: var(--space-8);
}

.eslabon {
  background: #fbf8ef;
  border: 1px solid var(--borde-superficie);
  border-left: 4px solid var(--azul-plano);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.eslabon h3 {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.eslabon p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--azul-plano);
}

@media (min-width: 900px) {
  .cadena {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── 16. Dos columnas (slide 07) ─── */
.dos-columnas {
  display: grid;
  gap: var(--space-8);
  margin-block: var(--space-8);
}

.columna {
  background: #fbf8ef;
  border: 1px solid var(--borde-superficie);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.columna h3 {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--azul-plano);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--azul-plano);
}

.columna .bullets {
  margin-bottom: 0;
}

@media (min-width: 900px) {
  .dos-columnas {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── 17. Razones (slide 08, fondo oscuro) ─── */
.razones {
  display: grid;
  gap: var(--space-4);
  margin-block: var(--space-8);
}

.razon {
  background: rgba(220, 239, 255, 0.05);
  border: 1px solid rgba(220, 239, 255, 0.16);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.razon-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--azul-plano-deep);
  background: var(--cian-linea);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

.razon h3 {
  font-size: 1.25rem;
  color: var(--cian-linea);
  margin-bottom: var(--space-2);
}

.razon p {
  color: rgba(220, 239, 255, 0.82);
}

@media (min-width: 900px) {
  .razones {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

/* ─── 18. Metric row (slide 09) ─── */
.metric-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  margin-block: var(--space-8);
}

.metric-row .metric {
  color: var(--azul-plano);
}

.metric-row .metric-label {
  color: var(--text-muted);
}

.metric-row .metric-sep {
  background: var(--borde-superficie);
}

@media (min-width: 768px) {
  .metric-row {
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    gap: var(--space-8);
  }
}

/* ─── 19. Escalera regional (slide 10) ─── */
.escalera {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-block: var(--space-8);
}

.peldaño {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  background: #fbf8ef;
  border: 1px solid var(--borde-superficie);
  border-radius: var(--radius);
  padding: var(--space-6);
  border-left: 4px solid var(--azul-plano);
  min-height: 140px;
  justify-content: flex-start;
}

.peldaño-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.14em;
}

.peldaño h3 {
  font-size: 1.375rem;
  color: var(--azul-plano);
}

.peldaño p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.escalera-note {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--sello-verde);
  margin-bottom: var(--space-8);
}

@media (min-width: 900px) {
  .escalera {
    grid-template-columns: repeat(4, 1fr);
    align-items: end;
    gap: var(--space-4);
  }

  .peldaño {
    justify-content: flex-end;
    border-left: none;
    border-bottom: 4px solid var(--azul-plano);
  }

  .peldaño--1 { min-height: 140px; }
  .peldaño--2 { min-height: 190px; }
  .peldaño--3 { min-height: 240px; }
  .peldaño--4 { min-height: 290px; }
}

/* ─── 20. Hitos (slide 11) ─── */
.hitos {
  display: grid;
  gap: var(--space-4);
  margin-block: var(--space-8);
}

.hito {
  background: #fbf8ef;
  border: 1px solid var(--borde-superficie);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.hito-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--cian-linea);
  background: var(--azul-plano);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}

.hito h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

.hito p {
  color: var(--text-muted);
}

@media (min-width: 900px) {
  .hitos {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ─── 21. Métricas clave (slide 11) ─── */
.metricas-clave {
  display: grid;
  gap: var(--space-4);
  margin-block: var(--space-8);
}

.metrica-clave {
  background: var(--azul-plano);
  color: var(--cian-linea);
  border-radius: var(--radius);
  padding: var(--space-6);
}

.metrica-clave h3 {
  font-size: 1.125rem;
  color: var(--cian-linea);
  margin-bottom: var(--space-2);
}

.metrica-clave p {
  color: rgba(220, 239, 255, 0.8);
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .metricas-clave {
    grid-template-columns: 1fr 1fr;
  }
}

/* ─── 22. Aviso de alcance (slide 05) ─── */
.aviso {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  border: 2px solid var(--azul-plano);
  border-left-width: 6px;
  border-radius: var(--radius);
  background: rgba(18, 49, 77, 0.05);
  padding: var(--space-4) var(--space-6);
  margin-block: var(--space-8);
  max-width: 640px;
}

.aviso-marca {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  color: var(--cian-linea);
  background: var(--azul-plano);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
}

.aviso p {
  color: var(--azul-plano);
  font-size: 0.9375rem;
}

/* ─── 23. Apéndice ─── */
.apendice-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-block: var(--space-8);
}

.apendice-item {
  background: #fbf8ef;
  border: 1px solid var(--borde-superficie);
  border-radius: var(--radius);
  overflow: hidden;
}

.apendice-item summary {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--azul-plano);
  min-height: 48px;
  transition: background-color var(--dur-fast) ease;
  list-style: none;
}

.apendice-item summary::-webkit-details-marker {
  display: none;
}

.apendice-item summary::after {
  content: "";
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--azul-plano);
  border-bottom: 2px solid var(--azul-plano);
  transform: rotate(45deg);
  transition: transform var(--dur-med) var(--ease-out);
  flex-shrink: 0;
}

.apendice-item[open] summary::after {
  transform: rotate(225deg);
}

.apendice-item summary:hover,
.apendice-item summary:focus-visible {
  background: rgba(18, 49, 77, 0.05);
}

.apendice-id {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--cian-linea);
  background: var(--azul-plano);
  border-radius: var(--radius);
  padding: var(--space-1) var(--space-2);
  flex-shrink: 0;
}

.apendice-content {
  padding: 0 var(--space-6) var(--space-6);
  border-top: 1px solid var(--borde-subtle);
}

.apendice-content h3 {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-block: var(--space-6) var(--space-3);
}

.apendice-content h3:first-child {
  margin-top: var(--space-6);
}

.apendice-content .table-wrap {
  margin-block: var(--space-4);
}

.apendice-content .bullets {
  margin-block: var(--space-4);
}

.apendice-content .notes {
  margin-top: var(--space-4);
}

.apendice-nota {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--azul-plano);
  margin-block: var(--space-4);
  max-width: 60ch;
}

/* ─── 24. Equipo ─── */
/* 5 miembros: fila de 3 arriba + fila de 2 centrada debajo (flex wrap) */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-4);
  margin-block: var(--space-8);
}

.team-card {
  background: #fbf8ef;
  border: 1px solid var(--borde-superficie);
  border-radius: var(--radius);
  padding: var(--space-6);
  text-align: center;
  flex: 0 1 100%;
  max-width: 360px;
}

.team-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  border: 2px dashed var(--azul-plano);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--azul-plano);
  background: rgba(18, 49, 77, 0.05);
}

.team-card h3 {
  font-size: 1.125rem;
  color: var(--azul-plano);
  margin-bottom: var(--space-1);
}

.team-rol {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sello-verde);
  margin-bottom: var(--space-3);
}

.team-text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 34ch;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .team-card {
    flex-basis: calc((100% - 2 * var(--space-4)) / 3);
    max-width: calc((100% - 2 * var(--space-4)) / 3);
  }
}

/* ─── 25. Notas al pie ─── */
.notes {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: var(--space-4);
  max-width: 64ch;
}

.notes code {
  font-family: var(--font-mono);
  background: rgba(35, 35, 35, 0.08);
  padding: 0 0.25em;
  border-radius: 2px;
}

.slide--emphasis .notes {
  color: rgba(220, 239, 255, 0.6);
}

/* ─── 26. Footer ─── */
.site-footer {
  background: var(--azul-plano-deep);
  color: rgba(220, 239, 255, 0.7);
  padding-block: var(--space-12);
}

.footer-inner {
  display: grid;
  gap: var(--space-8);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
}

.footer-brand .brand-mark,
.footer-brand .brand-name {
  color: var(--cian-linea);
}

.footer-brand p {
  font-size: 0.9375rem;
  max-width: 40ch;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
}

.footer-nav a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(220, 239, 255, 0.65);
  transition: color var(--dur-fast) ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--cian-linea);
}

.footer-legal {
  border-top: 1px solid rgba(220, 239, 255, 0.12);
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(220, 239, 255, 0.5);
}

@media (min-width: 900px) {
  .footer-inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
  .footer-legal {
    grid-column: 1 / -1;
  }
}

/* ─── 27. Reveal on scroll ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger para grupos */
.reveal-group > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.reveal-group.is-visible > * {
  opacity: 1;
  transform: none;
}

/* ─── 28. Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-group > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

