/* ============================================
   Variables y base
   ============================================ */
:root {
  /* Brand */
  --brand: #0f0f0f;
  --brand-accent: #2563eb;
  /* UI */
  --bg: #fafafa;
  --bg-card: #ffffff;
  --text: #0f0f0f;
  --text-muted: #525252;
  --text-soft: #737373;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --whatsapp: #25d366;
  --whatsapp-hover: #20bd5a;
  --border: #e5e5e5;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-btn: 10px;
  --shadow-btn: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-btn-hover: 0 4px 12px rgba(37, 99, 235, 0.18);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1100px;
  --transition: 220ms ease;
  --transition-btn: 250ms ease;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-24: 24px;
  --space-40: 40px;
  --space-64: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 720px;
}

/* ============================================
   Header
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-24);
  min-height: 88px;
  padding: var(--space-16) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--brand);
  text-decoration: none;
  transition: color 200ms ease;
  margin: 2px 0 0;
}

.brand:hover {
  color: var(--brand-accent);
}

.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
}

.brand-logo img {
  display: block;
  height: 72px;
  width: auto;
  object-fit: contain;
}

.brand-svg {
  display: block;
  width: auto;
  height: 36px;
  color: currentColor;
}

.brand-svg .brand-symbol,
.brand-svg .brand-wordmark {
  fill: currentColor;
}

.brand-svg .brand-accent {
  fill: var(--brand-accent);
}

.brand:hover .brand-svg .brand-accent {
  fill: var(--accent-hover);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 200ms ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }
  .header-inner {
    min-height: 72px;
    padding: var(--space-12) 0;
    gap: var(--space-16);
  }
  .brand-logo img {
    height: 64px;
  }
  .brand-svg {
    height: 32px;
  }
}

/* Header: dark mode (optional) */
[data-theme="dark"] .header,
.theme-dark .header {
  background: rgba(18, 18, 18, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .brand,
.theme-dark .brand {
  color: #fafafa;
}

[data-theme="dark"] .brand:hover,
.theme-dark .brand:hover {
  color: #93c5fd;
}

[data-theme="dark"] .brand-svg .brand-accent,
.theme-dark .brand-svg .brand-accent {
  fill: var(--brand-accent);
}

[data-theme="dark"] .nav a,
.theme-dark .nav a {
  color: #a3a3a3;
}

[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .nav a:focus-visible,
.theme-dark .nav a:hover,
.theme-dark .nav a:focus-visible {
  color: #fafafa;
}

/* ============================================
   Botones
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-btn-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--text-soft);
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  border: none;
}

.btn-whatsapp:hover {
  background: var(--whatsapp-hover);
  box-shadow: var(--shadow-hover);
  color: #fff;
}

/* ============================================
   Hero — SaaS premium
   ============================================ */
.hero {
  position: relative;
  padding: clamp(88px, 14vw, 140px) 0 clamp(88px, 12vw, 120px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0);
  background-size: 32px 32px;
}

.hero-mark {
  position: absolute;
  bottom: 40px;
  right: 40px;
  width: 96px;
  height: 96px;
  opacity: 0.18;
  object-fit: contain;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-title {
  margin: 0 0 var(--space-24);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text);
  max-width: 18em;
  margin-left: auto;
  margin-right: auto;
}

.hero-subtitle {
  margin: 0 0 var(--space-40);
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--text-soft);
  line-height: 1.5;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  justify-content: center;
  align-items: center;
}

.btn-ghost-hero {
  color: var(--text-muted);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-ghost-hero:hover,
.btn-ghost-hero:focus-visible {
  color: var(--text);
  border-color: var(--text-soft);
  background: rgba(0, 0, 0, 0.02);
}

@media (max-width: 768px) {
  .hero {
    padding: clamp(48px, 10vw, 72px) 0 clamp(56px, 12vw, 80px);
  }
  .hero-mark {
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
  }
  .hero-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 20px;
  }
  .hero-subtitle {
    margin-bottom: var(--space-24);
    font-size: 1rem;
  }
  .hero-ctas {
    flex-direction: column;
    gap: var(--space-8);
  }
  .hero-ctas .btn {
    width: 100%;
    max-width: 280px;
    padding: 12px 20px;
    font-size: 0.9375rem;
  }
}

/* ============================================
   Secciones
   ============================================ */
.section {
  padding: clamp(48px, 8vw, 64px) 0;
}

@media (min-width: 769px) {
  .section {
    padding: clamp(64px, 10vw, 96px) 0;
  }
}

.section-label {
  display: block;
  margin: 0 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.section-intro {
  margin: 0 0 48px;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 560px;
}

/* Problema */
.section-problem {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.problem-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-width: 560px;
}

.problem-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  font-size: 1.0625rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.problem-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.problem-list li:last-child {
  border-bottom: none;
}

/* Solución */
.solution-lead {
  margin: 0 0 24px;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  max-width: 560px;
}

.solution-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.solution-list li {
  position: relative;
  padding: 10px 0 10px 24px;
  font-size: 1rem;
  color: var(--text-muted);
}

.solution-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--accent);
}

/* Casos representativos */
.section-cases {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-24);
  margin-top: var(--space-24);
}

.card-case {
  padding: var(--space-24);
}

.card-case-who {
  margin: 0 0 var(--space-8);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.card-case-title {
  margin: 0 0 var(--space-12);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.card-case-quote {
  margin: 0 0 var(--space-12);
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  border-left: 3px solid var(--accent);
  padding-left: var(--space-12);
  font-style: italic;
}

.card-case-metrics {
  margin: 0 0 var(--space-12);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.4;
}

.card-case p {
  margin: 0 0 var(--space-12);
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-case-result {
  margin: 0;
  padding-top: var(--space-12);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  border-top: 1px solid var(--border);
}

.section-intro-casos {
  margin-bottom: var(--space-24);
}

@media (max-width: 960px) {
  .cases-grid {
    grid-template-columns: 1fr;
  }
}

/* Productos (cards) */
.section-products {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-24);
  margin-top: var(--space-24);
}

@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-24);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(37, 99, 235, 0.2);
}

.card-featured {
  background: var(--bg-card);
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
}

.card-featured:hover {
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.12);
}

.card-badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: rgba(37, 99, 235, 0.1);
  border-radius: 6px;
}

.card-title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.card-desc {
  margin: 0 0 var(--space-12);
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-outcome {
  margin: 0 0 var(--space-24);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.4;
}

.card-meta {
  margin: 0 0 var(--space-24);
}

.card-meta-label {
  margin: var(--space-12) 0 var(--space-8);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.card-meta-label:first-child {
  margin-top: 0;
}

.card-meta-value {
  margin: 0 0 var(--space-8);
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.5;
}

.card-includes {
  margin: 0 0 var(--space-8);
  padding: 0;
  list-style: none;
}

.card-includes li {
  position: relative;
  padding: 6px 0 6px 20px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.card-includes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-soft);
}

.card-result {
  margin: 0 0 var(--space-24);
  padding: var(--space-16);
  font-size: 0.875rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.card-result strong {
  color: var(--text);
}

.card .btn {
  margin-top: 0;
}

.card .card-meta .card-includes {
  margin-bottom: var(--space-12);
}

/* Proceso */
.process-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .process-list {
    grid-template-columns: 1fr;
  }
}

.process-list li {
  position: relative;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--text-muted);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.process-list li:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.process-num {
  display: block;
  margin-bottom: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

/* Sobre mí */
.section-about {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.about-text {
  margin: 0;
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* FAQ */
.faq-list {
  margin: 0;
  padding: 0;
}

.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item dt {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.faq-item dd {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA final */
.section-cta {
  padding: 100px 0 120px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.cta-inner {
  text-align: center;
}

.cta-title {
  margin: 0 0 16px;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--text);
}

.cta-subtitle {
  margin: 0 0 32px;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 32px;
}

.form-wrap {
  max-width: 480px;
  margin: 0 auto 32px;
  text-align: left;
}

.contact-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
  margin-top: 16px;
}

.contact-form label:first-of-type {
  margin-top: 0;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text);
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form button[type="submit"] {
  margin-top: 20px;
  cursor: pointer;
  border: none;
}

.form-or {
  text-align: center;
  margin: 24px 0 16px;
  font-size: 0.875rem;
  color: var(--text-soft);
}

.cta-two-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.cta-two-buttons .btn {
  min-width: 180px;
}

.cta-contact {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-soft);
}

.cta-contact a {
  color: var(--accent);
  text-decoration: none;
}

.cta-contact a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  margin: 0;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.footer-copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-soft);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
