/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  --bg: #F7F8FA;
  --white: #ffffff;
  --border: #E2E8F0;
  --border-soft: #E5E7EB;
  --border-faint: #EDF1F5;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #64748B;
  --text-quaternary: #94A3B8;

  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --accent-bg: #EFF6FF;
  --accent-bg-strong: #DBEAFE;

  --success: #10B981;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-strong: 0 20px 50px -20px rgba(15, 23, 42, 0.22);

  --max-wide: 1160px;
  --max-content: 1080px;
  --max-narrow: 680px;
  --max-form: 640px;
}

/* ==========================================================================
   RESET
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* overflow-x va en html, no en body: en body rompe position:sticky de sus
   hijos (el header sticky dejaría de fijarse al hacer scroll). */
html {
  overflow-x: hidden;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  width: 100%;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent-bg-strong); color: var(--text-primary); }

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

input, select, textarea, button { font-family: 'Plus Jakarta Sans', sans-serif; }
input::placeholder, textarea::placeholder { color: var(--text-quaternary); }

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

.hidden { display: none !important; }
.accent { color: var(--accent); }
.center { text-align: center; }

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

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  font-size: 15.5px;
  padding: 15px 24px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-outline {
  background: #fff;
  color: var(--text-primary);
  font-size: 15.5px;
  padding: 15px 24px;
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-small { font-size: 13px; padding: 11px 18px; }
.btn-full { width: 100%; font-size: 16px; padding: 16px 24px; }
.btn-submit { padding: 18px; }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

/* ==========================================================================
   TOP BAR
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(247, 248, 250, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.logo {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding: 48px 20px 40px;
  background:
    radial-gradient(1100px 500px at 15% -10%, #EFF6FF 0%, rgba(239, 246, 255, 0) 60%),
    radial-gradient(900px 500px at 100% 0%, #EEF2FF 0%, rgba(238, 242, 255, 0) 55%),
    var(--bg);
}

.hero-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 36px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  flex: 1 1 480px;
  min-width: 280px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  box-shadow: var(--shadow-card);
}

.hero-copy h1 {
  font-weight: 800;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: -0.8px;
  color: var(--text-primary);
}

.hero-sub {
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.hero-highlight {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.hero-highlight p {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  color: #1E293B;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}
.hero-facts strong { color: var(--text-primary); }

.hero-image {
  flex: 1 1 420px;
  min-width: 260px;
  max-width: 560px;
  margin-left: auto;
  display: flex;
  justify-content: center;
}
.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow-strong);
}

/* ==========================================================================
   SECTION GENERICS
   ========================================================================== */
.section {
  padding: 64px 20px;
  max-width: var(--max-content);
  margin: 0 auto;
}

.section-inner { max-width: var(--max-content); margin: 0 auto; }
.section-inner-narrow { max-width: var(--max-narrow); margin: 0 auto; }

.section-title {
  font-weight: 800;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.section-sub {
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: 15.5px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

/* ==========================================================================
   PROBLEMA
   ========================================================================== */
.problem-card {
  padding: 22px 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.problem-img {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  overflow: hidden;
  border-radius: 10px;
}
.problem-img img { max-width: 100%; max-height: 100%; object-fit: contain; }

.card-title {
  font-weight: 700;
  font-size: 16.5px;
  color: var(--text-primary);
}
.card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-tertiary);
}

.callout-blue {
  margin-top: 24px;
  background: var(--accent-bg);
  border: 1px solid var(--accent-bg-strong);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-hover);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.fine-print {
  margin-top: 16px;
  font-size: 14.5px;
  color: var(--text-tertiary);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.problema .section-title { max-width: 720px; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   PARA QUIEN
   ========================================================================== */
.para-quien {
  padding: 56px 20px 64px;
  background: #fff;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  max-width: none;
}
.para-quien .section-title { margin-bottom: 28px; font-size: 26px; }

.grid-audience {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.audience-card {
  display: flex;
  gap: 12px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}
.audience-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.audience-icon img { width: 100%; height: 100%; object-fit: contain; }
.audience-name { font-size: 14.5px; font-weight: 700; color: var(--text-primary); }
.audience-desc { font-size: 12.5px; color: var(--text-tertiary); margin-top: 3px; line-height: 1.4; }

/* ==========================================================================
   SERVICIOS
   ========================================================================== */
.servicios .section-title { font-size: 26px; margin-bottom: 16px; max-width: 720px; margin-left: auto; margin-right: auto; }

.service-card {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.service-icon img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.service-title { font-weight: 800; font-size: 19px; }

.grid.servicios-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
#services-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }

/* ==========================================================================
   OFERTA
   ========================================================================== */
.oferta {
  padding: 64px 20px;
  background: #F8FAFC;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  max-width: none;
}
.oferta-inner { max-width: var(--max-narrow); margin: 0 auto; text-align: center; }

.pill-badge {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.oferta .section-title { font-size: 28px; margin-bottom: 14px; }
.oferta .section-sub { margin-bottom: 28px; }

.price-card {
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 34px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 24px 48px -24px rgba(37, 99, 235, 0.35);
  text-align: left;
}
.price {
  font-weight: 800;
  font-size: 40px;
  color: var(--text-primary);
  line-height: 1;
}
.price span { font-size: 17px; color: var(--text-tertiary); font-weight: 700; }
.price-note { font-size: 13px; color: var(--text-tertiary); margin-top: 8px; }
.price-note strong { color: var(--text-primary); }

.price-summary {
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==========================================================================
   INCLUYE / NO INCLUYE
   ========================================================================== */
.incluye { max-width: 1000px; }

.includes-card, .excludes-card { padding: 28px 24px; }
.excludes-card { background: #F8FAFC; box-shadow: none; }

.includes-card h3, .excludes-card h3 {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 18px;
}
.includes-card h3 { color: var(--text-primary); }
.excludes-card h3 { color: var(--text-secondary); }

.list { display: flex; flex-direction: column; gap: 12px; }
.list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.4;
}
.check { color: var(--accent); font-weight: 900; flex-shrink: 0; }
.cross { color: var(--text-quaternary); font-weight: 900; flex-shrink: 0; }
.list-item span:last-child { color: #334155; }
.excl-text { color: var(--text-tertiary) !important; }

.fine-print-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-faint);
  font-size: 12.5px;
  color: var(--text-quaternary);
  line-height: 1.5;
}

/* ==========================================================================
   PROCESO
   ========================================================================== */
.proceso {
  padding: 56px 20px 64px;
  background: #fff;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  max-width: none;
}
.proceso .section-title { font-size: 26px; margin-bottom: 36px; }

.grid-steps {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
}

.step {
  position: relative;
  padding: 0 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step:first-child { padding-left: 0; }

.step-top { display: flex; align-items: center; gap: 10px; }
.step-num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-line { height: 2px; background: var(--border); flex: 1; min-width: 12px; }
.step-title { font-weight: 800; font-size: 15.5px; color: var(--text-primary); }
.step-text { font-size: 13px; color: var(--text-tertiary); line-height: 1.5; }

/* ==========================================================================
   CASOS DE EXITO
   ========================================================================== */
.casos { max-width: 1000px; }
.casos .section-title { font-size: 26px; margin-bottom: 28px; }

.grid-cases { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }

.case-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-card);
}
.case-title { font-weight: 800; font-size: 18px; color: var(--text-primary); }
.case-subtitle { font-size: 13px; color: var(--text-tertiary); margin-top: 2px; }

.case-headline-box {
  background: var(--accent-bg);
  border: 1px solid var(--accent-bg-strong);
  border-radius: 12px;
  padding: 14px 16px;
}
.case-headline { font-weight: 800; font-size: 20px; color: var(--accent-hover); }
.case-headline-sub { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }

.case-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.case-field {
  background: #F8FAFC;
  border: 1px solid var(--border-faint);
  border-radius: 10px;
  padding: 10px 12px;
}
.case-field-k {
  font-size: 10.5px;
  color: var(--text-quaternary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.case-field-v { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; margin-top: 3px; }

.case-quote-block { border-top: 1px solid var(--border-faint); padding-top: 14px; }
.case-quote { font-size: 14px; line-height: 1.6; color: #334155; font-style: italic; }
.case-author { margin-top: 10px; font-size: 13px; color: var(--text-primary); font-weight: 700; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq {
  padding: 56px 20px 64px;
  background: #F8FAFC;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  max-width: none;
}
.faq .section-title { font-size: 26px; margin-bottom: 24px; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.faq-question {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}
.faq-sign { color: var(--accent); font-weight: 900; font-size: 18px; flex-shrink: 0; }
.faq-answer {
  padding: 0 18px 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-tertiary);
}

/* ==========================================================================
   FORMULARIO
   ========================================================================== */
.form-section { padding: 64px 20px 80px; max-width: var(--max-form); }

.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  box-shadow: 0 20px 50px -30px rgba(15, 23, 42, 0.2);
}

.form-header { text-align: center; margin-bottom: 26px; }
.form-header h2 {
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.form-header p { font-size: 14.5px; color: var(--text-tertiary); }

.lead-form { display: flex; flex-direction: column; gap: 14px; }

/* Progreso */
.progress-track {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 4px;
}
.progress-bar {
  height: 100%;
  width: 33.33%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}
.progress-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

/* Pasos */
.form-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: stepIn 0.3s ease;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.field-group { display: flex; flex-direction: column; gap: 6px; }

.form-nav {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}
.form-nav .btn-back { flex: 0 0 auto; }
.form-nav .btn-next,
.form-nav .btn-submit { flex: 1; }

.req-mark { color: var(--accent); }

.no-margin { margin-top: 0 !important; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid input,
.select-field,
.textarea-field,
.field-group input {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  color: var(--text-primary);
  font-size: 14.5px;
  width: 100%;
}
.form-grid input:focus,
.select-field:focus,
.textarea-field:focus,
.field-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Validación inline */
.field-error {
  font-size: 12.5px;
  color: #DC2626;
  min-height: 0;
  line-height: 1.4;
}
.field-group.field-invalid input,
select.field-invalid {
  border-color: #DC2626;
  background: #FEF2F2;
}
.field-group.field-invalid input:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}
.field-group.field-valid input {
  border-color: #A7D9C5;
  background: #F0FBF6;
}
.field-group.field-valid input:focus {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.chip-group-error .chip { border-color: #DC2626; }

.trust-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: #F8FAFC;
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

.col-span-2 { grid-column: span 2; }

.textarea-field { resize: vertical; font-family: inherit; }

.form-block { margin-top: 6px; }
.form-label { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 10px; }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: #F8FAFC;
  color: #334155;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.form-note { font-size: 12px; color: var(--text-quaternary); }

.success-message { text-align: center; padding: 24px 8px; }
.success-icon { font-size: 38px; margin-bottom: 12px; color: var(--success); }
.success-title { font-weight: 800; font-size: 19px; margin-bottom: 8px; color: var(--text-primary); }
.success-text { font-size: 14px; color: var(--text-tertiary); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  padding: 32px 20px;
  text-align: center;
  border-top: 1px solid var(--border-soft);
  background: #fff;
}
.footer .logo { font-size: 16px; }
.footer-tagline { font-size: 12.5px; color: var(--text-quaternary); margin-top: 8px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 640px) {
  .hero-copy h1 { font-size: 28px; }
  .section-title { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: span 1; }
  .case-fields { grid-template-columns: 1fr; }
  .step { padding: 0; margin-bottom: 20px; }
}

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