/* =========================================================
   Villegas SG — Sistema de diseño
   Base neutra + azul marino (autoridad) + un único acento azul,
   tomados del logotipo. Sin fuentes externas: pila tipográfica
   del sistema (rápida y legible en Windows, macOS, Android, iOS).
   ========================================================= */
:root {
  /* Marca */
  --navy-950: #081634;
  --navy-900: #0e1f47;
  --navy-800: #15295c;
  --navy-700: #1e3a78;
  --accent: #1b6ec2;        /* azul del logotipo — contraste 5.2:1 sobre blanco */
  --accent-strong: #155ca4; /* hover / texto de enlaces */
  --accent-soft: #e8f1fb;
  --accent-on-dark: #8ec0f2;

  /* Neutros */
  --ink: #18212f;
  --text: #2b3545;
  --muted: #566176;
  --line: #dde3ec;
  --line-strong: #c4ccd8;
  --surface: #ffffff;
  --surface-alt: #f4f6f9;
  --surface-sunk: #eceff4;

  /* Estados */
  --ok: #1f7a4d;
  --ok-soft: #e6f4ec;
  --warn: #8a5a00;
  --warn-soft: #fff4dc;
  --danger: #b42318;
  --danger-soft: #fdecea;

  /* Escala */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(14, 31, 71, 0.06);
  --shadow: 0 1px 3px rgba(14, 31, 71, 0.08), 0 6px 16px rgba(14, 31, 71, 0.06);
  --max: 74rem;
  --max-narrow: 50rem;
  --gutter: 1.25rem;
  --header-h: 4.5rem;

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p { margin: 0; }
p + p { margin-top: 0.85rem; }
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-strong); text-underline-offset: 0.18em; }
a:hover { color: var(--navy-800); }

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

strong { color: var(--ink); font-weight: 650; }

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--navy-900);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; color: #fff; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-narrow { max-width: var(--max-narrow); }

@media (min-width: 900px) {
  :root { --gutter: 2rem; }
}

/* =========================================================
   Botones
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.875rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }

.btn-dark { background: var(--navy-900); color: #fff; }
.btn-dark:hover { background: var(--navy-800); color: #fff; }

.btn-outline { background: transparent; color: var(--navy-900); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--navy-900); color: var(--navy-900); }

.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn-ghost-light:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.06); }

.btn-block { width: 100%; }
.btn-sm { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.9rem; }

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

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow::after { content: "→"; transition: transform 0.15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* =========================================================
   Etiquetas
   ========================================================= */
.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.on-dark .eyebrow, .eyebrow-light { color: var(--accent-on-dark); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--surface-sunk);
  color: var(--navy-800);
}
.tag-accent { background: var(--accent-soft); color: var(--accent-strong); }
.tag-demo { background: var(--warn-soft); color: var(--warn); }
.tag-real { background: var(--ok-soft); color: var(--ok); }
.tag-light { background: rgba(255, 255, 255, 0.1); color: #e5ecf7; border: 1px solid rgba(255, 255, 255, 0.18); }

/* =========================================================
   Barra superior y cabecera
   ========================================================= */
.topbar {
  background: var(--navy-950);
  color: #c9d4e6;
  font-size: 0.82rem;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 2.25rem;
}
.topbar a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4rem; }
.topbar a:hover { color: var(--accent-on-dark); }
.topbar svg { width: 0.95rem; height: 0.95rem; }
.topbar-text { display: none; }
@media (min-width: 700px) { .topbar-text { display: inline; } }
@media (max-width: 699px) { .topbar-inner { justify-content: center; } }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--navy-900);
  margin-right: auto;
}
.brand img { width: 84px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.1rem; letter-spacing: 0.01em; color: var(--navy-900); }
.brand-tagline { font-size: 0.72rem; color: var(--muted); display: none; }
@media (min-width: 480px) { .brand-tagline { display: block; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--navy-900);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.nav-toggle svg { width: 1.25rem; height: 1.25rem; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

.main-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
.nav-open .main-nav { display: block; }
.main-nav ul { list-style: none; padding: 0.5rem var(--gutter) 1rem; }
.main-nav a {
  display: block;
  padding: 0.8rem 0.25rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--surface-sunk);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--accent); }
.main-nav .submenu a { padding-left: 1rem; font-weight: 500; color: var(--text); }
.main-nav .nav-cta-item { padding-top: 0.75rem; }
.main-nav .nav-cta-item a { border: 0; }

.header-cta { display: none; }

@media (min-width: 1140px) {
  .nav-toggle { display: none; }
  .main-nav {
    display: block;
    position: static;
    box-shadow: none;
    border: 0;
    background: transparent;
    max-height: none;
    overflow: visible;
  }
  .main-nav > ul { display: flex; align-items: center; gap: 0.15rem; padding: 0; }
  .main-nav > ul > li { position: relative; }
  .main-nav a {
    padding: 0.5rem 0.65rem;
    border: 0;
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
  }
  .main-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
  .main-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 16rem;
    padding: 0.5rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  }
  .main-nav .has-submenu:hover .submenu,
  .main-nav .has-submenu:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
  .main-nav .submenu a { padding: 0.55rem 0.75rem; font-size: 0.9rem; }
  .main-nav .submenu a:hover { background: var(--surface-alt); }
  .main-nav .has-submenu > a::after { content: " ▾"; font-size: 0.7em; color: var(--muted); }
  .main-nav .nav-cta-item { display: none; }
  .header-cta { display: inline-flex; }
}

/* =========================================================
   Secciones
   ========================================================= */
.section { padding: 3.5rem 0; position: relative; }
@media (min-width: 900px) { .section { padding: 5rem 0; } }
.section-alt { background: var(--surface-alt); }
.section-tight { padding: 2.5rem 0; }

.section-head { max-width: 46rem; margin-bottom: 2.25rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.55rem, 2.2vw + 1rem, 2.15rem); }
.section-head p { margin-top: 0.85rem; font-size: 1.05rem; color: var(--muted); }

.on-dark { background: var(--navy-900); color: #d5deec; }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4, .on-dark strong { color: #fff; }
.on-dark a:not(.btn) { color: var(--accent-on-dark); }
.on-dark .section-head p { color: #c3cee0; }

.prose { max-width: 46rem; }
.prose h2 { font-size: 1.5rem; margin: 2.25rem 0 0.75rem; }
.prose h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0.75rem 0; }
.prose li + li { margin-top: 0.35rem; }

.lead { font-size: 1.1rem; color: var(--muted); }

/* Marca de agua */
.brand-watermark {
  position: absolute;
  pointer-events: none;
  user-select: none;
  opacity: 0.06;
  z-index: 0;
  width: 22rem;
  right: -4rem;
  top: 50%;
  transform: translateY(-50%) rotate(-6deg);
}
@media (min-width: 900px) { .brand-watermark { width: 34rem; right: -3rem; } }

/* =========================================================
   Hero de inicio
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #d5deec;
  padding: 3rem 0 3.5rem;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 980px) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 3.5rem; }
}
.hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 3.4vw + 1rem, 3.1rem);
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--accent-on-dark); display: block; }
.hero-sub { margin-top: 1.1rem; font-size: 1.1rem; color: #c9d4e6; max-width: 38rem; }
.hero .btn-row { margin-top: 1.75rem; }
.hero-note {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: #aebbd2;
  max-width: 36rem;
}
.hero-note a { color: #fff; }

/* Panel de demostración en el hero */
.demo-panel {
  background: #fff;
  color: var(--text);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.demo-panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-900);
}
.demo-panel-body { padding: 1rem; display: grid; gap: 0.85rem; }
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.kpi {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.65rem;
}
.kpi-label { font-size: 0.7rem; color: var(--muted); line-height: 1.3; }
.kpi-value { font-size: 1.3rem; font-weight: 700; color: var(--navy-900); line-height: 1.2; margin-top: 0.15rem; }
.meter { height: 0.5rem; background: var(--surface-sunk); border-radius: 999px; overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter-row { display: grid; gap: 0.3rem; font-size: 0.8rem; }
.meter-row-top { display: flex; justify-content: space-between; gap: 0.5rem; }
.w-92 { width: 92%; } .w-74 { width: 74%; } .w-58 { width: 58%; } .w-40 { width: 40%; } .w-85 { width: 85%; } .w-66 { width: 66%; }
.alert-list { list-style: none; display: grid; gap: 0.4rem; font-size: 0.8rem; }
.alert-list li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}
.badge { font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 4px; white-space: nowrap; }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.demo-caption { font-size: 0.75rem; color: var(--muted); padding: 0 1rem 0.85rem; }

/* =========================================================
   Banner de páginas internas
   ========================================================= */
.page-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #c9d4e6;
  padding: 2.75rem 0 3rem;
}
@media (min-width: 900px) { .page-hero { padding: 3.75rem 0 4rem; } }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(1.75rem, 2.6vw + 1rem, 2.6rem); max-width: 48rem; }
.page-hero-sub { margin-top: 0.9rem; font-size: 1.08rem; max-width: 44rem; color: #c9d4e6; }
.page-hero .btn-row { margin-top: 1.5rem; }
.breadcrumb { margin-bottom: 1rem; font-size: 0.85rem; color: #aebbd2; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 0.35rem; color: #7f8daa; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; color: #fff; }

/* =========================================================
   Rejillas y tarjetas
   ========================================================= */
.grid { display: grid; gap: 1.25rem; }
@media (min-width: 700px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.card h3 { font-size: 1.15rem; }
.card p { color: var(--muted); }
.card .link-arrow { margin-top: auto; padding-top: 0.5rem; }
.card-link { text-decoration: none; color: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.card-link:hover { border-color: var(--accent); box-shadow: var(--shadow); color: inherit; }
.card-link:hover .link-arrow::after { transform: translateX(3px); }

.icon-box {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.icon-box svg { width: 1.4rem; height: 1.4rem; }
.on-dark .icon-box { background: rgba(142, 192, 242, 0.12); color: var(--accent-on-dark); }

.on-dark .card { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
.on-dark .card p { color: #c3cee0; }

/* Lista de problemas */
.problem-list { list-style: none; display: grid; gap: 0.75rem; }
@media (min-width: 700px) { .problem-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .problem-list { grid-template-columns: repeat(3, 1fr); } }
.problem-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 500;
}
.problem-list svg { width: 1.25rem; height: 1.25rem; color: var(--accent); flex-shrink: 0; margin-top: 0.15rem; }

/* Listas de verificación */
.check-list, .cross-list, .dot-list { list-style: none; display: grid; gap: 0.5rem; }
.check-list li, .cross-list li, .dot-list li { position: relative; padding-left: 1.6rem; }
.check-list li::before, .cross-list li::before, .dot-list li::before {
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-weight: 700;
}
.check-list li::before { content: "✓"; color: var(--ok); }
.cross-list li::before { content: "✕"; color: var(--danger); font-size: 0.9em; top: 0.1rem; }
.dot-list li::before { content: "•"; color: var(--accent); font-size: 1.2em; top: -0.1rem; }
.on-dark .check-list li::before { color: #7fd6a8; }

/* Diferencial: dos columnas que convergen */
.split { display: grid; gap: 1.25rem; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.result-box {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--navy-900);
  color: #d5deec;
}
.result-box strong { color: #fff; }

/* =========================================================
   Niveles de contratación / precios
   ========================================================= */
.tier-grid { display: grid; gap: 1.25rem; }
@media (min-width: 980px) { .tier-grid { grid-template-columns: repeat(3, 1fr); } }
.tier {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.tier-level { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.tier h3 { font-size: 1.3rem; }
.tier-for { color: var(--muted); font-size: 0.95rem; }
.tier-price {
  padding: 0.85rem 1rem;
  background: var(--surface-alt);
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.tier-price b { display: block; font-size: 1.2rem; color: var(--navy-900); }
.tier .btn { margin-top: auto; }
.tier-dark { background: var(--navy-900); border-color: var(--navy-900); color: #d5deec; }
.tier-dark h3 { color: #fff; }
.tier-dark .tier-level { color: var(--accent-on-dark); }
.tier-dark .tier-for { color: #c3cee0; }
.tier-dark .tier-price { background: rgba(255, 255, 255, 0.07); }
.tier-dark .tier-price b { color: #fff; }
.tier-dark .check-list li::before { color: #7fd6a8; }

.price-note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.93rem;
  color: var(--navy-900);
}
.price-note p + p { margin-top: 0.5rem; }

/* =========================================================
   Fichas de servicio
   ========================================================= */
.subnav {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.subnav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
}
.subnav a {
  display: block;
  white-space: nowrap;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--navy-800);
  background: var(--surface-alt);
}
.subnav a:hover { background: var(--accent-soft); color: var(--accent-strong); }

.service-list { display: grid; gap: 1.75rem; }
.service {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.service-head {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-alt);
}
@media (min-width: 900px) {
  .service-head { grid-template-columns: 1fr auto; align-items: start; padding: 1.75rem 2rem; }
}
.service-head h3 { font-size: 1.35rem; margin-top: 0.35rem; }
.service-head p { margin-top: 0.5rem; color: var(--muted); max-width: 42rem; }
.service-price {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  min-width: 15rem;
}
.service-price-label { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.service-price-value { font-size: 1.15rem; font-weight: 700; color: var(--navy-900); margin-top: 0.15rem; }
.service-price-time { font-size: 0.85rem; color: var(--muted); margin-top: 0.35rem; }
.service-body { display: grid; gap: 1.5rem; padding: 1.5rem; }
@media (min-width: 900px) { .service-body { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 2.5rem; padding: 1.75rem 2rem; } }
.service-body h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--navy-700);
  margin-bottom: 0.6rem;
}
.service-body p, .service-body li { font-size: 0.95rem; }
.service-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .service-foot { padding: 1.1rem 2rem; } }
.service-foot p { font-size: 0.88rem; color: var(--muted); }

/* =========================================================
   Tablas
   ========================================================= */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
}
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
caption { text-align: left; padding: 1rem 1.25rem 0; font-weight: 700; color: var(--ink); }
th, td { text-align: left; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-alt); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--navy-700); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; color: var(--ink); }
td.num { white-space: nowrap; font-weight: 600; color: var(--navy-900); }
.table-group th { background: var(--navy-900); color: #fff; font-size: 0.85rem; letter-spacing: 0.04em; }

/* Tabla que se convierte en tarjetas en móvil */
@media (max-width: 699px) {
  .table-stack thead { display: none; }
  .table-stack tr { display: block; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
  .table-stack tbody tr:last-child { border-bottom: 0; }
  .table-stack th, .table-stack td { display: block; border: 0; padding: 0.2rem 0; }
  .table-stack td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--muted);
    font-size: 0.82rem;
  }
  .table-stack .table-group th { margin: -0.75rem -1rem 0; padding: 0.6rem 1rem; }
}

/* =========================================================
   Metodología (pasos)
   ========================================================= */
.steps { list-style: none; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 900px) { .steps-row { grid-template-columns: repeat(5, 1fr); } }
.step {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--navy-900);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.step h3 { font-size: 1.05rem; }
.step p { margin-top: 0.4rem; color: var(--muted); font-size: 0.93rem; }

.step-detail {
  display: grid;
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
@media (min-width: 900px) {
  .step-detail { grid-template-columns: 4rem 1fr 1fr 1fr; gap: 1.5rem; align-items: start; padding: 1.75rem; }
}
.step-num {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--navy-900);
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-detail h3 { font-size: 1.2rem; }
.step-detail h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--navy-700); margin-bottom: 0.4rem; }
.step-detail p, .step-detail li { font-size: 0.94rem; }

/* =========================================================
   Demostraciones
   ========================================================= */
.demo-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.demo-frame-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--line);
}
.demo-frame-head h3 { font-size: 1.1rem; }
.demo-frame-body { padding: 1.25rem; }
.demo-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
@media (min-width: 700px) { .demo-summary { grid-template-columns: repeat(4, 1fr); } }
.demo-table select {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  min-height: 2.25rem;
}
.demo-table td, .demo-table th { padding: 0.65rem 0.85rem; }
.row-overdue td { background: var(--danger-soft); }
.demo-controls { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.demo-controls button {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  min-height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--navy-800);
  cursor: pointer;
}
.demo-controls button[aria-pressed="true"] { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.chart-bars { display: grid; gap: 0.85rem; }
.chart-bar { display: grid; gap: 0.3rem; }
.chart-bar-top { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.9rem; }
.chart-bar-top b { color: var(--navy-900); }
.chart-bar .meter { height: 0.7rem; }
.chart-bar .meter > span { transition: width 0.3s ease; }
.meter-target { position: relative; }
.demo-limits {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: #5c3d00;
  font-size: 0.9rem;
}
.demo-limits strong { color: #5c3d00; }

.case {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 1.5rem;
}
@media (min-width: 900px) { .case { padding: 2rem; } }
.case dl { display: grid; gap: 1rem; margin: 1.25rem 0 0; }
@media (min-width: 900px) { .case dl { grid-template-columns: 12rem 1fr; gap: 0.9rem 2rem; } }
.case dt { font-weight: 700; color: var(--navy-800); font-size: 0.92rem; }
.case dd { margin: 0; color: var(--text); }

/* =========================================================
   Nosotros
   ========================================================= */
.about-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1.3fr 0.7fr; gap: 3rem; } }
.about-logo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.about-logo img { margin: 0 auto; width: 100%; max-width: 280px; }
.fact-list { list-style: none; display: grid; gap: 0; margin-top: 1.5rem; border-top: 1px solid var(--line); }
.fact-list li { display: grid; gap: 0.15rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-size: 0.93rem; }
.fact-list span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }

/* =========================================================
   FAQ
   ========================================================= */
.faq-group + .faq-group { margin-top: 2.5rem; }
.faq-group h2 { font-size: 1.3rem; margin-bottom: 1rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.faq-item + .faq-item { margin-top: 0.6rem; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-answer { padding: 0 1.25rem 1.1rem; color: var(--text); }
.faq-answer ul { padding-left: 1.2rem; margin-top: 0.5rem; }

/* =========================================================
   Contacto y formulario
   ========================================================= */
.contact-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 980px) { .contact-grid { grid-template-columns: 1.2fr 0.8fr; gap: 3rem; } }

.form-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 700px) { .form-card { padding: 2rem; } }
.form-grid { display: grid; gap: 1.1rem; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field { display: grid; gap: 0.35rem; }
.field label, .field legend { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.field .optional { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.field input[type="text"], .field input[type="tel"], .field input[type="email"], .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 0.65rem 0.8rem;
  min-height: 2.9rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(27, 110, 194, 0.35); outline-offset: 0; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-hint { font-size: 0.82rem; color: var(--muted); }
.field-error { font-size: 0.85rem; color: var(--danger); font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.radio-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.25rem; }
.radio-row label, .check-label { display: inline-flex; align-items: flex-start; gap: 0.5rem; font-weight: 500; font-size: 0.95rem; cursor: pointer; }
.radio-row input, .check-label input { width: 1.15rem; height: 1.15rem; margin: 0.2rem 0 0; accent-color: var(--accent); flex-shrink: 0; }
.check-label { font-size: 0.88rem; color: var(--text); }

.form-status {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.93rem;
}
.form-status:empty { display: none; }
.form-status.is-success { background: var(--ok-soft); color: #14532d; }
.form-status.is-error { background: var(--danger-soft); color: #7a1a12; }
.form-status a { font-weight: 700; }

.info-card {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.info-card + .info-card { margin-top: 1.25rem; }
.info-card h2, .info-card h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.contact-line { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.6rem 0; }
.contact-line svg { width: 1.25rem; height: 1.25rem; color: var(--accent); flex-shrink: 0; margin-top: 0.2rem; }
.contact-line span { display: block; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--muted); }

/* =========================================================
   Llamado final
   ========================================================= */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: #d5deec;
  padding: 3.5rem 0;
}
@media (min-width: 900px) { .cta-band { padding: 4.5rem 0; } }
.cta-band .container { position: relative; z-index: 1; }
.cta-band-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .cta-band-grid { grid-template-columns: 1.3fr 1fr; gap: 3rem; } }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem); }
.cta-band p { margin-top: 0.75rem; color: #c3cee0; }
.cta-terms {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  font-size: 0.92rem;
}
.cta-terms h3 { font-size: 1rem; color: #fff; margin-bottom: 0.6rem; }
.cta-terms dl { margin: 0; display: grid; gap: 0.55rem; }
.cta-terms dt { font-weight: 700; color: #fff; }
.cta-terms dd { margin: 0; color: #c3cee0; }

/* Condiciones del diagnóstico (versión clara) */
.terms-light dl { margin: 0; display: grid; gap: 0.75rem; }
.terms-light dt { font-weight: 700; color: var(--ink); }
.terms-light dd { margin: 0.15rem 0 0; color: var(--text); font-size: 0.95rem; }

/* =========================================================
   Pie de página
   ========================================================= */
.site-footer { background: var(--navy-950); color: #aebbd2; font-size: 0.92rem; }
.footer-grid { display: grid; gap: 2rem; padding: 3rem 0 2.5rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; font-weight: 800; font-size: 1.1rem; }
.footer-brand img { width: 64px; }
.footer-about { margin-top: 0.9rem; max-width: 22rem; }
.site-footer h2 { font-size: 0.8rem; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; display: grid; gap: 0.5rem; }
.site-footer a { color: #d5deec; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

/* WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: #1f8f4e;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}
.whatsapp-float:hover { background: #18773f; color: #fff; }
.whatsapp-float svg { width: 1.7rem; height: 1.7rem; fill: currentColor; }
.icon-wa { fill: currentColor; }

/* Utilidades */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.text-muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.center { text-align: center; }

/* 404 */
.notfound { padding: 5rem 0; text-align: center; }
.notfound h1 { font-size: 2rem; }
.notfound p { margin: 1rem auto 1.5rem; max-width: 32rem; color: var(--muted); }
.notfound .btn-row { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .topbar, .site-header, .whatsapp-float, .cta-band, .subnav { display: none !important; }
  .page-hero, .hero { background: none; color: #000; }
  .page-hero h1, .hero h1 { color: #000; }
}

@media (min-width: 1140px) {
  .main-nav a, .header-cta { white-space: nowrap; }
}

[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }
.brand-text { white-space: nowrap; }
@media (min-width: 1140px) and (max-width: 1399px) {
  .brand-tagline { display: none; }
  .brand img { width: 72px; }
}
.brand { flex-shrink: 0; }
@media (min-width: 1140px) {
  .header-inner { gap: 0.75rem; }
  .main-nav a { padding: 0.5rem 0.5rem; font-size: 0.9rem; }
}
html:has(.subnav) { scroll-padding-top: calc(var(--header-h) + 4.5rem); }
@media (max-width: 379px) {
  :root { --gutter: 1rem; }
  .brand img { width: 64px; }
  .header-inner { gap: 0.5rem; }
  .nav-toggle { padding: 0.5rem 0.6rem; }
}

/* =========================================================
   Portafolio 2026: matriz de ruteo, autoridad y notas comerciales
   ========================================================= */
.route-grid { counter-reset: none; }
.route-card { position: relative; border-top: 4px solid var(--accent); }
.route-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--navy-900); color: #fff; font-weight: 800;
}
.route-card h3 { font-size: 1.08rem; }
.route-arrow { font-size: 1.05rem; color: var(--accent-strong) !important; margin: 0; }
.route-arrow strong { color: var(--accent-strong); }
.route-card .btn-row { margin-top: auto; padding-top: .5rem; }

.authority { position: relative; overflow: hidden; }
.authority .container { position: relative; z-index: 1; }
.authority-grid { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 900px) { .authority-grid { grid-template-columns: 1fr 1.2fr; gap: 3rem; } }
.authority h2 { font-size: clamp(1.5rem, 2vw + 1rem, 2rem); }
.authority-list { list-style: none; display: grid; gap: .75rem; }
.authority-list li {
  display: flex; gap: .75rem; align-items: center;
  padding: .9rem 1.1rem; border-radius: var(--radius);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  color: #fff; font-weight: 600;
}
.authority-list li:nth-child(-n+2) { border-color: var(--accent-on-dark); background: rgba(142, 192, 242, .14); font-size: 1.05rem; }
.authority-list svg { width: 1.4rem; height: 1.4rem; color: #7fd6a8; flex-shrink: 0; }

.cert-note {
  border: 2px solid #c98a12; background: var(--warn-soft); color: #5c3d00;
  border-radius: var(--radius-lg); padding: 1rem 1.25rem; font-size: 1.02rem;
}
.cert-note strong { color: #5c3d00; }
.note-sst {
  margin-top: 1.25rem; padding: 1rem 1.25rem; border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0; font-size: .93rem; color: var(--navy-900);
}
.card-highlight { background: var(--accent-soft); border-color: #c8ddf3; }
.card-highlight p { color: var(--text); }
@media (min-width: 1000px) { .steps-row7 { grid-template-columns: repeat(7, 1fr); } }
@media (min-width: 700px) and (max-width: 999px) { .steps-row7 { grid-template-columns: repeat(4, 1fr); } }
.steps-list { padding-left: 1.25rem; display: grid; gap: .35rem; }
.footer-price { display: block; color: #fff; font-weight: 600; margin-top: .25rem; }
.split .card .btn, .grid .card > .btn { align-self: flex-start; }
.grid + .table-wrap { margin-top: 1.5rem; }

/* Cinco líneas de servicio */
@media (min-width: 700px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1240px) { .grid-5 { grid-template-columns: repeat(5, 1fr); } }
.check-list.cols-2 { margin-top: 1rem; }
@media (min-width: 700px) { .check-list.cols-2 { grid-template-columns: repeat(2, 1fr); } }

/* Software SG-SST: módulos */
.module-grid { list-style: none; display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .module-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .module-grid { grid-template-columns: repeat(3, 1fr); } }
.module-grid li {
  display: flex; gap: .65rem; align-items: center; padding: .85rem 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; color: var(--ink);
}
.module-grid svg { width: 1.3rem; height: 1.3rem; color: var(--accent); flex-shrink: 0; }

/* Formulario: datos opcionales del software */
.sw-fields { border: 1px solid var(--line) !important; border-radius: var(--radius); padding: 1rem !important; background: var(--surface-alt); }
.sw-fields legend { padding: 0 .35rem; }
.field-label { display: block; font-weight: 600; font-size: 0.92rem; color: var(--ink); margin-bottom: .35rem; }
.check-grid { display: grid; gap: .4rem 1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .check-grid { grid-template-columns: repeat(2, 1fr); } }
.check-grid label { display: flex; gap: .5rem; align-items: flex-start; font-weight: 500; font-size: .92rem; cursor: pointer; }
.check-grid input { width: 1.1rem; height: 1.1rem; margin: .15rem 0 0; accent-color: var(--accent); flex-shrink: 0; }
