/* ============ RESET & BASE ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --dark: #0a0e1a;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 40px -10px rgba(15,23,42,0.15);
  --shadow-xl: 0 30px 60px -15px rgba(15,23,42,0.25);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: white;
}

img, svg { display: block; max-width: 100%; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--gray-900);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--blue-600); }
.logo-light { color: white; }
.logo-light span { color: var(--blue-500); }

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a {
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--gray-900); }

.nav-cta { display: flex; gap: 0.6rem; align-items: center; }

/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue-600);
  color: white;
  box-shadow: 0 1px 2px rgba(37,99,235,0.3), 0 4px 12px -4px rgba(37,99,235,0.4);
}
.btn-primary:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37,99,235,0.3), 0 8px 20px -4px rgba(37,99,235,0.5);
}

.btn-secondary {
  background: white;
  color: var(--gray-900);
  border: 1.5px solid var(--gray-300);
}
.btn-secondary:hover {
  border-color: var(--gray-500);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-700);
}
.btn-ghost:hover { color: var(--gray-900); }

.btn-white {
  background: white;
  color: var(--blue-700);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
}
.btn-white:hover { transform: translateY(-2px); }

.btn-lg { padding: 0.95rem 1.7rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ============ HERO ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 4rem;
}

.hero-bg {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 800px;
  background: radial-gradient(closest-side, rgba(37,99,235,0.12), transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content { max-width: 560px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid var(--gray-200);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.3rem;
}
.badge-dot {
  width: 8px; height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0.1); }
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.1rem;
}

.gradient-text {
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500), #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--gray-600);
  margin-bottom: 1.7rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.7rem;
  flex-wrap: wrap;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 0.9rem;
}
.hero-proof strong { color: var(--gray-900); }

.avatars { display: flex; }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  margin-left: -8px;
}
.avatar:first-child { margin-left: 0; }

.hero-micro {
  font-size: 0.82rem;
  color: var(--gray-500);
}

/* ============ HERO VISUAL (MOCKUP) ============ */
.hero-visual { position: relative; }

.hero-blob {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 500px; height: 500px;
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(6,182,212,0.1));
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
}

.mockup {
  display: block;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}
.mockup:hover {
  box-shadow: 0 40px 80px -20px rgba(15,23,42,0.3);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.mockup-topbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1rem;
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}
.mockup-topbar .dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }
.mockup-url {
  margin-left: 1rem;
  font-size: 0.72rem;
  color: var(--gray-500);
  background: white;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
}

.mockup-body { padding: 1.5rem; }

.mockup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}
.mockup-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.mockup-num {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gray-900);
}
.mockup-status {
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
}

.mockup-cliente { margin-bottom: 1.3rem; }
.mockup-cliente-nombre {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gray-900);
}
.mockup-cliente-nif {
  font-size: 0.78rem;
  color: var(--gray-500);
}

.mockup-lineas {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}
.mockup-linea {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--gray-700);
  padding: 0.35rem 0;
}

.mockup-totales { margin-bottom: 1.2rem; }
.mockup-fila {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--gray-600);
  padding: 0.25rem 0;
}
.mockup-fila.irpf { color: #dc2626; }
.mockup-fila.total {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue-600);
  padding-top: 0.6rem;
  margin-top: 0.4rem;
  border-top: 2px solid var(--gray-200);
}

.mockup-button {
  background: var(--blue-600);
  color: white;
  text-align: center;
  padding: 0.7rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.88rem;
}

/* ============ TRUST BAR ============ */
.trust-bar {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.1rem 0;
}
.trust-inner {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--gray-600);
  font-weight: 500;
}
.trust-item svg { color: var(--blue-600); flex-shrink: 0; }

/* ============ SECCIONES ============ */
.section { padding: 4rem 0; }
.section-alt { background: var(--gray-50); }

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-600);
  margin-bottom: 0.7rem;
}

.section-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.section-header p {
  color: var(--gray-600);
  font-size: 1.05rem;
}

/* ============ STEPS ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  position: relative;
}
.step {
  text-align: center;
  padding: 0.8rem;
}
.step-num {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  color: white;
  font-size: 1.4rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  box-shadow: 0 8px 20px -6px rgba(37,99,235,0.5);
}
.step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.step p { color: var(--gray-600); font-size: 0.95rem; }

/* ============ FEATURES ============ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
}
.feature {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: all 0.25s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200);
}
.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 0.9rem;
  width: 48px; height: 48px;
  background: var(--blue-50);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.feature h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.feature p { color: var(--gray-600); font-size: 0.92rem; }

/* ============ TESTIMONIOS ============ */
.testimonios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
}
.testimonio {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  transition: all 0.25s;
}
.testimonio:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.stars {
  color: #fbbf24;
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.8rem;
}
.testimonio > p {
  color: var(--gray-700);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}
.testimonio-autor {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-100);
}
.testimonio-autor .avatar { width: 40px; height: 40px; margin: 0; font-size: 1rem; border: none; }
.testimonio-autor strong {
  display: block;
  font-size: 0.92rem;
  color: var(--gray-900);
}
.testimonio-autor small {
  color: var(--gray-500);
  font-size: 0.82rem;
}

/* ============ COMPARATIVA ============ */
.comparativa-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  background: white;
}
.comparativa {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 640px;
}
.comparativa thead {
  background: var(--gray-50);
}
.comparativa th {
  padding: 1rem 0.9rem;
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.88rem;
}
.comparativa th:first-child { color: var(--gray-500); font-weight: 500; }
.comparativa th.destacado {
  background: var(--blue-50);
  color: var(--blue-700);
  position: relative;
}
.comp-logo {
  font-weight: 800;
  font-size: 1rem;
  color: var(--gray-900);
}
.comp-logo span { color: var(--blue-600); }

.comparativa td {
  padding: 0.9rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-600);
}
.comparativa td:first-child { color: var(--gray-700); font-weight: 500; }
.comparativa td.destacado {
  background: var(--blue-50);
  color: var(--blue-700);
  font-weight: 600;
}
.comparativa tr:last-child td { border-bottom: none; }

/* ============ PRECIOS ============ */
.precios {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
  max-width: 1000px;
  margin: 0 auto;
}
.plan {
  background: white;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  position: relative;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.plan:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.plan.destacado {
  border-color: var(--blue-600);
  border-width: 2px;
  box-shadow: 0 10px 30px -10px rgba(37,99,235,0.3);
  transform: scale(1.03);
}
.plan.destacado:hover { transform: scale(1.03) translateY(-4px); }
.plan-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue-600);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.9rem;
  border-radius: 100px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.plan h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.precio {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  margin-bottom: 0.3rem;
}
.precio small {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-500);
}
.plan-desc {
  color: var(--gray-500);
  font-size: 0.88rem;
  margin-bottom: 1.3rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--gray-200);
}
.plan ul {
  list-style: none;
  margin-bottom: 1.8rem;
  flex-grow: 1;
}
.plan ul li {
  padding: 0.45rem 0;
  font-size: 0.92rem;
  color: var(--gray-700);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.plan ul li::before {
  content: "✓";
  color: var(--blue-600);
  font-weight: 800;
  flex-shrink: 0;
}

/* ============ FAQ ============ */
.faq { max-width: 720px; margin: 0 auto; }
.faq details {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.6rem;
  transition: all 0.2s;
}
.faq details[open] {
  border-color: var(--blue-200);
  box-shadow: var(--shadow);
}
.faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: var(--gray-900);
}
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--blue-600);
  font-weight: 400;
  transition: transform 0.2s;
  margin-left: 1rem;
}
.faq details[open] summary::after {
  content: "−";
}
.faq summary::-webkit-details-marker { display: none; }
.faq details p {
  margin-top: 0.8rem;
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============ CTA FINAL ============ */
.cta-final {
  background: linear-gradient(135deg, var(--blue-700), var(--blue-600), #0891b2);
  color: white;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: "";
  position: absolute;
  top: -50%; left: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 70%);
  border-radius: 50%;
}
.cta-final .container { position: relative; }
.cta-final h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.cta-final p {
  font-size: 1.08rem;
  opacity: 0.9;
  margin-bottom: 1.7rem;
}
.cta-final .btn { margin-bottom: 0.8rem; }
.cta-micro {
  font-size: 0.88rem;
  opacity: 0.75;
  margin-top: 0.4rem;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--dark);
  color: var(--gray-300);
  padding: 3.5rem 0 1.8rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand p {
  font-size: 0.9rem;
  color: #94a3b8;
  margin: 0.9rem 0 1.3rem;
  max-width: 280px;
}
.footer-social {
  display: flex;
  gap: 0.6rem;
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}
.footer-social a:hover { background: rgba(255,255,255,0.12); }

.footer h4 {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer a {
  color: #94a3b8;
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.footer a:hover { color: white; }
.footer-small {
  font-size: 0.82rem;
  color: #64748b;
  margin-top: 0.7rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-content { max-width: none; text-align: center; margin: 0 auto; }
  .hero-cta, .hero-proof { justify-content: center; }
  .badge { margin-left: auto; margin-right: auto; }
  .nav-links { display: none; }
  .steps, .features, .testimonios, .precios { grid-template-columns: 1fr; }
  .plan.destacado { transform: none; }
  .plan.destacado:hover { transform: translateY(-4px); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .section { padding: 3rem 0; }
  .hero { padding: 2.5rem 0 3rem; }
  .nav-inner { padding: 0.8rem 1rem; }
  .nav-cta .btn-ghost { display: none; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .hero-proof { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .trust-inner { flex-direction: column; align-items: center; }
  .comparativa { font-size: 0.85rem; }
  .comparativa th, .comparativa td { padding: 0.7rem; }
}
