/* ============================================================
   Ian Jurídico — Design System
   Inspirado en: Linear · Stripe · Intercom · Claude
   ============================================================ */

/* ------------------------------------------------------------
   1. CUSTOM PROPERTIES (Design Tokens)
   ------------------------------------------------------------ */
:root {
  /* Backgrounds */
  --bg-base:       #0B0F1A;
  --bg-elevated:   #111827;
  --bg-subtle:     #1C2333;
  --border:        #1E2D40;
  --border-subtle: #243044;

  /* Text */
  --text-primary:   #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted:     #475569;
  --text-inverse:   #0B0F1A;

  /* Blue — confianza */
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-900: #1E3A5F;
  --blue-glow: rgba(59, 130, 246, 0.15);

  /* Amber — CTA */
  --amber-400: #FBBF24;
  --amber-500: #F59E0B;
  --amber-600: #D97706;

  /* Telegram */
  --telegram: #229ED9;

  /* States */
  --success:    #10B981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --error:      #EF4444;
  --error-bg:   rgba(239, 68, 68, 0.12);

  /* Shadows */
  --shadow-sm:  0 2px 4px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
  --shadow-md:  0 4px 12px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.2);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.4),  0 4px 8px rgba(0,0,0,.2);
  --shadow-glow: 0 0 0 1px rgba(59,130,246,.15), 0 8px 24px rgba(37,99,235,.2);
  --shadow-cta:  0 4px 16px rgba(245,158,11,.35);

  /* Spacing */
  --space-1:  4px;  --space-2:  8px;  --space-3: 12px;
  --space-4: 16px;  --space-5: 20px;  --space-6: 24px;
  --space-8: 32px;  --space-10:40px;  --space-12:48px;
  --space-16:64px;  --space-20:80px;  --space-24:96px;

  /* Radii */
  --radius-sm:  8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* Light mode override — /despachos */
html.light {
  --bg-base:       #FFFFFF;
  --bg-elevated:   #F8FAFC;
  --bg-subtle:     #F1F5F9;
  --border:        #E2E8F0;
  --border-subtle: #E9EFF6;
  --text-primary:  #0F172A;
  --text-secondary:#475569;
  --text-muted:    #94A3B8;
  --blue-glow:     rgba(37,99,235,.06);
}

/* ------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ------------------------------------------------------------
   3. LAYOUT
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 var(--space-8); }
.container-wide   { max-width: 1440px; margin: 0 auto; padding: 0 var(--space-8); }

.section    { padding: var(--space-24) 0; position: relative; }
.section-sm { padding: var(--space-16) 0; }
.section-lg { padding: 128px 0; }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-16);
}
.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: 1.25;
}
.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.625;
}

.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--space-5); }

.grid-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-16);
  align-items: center;
}

/* ------------------------------------------------------------
   4. TYPOGRAPHY
   ------------------------------------------------------------ */
.overline {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-bottom: var(--space-3);
}

.headline-hero {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-primary);
}

.headline-section {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-primary);
}

.lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.625;
}

.mono {
  font-family: var(--font-mono);
  font-size: .875rem;
}

/* ------------------------------------------------------------
   5. BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all .15s ease;
  white-space: nowrap;
  text-decoration: none;
  outline-offset: 3px;
}
.btn:focus-visible { outline: 2px solid var(--blue-500); }

/* Sizes */
.btn-sm  { padding:  8px 16px; font-size: .875rem; border-radius: var(--radius-sm); }
.btn-md  { padding: 12px 24px; font-size: 1rem;    border-radius: var(--radius-md); }
.btn-lg  { padding: 16px 32px; font-size: 1.125rem; border-radius: var(--radius-md); }
.btn-xl  { padding: 20px 40px; font-size: 1.25rem;  border-radius: var(--radius-lg); }

/* Primary — Amber CTA */
.btn-primary {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: var(--text-inverse);
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 0 0 1px rgba(245,158,11,.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-cta);
}
.btn-primary:active { transform: translateY(0); }

/* Secondary — Blue outline */
.btn-secondary {
  background: transparent;
  color: var(--blue-400);
  border: 1px solid var(--blue-500);
}
.btn-secondary:hover {
  background: var(--blue-glow);
  border-color: var(--blue-400);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* Telegram */
.btn-telegram {
  background: var(--telegram);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.btn-telegram:hover {
  background: #1a8fc4;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34,158,217,.4);
}

/* Blue solid — B2B */
.btn-blue {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.btn-blue:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,.4);
}

/* ------------------------------------------------------------
   6. CARDS
   ------------------------------------------------------------ */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color .2s, box-shadow .2s;
}
.card:hover {
  border-color: rgba(59,130,246,.3);
  box-shadow: var(--shadow-glow);
}

/* Feature card */
.card-feature {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .2s, box-shadow .2s;
}
.card-feature:hover {
  border-color: rgba(59,130,246,.25);
  box-shadow: var(--shadow-md);
}
.card-feature .icon-wrap {
  width: 44px; height: 44px;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--blue-400);
}
.card-feature h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}
.card-feature p {
  font-size: .875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Pricing card */
.card-pricing {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  transition: box-shadow .2s;
}
.card-pricing.featured {
  border-color: var(--blue-600);
  background: linear-gradient(180deg, rgba(37,99,235,.06) 0%, var(--bg-elevated) 100%);
  box-shadow: var(--shadow-glow);
}
.card-pricing.featured::before {
  content: "MÁS POPULAR";
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--blue-600);
  color: #fff;
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  padding: 4px 14px; border-radius: var(--radius-full);
}
.card-pricing .plan-name {
  font-size: .875rem; font-weight: 600;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: var(--space-3);
}
.card-pricing .plan-price {
  font-size: 2.5rem; font-weight: 800;
  letter-spacing: -0.03em; color: var(--text-primary);
  line-height: 1;
  margin-bottom: var(--space-1);
}
.card-pricing .plan-price sup  { font-size: 1.25rem; vertical-align: super; font-weight: 700; }
.card-pricing .plan-price span { font-size: 1rem; color: var(--text-secondary); font-weight: 400; }
.card-pricing .plan-desc {
  font-size: .875rem; color: var(--text-secondary);
  margin-bottom: var(--space-6);
  line-height: 1.5;
}
.card-pricing .plan-cta { width: 100%; margin-bottom: var(--space-6); }

/* Feature rows inside pricing */
.feature-row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: .875rem; color: var(--text-secondary);
}
.feature-row:last-child { border-bottom: none; }
.feature-row .check {
  width: 18px; height: 18px; flex-shrink: 0;
  background: var(--success-bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--success); font-size: 10px; font-weight: 700;
}
.feature-row .cross {
  width: 18px; height: 18px; flex-shrink: 0;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

/* Testimonial card */
.card-testimonial {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.card-testimonial .quote-mark {
  font-size: 3rem; color: var(--blue-500); opacity: .35;
  line-height: 1; margin-bottom: -8px; font-family: Georgia, serif;
}
.card-testimonial blockquote {
  font-size: .9375rem; color: var(--text-secondary);
  line-height: 1.65; margin-bottom: var(--space-4);
  font-style: italic;
}
.card-testimonial .author {
  font-size: .8125rem; font-weight: 600; color: var(--text-primary);
}
.card-testimonial .author-role {
  font-size: .8125rem; color: var(--text-muted);
}

/* ------------------------------------------------------------
   7. BADGES & TRUST INDICATORS
   ------------------------------------------------------------ */
.badge-corpus {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--success-bg);
  border: 1px solid rgba(16,185,129,.25);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: .75rem; font-weight: 600; color: #34D399;
}
.badge-corpus::before {
  content: "●"; color: var(--success); font-size: .5rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}

.badge-epoca {
  font-family: var(--font-mono);
  font-size: .6875rem; font-weight: 500;
  background: rgba(59,130,246,.1);
  border: 1px solid rgba(59,130,246,.2);
  color: var(--blue-400);
  border-radius: 4px;
  padding: 2px 6px;
}

/* Trust bar */
.trust-bar {
  display: flex; align-items: center;
  gap: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--space-8);
  flex-wrap: wrap;
}
.trust-bar .stat-num {
  font-size: 1.25rem; font-weight: 800;
  color: var(--text-primary); letter-spacing: -0.02em;
}
.trust-bar .stat-label {
  font-size: .75rem; color: var(--text-muted); line-height: 1.3;
}
.trust-bar .divider {
  width: 1px; height: 32px;
  background: var(--border);
}

/* Zero-friction badges */
.zero-friction {
  display: flex; align-items: center; gap: var(--space-5);
  flex-wrap: wrap; margin-top: var(--space-4);
}
.zero-friction span {
  font-size: .8125rem; color: var(--text-muted);
  display: flex; align-items: center; gap: var(--space-2);
}
.zero-friction span::before {
  content: "✓"; color: var(--success); font-weight: 700;
}

/* Guarantee badge */
.guarantee-badge {
  display: flex; align-items: center; gap: var(--space-3);
  background: rgba(16,185,129,.08);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-6);
  font-size: .875rem; color: var(--success);
}

/* ------------------------------------------------------------
   8. NAVBAR
   ------------------------------------------------------------ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,15,26,.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
html.light .navbar {
  background: rgba(255,255,255,.9);
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }

.navbar-inner {
  height: 62px;
  display: flex; align-items: center; justify-content: space-between;
}

.navbar-logo {
  font-size: 1.25rem; font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.navbar-logo span { color: var(--blue-500); }

.navbar-links {
  display: flex; align-items: center; gap: var(--space-1);
}
.navbar-links a {
  font-size: .875rem; font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px; border-radius: var(--radius-sm);
  transition: all .15s;
}
.navbar-links a:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.navbar-cta { display: flex; align-items: center; gap: var(--space-3); }

/* Hamburger */
.navbar-hamburger {
  display: none;
  flex-direction: column; justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  padding: 4px;
}
.navbar-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all .2s;
}
.navbar-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-hamburger.open span:nth-child(2) { opacity: 0; }
.navbar-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.navbar-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg-base);
  padding: var(--space-4) var(--space-6) var(--space-6);
}
.navbar-mobile.open { display: block; }
.navbar-mobile nav {
  display: flex; flex-direction: column; gap: var(--space-1);
  margin-bottom: var(--space-4);
}
.navbar-mobile nav a {
  font-size: 1rem; font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-sm);
}
.navbar-mobile nav a:hover { color: var(--text-primary); background: var(--bg-subtle); }
.navbar-mobile-cta { display: flex; flex-direction: column; gap: var(--space-3); }
.navbar-mobile-cta .btn { width: 100%; justify-content: center; }

/* ------------------------------------------------------------
   9. CHAT DEMO
   ------------------------------------------------------------ */
.chat-demo {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  font-size: .9375rem;
}

.chat-header {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) var(--space-5);
  display: flex; align-items: center; gap: var(--space-3);
}
.chat-header .avatar {
  width: 38px; height: 38px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9375rem; color: #fff;
}
.chat-header-info { display: flex; flex-direction: column; gap: 2px; }
.chat-name { font-weight: 700; color: var(--text-primary); font-size: .9375rem; }
.chat-status {
  font-size: .75rem; color: var(--text-muted);
  display: flex; align-items: center; gap: var(--space-2);
}
.status-dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16,185,129,.6);
  animation: pulse 2s infinite;
}

.chat-messages {
  padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-4);
  min-height: 260px;
}

.message-user {
  align-self: flex-end;
  background: var(--blue-600);
  color: #fff;
  padding: 10px 16px;
  border-radius: 18px 18px 4px 18px;
  max-width: 78%;
  font-size: .875rem; line-height: 1.55;
}

.message-ian {
  align-self: flex-start;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 14px 16px;
  border-radius: 18px 18px 18px 4px;
  max-width: 88%;
  font-size: .875rem; line-height: 1.6;
  display: flex; flex-direction: column; gap: var(--space-3);
}
.message-ian p { color: var(--text-secondary); }
.message-ian strong { color: var(--text-primary); }
.message-ian .message-note {
  font-size: .8125rem; color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-3); margin-top: var(--space-1);
}

/* Tesis chip */
.tesis-chip {
  display: flex; flex-direction: column; gap: 4px;
  background: rgba(59,130,246,.07);
  border: 1px solid rgba(59,130,246,.18);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.chip-registro {
  font-family: var(--font-mono);
  font-size: .6875rem; font-weight: 600;
  color: var(--blue-400);
  letter-spacing: .03em;
}
.chip-titulo {
  font-size: .8125rem; font-weight: 700;
  color: var(--text-primary); line-height: 1.4;
}
.chip-meta {
  font-size: .6875rem; color: var(--text-muted);
}

/* Typing indicator */
.typing-indicator {
  display: flex; align-items: center; gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 14px 18px;
  border-radius: 18px 18px 18px 4px;
  align-self: flex-start; width: 60px;
}
.typing-indicator span {
  width: 6px; height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: .2s; }
.typing-indicator span:nth-child(3) { animation-delay: .4s; }

@keyframes typing {
  0%,60%,100% { transform: translateY(0); opacity: .4; }
  30%          { transform: translateY(-6px); opacity: 1; }
}

.message-ian--response.hidden { display: none; }

/* Chat input bar */
.chat-input-bar {
  border-top: 1px solid var(--border);
  padding: var(--space-3) var(--space-4);
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--bg-base);
}
.chat-input-bar input {
  flex: 1;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-muted);
  font-size: .875rem;
  cursor: default;
}

/* ------------------------------------------------------------
   10. COMPARISON TABLE
   ------------------------------------------------------------ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.comparison-table th {
  text-align: left; padding: 12px 16px;
  background: var(--bg-subtle);
  border-bottom: 2px solid var(--border);
  font-weight: 600; font-size: .75rem;
  color: var(--text-secondary);
  letter-spacing: .06em; text-transform: uppercase;
}
.comparison-table th.ian-col {
  background: rgba(37,99,235,.08);
  color: var(--blue-400);
  border-bottom-color: var(--blue-600);
}
.comparison-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table td.ian-col {
  background: rgba(37,99,235,.03);
  color: var(--text-primary); font-weight: 500;
}
.comparison-table .check-yes { color: var(--success); font-weight: 700; }
.comparison-table .check-no  { color: var(--text-muted); }

/* ------------------------------------------------------------
   11. STEP LIST (onboarding)
   ------------------------------------------------------------ */
.step-list {
  display: flex; flex-direction: column; gap: 0;
  position: relative;
}
.step-list::before {
  content: ''; position: absolute;
  left: 19px; top: 40px; bottom: 40px; width: 2px;
  background: linear-gradient(180deg, var(--blue-600), transparent);
}
.step-item { display: flex; gap: var(--space-5); padding: var(--space-5) 0; }
.step-number {
  width: 40px; height: 40px; flex-shrink: 0;
  background: rgba(37,99,235,.12);
  border: 2px solid var(--blue-600);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--blue-400); font-size: .875rem;
  position: relative; z-index: 1;
}
.step-content h3 {
  font-size: 1rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: var(--space-2);
}
.step-content p { font-size: .875rem; color: var(--text-secondary); line-height: 1.6; }

/* ------------------------------------------------------------
   12. FAQ ACCORDION
   ------------------------------------------------------------ */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}
.faq-item:first-child { border-top: 1px solid var(--border-subtle); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: var(--space-5) 0;
  font-size: .9375rem; font-weight: 600;
  color: var(--text-primary);
  text-align: left; cursor: pointer;
  gap: var(--space-4);
}
.faq-question .faq-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  background: var(--bg-subtle); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: var(--blue-400);
  transition: transform .2s, background .2s;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: rgba(59,130,246,.15);
}
.faq-answer {
  overflow: hidden; max-height: 0;
  transition: max-height .25s ease, padding .25s;
}
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: var(--space-5); }
.faq-answer p {
  font-size: .875rem; color: var(--text-secondary); line-height: 1.7;
}

/* ------------------------------------------------------------
   13. HERO SPLIT (Home)
   ------------------------------------------------------------ */
.hero-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  max-width: 640px; margin: var(--space-8) auto 0;
}
.hero-split-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  cursor: pointer; text-decoration: none; display: block;
}
.hero-split-card:hover {
  border-color: rgba(59,130,246,.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}
.hero-split-card .split-icon {
  font-size: 1.75rem; margin-bottom: var(--space-3);
}
.hero-split-card h3 {
  font-size: 1rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: var(--space-2);
}
.hero-split-card p {
  font-size: .8125rem; color: var(--text-secondary); line-height: 1.5;
  margin-bottom: var(--space-4);
}

/* ------------------------------------------------------------
   14. PAIN COLUMNS
   ------------------------------------------------------------ */
.pain-col {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.pain-col .pain-icon {
  font-size: 2rem; margin-bottom: var(--space-4);
}
.pain-col h3 {
  font-size: 1rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: var(--space-3);
}
.pain-col p {
  font-size: .875rem; color: var(--text-secondary); line-height: 1.65;
}

/* ------------------------------------------------------------
   15. FOOTER
   ------------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-16);
}
.footer-grid {
  display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: var(--space-10); margin-bottom: var(--space-10);
}
.footer-logo { display: inline-block; margin-bottom: var(--space-3); }
.footer-tagline {
  font-size: .875rem; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: var(--space-4);
}
.footer-corpus-badge {
  display: flex; flex-direction: column; gap: var(--space-2);
}
.footer-corpus-num { font-size: .75rem; color: var(--text-muted); }
.footer-heading {
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a {
  font-size: .875rem; color: var(--text-secondary);
  transition: color .15s;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-6);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.footer-disclaimer {
  font-size: .75rem; color: var(--text-muted);
  line-height: 1.7; max-width: 720px;
}
.footer-disclaimer a { color: var(--blue-400); }
.footer-disclaimer a:hover { text-decoration: underline; }
.footer-copy { font-size: .75rem; color: var(--text-muted); }

/* ------------------------------------------------------------
   16. HERO (general)
   ------------------------------------------------------------ */
.hero {
  padding: var(--space-24) 0 var(--space-20);
  text-align: center;
  background: radial-gradient(ellipse 80% 50% at 50% -10%,
    rgba(37,99,235,.14), transparent), var(--bg-base);
}
.hero .overline { margin-bottom: var(--space-4); }
.hero .hero-sub {
  font-size: 1.125rem; color: var(--text-secondary);
  max-width: 560px; margin: var(--space-5) auto 0;
  line-height: 1.65;
}

/* B2B hero — left-aligned, light mode */
.hero-b2b {
  padding: var(--space-20) 0;
  background: radial-gradient(ellipse 60% 50% at 30% 50%,
    rgba(37,99,235,.06), transparent);
}
.hero-b2b .hero-b2b-text { max-width: 640px; }
.hero-b2b .hero-b2b-text .overline { text-align: left; display: block; }
.hero-b2b .hero-b2b-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.15;
  color: var(--text-primary); margin-bottom: var(--space-5);
}
.hero-b2b .hero-b2b-text p {
  font-size: 1.0625rem; color: var(--text-secondary);
  line-height: 1.65; margin-bottom: var(--space-6);
  max-width: 520px;
}
.hero-b2b .trust-badges {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin-top: var(--space-5);
}
.trust-badge {
  font-size: .8125rem; font-weight: 500;
  color: var(--text-secondary); padding: 4px 12px;
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

/* ------------------------------------------------------------
   17. PROBLEM STAT (B2B)
   ------------------------------------------------------------ */
.problem-stat {
  text-align: center; padding: var(--space-16) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-12);
}
.problem-stat .stat-big {
  font-size: clamp(3rem, 7vw, 5rem);
  font-weight: 800; letter-spacing: -0.04em;
  color: var(--text-primary); line-height: 1;
}
.problem-stat .stat-big span { color: var(--blue-500); }
.problem-stat p {
  font-size: 1rem; color: var(--text-secondary);
  margin-top: var(--space-3);
}

/* ------------------------------------------------------------
   18. PRICE TOGGLE (precios.php)
   ------------------------------------------------------------ */
.plan-toggle {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 5px;
  width: fit-content; margin: 0 auto var(--space-12);
}
.plan-toggle input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.toggle-label {
  padding: 8px 24px; border-radius: var(--radius-full);
  font-size: .9375rem; font-weight: 600; cursor: pointer;
  color: var(--text-secondary); transition: all .2s;
  user-select: none;
}
.toggle-label.active,
.plan-toggle input:not(:checked) ~ .section-b2c .toggle-lbl-b2c,
.plan-toggle input:checked ~ .section-b2b .toggle-lbl-b2b {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* CSS-first toggle — show/hide sections */
#toggle-plan:not(:checked) ~ .section-b2b { display: none; }
#toggle-plan:checked ~ .section-b2c       { display: none; }

/* ------------------------------------------------------------
   19. RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .grid-3  { grid-template-columns: repeat(2,1fr); }
  .grid-4  { grid-template-columns: repeat(2,1fr); }
  .grid-hero { grid-template-columns: 1fr; gap: var(--space-10); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}

@media (max-width: 768px) {
  .container, .container-narrow { padding: 0 var(--space-5); }
  .section    { padding: var(--space-16) 0; }
  .section-lg { padding: var(--space-20) 0; }

  .navbar-links, .navbar-cta { display: none; }
  .navbar-hamburger { display: flex; }

  .grid-2     { grid-template-columns: 1fr; }
  .grid-3     { grid-template-columns: 1fr; }
  .grid-4     { grid-template-columns: 1fr; }

  .hero-split {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  .trust-bar { gap: var(--space-5); }
  .trust-bar .divider { display: none; }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .comparison-table { font-size: .8125rem; }
  .comparison-table th,
  .comparison-table td { padding: 9px 10px; }

  .step-list::before { display: none; }

  .problem-stat .stat-big { font-size: 3rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: var(--space-16) 0 var(--space-12); }
}
