/* ===================== DESIGN TOKENS ===================== */
:root, [data-theme="light"] {
  --color-bg:              #f7f9fb;
  --color-surface:         #ffffff;
  --color-surface-2:       #f4f7fa;
  --color-surface-offset:  #eef3f7;
  --color-surface-dynamic: #e2e8ef;
  --color-divider:         #dfe6ee;
  --color-border:          oklch(0.35 0.01 240 / 0.12);
  --color-text:            #17202a;
  --color-text-muted:      #556170;
  --color-text-faint:      #5a6876;
  --color-text-inverse:    #ffffff;
  --color-primary:         #0b8f83;
  --color-primary-hover:   #08786f;
  --color-primary-active:  #06635d;
  --color-primary-dim:     oklch(0.65 0.12 178 / 0.10);
  --color-accent:          #2f6fed;
  --color-danger:          #cf3e36;
  --color-warning:         #ba8b16;
  --color-success:         #2d8f45;
  --font-display:          'Sora', 'Helvetica Neue', sans-serif;
  --font-body:             'Inter', 'Helvetica Neue', sans-serif;
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    4rem);
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem;    --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;    --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;   --space-20: 5rem;   --space-24: 6rem;
  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem;
  --radius-xl: 1rem; --radius-2xl: 1.5rem; --radius-full: 9999px;
  --shadow-sm: 0 1px 3px oklch(0.25 0.01 240 / 0.08);
  --shadow-md: 0 8px 24px oklch(0.25 0.01 240 / 0.10);
  --shadow-lg: 0 16px 40px oklch(0.25 0.01 240 / 0.12);
  --shadow-glow: 0 12px 30px oklch(0.65 0.12 178 / 0.20);
  --content-narrow: 640px; --content-default: 960px; --content-wide: 1200px;
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
/* ===================== BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  overflow-x: hidden;
}
img, picture, video { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); text-wrap: balance; line-height: 1.12; }
p, li { text-wrap: pretty; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
/* Links de texto dentro de párrafos/listas: subrayado para no depender solo del color (WCAG 1.4.1). */
p a:not([class]), li a:not([class]) {
  color: var(--color-primary); text-decoration: underline;
  text-underline-offset: 0.15em; text-decoration-thickness: 1px;
}
p a:not([class]):hover, li a:not([class]):hover { color: var(--color-primary-hover); }
a, button, input, textarea, select {
  transition: color var(--transition), background var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              opacity var(--transition), transform var(--transition);
}
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; border-radius: var(--radius-sm); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border-width:0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===================== LAYOUT ===================== */
.container { max-width: var(--content-default); margin-inline: auto; padding-inline: var(--space-6); }
.container--wide { max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--space-6); }
.container--narrow { max-width: var(--content-narrow); margin-inline: auto; padding-inline: var(--space-6); }
section { padding-block: clamp(var(--space-16), 8vw, var(--space-24)); }
/* Secciones de ritmo reducido (trust strip, notas) — ritmo vertical consistente */
.section--compact { padding-block: var(--space-8); }

/* ===================== NAV ===================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(16px) saturate(180%);
  background: rgba(255,255,255,0.88);
  border-bottom: 1px solid var(--color-border);
}
.nav__inner {
  max-width: var(--content-wide); margin-inline: auto;
  padding: var(--space-4) var(--space-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
}
.nav__logo { display: flex; align-items: center; gap: var(--space-3); }
.nav__logo-text {
  font-family: var(--font-display); font-weight: 700; font-size: var(--text-lg);
  letter-spacing: -0.02em; color: var(--color-text);
}
.nav__logo-text span { color: var(--color-primary); }
.nav__links { display: flex; align-items: center; gap: var(--space-5); }
.nav__links a { font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 500; white-space: nowrap; }
.nav__links a:hover { color: var(--color-text); }
.nav__links a[aria-current="page"] { color: var(--color-primary); font-weight: 600; }
.nav__cta {
  background: var(--color-primary); color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-5); border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 600; font-family: var(--font-display);
  white-space: nowrap;
}
.nav__cta:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.nav__hamburger { display: none; padding: var(--space-2); color: var(--color-text-muted); }
@media (max-width: 768px) {
  .nav__cta { display: none; }
  .nav__links { display: none; }
  .nav__hamburger { display: flex; align-items: center; justify-content: center; }
  .nav__links.is-open {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--color-surface);
    padding: var(--space-6); gap: var(--space-4); border-bottom: 1px solid var(--color-border);
  }
}

/* ===================== HERO ===================== */
.hero {
  padding-top: calc(80px + var(--space-16));
  padding-bottom: var(--space-16);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, oklch(0.75 0.08 178 / 0.18) 0%, transparent 60%);
  pointer-events: none;
}
.hero__inner {
  position: relative; z-index: 1;
  max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--space-6);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: stretch;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--color-primary-dim); border: 1px solid oklch(0.65 0.12 178 / 0.3);
  color: var(--color-primary); padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: var(--space-5);
}
.hero__badge::before { content: ''; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.5;transform:scale(0.8)} }
.hero__title {
  font-size: var(--text-3xl); font-weight: 800; letter-spacing: -0.03em;
  color: var(--color-text); line-height: 1.05; margin-bottom: var(--space-6);
}
.hero__title .accent { color: var(--color-primary); }
.hero__title .strike {
  text-decoration: line-through; color: var(--color-text-faint);
  text-decoration-color: var(--color-danger); text-decoration-thickness: 3px;
}
.hero__sub {
  font-size: var(--text-lg); color: var(--color-text-muted); max-width: 52ch;
  margin-bottom: var(--space-8); line-height: 1.6;
}
.hero__actions { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.btn-primary {
  display: inline-flex; align-items: center; gap: var(--space-2);
  background: var(--color-primary); color: var(--color-text-inverse);
  padding: var(--space-4) var(--space-8); border-radius: var(--radius-full);
  font-size: var(--text-base); font-weight: 700; font-family: var(--font-display);
  box-shadow: 0 4px 20px oklch(0.65 0.12 178 / 0.4);
}
.btn-primary:hover { background: var(--color-primary-hover); transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: var(--color-text-muted); padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-full); font-size: var(--text-base); font-weight: 600;
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { color: var(--color-text); border-color: oklch(0.8 0 0 / 0.25); background: var(--color-surface); }
.hero__stats {
  display: flex; gap: var(--space-6); margin-top: var(--space-6); padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}
.hero__stat { display: flex; flex-direction: column; }
.hero__stat-num { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 800; color: var(--color-primary); letter-spacing: -0.02em; }
.hero__stat-label { font-size: 0.68rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
.hero__slider {
  position: relative; height: 100%;
  border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.hero__slides {
  display: flex; height: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@media (prefers-reduced-motion: reduce) { .hero__slides { transition: none; } }
.hero__slide { min-width: 100%; height: 100%; position: relative; display: flex; }
.hero__image { width: 100%; height: 100%; min-height: 340px; object-fit: cover; display: block; }
.hero__slider-prev,
.hero__slider-next {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(4px);
  border: 1px solid var(--color-border); border-radius: var(--radius-full);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--color-text); transition: background 0.2s;
}
.hero__slider-prev:hover, .hero__slider-next:hover { background: white; }
.hero__slider-prev { left: var(--space-3); }
.hero__slider-next { right: var(--space-3); }
.hero__slider-dots {
  position: absolute; bottom: var(--space-12); right: var(--space-4);
  display: flex; gap: var(--space-2); z-index: 10;
}
.hero__dot {
  width: 8px; height: 8px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.5); border: none; cursor: pointer; padding: 0;
  transition: background 0.2s, width 0.3s;
}
.hero__dot.is-active { background: white; width: 24px; }
.hero__image-badge {
  position: absolute; bottom: var(--space-4); left: var(--space-4);
  background: rgba(255,255,255,0.92); border: 1px solid var(--color-border);
  backdrop-filter: blur(8px); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg); display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); font-weight: 600; color: var(--color-text);
}
.hero__image-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 8px var(--color-success); flex-shrink: 0; animation: pulse-dot 1.5s infinite; }
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__stats { flex-wrap: wrap; gap: var(--space-6); }
}
@media (max-width: 560px) {
  /* CTAs del hero a ancho completo y fáciles de tocar en teléfonos */
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn-primary, .hero__actions .btn-ghost { width: 100%; justify-content: center; }
}
/* Hero centrado para páginas internas (sin imagen) */
.hero--compact { padding-top: calc(80px + var(--space-12)); padding-bottom: var(--space-12); }
.hero--compact .hero__inner { grid-template-columns: 1fr; max-width: var(--content-default); text-align: center; }
.hero--compact .hero__sub { margin-inline: auto; }
.hero--compact .hero__actions { justify-content: center; }

/* ===================== PROBLEM SECTION ===================== */
.problem { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.problem__stats { display: flex; gap: var(--space-10); margin-top: var(--space-10); flex-wrap: wrap; }
.problem__stat { display: flex; flex-direction: column; flex: 1 1 220px; max-width: 320px; }
.problem__stat-num { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800; color: var(--color-danger); letter-spacing: -0.03em; line-height: 1; margin-bottom: var(--space-3); }
.problem__stat-label { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.5; }
@media (max-width: 560px) {
  /* En teléfonos chicos las stats apilan a ancho completo (sin última fila despareja) */
  .problem__stat { flex-basis: 100%; max-width: 100%; }
}
.problem__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px,100%), 1fr)); gap: var(--space-4); margin-top: var(--space-10); }
.problem__card {
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-6);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.problem__card:hover { box-shadow: var(--shadow-md); border-color: oklch(0.65 0.15 25 / 0.20); }
.problem__icon {
  width: 44px; height: 44px; border-radius: var(--radius-lg); flex-shrink: 0;
  background: oklch(0.65 0.15 25 / 0.08); border: 1px solid oklch(0.65 0.15 25 / 0.18);
  display: flex; align-items: center; justify-content: center; color: var(--color-danger);
  margin-bottom: var(--space-4);
}
.problem__icon svg { width: 20px; height: 20px; }
.problem__card h3 { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-2); color: var(--color-text); }
.problem__card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }
.section-label {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-primary); margin-bottom: var(--space-4);
}
.section-title { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; color: var(--color-text); margin-bottom: var(--space-4); }
.section-sub { font-size: var(--text-base); color: var(--color-text-muted); max-width: 58ch; line-height: 1.7; }

/* ===================== SOLUTION / HOW IT WORKS ===================== */
.how__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6); margin-top: var(--space-10);
}
@media (max-width: 640px) {
  .how__grid { grid-template-columns: 1fr; }
}
.how__card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-8); position: relative; overflow: hidden;
}
.how__card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--color-primary), transparent);
}
.how__num {
  font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5rem); font-weight: 800;
  color: oklch(0.65 0.12 178 / 0.12); line-height: 1; margin-bottom: var(--space-3);
  letter-spacing: -0.04em;
}
.how__card h3 { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--space-3); color: var(--color-text); }
.how__card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; }

/* ===================== FEATURES ===================== */
.features { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.features__layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; margin-top: var(--space-12); }
.features__image { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); }
.features__list { display: flex; flex-direction: column; gap: var(--space-5); }
.feature-item { display: flex; gap: var(--space-4); align-items: flex-start; }
.feature-item__icon {
  width: 40px; height: 40px; border-radius: var(--radius-lg); flex-shrink: 0;
  background: var(--color-primary-dim); border: 1px solid oklch(0.65 0.12 178 / 0.25);
  display: flex; align-items: center; justify-content: center; color: var(--color-primary);
  margin-top: 2px;
}
.feature-item__icon svg { width: 18px; height: 18px; }
.feature-item__content h4 { font-size: var(--text-base); font-weight: 700; color: var(--color-text); margin-bottom: 4px; font-family: var(--font-body); }
.feature-item__content p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }
@media (max-width: 800px) { .features__layout { grid-template-columns: 1fr; } }

/* ===================== UNDERSTAND (razona / comprende) ===================== */
/* Recurso A — cómo razona ante una escena */
.scene-demo { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); margin-top: var(--space-10); }
.scene-demo__card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4);
}
.scene-demo__scene { display: flex; gap: var(--space-3); align-items: flex-start; }
.scene-demo__time { font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700; color: var(--color-text-muted); flex-shrink: 0; }
.scene-demo__scene p { font-size: var(--text-sm); color: var(--color-text); line-height: 1.6; margin: 0; }
.scene-demo__verdict {
  display: flex; gap: var(--space-3); align-items: flex-start;
  border-radius: var(--radius-lg); padding: var(--space-4); font-size: var(--text-sm); line-height: 1.5; margin-top: auto;
}
.scene-demo__verdict strong { font-weight: 700; }
.scene-demo__verdict .ic { flex-shrink: 0; font-weight: 800; }
.scene-demo__verdict.is-normal { background: oklch(0.6 0.13 150 / 0.1); border: 1px solid oklch(0.6 0.13 150 / 0.3); color: var(--color-success); }
.scene-demo__verdict.is-alert { background: oklch(0.6 0.18 25 / 0.08); border: 1px solid oklch(0.6 0.18 25 / 0.3); color: var(--color-danger); }
.scene-demo__caption { text-align: center; font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-6); line-height: 1.6; }

/* Recurso B — mini comparativa cámara de fábrica vs VisionIA */
.mini-cmp { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); margin-top: var(--space-10); position: relative; align-items: stretch; }
/* Chip "vs" en el centro */
.mini-cmp::after {
  content: 'vs'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: 2.4rem; height: 2.4rem; border-radius: var(--radius-full);
  background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-muted);
}
.mini-cmp__col {
  position: relative; background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl); padding: var(--space-8);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mini-cmp__head { margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-border); }
.mini-cmp__eyebrow { display: block; font-size: var(--text-xs); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; margin-bottom: var(--space-1); }
.mini-cmp__col h3 { font-size: var(--text-lg); font-weight: 700; color: var(--color-text); margin: 0; }
.mini-cmp__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.mini-cmp__col li {
  font-size: var(--text-sm); color: var(--color-text); line-height: 1.45;
  padding-left: calc(1.6rem + var(--space-3)); position: relative; display: flex; align-items: center; min-height: 1.6rem;
}
.mini-cmp__col li::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 1.6rem; height: 1.6rem; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 800; line-height: 1;
}
/* Columna "lo de siempre" — atenuada */
.mini-cmp__col.bad { background: var(--color-surface-2); }
.mini-cmp__col.bad .mini-cmp__eyebrow { color: var(--color-danger); }
.mini-cmp__col.bad li { color: var(--color-text-muted); }
.mini-cmp__col.bad li::before { content: '\2715'; color: var(--color-danger); background: oklch(0.6 0.18 25 / 0.12); }
/* Columna VisionIA — destacada */
.mini-cmp__col.good {
  border-color: var(--color-primary);
  background: linear-gradient(180deg, var(--color-primary-dim), var(--color-surface) 60%);
  box-shadow: var(--shadow-glow);
}
.mini-cmp__col.good .mini-cmp__eyebrow { color: var(--color-primary); }
.mini-cmp__col.good .mini-cmp__head { border-bottom-color: oklch(0.65 0.12 178 / 0.25); }
.mini-cmp__col.good li::before { content: '\2713'; color: var(--color-success); background: oklch(0.65 0.15 150 / 0.14); }
.mini-cmp__badge {
  position: absolute; top: 0; right: var(--space-6); transform: translateY(-50%);
  background: var(--color-primary); color: var(--color-text-inverse);
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .03em;
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); box-shadow: var(--shadow-sm);
}

/* Recurso D — conversás con el sistema */
.chat-demo { max-width: 560px; margin: var(--space-10) auto 0; display: flex; flex-direction: column; gap: var(--space-3); }
.chat-demo__bubble { font-size: var(--text-sm); line-height: 1.5; padding: var(--space-3) var(--space-5); border-radius: var(--radius-xl); max-width: 85%; }
.chat-demo__bubble.is-user { align-self: flex-end; background: var(--color-primary-dim); border: 1px solid oklch(0.65 0.12 178 / 0.25); color: var(--color-text); border-bottom-right-radius: var(--radius-sm); }
.chat-demo__bubble.is-system { align-self: flex-start; background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text-muted); border-bottom-left-radius: var(--radius-sm); }
.chat-demo__caption { text-align: center; font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-5); line-height: 1.6; }

@media (max-width: 640px) {
  .scene-demo, .mini-cmp { grid-template-columns: 1fr; }
  /* Al apilar, el chip centrado del contenedor caería dentro de una tarjeta.
     Lo anclamos al borde inferior de la columna "lo de siempre" para que
     quede en la costura (gutter) entre ambas tarjetas. */
  .mini-cmp::after { display: none; }
  .mini-cmp__col.bad::after {
    content: 'vs'; position: absolute; left: 50%; bottom: 0;
    transform: translate(-50%, 50%); z-index: 3;
    width: 2.4rem; height: 2.4rem; border-radius: var(--radius-full);
    background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-muted);
  }
}

/* ===================== USE CASES ===================== */
.cases__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4); margin-top: var(--space-10); }
.case-card {
  flex: 0 0 calc(25% - 12px);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
@media (max-width: 720px) { .case-card { flex: 0 0 calc(50% - 8px); } }
@media (max-width: 420px) { .case-card { flex: 0 0 100%; } }
.case-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: oklch(0.65 0.12 178 / 0.3); }
.case-card__img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.case-card__body { padding: var(--space-5); }
.case-card__tag {
  display: inline-block; font-size: var(--text-xs); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--color-primary); margin-bottom: var(--space-2);
}
.case-card__body h3 { font-size: var(--text-base); font-weight: 700; color: var(--color-text); margin-bottom: var(--space-2); font-family: var(--font-body); }
.case-card__hook { font-size: var(--text-sm); font-weight: 600; color: var(--color-primary); line-height: 1.5; margin-bottom: var(--space-2); font-style: italic; }
.case-card__body p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }
/* Variante ancha para la página dedicada de casos */
.cases__grid--wide .case-card { flex: 0 0 calc(33.333% - 11px); }
@media (max-width: 900px) { .cases__grid--wide .case-card { flex: 0 0 calc(50% - 8px); } }
@media (max-width: 560px) { .cases__grid--wide .case-card { flex: 0 0 100%; } }

/* ===================== COMPARISON ===================== */
.comparison { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.comparison__hero { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); margin-bottom: var(--space-12); }
/* Enfocable por teclado + pista visual de scroll lateral en pantallas angostas */
.comparison__table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(90deg, var(--color-surface) 30%, transparent),
    linear-gradient(90deg, transparent, var(--color-surface) 70%) 100% 0,
    radial-gradient(farthest-side at 0 50%, oklch(0.25 0.01 240 / 0.12), transparent),
    radial-gradient(farthest-side at 100% 50%, oklch(0.25 0.01 240 / 0.12), transparent) 100% 0;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
  background-attachment: local, local, scroll, scroll;
}
.comparison__table-wrap:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.comparison__table { width: 100%; border-collapse: collapse; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--color-border); }
.comparison__table th {
  background: var(--color-surface-2); padding: var(--space-4) var(--space-6);
  font-family: var(--font-display); font-size: var(--text-sm); font-weight: 700;
  text-align: left; color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
}
.comparison__table th.good { color: var(--color-primary); }
.comparison__table td { padding: var(--space-4) var(--space-6); font-size: var(--text-sm); vertical-align: top; border-bottom: 1px solid var(--color-border); }
.comparison__table tr:last-child td { border-bottom: none; }
.comparison__table td:first-child { color: var(--color-text-muted); font-weight: 500; }
.comparison__table .bad { color: var(--color-danger); }
.comparison__table .ok { color: var(--color-warning); }
.comparison__table .good { color: var(--color-success); font-weight: 600; }
.comparison__table tr:hover td { background: oklch(0.8 0 0 / 0.02); }

/* ===================== LOCAL AI SECTION ===================== */
.local__layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: center; margin-top: var(--space-12); }
.local__image { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); }
.local__benefits { display: flex; flex-direction: column; gap: var(--space-4); }
.local__benefit {
  display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4);
  background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
}
.local__benefit-icon { color: var(--color-primary); flex-shrink: 0; margin-top: 2px; }
.local__benefit-icon svg { width: 20px; height: 20px; }
.local__benefit h4 { font-size: var(--text-sm); font-weight: 700; color: var(--color-text); margin-bottom: 2px; font-family: var(--font-body); }
.local__benefit p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.5; }
@media (max-width: 800px) { .local__layout { grid-template-columns: 1fr; } }

/* ===================== INTEGRADOR (cara humana) ===================== */
.integrator { display: grid; grid-template-columns: 280px 1fr; gap: var(--space-12); align-items: center; margin-top: var(--space-10); }
.integrator__photo-wrap { position: relative; }
.integrator__photo {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg); border: 1px solid var(--color-border); background: var(--color-surface-2);
}
.integrator__badge {
  position: absolute; left: var(--space-4); bottom: var(--space-4);
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full);
  background: oklch(0.2 0.02 240 / 0.78); color: #fff; font-size: var(--text-xs); font-weight: 700;
  backdrop-filter: blur(4px);
}
.integrator__name { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; color: var(--color-text); margin-bottom: 2px; }
.integrator__role { font-size: var(--text-sm); font-weight: 600; color: var(--color-primary); margin-bottom: var(--space-4); }
.integrator__bio { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.7; margin-bottom: var(--space-5); }
.integrator__certs { margin-bottom: var(--space-6); }
@media (max-width: 800px) { .integrator { grid-template-columns: 1fr; gap: var(--space-6); max-width: 420px; margin-inline: auto; } }

/* ===================== PRICING ===================== */
.pricing__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px,100%), 1fr)); gap: var(--space-5); margin-top: var(--space-10); }
.pricing-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl); padding: var(--space-8); display: flex; flex-direction: column;
}
.pricing-card--featured {
  border-color: oklch(0.65 0.12 178 / 0.5);
  background: linear-gradient(160deg, var(--color-surface-2), var(--color-surface));
  box-shadow: 0 0 0 1px oklch(0.65 0.12 178 / 0.2), var(--shadow-md);
  position: relative;
}
.pricing-card--featured::before {
  content: 'MÁS POPULAR'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--color-primary); color: var(--color-text-inverse);
  font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.1em;
  padding: 2px var(--space-4); border-radius: var(--radius-full);
}
.pricing-card__name { font-size: var(--text-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); margin-bottom: var(--space-2); }
.pricing-card__price { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800; color: var(--color-text); letter-spacing: -0.03em; margin-bottom: var(--space-1); }
.pricing-card__price span { font-size: var(--text-sm); font-weight: 400; color: var(--color-text-muted); }
.pricing-card__desc { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-6); line-height: 1.6; }
.pricing-divider { height: 1px; background: var(--color-border); margin-bottom: var(--space-6); }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); flex: 1; margin-bottom: var(--space-8); }
.pricing-features li { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--text-sm); color: var(--color-text-muted); }
.pricing-features li::before { content: '✓'; color: var(--color-success); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.pricing-features li.no::before { content: '✗'; color: var(--color-text-faint); }
.pricing-features li.no { color: var(--color-text-faint); }
.btn-outline {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  border: 2px solid var(--color-primary); color: var(--color-primary);
  padding: var(--space-4) var(--space-6); border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 700; font-family: var(--font-display);
}
.btn-outline:hover { background: var(--color-primary); color: var(--color-text-inverse); }
.btn-filled {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  background: var(--color-primary); color: var(--color-text-inverse);
  padding: var(--space-4) var(--space-6); border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 700; font-family: var(--font-display);
}
.btn-filled:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-glow); }

/* ===================== FAQ ===================== */
.faq__list { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-10); max-width: 720px; }
.faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); overflow: hidden; }
.faq-item__btn {
  width: 100%; text-align: left; padding: var(--space-5) var(--space-6);
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  font-size: var(--text-base); font-weight: 600; color: var(--color-text);
}
.faq-item__btn:hover { background: var(--color-surface-2); }
.faq-item__chevron { color: var(--color-text-muted); transition: transform var(--transition); flex-shrink: 0; }
.faq-item__chevron svg { width: 18px; height: 18px; }
.faq-item.is-open .faq-item__chevron { transform: rotate(180deg); }
.faq-item__body { max-height: 0; overflow: hidden; transition: max-height 300ms ease, padding 300ms ease; }
.faq-item.is-open .faq-item__body { max-height: 600px; }
.faq-item__body p { padding: 0 var(--space-6) var(--space-5); font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; word-break: break-word; }
/* Layout dos columnas (intro + lista) para la página de FAQ */
.faq__layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: start; }
.faq__layout .faq__list { margin-top: 0; }
@media (max-width: 780px) { .faq__layout { grid-template-columns: 1fr; gap: var(--space-8); } }

/* ===================== LEAD FORM ===================== */
.lead { background: var(--color-surface); border-top: 1px solid var(--color-border); }
.lead__inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); align-items: start;
}
.lead__copy { padding-top: var(--space-2); }
.lead__copy h2 { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--space-5); }
.lead__copy h2 .accent { color: var(--color-primary); }
.lead__copy p { font-size: var(--text-base); color: var(--color-text-muted); line-height: 1.7; margin-bottom: var(--space-8); }
.lead__proof { display: flex; flex-direction: column; gap: var(--space-4); }
.lead__proof-item { display: flex; gap: var(--space-3); align-items: center; font-size: var(--text-sm); color: var(--color-text-muted); }
.lead__proof-item .icon { color: var(--color-primary); flex-shrink: 0; }
.lead__proof-item .icon svg { width: 18px; height: 18px; }
.lead-form {
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl); padding: var(--space-8);
}
.lead-form h3 { font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.02em; color: var(--color-text); margin-bottom: var(--space-2); }
.lead-form .form-sub { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-6); }
.form-group { margin-bottom: var(--space-4); }
.form-group label { display: block; font-size: var(--text-sm); font-weight: 600; color: var(--color-text); margin-bottom: var(--space-2); }
.form-group label span { color: var(--color-danger); margin-left: 2px; }
.form-control {
  width: 100%; padding: var(--space-3) var(--space-4);
  background: var(--color-surface); border: 1px solid oklch(0.8 0 0 / 0.15);
  border-radius: var(--radius-lg); color: var(--color-text);
  font-size: var(--text-sm); line-height: 1.5;
}
.form-control::placeholder { color: var(--color-text-faint); }
.form-control:hover { border-color: oklch(0.8 0 0 / 0.25); }
.form-control:focus { border-color: var(--color-primary); outline: none; box-shadow: 0 0 0 3px oklch(0.65 0.12 178 / 0.15); }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right var(--space-4) center; padding-right: calc(var(--space-4) + 20px); }
.form-checkbox { display: flex; gap: var(--space-3); align-items: flex-start; margin-top: var(--space-2); }
.form-checkbox input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; accent-color: var(--color-primary); cursor: pointer; }
.form-checkbox label { font-size: var(--text-xs); color: var(--color-text-muted); line-height: 1.5; cursor: pointer; }
.form-checkbox a { color: var(--color-primary); }
.form-submit {
  width: 100%; background: var(--color-primary); color: var(--color-text-inverse);
  padding: var(--space-4); border-radius: var(--radius-full);
  font-size: var(--text-base); font-weight: 700; font-family: var(--font-display);
  margin-top: var(--space-5); box-shadow: 0 4px 20px oklch(0.65 0.12 178 / 0.3);
}
.form-submit:hover { background: var(--color-primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.form-submit:active { transform: translateY(0); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.form-note { font-size: var(--text-xs); color: var(--color-text-faint); text-align: center; margin-top: var(--space-3); }
.form-success {
  display: none; text-align: center; padding: var(--space-10);
}
.form-success.is-visible { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.form-success__icon { width: 64px; height: 64px; border-radius: 50%; background: oklch(0.5 0.15 145 / 0.15); display: flex; align-items: center; justify-content: center; color: var(--color-success); }
.form-success__icon svg { width: 32px; height: 32px; }
.form-success h4 { font-size: var(--text-xl); font-weight: 800; color: var(--color-text); }
.form-success p { font-size: var(--text-sm); color: var(--color-text-muted); max-width: 36ch; text-align: center; }
@media (max-width: 800px) {
  .lead__inner { grid-template-columns: 1fr; }
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* ===================== FOOTER ===================== */
footer {
  background: var(--color-surface); border-top: 1px solid var(--color-border);
  padding-block: var(--space-12);
}
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-10); }
.footer__brand .nav__logo-text { font-size: var(--text-base); display: block; margin-bottom: var(--space-3); }
.footer__brand p { font-size: var(--text-sm); color: var(--color-text-muted); max-width: 40ch; line-height: 1.7; }
.footer__col h4 { font-size: var(--text-sm); font-weight: 700; color: var(--color-text); margin-bottom: var(--space-4); }
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.footer__col a { font-size: var(--text-sm); color: var(--color-text-muted); }
.footer__col a:hover { color: var(--color-primary); }
.footer__bottom {
  margin-top: var(--space-10); padding-top: var(--space-6); border-top: 1px solid var(--color-border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--space-4);
  font-size: var(--text-xs); color: var(--color-text-faint);
}
.footer__certs { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.cert-badge {
  background: var(--color-surface-2); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); padding: 2px var(--space-3);
  font-size: var(--text-xs); color: var(--color-text-muted); font-weight: 600;
}
@media (max-width: 700px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ===================== SCROLL REVEAL ===================== */
/* Solo se oculta cuando hay JS (clase 'js' en <html>); sin JS el contenido es visible por defecto. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===================== MISC ===================== */
.text-center { text-align: center; }
.text-center .section-sub { margin-inline: auto; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }

/* CTA band reutilizable (cierre de páginas internas) */
.cta-band { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); text-align: center; }
.cta-band h2 { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--space-4); }
.cta-band p { font-size: var(--text-base); color: var(--color-text-muted); max-width: 52ch; margin: 0 auto var(--space-8); line-height: 1.7; }
.cta-band__actions { display: flex; gap: var(--space-4); justify-content: center; flex-wrap: wrap; }

/* Floating WhatsApp */
@media (max-width: 640px) {
  .whatsapp-fab { right: var(--space-4) !important; width: 48px !important; height: 48px !important; }
  .whatsapp-fab svg { width: 22px !important; height: 22px !important; }
}
.whatsapp-fab {
  position: fixed; bottom: var(--space-6); right: var(--space-6); z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; box-shadow: 0 4px 20px oklch(0.5 0.2 145 / 0.4);
  display: flex; align-items: center; justify-content: center; color: white;
  font-size: 26px; line-height: 1;
  transition: transform var(--transition), box-shadow var(--transition), bottom var(--transition);
}
/* Cuando la barra sticky está visible, el FAB se eleva para no superponerse. */
.whatsapp-fab.is-lifted { bottom: calc(72px + var(--space-4)); }
.whatsapp-fab:hover { transform: scale(1.1); box-shadow: 0 6px 30px oklch(0.5 0.2 145 / 0.5); }
.whatsapp-fab svg { width: 28px; height: 28px; fill: white; }

/* Counter animation */
.counter { display: inline-block; }

/* Sticky CTA bar */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border); padding: var(--space-4) var(--space-6);
  display: flex; align-items: center; justify-content: center; gap: var(--space-4);
  transform: translateY(100%); transition: transform 0.4s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta p { font-size: var(--text-sm); color: var(--color-text-muted); display: none; }
@media (min-width: 640px) { .sticky-cta p { display: block; } }
.sticky-cta__form { display: flex; align-items: center; gap: var(--space-2); }
.sticky-cta__input {
  font-size: var(--text-sm); padding: var(--space-3) var(--space-4); min-width: 0; width: 220px;
  border: 1px solid var(--color-border); border-radius: var(--radius-md, 8px);
  background: var(--color-surface, #fff); color: var(--color-text);
}
.sticky-cta__input:focus { outline: none; border-color: var(--color-primary); }
@media (max-width: 480px) { .sticky-cta__input { width: 100%; } }
.sticky-cta__close { color: var(--color-text-faint); padding: var(--space-2); margin-left: var(--space-2); }
.sticky-cta__close:hover { color: var(--color-text-muted); }

/* Zebra striping tabla comparativa */
.comparison__table tbody tr:nth-child(even) td { background: var(--color-surface-2); }

/* Indicadores visuales en headers de tabla */
.comparison__table thead th.bad::before { content: '✕ '; color: var(--color-danger); font-size: 0.9em; }
.comparison__table thead th.good::before { content: '✓ '; color: var(--color-success); font-size: 0.9em; }

/* Campos opcionales del formulario */
.form-group--optional label { color: var(--color-text-muted); font-weight: 500; }
.form-group--optional .form-control { background: var(--color-surface-offset); }

/* Textarea redimensionable verticalmente */
textarea.form-control { resize: vertical; }
