/* ==========================================================================
   SIXDE — Sistema de diseño
   Paleta extraída del logotipo: grafito, carmesí, oro.
   ========================================================================== */

/* --- 1. Tokens ---------------------------------------------------------- */
:root {
  /* Marca */
  --carbon-950: #0d0d10;
  --carbon-900: #141419;
  --carbon-850: #1a1a21;
  --carbon-800: #23232c;
  --carbon-700: #33333f;

  --crimson-800: #6f0a1c;
  --crimson-700: #8e0c24;
  --crimson-600: #a8112b;
  --crimson-500: #c31c34;

  --gold-700: #8f6c17;
  --gold-600: #a87e1e;
  --gold-500: #c69a2e;
  --gold-400: #d9b04a;
  --gold-300: #e8c977;

  /* Neutros */
  --ink:        #15151a;
  --ink-soft:   #4a4a55;
  --ink-muted:  #6e6e7a;
  --line:       #e5e3de;
  --line-soft:  #f0efec;
  --surface:    #ffffff;
  --surface-2:  #f7f6f3;
  --surface-3:  #efeeea;

  /* Semánticos del producto (semáforo SIXDE) */
  --pos:      #15803d;
  --pos-bg:   #e8f5ec;
  --neg:      #b3261e;
  --neg-bg:   #fbeceb;
  --warn:     #b45309;
  --warn-bg:  #fdf3e3;

  /* Sobre fondo oscuro */
  --on-dark:        #f6f5f2;
  --on-dark-soft:   #b9b7b1;
  --on-dark-muted:  #85838d;
  --on-dark-line:   rgba(255, 255, 255, .12);

  /* Tipografía */
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Escala de espacio (8pt) */
  --space-1: .25rem;  --space-2: .5rem;   --space-3: .75rem;
  --space-4: 1rem;    --space-5: 1.5rem;  --space-6: 2rem;
  --space-7: 3rem;    --space-8: 4rem;    --space-9: 6rem;

  /* Radios */
  --r-sm: 8px;  --r-md: 12px;  --r-lg: 18px;  --r-xl: 28px;  --r-full: 999px;

  /* Sombras */
  --sh-sm: 0 1px 2px rgba(21, 21, 26, .06), 0 1px 3px rgba(21, 21, 26, .04);
  --sh-md: 0 4px 12px rgba(21, 21, 26, .07), 0 2px 4px rgba(21, 21, 26, .04);
  --sh-lg: 0 18px 40px rgba(21, 21, 26, .10), 0 4px 12px rgba(21, 21, 26, .05);
  --sh-xl: 0 32px 70px rgba(13, 13, 16, .28);

  /* Layout */
  --container: 1200px;
  --nav-h: 72px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 220ms;

  /* Z-index */
  --z-nav: 100;
  --z-float: 90;
  --z-overlay: 200;
}

/* --- 2. Reset ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }

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

/* --- 3. Utilidades ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 1024px) { .container { padding-inline: var(--space-6); } }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--alt { background: var(--surface-2); }

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

.skip-link {
  position: absolute; top: -100px; left: var(--space-4);
  z-index: 999; padding: .75rem 1.25rem;
  background: var(--carbon-900); color: var(--on-dark);
  border-radius: var(--r-sm); font-weight: 600;
}
.skip-link:focus { top: var(--space-4); }

/* Encabezados de sección */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8125rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--crimson-700);
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px;
  background: var(--gold-500); border-radius: 2px;
}
.eyebrow--light { color: var(--gold-400); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .eyebrow--center { justify-content: center; }

.h1 { font-size: clamp(2.25rem, 5.6vw, 3.75rem); letter-spacing: -0.03em; }
.h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); margin-top: var(--space-3); }
.h3 { font-size: clamp(1.125rem, 1.6vw, 1.3rem); letter-spacing: -0.01em; }

.lead {
  margin-top: var(--space-4);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  color: var(--ink-soft);
  max-width: 42rem;
}
.section-head--center .lead { margin-inline: auto; }
.lead--light { color: var(--on-dark-soft); }

/* --- 4. Botones --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-size: .9375rem; font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn--primary {
  background: var(--gold-500); color: #1a1405;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.btn--primary:hover { background: var(--gold-400); box-shadow: var(--sh-md); }

.btn--dark { background: var(--carbon-900); color: var(--on-dark); }
.btn--dark:hover { background: var(--carbon-800); box-shadow: var(--sh-md); }

.btn--outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--outline:hover { border-color: var(--ink); background: var(--surface-2); }

.btn--ghost-light {
  background: rgba(255,255,255,.06); color: var(--on-dark);
  border-color: var(--on-dark-line);
}
.btn--ghost-light:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.28); }

.btn--sm { min-height: 42px; padding: .5rem 1.1rem; font-size: .875rem; }
.btn--block { width: 100%; }

/* --- 5. Header ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-nav);
  /* Mismo tono con el que arranca el hero: la unión entre ambos es invisible. */
  background: var(--carbon-950);
  color: var(--on-dark);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: rgba(255, 255, 255, .10);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .38);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header.is-stuck {
    background: rgba(13, 13, 16, .88);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
  }
}

.nav {
  display: flex; align-items: center; gap: var(--space-5);
  min-height: var(--nav-h);
}

.brand { display: inline-flex; align-items: center; gap: .625rem; margin-right: auto; }
.brand__mark { width: 34px; height: 34px; }
.brand__name {
  font-size: 1.25rem; font-weight: 700;
  letter-spacing: .14em; color: #fff;
}
.brand__name span { color: var(--gold-400); }

.nav__links { display: none; align-items: center; gap: var(--space-1); }
.nav__link {
  position: relative;
  padding: .55rem .8rem;
  border-radius: var(--r-sm);
  font-size: .9375rem; font-weight: 500; color: var(--on-dark-soft);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav__link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav__link.is-active { color: #fff; font-weight: 600; }
.nav__link.is-active::after {
  content: ''; position: absolute; left: .8rem; right: .8rem; bottom: .15rem;
  height: 2px; border-radius: 2px; background: var(--gold-500);
}

.nav__actions { display: none; align-items: center; gap: .625rem; }

.nav__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-right: -.5rem;
  background: transparent; color: var(--on-dark);
  border: 0; border-radius: var(--r-sm);
  cursor: pointer;
}
.nav__toggle:hover { background: rgba(255, 255, 255, .08); }
.nav__toggle svg { width: 24px; height: 24px; }
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }
.nav__toggle[aria-expanded="true"] .icon-menu { display: none; }

.nav__drawer {
  display: none;
  padding: var(--space-3) 0 var(--space-5);
  border-top: 1px solid rgba(255, 255, 255, .10);
}
.nav__drawer.is-open { display: block; }
.nav__drawer .nav__link {
  display: block; padding: .875rem .5rem;
  font-size: 1.0625rem; color: var(--on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.nav__drawer .nav__link.is-active::after { display: none; }
.nav__drawer-actions {
  display: grid; gap: .625rem; margin-top: var(--space-4);
}

@media (min-width: 1024px) {
  .nav__links, .nav__actions { display: flex; }
  .nav__toggle { display: none; }
  .nav__drawer { display: none !important; }
}

/* --- 6. Hero ------------------------------------------------------------ */
.hero { padding: 0; }

.hero__panel {
  position: relative;
  overflow: hidden;
  /* Arranca exactamente en --carbon-950, el color del header: sin costura visible. */
  background:
    radial-gradient(110% 80% at 84% 34%, rgba(198, 154, 46, .17) 0%, transparent 58%),
    radial-gradient(95% 75% at -5% 105%, rgba(142, 12, 36, .30) 0%, transparent 60%),
    linear-gradient(180deg, var(--carbon-950) 0%, var(--carbon-900) 48%, var(--carbon-950) 100%);
  color: var(--on-dark);
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 0;
}
.hero__panel::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='64' viewBox='0 0 56 64'%3E%3Cpath d='M28 1 54 16v32L28 63 2 48V16z' fill='none' stroke='%23ffffff' stroke-opacity='.05' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 56px 64px;
  opacity: .9;
  pointer-events: none;
}
/* El ancho legible vuelve a limitarse dentro del panel a sangre. */
.hero__inner { position: relative; z-index: 1; }

.hero__grid { display: grid; gap: clamp(2rem, 4vw, 3rem); align-items: center; }
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: var(--space-7); }
}

.hero__copy { padding-bottom: clamp(2rem, 4vw, 3rem); }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--gold-400); }

.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem .5rem .4rem .4rem;
  margin-bottom: var(--space-5);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-full);
  background: rgba(255,255,255,.05);
  font-size: .8125rem; color: var(--on-dark-soft);
}
.badge__tag {
  padding: .1rem .5rem;
  border-radius: var(--r-full);
  background: var(--crimson-700); color: #fff;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
}

.hero__actions {
  display: flex; flex-wrap: wrap; gap: .75rem;
  margin-top: var(--space-6);
}
.hero__note {
  margin-top: var(--space-4);
  font-size: .8125rem; color: var(--on-dark-muted);
}

/* Barra de confianza dentro del hero */
.trustbar {
  display: grid; gap: var(--space-4);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--on-dark-line);
}
@media (min-width: 640px) { .trustbar { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); } }
.trustbar__item { display: flex; flex-direction: column; }
.trustbar__value {
  font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700;
  letter-spacing: -0.02em; color: var(--gold-400);
}
.trustbar__label { font-size: .8125rem; color: var(--on-dark-muted); line-height: 1.45; }

/* --- 7. Mockups / placeholders de producto ------------------------------ */
.shot {
  position: relative;
  border-radius: var(--r-lg);
  background: var(--surface);
  /* El mockup es siempre superficie clara, aunque viva dentro del hero oscuro. */
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}
.shot--floating { box-shadow: var(--sh-xl); border-color: rgba(255,255,255,.14); }
.shot__bar {
  display: flex; align-items: center; gap: .375rem;
  padding: .625rem .875rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.shot__dot { width: 9px; height: 9px; border-radius: 50%; background: #d5d2cc; }
.shot__title {
  margin-left: .5rem; font-size: .75rem; font-weight: 500;
  color: var(--ink-muted); letter-spacing: .02em;
}
.shot__body {
  aspect-ratio: 16 / 10;
  background: var(--surface);
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 28px 28px;
  display: grid; place-items: center;
  padding: var(--space-4);
}
.shot__hint {
  font-family: var(--font-mono);
  font-size: .75rem; color: var(--ink-muted);
  text-align: center; line-height: 1.6;
  border: 1px dashed var(--line);
  border-radius: var(--r-sm);
  padding: .875rem 1.25rem;
  background: rgba(255,255,255,.9);
}
.shot__img { width: 100%; height: auto; display: block; }

.hero__visual { position: relative; padding-bottom: clamp(2rem, 4vw, 3rem); }
@media (min-width: 1024px) {
  .hero__visual { padding-bottom: 0; margin-bottom: -1px; }
}

/* Variante compacta del hero, para páginas internas */
.hero__panel--compact { padding-top: clamp(2rem, 4vw, 3.5rem); }
.hero__panel--compact .hero__copy { padding-bottom: clamp(2rem, 4vw, 3.5rem); }
.hero__panel--compact .h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
@media (min-width: 1024px) {
  .hero__grid--narrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* Vista de cartera del consultor (mockup) */
.portfolio { display: grid; gap: .375rem; }
.portfolio__head, .portfolio__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .625rem; align-items: center;
}
.portfolio__head {
  padding: 0 .75rem .375rem;
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-muted);
}
.portfolio__head span:not(:first-child) { text-align: right; }
.portfolio__row {
  padding: .625rem .75rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
}
.portfolio__name {
  font-size: .8125rem; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.portfolio__score {
  font-family: var(--font-mono); font-size: .9375rem; font-weight: 600;
  font-variant-numeric: tabular-nums; min-width: 2.2rem; text-align: right;
}

/* Escalones de tarifa */
.tiers {
  display: grid; gap: var(--space-4);
  max-width: 62rem; margin-inline: auto;
}
@media (min-width: 880px) { .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); } }
.tiers > * { min-width: 0; }

.tier {
  position: relative;
  display: flex; flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.tier__range {
  font-size: .8125rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-muted);
}
.tier h3 { margin: .375rem 0 .75rem; font-size: clamp(1.25rem, 2vw, 1.5rem); }
.tier p { font-size: .9375rem; color: var(--ink-soft); }

.tier--featured {
  background: linear-gradient(160deg, var(--carbon-900), var(--carbon-950));
  border-color: var(--gold-600);
  color: var(--on-dark);
}
.tier--featured h3 { color: #fff; }
.tier--featured .tier__range { color: var(--gold-400); }
.tier--featured p { color: var(--on-dark-soft); }
.tier--featured .checklist li { color: var(--on-dark-soft); }
.tier--featured .checklist svg { color: var(--gold-400); }

.tier__badge {
  position: absolute; top: -13px; right: clamp(1.5rem, 3vw, 2.25rem);
  padding: .25rem .75rem;
  border-radius: var(--r-full);
  background: var(--crimson-700); color: #fff;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
}

/* El precio, cuando la tarjeta lo anuncia. El «antes» tachado va antes del
   vigente y en menor peso: la cifra que manda es la que se paga. */
.tier__price {
  margin: 0 0 .5rem;
  font-size: clamp(1.5rem, 2.6vw, 1.875rem); font-weight: 700;
  color: var(--ink); letter-spacing: -0.02em;
}
.tier__price-before {
  margin-right: .375rem;
  font-size: .8em; font-weight: 500;
  color: var(--ink-muted); text-decoration-thickness: 1px;
}
.tier__price-unit {
  display: block; margin-top: .125rem;
  font-size: .8125rem; font-weight: 500; letter-spacing: 0;
  color: var(--ink-muted); text-transform: none;
}
.tier--featured .tier__price { color: #fff; }
.tier--featured .tier__price-before { color: var(--on-dark-soft); }
.tier--featured .tier__price-unit { color: var(--on-dark-soft); }

/* El botón se ancla al pie: las listas de dos escalones nunca miden igual. */
.tier__cta { margin-top: auto; }
.tier .checklist + .tier__cta { padding-top: var(--space-5); }

.tiers__note {
  max-width: 40rem; margin: var(--space-5) auto 0;
  text-align: center; font-size: .9375rem; color: var(--ink-muted);
}
.tiers__note a { color: var(--crimson-700); font-weight: 600; text-decoration: underline; }
.tiers__note a:hover { color: var(--crimson-600); }

/* Bloque de entrada al programa desde la home */
.segment {
  display: grid; gap: var(--space-5); align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  background: var(--surface);
}
@media (min-width: 900px) {
  .segment { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-7); }
}
.segment > * { min-width: 0; }
.segment h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: var(--space-3); }
.segment p { margin-top: var(--space-4); color: var(--ink-soft); max-width: 44rem; }
.segment__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* --- 8. Tarjetas -------------------------------------------------------- */
/* Los hijos de una grilla no deben heredar min-width:auto: un contenido ancho
   (fórmulas, tablas, cifras sin corte) empujaría el layout más allá del viewport. */
.grid > *, .feature > *, .steps > *, .author > *,
.hero__grid > *, .contact-grid > *, .stat-grid > *,
.kpi-row > *, .demo__split > *, .footer__grid > * { min-width: 0; }

.grid { display: grid; gap: var(--space-4); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid { gap: var(--space-5); }
}

.card {
  display: flex; flex-direction: column;
  height: 100%;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover { border-color: #d6d3cc; box-shadow: var(--sh-md); transform: translateY(-2px); }
.card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: var(--space-4);
  border-radius: var(--r-md);
  background: var(--surface-3); color: var(--crimson-700);
}
.card__icon svg { width: 22px; height: 22px; }
.card__icon--gold { background: rgba(198,154,46,.14); color: var(--gold-700); }
.card__icon--dark { background: var(--carbon-850); color: var(--gold-400); }
.card h3 { margin-bottom: var(--space-2); }
.card p { font-size: .9375rem; color: var(--ink-soft); }
.card__meta {
  margin-top: auto; padding-top: var(--space-4);
  font-size: .8125rem; font-weight: 600; color: var(--ink-muted);
  letter-spacing: .02em;
}

.card--tint { background: var(--surface-2); border-color: transparent; }

/* Lista con check */
.checklist { display: grid; gap: .75rem; margin-top: var(--space-5); }
.checklist li {
  display: flex; gap: .625rem; align-items: flex-start;
  font-size: .9375rem; color: var(--ink-soft);
}
.checklist svg {
  width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px;
  color: var(--pos);
}
.checklist--light li { color: var(--on-dark-soft); }
.checklist--light svg { color: var(--gold-400); }

/* --- 9. Bloques alternados (feature) ------------------------------------ */
.feature { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 1024px) {
  .feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature--reverse .feature__media { order: -1; }
}
.feature + .feature { margin-top: clamp(3rem, 7vw, 5.5rem); }
.feature__body .h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }

/* --- 10. Semáforo / demo de diagnóstico --------------------------------- */
.kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: .625rem; }
@media (min-width: 640px) { .kpi-row { grid-template-columns: repeat(4, 1fr); } }
.kpi {
  padding: .875rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.kpi__label { font-size: .6875rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-muted); }
.kpi__value {
  font-family: var(--font-mono);
  font-size: clamp(.875rem, 1.1vw, 1.0625rem);
  font-weight: 600; font-variant-numeric: tabular-nums;
  white-space: nowrap;   /* la cifra y su unidad nunca se parten */
  margin-top: .25rem;
}
.kpi__delta { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 600; margin-top: .125rem; }
.kpi__delta svg { width: 13px; height: 13px; }

.tag {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .25rem .625rem;
  border-radius: var(--r-full);
  font-size: .75rem; font-weight: 600; letter-spacing: .01em;
  white-space: nowrap; flex-shrink: 0;
}
.tag svg { width: 13px; height: 13px; }
.tag--pos { background: var(--pos-bg); color: var(--pos); }
.tag--neg { background: var(--neg-bg); color: var(--neg); }
.tag--warn { background: var(--warn-bg); color: var(--warn); }

/* Demo interna del mockup del hero */
.demo { display: block; padding: .75rem; background: var(--surface); background-image: none; aspect-ratio: auto; }
.demo__split { display: grid; gap: .625rem; margin-top: .625rem; grid-template-columns: 1fr; }
@media (min-width: 480px) { .demo__split { grid-template-columns: 1.05fr .95fr; } }
.demo__box { border: 1px solid var(--line); border-radius: var(--r-md); padding: .875rem; }
/* Etiquetas de una o dos líneas: las cifras quedan alineadas entre sí. */
.demo .kpi-row .kpi__label { display: block; min-height: 2.4em; }
.demo__score { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }
.demo__score-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.demo__score-max { font-size: .8125rem; color: var(--ink-muted); }
.demo__score .tag { margin-left: auto; }
.demo__bars { display: flex; align-items: flex-end; gap: 5px; height: 54px; margin-top: .875rem; }
.demo__bars span { flex: 1; background: var(--surface-3); border-radius: 4px 4px 0 0; }
.demo__bars span.is-current { background: var(--gold-500); }
.demo__list { display: grid; gap: .5rem; margin-top: .625rem; }
.demo__list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .8125rem; line-height: 1.35; }
.demo__list li > span:first-child { min-width: 0; }
.demo__note { font-size: .75rem; color: var(--ink-muted); margin-top: .75rem; text-align: center; }
.kpi__delta--pos { color: var(--pos); }
.kpi__delta--neg { color: var(--neg); }

.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: var(--space-4); font-size: .8125rem; color: var(--ink-muted); }
.legend--center { justify-content: center; margin-top: var(--space-6); }
.legend span { display: inline-flex; align-items: center; gap: .4rem; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* --- 11. Sección oscura ------------------------------------------------- */
.dark-panel {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl);
  background: linear-gradient(155deg, var(--carbon-900), var(--carbon-950));
  color: var(--on-dark);
  padding: clamp(2rem, 5vw, 4rem);
}
.dark-panel h2, .dark-panel h3 { color: #fff; }
.dark-panel::after {
  content: '';
  position: absolute; right: -12%; top: -30%;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(142,12,36,.35), transparent 65%);
  pointer-events: none;
}
.dark-panel > * { position: relative; }

.dark-card {
  padding: var(--space-5);
  border: 1px solid var(--on-dark-line);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.035);
}
.dark-card h3 { margin-bottom: .5rem; }
.dark-card p { font-size: .9375rem; color: var(--on-dark-soft); }

/* --- 12. Escala Altman -------------------------------------------------- */
.zscale { margin-top: var(--space-6); }
.zscale__bar {
  display: grid; grid-template-columns: 1.23fr 1.66fr 1.4fr;
  height: 14px; border-radius: var(--r-full); overflow: hidden;
}
.zscale__seg--neg  { background: linear-gradient(90deg, #8c1d18, #b3261e); }
.zscale__seg--warn { background: linear-gradient(90deg, #b45309, #d99a3a); }
.zscale__seg--pos  { background: linear-gradient(90deg, #1a7f3d, #2f9e58); }
.zscale__labels {
  display: grid; grid-template-columns: 1.23fr 1.66fr 1.4fr;
  gap: .5rem; margin-top: .875rem;
}
.zscale__labels div { font-size: .8125rem; color: var(--on-dark-soft); }
.zscale__labels strong { display: block; color: #fff; font-family: var(--font-mono); font-size: .875rem; }

/* --- 13. Proceso (pasos) ------------------------------------------------ */
.steps { counter-reset: step; display: grid; gap: var(--space-4); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); gap: var(--space-5); } }
.step {
  position: relative; padding: var(--space-5);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.step__num {
  counter-increment: step;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-bottom: var(--space-4);
  border-radius: 50%;
  background: var(--carbon-900); color: var(--gold-400);
  font-family: var(--font-mono); font-size: .875rem; font-weight: 600;
}
.step__num::before { content: '0' counter(step); }
.step h3 { font-size: 1.0625rem; margin-bottom: .375rem; }
.step p { font-size: .9375rem; color: var(--ink-soft); }

/* --- 14. Autor ---------------------------------------------------------- */
.author {
  display: grid; gap: var(--space-6); align-items: center;
}
@media (min-width: 1024px) { .author { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); } }
.author__quote {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: 1.45; letter-spacing: -0.015em; font-weight: 500;
}
.author__quote::before { content: '“'; color: var(--gold-500); }
.author__quote::after  { content: '”'; color: var(--gold-500); }
.author__meta { margin-top: var(--space-5); display: flex; align-items: center; gap: .875rem; }
.author__avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--carbon-850); color: var(--gold-400);
  display: grid; place-items: center;
  font-weight: 700; letter-spacing: .04em;
}
.author__name { font-weight: 600; }
.author__role { font-size: .875rem; color: var(--ink-muted); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
.stat {
  padding: var(--space-5);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.stat__value {
  font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 700;
  letter-spacing: -0.03em; color: var(--crimson-700);
}
.stat__label { font-size: .875rem; color: var(--ink-soft); margin-top: .25rem; }

/* --- 14b. Preguntas frecuentes ------------------------------------------ */
.faq { max-width: 48rem; margin-inline: auto; display: grid; gap: .75rem; }
.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.faq__item[open] { border-color: #d6d3cc; box-shadow: var(--sh-sm); }
.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 56px; padding: 1rem 1.25rem;
  font-size: 1rem; font-weight: 600; letter-spacing: -0.01em;
  cursor: pointer; list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: ''; flex-shrink: 0;
  width: 11px; height: 11px;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur) var(--ease);
}
.faq__item[open] .faq__q::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq__q:hover { color: var(--crimson-700); }
.faq__a { padding: 0 1.25rem 1.25rem; }
.faq__a p { font-size: .9375rem; color: var(--ink-soft); max-width: 42rem; }

/* --- 15. CTA final ------------------------------------------------------ */
.cta-panel { text-align: center; }
.cta-panel .lead { margin-inline: auto; }
.cta-panel__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem;
  margin-top: var(--space-6);
}

/* --- 16. Formulario ----------------------------------------------------- */
.form { display: grid; gap: var(--space-4); }
.form__row { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .form__row { grid-template-columns: repeat(2, 1fr); } }

.field { display: grid; gap: .375rem; }
.field label { font-size: .875rem; font-weight: 600; }
.field .req { color: var(--crimson-600); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: .7rem .875rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 1rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 128px; resize: vertical; line-height: 1.6; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #cfccc5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(198,154,46,.22);
}
.field__help { font-size: .8125rem; color: var(--ink-muted); }
.field__error { font-size: .8125rem; font-weight: 500; color: var(--neg); }
.field__error:empty { display: none; }
.field__help svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--neg); }
.field.has-error input:focus { box-shadow: 0 0 0 3px rgba(179,38,30,.18); }

.alert {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: var(--space-4);
  border-radius: var(--r-md);
  font-size: .9375rem;
}
.alert svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.alert--ok  { background: var(--pos-bg); color: #10502a; border: 1px solid #bfe0cb; }
.alert--err { background: var(--neg-bg); color: #8c1d18; border: 1px solid #eec7c4; }
.alert a { text-decoration: underline; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* Panel de contacto lateral */
.contact-grid { display: grid; gap: clamp(2rem, 4vw, 3rem); align-items: start; }
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); }
  .contact-grid .dark-panel { position: sticky; top: calc(var(--nav-h) + 24px); }
}

.contact-list { display: grid; gap: var(--space-4); margin-top: var(--space-5); }
.contact-item { display: flex; gap: .875rem; align-items: flex-start; }
.contact-item svg { width: 20px; height: 20px; color: var(--gold-400); flex-shrink: 0; margin-top: 3px; }
.contact-item__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--on-dark-muted); }
.contact-item__value { font-weight: 500; color: var(--on-dark); }
.contact-item a.contact-item__value:hover { color: var(--gold-300); }

/* --- 17. Footer --------------------------------------------------------- */
.site-footer {
  background: var(--carbon-950); color: var(--on-dark-soft);
  padding-block: clamp(3rem, 6vw, 4.5rem) var(--space-6);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.footer__grid { display: grid; gap: var(--space-6); }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--space-7); } }
.site-footer .brand__name { color: #fff; }
.site-footer .brand__name span { color: var(--gold-400); }
.footer__about { margin-top: var(--space-4); font-size: .875rem; max-width: 30rem; }
.footer__title {
  font-size: .8125rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; margin-bottom: var(--space-4);
}
.footer__links { display: grid; gap: .625rem; }
.footer__links a { font-size: .9375rem; transition: color var(--dur) var(--ease); }
.footer__links a:hover { color: var(--gold-300); }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5);
  justify-content: space-between; align-items: center;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: var(--space-5);
  border-top: 1px solid var(--on-dark-line);
  font-size: .8125rem; color: var(--on-dark-muted);
}

/* --- 18. Botón flotante WhatsApp ---------------------------------------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: var(--z-float);
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 52px; padding: .75rem 1.15rem;
  border-radius: var(--r-full);
  background: #1fa855; color: #fff;
  font-size: .9375rem; font-weight: 600;
  box-shadow: 0 10px 26px rgba(31,168,85,.34);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.wa-float:hover { background: #17904a; transform: translateY(-2px); box-shadow: 0 14px 32px rgba(31,168,85,.42); }
.wa-float svg { width: 24px; height: 24px; }
.wa-float__text { display: none; }
@media (min-width: 640px) { .wa-float__text { display: inline; } }
@supports (padding: max(0px)) {
  .wa-float { right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); }
}

/* --- 19. Animaciones de entrada ----------------------------------------- */
/* El contenido solo se oculta si hay JS capaz de volver a mostrarlo.
   Sin JS, o si el observador falla, todo queda visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }

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

/* --- 20. Impresión ------------------------------------------------------ */
@media print {
  .site-header, .wa-float, .site-footer { display: none; }
  .hero__panel, .dark-panel { background: #fff !important; color: #000 !important; }
}
