/* ═══════════════════════════════════════════════════════════════════════════
   PRECEDENTE AI — Executive Modern Legal Stylesheet
   Sovereign, Dark Slate & Royal Sapphire Palette, Ultra-Modern Fluid Borders
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --bg-landing: #090d16;
  --surface-landing: #0f1523;
  --surface-card: #131c2e;
  --surface-hover: #1b263b;
  --surface-glass: rgba(19, 28, 46, 0.75);
  --border-landing: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(59, 130, 246, 0.35);
  --border-glow: rgba(59, 130, 246, 0.15);
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  
  /* Gradiente Sobrio & Ejecutivo (Titanio Platino a Azul Zafiro) */
  --primary-gradient: linear-gradient(135deg, #ffffff 0%, #cbd5e1 35%, #60a5fa 75%, #2563eb 100%);
  --accent-blue: #3b82f6;
  --accent-sapphire: #2563eb;
  --accent-ice: #93c5fd;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  
  /* Bordes Ultra-Modernos y Fluidos (Sin esquinas duras) */
  --radius-xs: 12px;
  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-full: 9999px;
  --max-w: 1240px;
}

[data-theme="light"] {
  --bg-landing: #f8fafc;
  --surface-landing: #ffffff;
  --surface-card: #ffffff;
  --surface-hover: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.85);
  --border-landing: #e2e8f0;
  --border-highlight: #cbd5e1;
  --border-glow: rgba(37, 99, 235, 0.12);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  --primary-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 40%, #1d4ed8 85%, #2563eb 100%);
  --accent-blue: #2563eb;
  --accent-sapphire: #1d4ed8;
  --accent-ice: #3b82f6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background-color: var(--bg-landing);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* ── Iluminación Atmosférica Sutil de Fondo ────────────────────────────── */
body::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1000px; height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, rgba(9, 13, 22, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Barra de Navegación ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 16px; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav-wrap {
  width: 100%;
  max-width: var(--max-w);
  background: var(--surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-landing);
  border-radius: var(--radius-full);
  padding: 8px 16px 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.4px;
}
.brand-sparkle {
  color: var(--accent-blue);
  display: inline-flex;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-main); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── Botones Modernos & Píldoras ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--text-main);
  color: var(--bg-landing);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}
[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-landing);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
}

.btn-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.45);
}

/* ── Hero Section ───────────────────────────────────────────────────────── */
.hero {
  padding-top: 170px;
  padding-bottom: 90px;
  text-align: center;
  position: relative;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--surface-glass);
  border: 1px solid var(--border-landing);
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent-ice);
  margin-bottom: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.hero h1 {
  font-size: clamp(40px, 5.5vw, 68px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1.8px;
  max-width: 960px;
  margin: 0 auto 24px;
}
.gradient-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p.lead {
  font-size: clamp(16.5px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 740px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* ── Mockup Ejecutivo ──────────────────────────────────────────────────── */
.hero-mockup {
  max-width: 980px;
  margin: 0 auto;
  background: var(--surface-card);
  border: 1px solid var(--border-landing);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-landing);
  overflow: hidden;
  text-align: left;
}
.mockup-header {
  height: 48px;
  background: var(--surface-landing);
  border-bottom: 1px solid var(--border-landing);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 8px;
}
.mockup-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.mockup-body {
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.chat-msg-user {
  align-self: flex-end;
  background: #1e293b;
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 24px 24px 6px 24px;
  max-width: 80%;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.chat-msg-bot {
  align-self: flex-start;
  background: var(--surface-landing);
  border: 1px solid var(--border-landing);
  padding: 24px;
  border-radius: 6px 24px 24px 24px;
  max-width: 90%;
  font-size: 15px;
  line-height: 1.6;
}

/* ── Estadísticas ──────────────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  padding: 44px;
  background: var(--surface-card);
  border: 1px solid var(--border-landing);
  border-radius: var(--radius-lg);
  margin: 60px 0;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.stat-item h3 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: var(--text-main);
  margin-bottom: 4px;
}
.stat-item p {
  font-size: 13.5px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Grid de Características ───────────────────────────────────────────── */
.features-section {
  padding: 100px 0;
}
.section-title {
  text-align: center;
  margin-bottom: 60px;
}
.section-title h2 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 14px;
}
.section-title p {
  color: var(--text-muted);
  font-size: 17.5px;
  max-width: 640px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
}
.feature-card {
  background: var(--surface-card);
  border: 1px solid var(--border-landing);
  padding: 38px 32px;
  border-radius: var(--radius-lg);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feature-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  font-size: 22px;
}
.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.feature-card p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

/* ── Sección de Precios / Planes ───────────────────────────────────────── */
.pricing-section {
  padding: 100px 0;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.pricing-card {
  background: var(--surface-card);
  border: 1px solid var(--border-landing);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.25s;
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}
.pricing-card.featured {
  border-color: var(--accent-blue);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, var(--surface-card) 100%);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.2);
}
.pricing-badge {
  position: absolute;
  top: -12px; right: 28px;
  background: var(--accent-blue);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.plan-name { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.plan-desc { color: var(--text-muted); font-size: 14px; min-height: 42px; margin-bottom: 24px; }
.plan-price { font-size: 42px; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 24px; }
.plan-price span { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; flex-grow: 1; }
.plan-features li { font-size: 14px; color: var(--text-muted); display: flex; align-items: flex-start; gap: 10px; }
.plan-features li svg { color: #3b82f6; flex-shrink: 0; margin-top: 2px; }

/* ── Sección de Blog ───────────────────────────────────────────────────── */
.blog-section {
  padding: 100px 0;
  background: var(--surface-landing);
  border-top: 1px solid var(--border-landing);
  border-bottom: 1px solid var(--border-landing);
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 44px;
}
.blog-card {
  background: var(--surface-card);
  border: 1px solid var(--border-landing);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.25s;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-highlight);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.blog-meta {
  font-size: 12px;
  color: var(--accent-ice);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.blog-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.45;
  letter-spacing: -0.3px;
}
.blog-card p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
  flex-grow: 1;
}
.blog-footer {
  margin-top: 24px;
  font-size: 13.5px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  padding: 80px 0 40px;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-col h4 {
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--text-main); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border-landing);
  font-size: 13.5px;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); padding: 24px; }
}
