/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --bg:           #FFFFFF;
  --bg-alt:       #F8FAFC;
  --bg-card:      #FFFFFF;
  --text:         #111827;
  --text-muted:   #6B7280;
  --text-light:   #9CA3AF;
  --accent:       #1565C0;
  --accent-dark:  #0D47A1;
  --accent-light: #E3F0FF;
  --red:          #D32F2F;
  --red-light:    #FFEBEE;
  --green:        #2E7D32;
  --green-light:  #E8F5E9;
  --border:       #E5E7EB;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 1px 4px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --max-w:        700px;
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }

/* ── Layout ────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 3.5rem 0; }
section:nth-child(even) { background: var(--bg-alt); }

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: .875rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -.01em;
}
.logo span { color: var(--text); }
.header-cta {
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1.5px solid var(--accent);
  padding: .4rem .875rem;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.header-cta:hover { background: var(--accent); color: #fff; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  padding: 4rem 0 3.5rem;
  text-align: center;
  background: linear-gradient(180deg, #EBF3FF 0%, #FFFFFF 100%);
}
.hero-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: .275rem .75rem;
  border-radius: 99px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(1.65rem, 5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--text);
  max-width: 580px;
  margin: 0 auto .875rem;
}
.hero h1 .highlight { color: var(--accent); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.65;
}
.btn-hero {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  padding: .875rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background .15s, transform .1s;
  box-shadow: 0 4px 14px rgba(21,101,192,.35);
}
.btn-hero:hover  { background: var(--accent-dark); transform: translateY(-1px); }
.btn-hero:active { transform: translateY(0); }
.hero-nota {
  margin-top: 1.25rem;
  font-size: .78rem;
  color: var(--text-light);
}

/* ── Sección calculadora ────────────────────────────────────────── */
.calc-section { padding: 2.5rem 0 3.5rem; }
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.75rem;
}
.calc-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .375rem;
}
.calc-subtitle {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ── Formulario ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
}
.form-group label .opt {
  font-weight: 400;
  color: var(--text-muted);
  font-size: .75rem;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .7rem .95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .9375rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .875rem center;
  padding-right: 2.25rem;
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(21,101,192,.12);
}
.form-group input.error,
.form-group select.error { border-color: var(--red); }
.form-error-msg { font-size: .78rem; color: var(--red); margin-top: .3rem; display: none; }
.form-error-msg.visible { display: block; }

.form-divider {
  height: 1px;
  background: var(--border);
  margin: 1.75rem 0;
}
.form-group-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Checkbox consentimiento */
.consent-row {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  margin-top: 1.5rem;
}
.consent-row input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  margin-top: .15rem;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-row label {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.55;
  cursor: pointer;
}
.consent-row a { color: var(--accent); }

/* Botón submit */
.btn-submit {
  width: 100%;
  margin-top: 1.5rem;
  padding: .9rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
  font-family: var(--font);
}
.btn-submit:hover  { background: var(--accent-dark); }
.btn-submit:active { transform: scale(.99); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ── Resultado ──────────────────────────────────────────────────── */
#resultado {
  margin-top: 2rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.res-label {
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.res-cotizacion {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.res-cotizacion strong { color: var(--text); }
.res-mensaje {
  font-size: .9375rem;
  color: var(--text);
  margin-bottom: .75rem;
  line-height: 1.55;
}
.monto-grande {
  font-size: clamp(2.4rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  font-variant-numeric: tabular-nums;
}
.monto-rojo  { color: var(--red); }
.monto-verde { color: var(--green); }
.res-anual-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: -.75rem;
  margin-bottom: 1.5rem;
}

/* Aviso alza */
.aviso-alza {
  background: #FFF8E1;
  border-left: 4px solid #F9A825;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .875rem 1rem;
  font-size: .875rem;
  color: #5D4037;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.aviso-alza strong { display: block; margin-bottom: .25rem; color: #E65100; }

/* Disclaimer resultado */
.res-disclaimer {
  font-size: .75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: .875rem;
  margin-top: 1.25rem;
  line-height: 1.55;
}

/* CTA WhatsApp */
.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  width: 100%;
  padding: .9rem 1.25rem;
  background: #25D366;
  color: #fff;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .15s, transform .1s;
  margin-bottom: .75rem;
}
.btn-whatsapp:hover { background: #1EBD57; transform: translateY(-1px); }
.btn-whatsapp svg  { flex-shrink: 0; }

/* ── Cómo funciona ──────────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 2rem;
}
.step {
  display: flex;
  gap: 1.125rem;
  align-items: flex-start;
}
.step-num {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-body h3 { font-size: .9375rem; font-weight: 700; margin-bottom: .25rem; }
.step-body p  { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }

/* ── Sección confianza ──────────────────────────────────────────── */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
.trust-item {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem;
}
.trust-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.trust-item p { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }
.trust-item strong { color: var(--text); }

/* ── FAQ ────────────────────────────────────────────────────────── */
.faq-list { margin-top: 1.75rem; }
details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .625rem;
  overflow: hidden;
}
details + details { }
summary {
  font-size: .9375rem;
  font-weight: 600;
  padding: 1rem 1.125rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background .12s;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  transition: transform .2s;
}
details[open] summary { background: var(--accent-light); }
details[open] summary::after { transform: rotate(45deg); }
details p {
  padding: .875rem 1.125rem 1.125rem;
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
}

/* ── CTA final ──────────────────────────────────────────────────── */
.cta-final {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(180deg, #EBF3FF 0%, #FFFFFF 100%);
}
.cta-final h2 {
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 700;
  margin-bottom: .75rem;
  letter-spacing: -.015em;
}
.cta-final p {
  font-size: .9375rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Footer ─────────────────────────────────────────────────────── */
footer {
  background: #111827;
  color: #9CA3AF;
  padding: 2.5rem 0;
  font-size: .8125rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.footer-logo {
  font-weight: 700;
  color: #fff;
  font-size: .95rem;
}
.footer-disclaimer {
  font-size: .75rem;
  line-height: 1.7;
  color: #6B7280;
}
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-links a { color: #9CA3AF; text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* ── Banner cookies ─────────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #1F2937;
  color: #E5E7EB;
  padding: 1.125rem 1.25rem;
  font-size: .8125rem;
  line-height: 1.55;
  border-top: 1px solid #374151;
}
.cookie-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .875rem;
}
.cookie-text a { color: #60A5FA; }
.cookie-btns  { display: flex; gap: .625rem; flex-wrap: wrap; }
.btn-accept-cookie {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .5rem 1.125rem;
  border-radius: 6px;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-reject-cookie {
  background: transparent;
  color: #9CA3AF;
  border: 1px solid #4B5563;
  padding: .5rem 1.125rem;
  border-radius: 6px;
  font-size: .8125rem;
  cursor: pointer;
}

/* ── Títulos de sección ─────────────────────────────────────────── */
.section-label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .5rem;
}
.section-title {
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: .625rem;
}
.section-sub {
  font-size: .9375rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.65;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .steps-grid  { grid-template-columns: 1fr 1fr 1fr; }
  .trust-grid  { grid-template-columns: 1fr 1fr; }
  .cookie-inner { flex-direction: row; align-items: center; }
  .cookie-btns  { flex-shrink: 0; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

/* ── Animaciones ────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
#resultado { animation: fadeUp .35s ease both; }
