
:root {
  --accent: #0ea5e9;
  --accent-light: #e0f2fe;
  --accent-dark: #0284c7;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-muted: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
  --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; color: var(--text-primary);
  text-decoration: none;
}
.nav-logo svg { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; cursor: pointer; border: none;
  transition: var(--transition); text-decoration: none;
}
.btn-primary {
  background: var(--text-primary); color: #fff;
}
.btn-primary:hover { background: #1e293b; transform: translateY(-1px); }
.btn-accent {
  background: var(--accent); color: #fff;
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--text-primary); background: var(--bg-soft); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* HERO */
.hero { text-align: center; padding: 80px 0 60px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-light); color: var(--accent-dark);
  font-size: 13px; font-weight: 600; padding: 6px 16px;
  border-radius: 999px; margin-bottom: 24px;
}
.hero h1 {
  font-size: 52px; font-weight: 800; line-height: 1.05;
  letter-spacing: -0.03em; margin-bottom: 20px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 19px; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 32px; line-height: 1.6;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* SECTIONS */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-soft); }
.section-label {
  font-size: 12px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.section-title {
  font-size: 36px; font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.section-title span { color: var(--accent); }
.section-desc {
  font-size: 17px; color: var(--text-secondary);
  max-width: 560px; line-height: 1.6;
}

/* CARDS */
.card-grid { display: grid; gap: 16px; }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: var(--transition);
}
.card:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-icon {
  width: 44px; height: 44px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.card p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

/* FEATURE BLOCKS */
.feature-block {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center; margin: 48px 0;
}
.feature-block.reverse { direction: rtl; }
.feature-block.reverse > * { direction: ltr; }
.feature-visual {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; background: var(--bg-soft);
  min-height: 280px; display: flex; flex-direction: column; justify-content: center;
}
.chat-bubble {
  max-width: 85%; padding: 12px 16px; border-radius: 16px;
  font-size: 14px; line-height: 1.5; margin-bottom: 10px;
  animation: fadeSlideIn 0.5s ease-out both;
}
.chat-bubble.user {
  background: #fff; color: var(--text-primary); align-self: flex-end;
  border-bottom-right-radius: 4px; border: 1px solid var(--border);
}
.chat-bubble.ai {
  background: var(--text-primary); color: #fff; align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.feature-text h3 {
  font-size: 30px; font-weight: 800; line-height: 1.1;
  letter-spacing: -0.02em; margin-bottom: 14px;
}
.feature-text p {
  font-size: 16px; color: var(--text-secondary); line-height: 1.6;
}

/* PRICING */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.pricing-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 24px; text-align: center;
  transition: var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-md); }
.pricing-card.featured {
  border-color: var(--accent); border-width: 2px;
  position: relative;
}
.pricing-card.featured::before {
  content: "Más popular";
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 14px; border-radius: 999px;
}
.pricing-card .plan-name { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; }
.pricing-card .price { font-size: 40px; font-weight: 800; margin-bottom: 4px; }
.pricing-card .period { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; }
.pricing-card ul li {
  font-size: 14px; color: var(--text-secondary); padding: 6px 0;
  display: flex; align-items: center; gap: 10px;
}
.pricing-card ul li::before {
  content: "✓"; color: var(--success); font-weight: 700; font-size: 14px;
}

/* TABLE */
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 24px; }
.compare-table th, .compare-table td {
  padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border);
}
.compare-table th {
  font-weight: 600; color: var(--text-muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.compare-table td:first-child { font-weight: 600; }
.compare-table .check { color: var(--success); font-weight: 700; }
.compare-table .dash { color: var(--text-muted); }

/* FAQ */
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 10px; overflow: hidden; background: #fff;
}
.faq-q {
  padding: 18px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  transition: background 0.2s;
}
.faq-q:hover { background: var(--bg-soft); }
.faq-a {
  padding: 0 20px; font-size: 14px; color: var(--text-secondary); line-height: 1.6;
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-a { max-height: 300px; padding: 0 20px 18px; }
.faq-q .chevron { transition: transform 0.3s; font-size: 12px; }
.faq-item.open .faq-q .chevron { transform: rotate(180deg); }

/* FORM */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 14px; background: #fff;
  color: var(--text-primary); transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-group textarea { min-height: 100px; resize: vertical; }

/* TIMELINE */
.steps-timeline { position: relative; padding-left: 40px; }
.steps-timeline::before {
  content: ""; position: absolute; left: 14px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.step-item { position: relative; margin-bottom: 40px; padding-left: 24px; }
.step-item::before {
  content: attr(data-step);
  position: absolute; left: -40px; top: 0;
  width: 30px; height: 30px; border-radius: 999px;
  background: var(--text-primary); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-item h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.step-item p { font-size: 15px; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.6; }
.step-visual {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; background: var(--bg-soft);
}

/* CASES */
.case-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; margin-bottom: 20px;
}
.case-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.case-avatar {
  width: 52px; height: 52px; border-radius: 999px;
  background: var(--bg-muted); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: var(--accent);
}
.case-header h3 { font-size: 18px; font-weight: 700; margin: 0; }
.case-header span { font-size: 13px; color: var(--text-secondary); }
.case-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.case-stat {
  text-align: center; padding: 16px; border-radius: var(--radius);
  background: var(--bg-soft); border: 1px solid var(--border-light);
}
.case-stat .num { font-size: 28px; font-weight: 800; color: var(--accent); }
.case-stat .label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.case-quote {
  font-size: 15px; color: var(--text-secondary); line-height: 1.7;
  padding: 16px 20px; border-left: 3px solid var(--accent);
  background: var(--bg-soft); border-radius: 0 var(--radius) var(--radius) 0;
}
.case-quote strong { color: var(--text-primary); }
.case-quote .author { margin-top: 10px; font-size: 13px; color: var(--text-muted); }

/* DASHBOARD */
.dashboard { padding: 24px; }
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
}
.dash-header h2 { font-size: 24px; font-weight: 700; }
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.dash-stat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px;
}
.dash-stat-card .label { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.dash-stat-card .value { font-size: 28px; font-weight: 800; }
.dash-stat-card .change {
  font-size: 12px; font-weight: 600; margin-top: 4px;
}
.dash-stat-card .change.up { color: var(--success); }
.dash-stat-card .change.down { color: var(--danger); }
.dash-chart {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; margin-bottom: 20px;
}
.dash-chart h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; color: var(--text-muted); }

/* CHAT INTERFACE */
.chat-container {
  display: flex; height: 600px; border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; background: #fff;
}
.chat-sidebar {
  width: 240px; border-right: 1px solid var(--border);
  background: var(--bg-soft); padding: 16px;
}
.chat-sidebar h4 { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.chat-area-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius);
  cursor: pointer; font-size: 14px; font-weight: 500;
  margin-bottom: 4px; transition: var(--transition);
}
.chat-area-item:hover, .chat-area-item.active { background: #fff; }
.chat-area-item .dot { width: 8px; height: 8px; border-radius: 999px; }
.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.chat-header h3 { font-size: 15px; font-weight: 700; }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; background: var(--bg-soft); }
.chat-input-area {
  padding: 16px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; background: #fff;
}
.chat-input-area input {
  flex: 1; padding: 12px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: 14px;
}
.chat-input-area input:focus { outline: none; border-color: var(--accent); }

/* DEMO */
.demo-hero { text-align: center; padding: 60px 0 40px; }
.demo-hero h1 { font-size: 42px; font-weight: 800; margin-bottom: 12px; }
.demo-hero p { font-size: 17px; color: var(--text-secondary); max-width: 500px; margin: 0 auto; }
.demo-selector { display: flex; gap: 8px; justify-content: center; margin: 32px 0; flex-wrap: wrap; }
.demo-selector .demo-btn {
  padding: 8px 18px; border-radius: var(--radius); border: 1.5px solid var(--border);
  background: #fff; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
}
.demo-selector .demo-btn:hover, .demo-selector .demo-btn.active {
  border-color: var(--accent); background: var(--accent-light); color: var(--accent-dark);
}

/* BLOG */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px; }
.blog-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: var(--transition);
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-card-img {
  height: 160px; background: var(--bg-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
.blog-card-content { padding: 20px; }
.blog-card .tag {
  font-size: 11px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px;
}
.blog-card h3 { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.blog-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 12px; }
.blog-card .meta { font-size: 12px; color: var(--text-muted); }

/* LEGAL */
.legal-content { max-width: 720px; margin: 0 auto; padding: 40px 0; }
.legal-content h2 { font-size: 24px; font-weight: 700; margin: 32px 0 16px; }
.legal-content h3 { font-size: 18px; font-weight: 700; margin: 24px 0 12px; }
.legal-content p { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 12px; }
.legal-content ul { margin: 12px 0 12px 24px; color: var(--text-secondary); }
.legal-content ul li { margin-bottom: 6px; line-height: 1.6; }

/* LOGIN */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); }
.login-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 40px; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg);
}
.login-card .logo { text-align: center; margin-bottom: 28px; }
.login-card .logo h2 { font-size: 22px; font-weight: 800; }
.login-card .logo p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border); padding: 48px 0 24px; margin-top: 48px;
  background: var(--bg-soft);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
}
.footer-brand p { font-size: 14px; color: var(--text-secondary); margin-top: 12px; line-height: 1.6; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--text-muted); margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-col a { display: block; font-size: 14px; color: var(--text-secondary); text-decoration: none; margin-bottom: 10px; transition: var(--transition); }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p { font-size: 13px; color: var(--text-muted); }

/* ANIMATIONS */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero h1 { font-size: 34px; }
  .section-title { font-size: 28px; }
  .card-grid-3, .card-grid-4, .pricing-grid, .blog-grid, .dash-stats, .case-stats { grid-template-columns: 1fr; }
  .feature-block { grid-template-columns: 1fr; }
  .feature-block.reverse { direction: ltr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .chat-container { flex-direction: column; height: auto; }
  .chat-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
}
