:root {
  --bg-primary: #080c14;
  --bg-surface: #0e1422;
  --bg-card: rgba(16, 24, 40, 0.7);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-emerald: #10b981;
  --accent-cyan: #06b6d4;
  --accent-violet: #8b5cf6;
  --accent-amber: #f59e0b;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --container-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Background Gradients & Grid */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}

.bg-glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-emerald) 0%, transparent 70%);
  top: -150px;
  left: -100px;
}

.bg-glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
  top: 300px;
  right: -100px;
}

.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon {
  width: 100%;
  height: 100%;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-emerald);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
}

.nav-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ai-sparkle {
  color: var(--accent-cyan);
}

.nav-btn-primary {
  padding: 0.5rem 1.15rem;
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.nav-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Hero Section */
.hero-section {
  position: relative;
  z-index: 10;
  padding: 5rem 0 3.5rem;
  text-align: center;
}

.hero-content {
  max-width: 860px;
}

.badge-matriz {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-emerald);
  margin-bottom: 1.75rem;
}

.status-pulse {
  width: 8px;
  height: 8px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, #34d399 0%, #38bdf8 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-hero-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.5);
}

.btn-arrow {
  width: 18px;
  height: 18px;
}

.btn-hero-secondary {
  background: rgba(14, 20, 34, 0.8);
  border: 1px solid var(--border-hover);
  color: #f1f5f9;
  backdrop-filter: blur(8px);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* Metrics Strip */
.metrics-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 20, 34, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.25rem 2rem;
  backdrop-filter: blur(12px);
}

.metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
}

.text-emerald { color: #34d399; }
.text-cyan { color: #38bdf8; }
.text-violet { color: #a78bfa; }
.text-amber { color: #fbbf24; }

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.25rem;
}

.metric-divider {
  width: 1px;
  height: 36px;
  background: var(--border-subtle);
}

/* Modules Grid */
.section-modulos {
  position: relative;
  z-index: 10;
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

.section-subtitle code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: #38bdf8;
  font-size: 0.95em;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.module-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.module-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
}

.card-nexus:hover {
  box-shadow: 0 12px 36px rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.card-crm:hover {
  box-shadow: 0 12px 36px rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
}

.card-caja:hover {
  box-shadow: 0 12px 36px rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.module-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-icon svg {
  width: 26px;
  height: 26px;
}

.icon-nexus {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.icon-crm {
  background: rgba(6, 182, 212, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.icon-caja {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.module-ext {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.card-body {
  flex: 1;
}

.badge-role {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.module-title {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.875rem;
  color: #ffffff;
}

.module-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.feature-list {
  list-style: none;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.check-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-emerald);
  flex-shrink: 0;
  margin-top: 2px;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}

.btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  flex: 1;
}

.btn-card-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
}

.btn-card-primary:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-card-ghost {
  flex: 0 0 auto;
  padding: 0.75rem 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: #38bdf8;
}

.btn-card-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-card-crm {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
}

.btn-card-crm:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}

.btn-card-caja {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #ffffff;
}

.btn-card-caja:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

/* Architecture Section */
.section-architecture {
  position: relative;
  z-index: 10;
  padding: 4rem 0;
}

.architecture-box {
  background: linear-gradient(135deg, rgba(14, 20, 34, 0.9) 0%, rgba(20, 29, 47, 0.8) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.arch-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.arch-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.arch-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.arch-pill {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.arch-pill span {
  color: var(--accent-emerald);
}

.terminal-mock {
  background: #050811;
  border: 1px solid var(--border-hover);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-bar {
  background: #0d121f;
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.dot-t {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.terminal-code {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.65;
  color: #cbd5e1;
  overflow-x: auto;
}

.c-comment { color: #64748b; }
.c-kw { color: #38bdf8; font-weight: 600; }
.c-green { color: #34d399; font-weight: 600; }

/* Status Section */
.section-status {
  position: relative;
  z-index: 10;
  padding: 3rem 0 5rem;
}

.status-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.25rem;
}

.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.status-title {
  font-size: 1.35rem;
  font-weight: 700;
}

.status-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-all-good {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.875rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.services-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.service-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.service-info {
  display: flex;
  flex-direction: column;
}

.service-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.service-url {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.service-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
}

.service-badge.operational {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: #060910;
  padding: 4rem 0 2rem;
  position: relative;
  z-index: 10;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  max-width: 340px;
}

.footer-logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-secure {
  font-size: 0.75rem;
  color: var(--accent-emerald);
}

/* Responsive */
@media (max-width: 992px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }
  .architecture-box {
    grid-template-columns: 1fr;
  }
  .services-list {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .metrics-strip {
    flex-direction: column;
    gap: 1.25rem;
  }
  .metric-divider {
    width: 60%;
    height: 1px;
  }
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
}
