:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --primary: #047857;
  --primary-dark: #065f46;
  --primary-soft: #ecfdf5;
  --accent: #0f172a;
  --border: #e2e8f0;
  --warn-bg: #fef3c7;
  --warn-ink: #92400e;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 22px;
}

.local-banner {
  background: var(--warn-bg);
  color: var(--warn-ink);
  text-align: center;
  padding: 8px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid #fcd34d;
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.12rem;
}

.brand small { font-weight: 500; color: var(--muted); font-size: 0.82rem; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  font-size: 0.92rem;
}

nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; font-weight: 600; }
nav a:hover { color: var(--primary); }

.btn-nav {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 15px;
  border-radius: 8px;
}
.btn-nav:hover { background: var(--primary-dark); }

.hero {
  background: radial-gradient(circle at top right, #065f46 0%, #0f172a 58%);
  color: #fff;
  padding: 68px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: #6ee7b7;
  font-weight: 700;
  margin: 0 0 12px;
}

.hero h1 { margin: 0 0 16px; font-size: 2.35rem; line-height: 1.18; }
.lead { color: #e2e8f0; font-size: 1.04rem; margin: 0 0 24px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 9px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: #10b981; color: #06281e; }
.btn-primary:hover { background: #34d399; }
.btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.25); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }
.btn-secondary { background: #e2e8f0; color: var(--ink); }
.btn-secondary:hover { background: #cbd5e1; }

.hero-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-pills span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: #d1fae5;
}

/* Mockup visual de proforma en el hero */
.hero-mockup {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.35);
}

.mockup-bar {
  background: #0f172a;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #94a3b8;
  font-size: 0.78rem;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.red { background: #ef4444; }
.dot.amber { background: #f59e0b; }
.dot.green { background: #22c55e; }

.mockup-sheet {
  background: #fff;
  color: var(--ink);
  margin: 12px;
  border-radius: 8px;
  padding: 16px;
  font-size: 0.82rem;
}
.mk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.mk-head strong { display: block; color: var(--primary-dark); font-size: 0.96rem; }
.mk-head span { font-size: 0.78rem; color: var(--muted); }
.mk-num { background: var(--primary-soft); color: var(--primary-dark); padding: 4px 9px; border-radius: 6px; font-weight: 700; }
.mk-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; color: var(--muted); font-size: 0.78rem; }
.mk-table { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.mk-row { display: grid; grid-template-columns: 1.8fr 0.5fr 0.8fr; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.mk-row:last-child { border-bottom: none; }
.mk-row.mk-th { background: #0f172a; color: #fff; font-weight: 600; }
.mk-row.alt { background: #f8fafc; }
.mk-total {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.mk-total span { font-size: 0.76rem; color: var(--muted); }
.mk-total strong { color: var(--primary-dark); font-size: 0.96rem; }
.mk-note { margin: 8px 0 0; font-size: 0.74rem; color: var(--warn-ink); background: var(--warn-bg); padding: 4px 8px; border-radius: 4px; }

.section { padding: 62px 0; }
.section.alt { background: #f1f5f9; }
.section-head { margin-bottom: 30px; }
.section-head.center { text-align: center; }
.section-head.center p { margin-left: auto; margin-right: auto; }
.section-tag {
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0 0 6px;
}
.section-head h2 { margin: 0 0 8px; font-size: 1.8rem; }
.section-head p { margin: 0; color: var(--muted); max-width: 700px; }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.compare-card { border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); }
.compare-card.before { background: var(--danger-soft); border-color: var(--danger-border); }
.compare-card.after { background: var(--primary-soft); border-color: #a7f3d0; }
.compare-card h3 { margin: 0 0 12px; }
.compare-card ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 0.94rem; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.card.featured { border-color: #6ee7b7; box-shadow: 0 8px 24px rgba(4, 120, 87, 0.08); }
.badge {
  align-self: flex-start;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.badge.muted { background: #e2e8f0; color: #334155; }
.card h3 { margin: 0 0 6px; }
.price { font-size: 1.3rem; font-weight: 800; color: var(--primary-dark); margin: 0 0 12px; }
.price small { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.card ul { padding-left: 18px; margin: 8px 0 14px; font-size: 0.92rem; }
.exclusion { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.84rem; color: var(--muted); }

.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step-num { display: inline-block; font-weight: 800; color: var(--primary); font-size: 0.86rem; margin-bottom: 6px; }
.step h3 { margin: 0 0 8px; font-size: 1.06rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.demo-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 24px; }
.demo-files, .demo-sim { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.file-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.file-item:last-child { border-bottom: none; }
.file-item h4 { margin: 0 0 4px; }
.file-item p { margin: 0 0 6px; font-size: 0.9rem; color: var(--muted); }
code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 0.85rem; }

.sim-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0 16px; }
.sim-controls label { font-size: 0.9rem; font-weight: 600; }
.sim-controls input { width: 78px; margin-left: 6px; padding: 5px 8px; border: 1px solid #cbd5e1; border-radius: 6px; }
.tax-warn { font-size: 0.82rem; color: var(--warn-ink); background: var(--warn-bg); padding: 4px 8px; border-radius: 6px; }

.sim-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.sim-table th, .sim-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.sim-table input { width: 68px; padding: 4px 6px; border: 1px solid #cbd5e1; border-radius: 4px; }
.sim-totals { margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--border); display: grid; gap: 6px; text-align: right; font-size: 0.95rem; }
.sim-totals .grand { font-size: 1.14rem; color: var(--primary-dark); }

.faq-list { display: grid; gap: 12px; max-width: 820px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; }
summary { font-weight: 600; cursor: pointer; }
details p { margin: 10px 0 0; color: var(--muted); font-size: 0.94rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.brief-form, .brief-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.brief-form label { display: block; margin-bottom: 14px; font-size: 0.92rem; font-weight: 600; }
.brief-form input, .brief-form select, .brief-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 8px; font-family: inherit; font-size: 0.94rem;
}
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.feedback { margin: 12px 0 0; font-size: 0.88rem; color: var(--primary-dark); }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.preview-head h3 { margin: 0; font-size: 1rem; }
.btn-small { padding: 6px 12px; font-size: 0.82rem; border-radius: 6px; border: 1px solid #cbd5e1; background: #f1f5f9; cursor: pointer; }
.btn-small:disabled { opacity: 0.5; cursor: not-allowed; }
pre { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 8px; overflow-x: auto; font-size: 0.84rem; white-space: pre-wrap; margin: 0; }

.site-footer { background: #0f172a; color: #cbd5e1; padding: 26px 0; font-size: 0.88rem; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-row p { margin: 0; }

@media (max-width: 860px) {
  .hero-grid, .compare-grid, .demo-layout, .contact-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.85rem; }
}

/* --- Animaciones suaves y microinteracciones --- */
@keyframes fadeUpIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulseTotal {
  0% { transform: scale(1); }
  45% { transform: scale(1.06); color: #047857; }
  100% { transform: scale(1); }
}

.hero-grid > div > * {
  animation: fadeUpIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero-grid > div > *:nth-child(1) { animation-delay: 0.05s; }
.hero-grid > div > *:nth-child(2) { animation-delay: 0.14s; }
.hero-grid > div > *:nth-child(3) { animation-delay: 0.22s; }
.hero-grid > div > *:nth-child(4) { animation-delay: 0.30s; }
.hero-grid > div > *:nth-child(5) { animation-delay: 0.38s; }

.hero-mockup {
  animation: fadeUpIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both,
             floatGentle 6s ease-in-out 1.2s infinite;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card, .step, .compare-card, details {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover, .step:hover, .compare-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.btn, .btn-nav {
  transition: transform 0.16s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover, .btn-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(4, 120, 87, 0.18);
}
.btn:active, .btn-nav:active {
  transform: translateY(0);
}

.sim-totals .grand strong.updated {
  display: inline-block;
  animation: pulseTotal 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hero-grid > div > *, .hero-mockup, .sim-totals .grand strong.updated {
    animation: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .card, .step, .compare-card, .btn, .btn-nav {
    transition: none !important;
    transform: none !important;
  }
}

