/* ═══════════════════════════════════════════════════════════════
   Constancia — Estilos principales
   Paleta "Sello y tinta". Todos los colores y medidas viven en
   :root y [data-theme="dark"]. Para retematizar el sitio completo
   se editan SOLO esos dos bloques.
   ═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────
   1. TOKENS — TEMA CLARO
───────────────────────────────────── */
:root {
  /* Marca */
  --tinta:          #0E1B2B;   /* tinta: titulos, navbar oscuro */
  --tinta-deep:     #060E18;   /* hero, pie */
  --tinta-soft:     #1A2C42;
  --jade:           #107A63;   /* sello: acento principal */
  --jade-bright:    #19B892;   /* brillos y acentos sobre oscuro */
  --jade-deep:      #0B5A49;

  /* Fondos */
  --papel:          #FBF8F3;   /* papel calido */
  --papel-alt:      #F3EEE6;
  --card:           #FFFFFF;
  --dark:           #0E1B2B;
  --dark-alt:       #16273A;

  /* Texto */
  --text:           #0E1B2B;
  --text-2:         #4A5566;
  --text-3:         #78838F;
  --on-dark:        #EDEAE3;
  --on-dark-2:      #A3B0BD;

  /* Acento operable (botones, ligas) */
  --accent:         #107A63;
  --accent-hover:   #0B5A49;
  --accent-on:      #FFFFFF;
  --accent-soft:    rgba(16, 122, 99, 0.10);
  --accent-glow:    rgba(16, 122, 99, 0.18);

  /* Semaforo — es el lenguaje del producto, no decoracion */
  --ok:             #10916E;
  --ok-bg:          rgba(16, 145, 110, 0.10);
  --warn:           #C8871B;
  --warn-bg:        rgba(200, 135, 27, 0.12);
  --bad:            #B3261E;
  --bad-bg:         rgba(179, 38, 30, 0.10);

  /* Bordes */
  --border:         rgba(14, 27, 43, 0.10);
  --border-2:       rgba(14, 27, 43, 0.18);

  /* Sombras (templadas hacia el papel, no grises) */
  --sh-sm:          0 1px 2px rgba(30, 22, 12, 0.05), 0 2px 8px rgba(30, 22, 12, 0.04);
  --sh-md:          0 4px 12px rgba(30, 22, 12, 0.06), 0 12px 32px rgba(30, 22, 12, 0.06);
  --sh-lg:          0 8px 24px rgba(30, 22, 12, 0.08), 0 24px 56px rgba(30, 22, 12, 0.10);
  --sh-hover:       0 12px 32px rgba(30, 22, 12, 0.10), 0 28px 64px rgba(30, 22, 12, 0.12);

  /* Navbar */
  --nav-bg:         rgba(251, 248, 243, 0.86);
  --nav-bg-solid:   rgba(251, 248, 243, 0.97);
  --nav-border:     rgba(14, 27, 43, 0.08);

  /* Gradientes */
  --grad-dark:      linear-gradient(155deg, #060E18 0%, #0E1B2B 52%, #123A32 132%);
  --grad-jade:      linear-gradient(135deg, #107A63 0%, #19B892 100%);

  /* Tipografia */
  --font:           'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif:     'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono:      'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Espaciado */
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  1.5rem;
  --sp-lg:  2.5rem;
  --sp-xl:  4rem;
  --sp-2xl: 6rem;

  /* Radios */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   20px;
  --r-xl:   30px;
  --r-full: 9999px;

  --ease:      0.24s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);

  --maxw: 1180px;
  --nav-h: 72px;
}

/* ─────────────────────────────────────
   2. TOKENS — TEMA OSCURO
───────────────────────────────────── */
[data-theme="dark"] {
  --papel:          #0B141F;
  --papel-alt:      #101C29;
  --card:           #14202E;
  --dark:           #060E18;
  --dark-alt:       #0E1B2B;

  --text:           #EDEAE3;
  --text-2:         #A3B0BD;
  --text-3:         #78838F;

  --accent:         #19B892;
  --accent-hover:   #35D3AC;
  --accent-on:      #04241C;
  --accent-soft:    rgba(25, 184, 146, 0.12);
  --accent-glow:    rgba(25, 184, 146, 0.20);

  --ok:             #2BC796;
  --ok-bg:          rgba(43, 199, 150, 0.12);
  --warn:           #E0A340;
  --warn-bg:        rgba(224, 163, 64, 0.14);
  --bad:            #E5675F;
  --bad-bg:         rgba(229, 103, 95, 0.12);

  --border:         rgba(237, 234, 227, 0.10);
  --border-2:       rgba(237, 234, 227, 0.20);

  --sh-sm:          0 1px 2px rgba(0, 0, 0, 0.30), 0 2px 8px rgba(0, 0, 0, 0.24);
  --sh-md:          0 4px 12px rgba(0, 0, 0, 0.36), 0 12px 32px rgba(0, 0, 0, 0.30);
  --sh-lg:          0 8px 24px rgba(0, 0, 0, 0.44), 0 24px 56px rgba(0, 0, 0, 0.38);
  --sh-hover:       0 12px 32px rgba(0, 0, 0, 0.48), 0 28px 64px rgba(25, 184, 146, 0.10);

  --nav-bg:         rgba(11, 20, 31, 0.86);
  --nav-bg-solid:   rgba(11, 20, 31, 0.97);
  --nav-border:     rgba(237, 234, 227, 0.09);

  --grad-dark:      linear-gradient(155deg, #040A12 0%, #0B141F 52%, #0C2A24 132%);
}

/* ─────────────────────────────────────
   3. RESET Y BASE
───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* El [hidden] del navegador pierde contra cualquier regla de display propia
   (.btn usa inline-flex, por ejemplo). Sin esto, ocultar algo desde JS con
   el atributo hidden no funciona y el defecto es dificil de ver. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--ease), color var(--ease);
}

h1, h2, h3, h4, h5 {
  margin: 0 0 var(--sp-sm);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: var(--text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: clamp(1.12rem, 1.7vw, 1.32rem); letter-spacing: -0.014em; }
h4 { font-size: 1rem; letter-spacing: -0.01em; }

p { margin: 0 0 var(--sp-sm); color: var(--text-2); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--accent-hover); }

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

ul, ol { margin: 0 0 var(--sp-sm); padding-left: 1.15rem; color: var(--text-2); }
li { margin-bottom: 0.35rem; }

strong, b { font-weight: 700; color: var(--text); }
em { font-style: italic; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-lg) 0; }

::selection { background: var(--accent); color: var(--accent-on); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 0.85rem 1.4rem;
  background: var(--accent);
  color: var(--accent-on);
  font-weight: 700;
  border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; color: var(--accent-on); }

.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;
}

/* La palabra de marca: Fraunces italica. Se usa SOLO para "constancia". */
.fr {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.005em;
  /* la italica trae mucho costado derecho; sin esto el punto final flota */
  margin-right: -0.06em;
}

/* Sobre fondo oscuro, <strong> no puede heredar el color de texto claro. */
.hero strong, .hero-mod strong, .spotlight strong, .section-dark strong,
.cta-band strong, .footer strong {
  color: #FFFFFF;
}
.spotlight.is-light strong { color: var(--text); }

.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ─────────────────────────────────────
   4. LAYOUT
───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 4vw, 2rem);
}
.container.narrow { max-width: 820px; }

.section { padding: clamp(3.5rem, 8vw, var(--sp-2xl)) 0; }
.section-alt { background: var(--papel-alt); }
.section-dark {
  background: var(--grad-dark);
  color: var(--on-dark);
}
.section-dark h2, .section-dark h3, .section-dark strong { color: var(--on-dark); }
.section-dark p { color: var(--on-dark-2); }

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(2rem, 4vw, 3.2rem);
  text-align: center;
}
.section-head.left { margin-left: 0; text-align: left; }

.kicker {
  display: inline-block;
  margin-bottom: 0.85rem;
  font-size: 0.775rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-dark .kicker { color: var(--jade-bright); }

.section-title { margin-bottom: 0.9rem; }

.section-desc {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--text-2);
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}
.section-head.left .section-desc { margin-left: 0; }

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* ─────────────────────────────────────
   5. BOTONES
───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.55rem;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease),
              border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-on);
  box-shadow: 0 6px 18px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-on);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* Sobre fondo oscuro el boton fantasma no puede heredar --text: se vuelve
   invisible. Toda seccion oscura NUEVA tiene que sumarse a esta lista. */
.on-dark .btn-ghost, .section-dark .btn-ghost, .hero .btn-ghost,
.hero-mod .btn-ghost, .cta-band .btn-ghost, .spotlight:not(.is-light) .btn-ghost {
  color: var(--on-dark);
  border-color: rgba(237, 234, 227, 0.28);
}
.on-dark .btn-ghost:hover, .section-dark .btn-ghost:hover, .hero .btn-ghost:hover,
.hero-mod .btn-ghost:hover, .cta-band .btn-ghost:hover, .spotlight:not(.is-light) .btn-ghost:hover {
  color: #fff;
  border-color: var(--jade-bright);
  background: rgba(25, 184, 146, 0.14);
}

.btn-sm { padding: 0.6rem 1.15rem; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

/* ─────────────────────────────────────
   6. NAVBAR
───────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.nav.scrolled {
  background: var(--nav-bg-solid);
  border-bottom-color: var(--nav-border);
  box-shadow: var(--sh-sm);
}

.nav-inner {
  position: relative;   /* ancla del mega-menu: ver .mega */
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 4vw, 2rem);
}

/* Logotipo = sello (SVG) + palabra */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  white-space: nowrap;
  color: var(--text);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.03em;
}
.logo:hover { color: var(--text); }
.logo .logo-mark { width: 34px; height: 34px; flex: none; }
.logo-word { display: inline-block; }

/* El sello va incrustado como SVG en cada pagina para poder tematizarlo. */
.logo-mark .lm-tile { fill: var(--tinta); }
.logo-mark .lm-off  { fill: #FFFFFF; opacity: 0.15; }
.logo-mark .lm-on   { fill: var(--jade-bright); }
[data-theme="dark"] .logo-mark .lm-tile { fill: #1D2F42; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-links a, .nav-links button {
  padding: 0.5rem 0.7rem;
  white-space: nowrap;
  border: 0;
  background: none;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.925rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--ease), background var(--ease);
}
.nav-links a:hover, .nav-links button:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Se muestra solo cuando el menu se vuelve desplegable (ver responsivo). */
.nav-only-mobile { display: none; }

.nav-login {
  padding: 0.5rem 0.8rem;
  white-space: nowrap;
  border-radius: var(--r-full);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 700;
  transition: color var(--ease), background var(--ease);
}
.nav-login:hover { color: var(--text); background: var(--accent-soft); }

/* Interruptor de tema */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun  { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* Hamburguesa */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 17px; height: 2px;
  margin: 3px auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ─────────────────────────────────────
   7. MEGA MENU
───────────────────────────────────── */
.mega-wrap { position: static; }
.mega-btn::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--ease);
}
.mega-btn[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }

.mega {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  z-index: 90;
  width: min(92vw, 800px);
  padding: 1.25rem;
  transform: translateY(-8px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
}
.mega[data-open="true"] { opacity: 1; visibility: visible; transform: translateY(0); }

.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem 1.5rem; }
.mega-col h4 {
  margin-bottom: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mega-col a {
  display: block;
  padding: 0.42rem 0.6rem;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color var(--ease), background var(--ease);
}
.mega-col a:hover { color: var(--accent); background: var(--accent-soft); }
.mega-col a b { display: block; color: inherit; font-weight: 700; }
.mega-col a span { display: block; font-size: 0.78rem; font-weight: 500; color: var(--text-3); }

.mega-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-3);
}

/* ─────────────────────────────────────
   8. HERO
───────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(92vh, 860px);
  padding: calc(var(--nav-h) + clamp(3rem, 7vw, 5.5rem)) 0 clamp(3rem, 7vw, 5rem);
  background: var(--grad-dark);
  color: var(--on-dark);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 96px;
  background: linear-gradient(to bottom, transparent, var(--papel));
  pointer-events: none;
}

/* La malla de constancia: meses x obligaciones que se van cumpliendo */
.hero-malla {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0.6;
  pointer-events: none;
  /* se desvanece del lado del texto para no competir con la lectura */
  -webkit-mask-image: linear-gradient(100deg, transparent 12%, rgba(0,0,0,.35) 42%, #000 78%);
          mask-image: linear-gradient(100deg, transparent 12%, rgba(0,0,0,.35) 42%, #000 78%);
}

.hero-inner { position: relative; z-index: 2; }

.hero h1, .hero h2, .hero h3 { color: #fff; }
.hero p { color: var(--on-dark-2); }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
  padding: 0.4rem 0.95rem 0.4rem 0.45rem;
  background: rgba(237, 234, 227, 0.07);
  border: 1px solid rgba(237, 234, 227, 0.14);
  border-radius: var(--r-full);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--on-dark-2);
}
.hero-eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--jade-bright);
  box-shadow: 0 0 0 4px rgba(25, 184, 146, 0.18);
}

.hero-title { max-width: 17ch; margin-bottom: 1.25rem; }
.hero-title .fr { color: var(--jade-bright); }

.hero-sub {
  max-width: 56ch;
  margin-bottom: 1.9rem;
  font-size: clamp(1.03rem, 1.9vw, 1.22rem);
  line-height: 1.6;
}

.pill-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.pill {
  padding: 0.35rem 0.85rem;
  background: rgba(237, 234, 227, 0.07);
  border: 1px solid rgba(237, 234, 227, 0.13);
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--on-dark-2);
}

.hero-cta { margin-bottom: 2.8rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  max-width: 640px;
  margin: 0;
  padding-top: 1.9rem;
  border-top: 1px solid rgba(237, 234, 227, 0.13);
}
.hero-stats .stat { margin: 0; }
.stat-number {
  margin: 0;
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--jade-bright);
}
.stat-label {
  margin-top: 0.28rem;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--on-dark-2);
}

/* ─────────────────────────────────────
   9. TARJETAS
───────────────────────────────────── */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.3rem, 2.4vw, 1.7rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
a.card { color: inherit; }
a.card:hover, .card.is-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 122, 99, 0.3);
  box-shadow: var(--sh-hover);
}

.card-tag {
  position: absolute;
  top: 1rem; right: 1rem;
  padding: 0.22rem 0.6rem;
  background: var(--accent-soft);
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.icon-badge {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 1rem;
  background: var(--accent-soft);
  border-radius: var(--r-md);
  color: var(--accent);
}
.icon-badge svg { width: 22px; height: 22px; }

/* Retícula de módulos */
.modules-grid { grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }
.module-card .module-fam {
  margin-bottom: 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.module-card h3 { margin-bottom: 0.5rem; }
.module-card > p { font-size: 0.925rem; }
.module-list {
  margin: 0.9rem 0 1.1rem;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-2);
}
.module-list li {
  position: relative;
  margin-bottom: 0.4rem;
  padding-left: 1.35rem;
  line-height: 1.5;
}
.module-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.42em;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0.85;
}
.module-more {
  margin-top: auto;
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--accent);
}
.module-more::after { content: " →"; transition: none; }
a.card:hover .module-more::after { content: " →"; }

/* Filtro de familias */
.fam-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}
.fam-btn {
  padding: 0.5rem 1.05rem;
  border: 1px solid var(--border-2);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--text-2);
  font-family: inherit;
  font-size: 0.865rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
}
.fam-btn:hover { color: var(--accent); border-color: var(--accent); }
.fam-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-on);
}

/* ─────────────────────────────────────
   10. BLOQUE DE DICCIONARIO (elemento de marca)
───────────────────────────────────── */
.dfn {
  padding: clamp(1.5rem, 3vw, 2.1rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  box-shadow: var(--sh-md);
}
.dfn-word {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.dfn-word b {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  letter-spacing: -0.01em;
  color: var(--text);
}
.dfn-word i {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-3);
}
.dfn ol {
  margin: 0;
  padding-left: 1.3rem;
  font-size: clamp(0.96rem, 1.6vw, 1.06rem);
  line-height: 1.6;
}
.dfn ol li { margin-bottom: 0.6rem; }
.dfn-note {
  margin: 1.1rem 0 0;
  padding-top: 0.95rem;
  border-top: 1px dashed var(--border-2);
  font-weight: 700;
  color: var(--accent);
}

/* ─────────────────────────────────────
   11. PANELES Y LISTAS DE VERIFICACION
───────────────────────────────────── */
.panel {
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}
.panel h3 { margin-bottom: 1.1rem; }

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li {
  position: relative;
  margin-bottom: 0.85rem;
  padding-left: 1.9rem;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--text-2);
}
.check-list li:last-child { margin-bottom: 0; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.18em;
  width: 1.25rem; height: 1.25rem;
  background: var(--ok-bg);
  border-radius: 50%;
}
.check-list li::after {
  content: "";
  position: absolute;
  left: 0.4rem; top: 0.42em;
  width: 0.32rem; height: 0.6rem;
  border-right: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(42deg);
}

/* Insignias de semáforo */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--r-full);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok   { background: var(--ok-bg);   color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad  { background: var(--bad-bg);  color: var(--bad); }

/* ─────────────────────────────────────
   12. SPOTLIGHT (módulo destacado)
───────────────────────────────────── */
.spotlight {
  padding: clamp(3.5rem, 8vw, var(--sp-2xl)) 0;
  background: var(--grad-dark);
  color: var(--on-dark);
}
.spotlight.is-light {
  background: var(--papel-alt);
  color: var(--text);
}
.spotlight h2, .spotlight h3 { color: var(--on-dark); }
.spotlight p { color: var(--on-dark-2); }
.spotlight.is-light h2, .spotlight.is-light h3 { color: var(--text); }
.spotlight.is-light p { color: var(--text-2); }

.spot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow-tag {
  display: inline-block;
  margin-bottom: 0.9rem;
  padding: 0.3rem 0.8rem;
  background: rgba(25, 184, 146, 0.14);
  border: 1px solid rgba(25, 184, 146, 0.3);
  border-radius: var(--r-full);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--jade-bright);
}
.spotlight.is-light .eyebrow-tag {
  background: var(--accent-soft);
  border-color: rgba(16, 122, 99, 0.3);
  color: var(--accent);
}

.spot-list { margin: 1.4rem 0 1.8rem; padding: 0; list-style: none; }
.spot-list li {
  position: relative;
  margin-bottom: 0.95rem;
  padding-left: 1.6rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--on-dark-2);
}
.spotlight.is-light .spot-list li { color: var(--text-2); }
.spot-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 8px; height: 8px;
  background: var(--jade-bright);
  border-radius: 2px;
}
.spotlight.is-light .spot-list li::before { background: var(--accent); }
.spot-list li b { color: #fff; }
.spotlight.is-light .spot-list li b { color: var(--text); }

/* Maqueta de pantalla dentro del spotlight */
.mock {
  padding: 1.15rem;
  background: rgba(237, 234, 227, 0.05);
  border: 1px solid rgba(237, 234, 227, 0.14);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
}
.spotlight.is-light .mock {
  background: var(--card);
  border-color: var(--border);
}
.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid rgba(237, 234, 227, 0.12);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-dark-2);
}
.spotlight.is-light .mock-head { border-bottom-color: var(--border); color: var(--text-3); }

.mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed rgba(237, 234, 227, 0.1);
  font-size: 0.86rem;
}
.spotlight.is-light .mock-row { border-bottom-color: var(--border); }
.mock-row:last-child { border-bottom: 0; }
.mock-row b { display: block; color: #fff; font-weight: 600; }
.spotlight.is-light .mock-row b { color: var(--text); }
.mock-row span { font-size: 0.78rem; color: var(--on-dark-2); }
.spotlight.is-light .mock-row span { color: var(--text-3); }

/* ─────────────────────────────────────
   13. PERFILES, PORTALES, AUTOMATIZACIONES
───────────────────────────────────── */
.audience-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.audience { padding: clamp(1.3rem, 2.4vw, 1.7rem); }
.audience h3 { margin-bottom: 0.5rem; }
.audience p { font-size: 0.91rem; margin-bottom: 1rem; }
.audience-mods { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: auto; }
.audience-mods a {
  padding: 0.25rem 0.65rem;
  background: var(--papel-alt);
  border-radius: var(--r-full);
  font-size: 0.755rem;
  font-weight: 600;
  color: var(--text-2);
  transition: all var(--ease);
}
.audience-mods a:hover { background: var(--accent-soft); color: var(--accent); }

.portal-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.portal-top { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.portal-dot {
  width: 10px; height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.portal-top h3 { margin: 0; font-size: 1.04rem; }
.portal p { font-size: 0.9rem; margin-bottom: 0.9rem; }
.portal-who {
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--text-3);
}
.portal-who b { color: var(--text-2); font-weight: 700; }

.auto-grid { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.auto {
  padding: clamp(1.2rem, 2.2vw, 1.5rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.auto h3 { font-size: 1.02rem; margin-bottom: 0.45rem; }
.auto p { font-size: 0.9rem; margin: 0; }

/* ─────────────────────────────────────
   14. MAPA NORMATIVA → MODULO
───────────────────────────────────── */
.norm-map {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--sh-sm);
}
.norm-row {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--border);
}
.norm-row:last-child { border-bottom: 0; }
.norm-row b { font-size: 0.95rem; font-weight: 700; }
.norm-row span { font-size: 0.89rem; color: var(--text-2); }
.norm-row a {
  padding: 0.35rem 0.9rem;
  background: var(--accent-soft);
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.norm-row a:hover { background: var(--accent); color: var(--accent-on); }

.disclaimer {
  max-width: 78ch;
  margin: clamp(1.6rem, 3vw, 2.2rem) auto 0;
  font-size: 0.855rem;
  line-height: 1.6;
  color: var(--text-3);
  text-align: center;
}

/* ─────────────────────────────────────
   15. ORIGEN DE LOS DATOS (sin ERP)
───────────────────────────────────── */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}
.flow-col h3 {
  margin-bottom: 0.9rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.flow-items { display: grid; gap: 0.55rem; }
.flow-item {
  padding: 0.7rem 0.9rem;
  background: var(--papel-alt);
  border-radius: var(--r-sm);
  font-size: 0.83rem;
  color: var(--text-3);
}
.flow-item b { display: block; font-size: 0.92rem; color: var(--text); }
.flow-arrow {
  display: grid;
  place-items: center;
  padding: 0.7rem 1.05rem;
  background: var(--grad-jade);
  border-radius: var(--r-full);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 8px 22px var(--accent-glow);
}

/* ─────────────────────────────────────
   16. PASOS
───────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  margin: 0;
  padding: clamp(1.2rem, 2.2vw, 1.6rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.step-num {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-bottom: 0.9rem;
  background: var(--accent);
  border-radius: var(--r-full);
  color: var(--accent-on);
  font-size: 0.9rem;
  font-weight: 800;
}
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.9rem; margin: 0; }

/* ─────────────────────────────────────
   17. FAQ
───────────────────────────────────── */
.faq-list { display: grid; gap: 0.7rem; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.faq-item[open] { border-color: rgba(16, 122, 99, 0.28); box-shadow: var(--sh-sm); }
.faq-item summary {
  position: relative;
  padding: 1.05rem 3rem 1.05rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: color var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 1.3rem; top: 1.45rem;
  width: 9px; height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform var(--ease);
}
.faq-item[open] summary::after { transform: rotate(-135deg); top: 1.6rem; }
.faq-body { padding: 0 1.25rem 1.25rem; }
.faq-body p { font-size: 0.94rem; margin-bottom: 0.7rem; }

/* ─────────────────────────────────────
   18. CONTACTO / FORMULARIO
───────────────────────────────────── */
.section-contact { background: var(--papel-alt); }
.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.contact-points { margin: 1.5rem 0 0; padding: 0; list-style: none; }
.contact-points li {
  position: relative;
  margin-bottom: 0.8rem;
  padding-left: 1.7rem;
  font-size: 0.93rem;
  color: var(--text-2);
}
.contact-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
}
.contact-meta {
  display: grid;
  gap: 0.45rem;
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-2);
  font-size: 0.92rem;
}
.contact-meta a { font-weight: 600; }

.form {
  padding: clamp(1.4rem, 3vw, 2.1rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  margin-bottom: 0.38rem;
  font-size: 0.845rem;
  font-weight: 700;
  color: var(--text);
}
.field .req { color: var(--bad); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  background: var(--papel);
  color: var(--text);
  font-family: inherit;
  font-size: 0.94rem;
  transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
.field textarea { min-height: 118px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }

.form-hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.form-legal {
  margin: 0.9rem 0 1.1rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-3);
}

.form-notice {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 600;
}
.form-notice.ok  { background: var(--ok-bg);  color: var(--ok); }
.form-notice.bad { background: var(--bad-bg); color: var(--bad); }

/* ─────────────────────────────────────
   19. PIE DE PAGINA
───────────────────────────────────── */
.footer {
  padding: clamp(3rem, 6vw, 4.5rem) 0 2rem;
  background: var(--grad-dark);
  color: var(--on-dark-2);
  font-size: 0.9rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.25fr 2.5fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(237, 234, 227, 0.12);
}
.footer-brand .logo { color: #fff; margin-bottom: 1rem; }
.footer-brand .logo .lm-tile { fill: rgba(237, 234, 227, 0.1); }
.footer-brand p { color: var(--on-dark-2); font-size: 0.88rem; }
.footer-by {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--on-dark-2);
}
.footer-by b { color: #fff; font-weight: 700; }

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}
.footer-links h4 {
  margin-bottom: 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(237, 234, 227, 0.55);
}
.footer-links a {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--on-dark-2);
  font-size: 0.875rem;
  transition: color var(--ease);
}
.footer-links a:hover { color: var(--jade-bright); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.8rem;
  font-size: 0.82rem;
  color: rgba(237, 234, 227, 0.5);
}
.footer-bottom p { margin: 0; color: inherit; }
.footer-legal-links { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.footer-legal-links a { color: rgba(237, 234, 227, 0.62); }
.footer-legal-links a:hover { color: var(--jade-bright); }
.footer-disclaimer { max-width: 62ch; }

/* ─────────────────────────────────────
   19.b PAGINAS DE MODULO
───────────────────────────────────── */
.hero-mod {
  position: relative;
  padding: calc(var(--nav-h) + clamp(2.5rem, 5vw, 4rem)) 0 clamp(2.5rem, 5vw, 3.75rem);
  background: var(--grad-dark);
  color: var(--on-dark);
  overflow: hidden;
}
.hero-mod::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 44px;
  background: linear-gradient(to bottom, transparent, var(--papel));
  pointer-events: none;
}
.hero-mod .container { position: relative; z-index: 2; }
.hero-mod h1 { color: #fff; max-width: 20ch; margin-bottom: 1rem; }
.hero-mod p { color: var(--on-dark-2); }
.hero-mod strong { color: #fff; }
.hero-lead {
  max-width: 62ch;
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  line-height: 1.6;
  margin-bottom: 1.7rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--on-dark-2);
}
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.45rem; opacity: 0.45; }
.breadcrumb a { color: var(--on-dark-2); font-weight: 600; }
.breadcrumb a:hover { color: var(--jade-bright); }
.breadcrumb [aria-current="page"] { color: #fff; font-weight: 600; }

/* Capacidades: cuadricula de tarjetas planas */
.cap-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.cap {
  padding: clamp(1.2rem, 2.2vw, 1.55rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.cap h3 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-size: 1.03rem;
  margin-bottom: 0.45rem;
}
.cap h3::before {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateY(-1px);
}
.cap p { font-size: 0.91rem; margin: 0; }

/* Franja de llamada a la accion al pie de cada modulo */
.cta-band {
  padding: clamp(2.5rem, 5vw, 3.75rem) 0;
  background: var(--grad-dark);
  color: var(--on-dark);
  text-align: center;
}
.cta-band h2 { color: #fff; max-width: 24ch; margin: 0 auto 0.9rem; }
.cta-band p { color: var(--on-dark-2); max-width: 58ch; margin: 0 auto 1.6rem; }
.cta-band .btn-row { justify-content: center; }

/* Navegacion entre modulos */
.mod-nav { padding: clamp(2.5rem, 5vw, 3.5rem) 0; background: var(--papel-alt); }
.mod-nav h2 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1.1rem;
}
.mod-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.6rem;
}
.mod-nav-grid a {
  display: block;
  padding: 0.8rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  transition: all var(--ease);
}
.mod-nav-grid a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--sh-sm);
}
.mod-nav-grid a span {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-3);
  margin-top: 0.12rem;
}

/* ─────────────────────────────────────
   19.c PAGINAS DE CONTENIDO (comparativa, seguridad, legales)
───────────────────────────────────── */

/* Tabla comparativa — siempre con scroll propio, nunca desborda la pagina */
.tabla-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--sh-sm);
  -webkit-overflow-scrolling: touch;
}
.tabla-comp {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.tabla-comp th, .tabla-comp td {
  padding: 0.9rem 1.05rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.tabla-comp thead th {
  position: sticky;
  top: 0;
  background: var(--papel-alt);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.tabla-comp thead th.is-nos { color: var(--accent); }
.tabla-comp tbody th {
  font-weight: 700;
  color: var(--text);
  width: 22%;
  min-width: 190px;
}
.tabla-comp td { color: var(--text-2); }
.tabla-comp td.is-nos {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.tabla-comp tbody tr:last-child th, .tabla-comp tbody tr:last-child td { border-bottom: 0; }
.tabla-nota {
  margin-top: 0.9rem;
  font-size: 0.83rem;
  color: var(--text-3);
}

/* Bloque de honestidad: cuando NO somos la opcion */
.contra {
  padding: clamp(1.2rem, 2.2vw, 1.55rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warn);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.contra h3 { font-size: 1.02rem; margin-bottom: 0.45rem; }
.contra p { font-size: 0.91rem; margin: 0; }

/* Prosa larga: avisos legales y terminos */
.legal { max-width: 76ch; }
.legal h2 {
  margin-top: clamp(2rem, 4vw, 2.8rem);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}
.legal h2:first-child { margin-top: 0; }
.legal h3 {
  margin-top: 1.6rem;
  font-size: 1.02rem;
}
.legal p, .legal li { font-size: 0.96rem; line-height: 1.7; }
.legal ul, .legal ol { padding-left: 1.4rem; }
.legal li { margin-bottom: 0.5rem; }
.legal-meta {
  margin-bottom: clamp(1.6rem, 3vw, 2.2rem);
  padding: 0.9rem 1.15rem;
  background: var(--papel-alt);
  border-radius: var(--r-sm);
  font-size: 0.86rem;
  color: var(--text-2);
}
.legal-meta b { color: var(--text); }

/* Marca de dato pendiente. Imposible de pasar por alto a proposito:
   estas paginas NO deben publicarse mientras quede una sola. */
.pendiente {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  background: var(--warn-bg);
  border: 1px dashed var(--warn);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.82em;
  font-weight: 600;
  color: var(--warn);
}
.aviso-borrador {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: clamp(1.6rem, 3vw, 2.2rem);
  padding: 1.1rem 1.3rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn);
  border-radius: var(--r-md);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}
.aviso-borrador b { display: block; margin-bottom: 0.2rem; color: var(--warn); }
.aviso-borrador svg { flex: none; width: 22px; height: 22px; color: var(--warn); margin-top: 1px; }

/* Lista de datos clave (pagina de seguridad) */
.datos { display: grid; gap: 0.6rem; }
.dato {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 1rem;
  padding: 0.85rem 1.05rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.9rem;
}
.dato b { color: var(--text); }
.dato span { color: var(--text-2); }
@media (max-width: 620px) {
  .dato { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ─────────────────────────────────────
   19.d AUTODIAGNOSTICO (/que-me-aplica/)
───────────────────────────────────── */
.dx {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
}

/* Barra de avance */
.dx-barra {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
}
.dx-barra-riel {
  flex: 1;
  height: 6px;
  background: var(--papel-alt);
  border-radius: var(--r-full);
  overflow: hidden;
}
.dx-barra-fill {
  height: 100%;
  width: 0;
  background: var(--grad-jade);
  border-radius: var(--r-full);
  transition: width var(--ease-slow);
}
.dx-barra-txt {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
}

/* Un paso a la vez */
.dx-paso fieldset { margin: 0; padding: 0; border: 0; }
.dx-paso legend {
  padding: 0;
  font-family: var(--font);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
}
.dx-ayuda {
  margin: 0.6rem 0 1.3rem;
  font-size: 0.89rem;
  color: var(--text-3);
}

/* Opciones */
.dx-ops { display: grid; gap: 0.55rem; }
.dx-op {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--papel);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  font-size: 0.94rem;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}
.dx-op:hover { border-color: var(--accent); background: var(--accent-soft); }
.dx-op input {
  flex: none;
  width: 19px; height: 19px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.dx-op:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  font-weight: 600;
}
.dx-op input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Navegacion */
.dx-nav {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  justify-content: flex-end;   /* con «Atrás» oculto, «Siguiente» se queda a la derecha */
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--border);
}
.dx-nav .dx-atras { margin-right: auto; }
.dx-nav .btn { width: auto; }

/* Resultado */
.dx-res-cabeza { text-align: center; margin-bottom: clamp(1.5rem, 3vw, 2rem); }
.dx-res-num {
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.dx-res-cabeza p { margin-top: 0.5rem; }

.dx-grupo { margin-bottom: clamp(1.5rem, 3vw, 2rem); }
.dx-grupo > h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.dx-grupo > h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.dx-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: start;
  padding: 0.95rem 1.1rem;
  margin-bottom: 0.55rem;
  background: var(--papel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.dx-item.es-ley { border-left-color: var(--warn); }
.dx-item h4 { margin: 0 0 0.2rem; font-size: 1rem; }
.dx-item p { margin: 0; font-size: 0.865rem; line-height: 1.5; }
.dx-item .dx-mod {
  grid-row: span 2;
  align-self: center;
  padding: 0.4rem 0.85rem;
  background: var(--accent-soft);
  border-radius: var(--r-full);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.dx-item .dx-mod:hover { background: var(--accent); color: var(--accent-on); }

@media (max-width: 620px) {
  .dx-item { grid-template-columns: 1fr; }
  .dx-item .dx-mod { grid-row: auto; justify-self: start; }
  .dx-nav { flex-wrap: wrap; }
  .dx-nav .btn { flex: 1 1 auto; }
}

/* ─────────────────────────────────────
   20. ANIMACION DE ENTRADA
───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--ease-slow), transform var(--ease-slow);
}
.reveal.visible { opacity: 1; transform: none; }

/* ─────────────────────────────────────
   21. RESPONSIVO
───────────────────────────────────── */
@media (max-width: 980px) {
  .split, .spot-grid, .contact-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { justify-self: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .norm-row { grid-template-columns: 1fr auto; }
  .norm-row span { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 1rem clamp(1.15rem, 4vw, 2rem) 1.6rem;
    background: var(--nav-bg-solid);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--sh-lg);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a, .nav-links button { padding: 0.7rem 0.6rem; text-align: left; width: 100%; }
  .mega {
    position: static;
    width: 100%;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
    box-shadow: none;
    background: var(--papel-alt);
    margin-top: 0.4rem;
  }
  .mega[data-open="true"] { display: block; transform: none; }
  .mega-grid { grid-template-columns: 1fr; gap: 1rem; }
  .nav-actions .nav-login { display: none; }
  .nav-only-mobile { display: block !important; }
  .cols-3, .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  /* El CTA del navbar empujaba la hamburguesa fuera de la pantalla y dejaba
     el menu inalcanzable. En movil el CTA vive dentro del menu. */
  .nav-actions > .btn { display: none; }
  .hero-malla { opacity: 0.34; }
}

@media (max-width: 620px) {
  .hero { min-height: auto; }
  .hero-stats { grid-template-columns: 1fr; gap: 1.2rem; text-align: left; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .norm-row { grid-template-columns: 1fr; }
  .norm-row a { justify-self: start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; }
  .btn-row .btn { width: auto; flex: 1 1 auto; }
}

/* ─────────────────────────────────────
   22. ACCESIBILIDAD E IMPRESION
───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .hero-malla, .theme-toggle, .nav-toggle, .form { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .spotlight, .hero { padding: 1.5rem 0; background: #fff !important; color: #000 !important; }
  a { color: #000; text-decoration: underline; }
}
