@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@600;700;800&display=swap");

:root {
  --bg: #F8FAFC;
  --bg-deep: #F1F5F9;
  --ink: #0B1121;
  --muted: #64748B;
  --brand: #10B981; 
  --brand-dark: #047857;
  --brand-light: #34D399;
  --brand-glow: rgba(16, 185, 129, 0.15);
  --accent: #F59E0B;
  --card: #FFFFFF;
  --border: #E2E8F0;
  
  --shadow-sm: 0 4px 6px -1px rgba(11, 17, 33, 0.05);
  --shadow-md: 0 10px 15px -3px rgba(11, 17, 33, 0.08);
  --shadow-xl: 0 25px 50px -12px rgba(11, 17, 33, 0.15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0; font-family: "Manrope", system-ui, sans-serif;
  color: var(--ink); background: var(--bg);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }

/* CONTENEDORES MÁS COMPACTOS Y CENTRADOS */
.container { 
  width: min(1140px, 100%); /* Ligeramente más estrecho para agrupar el contenido */
  margin: 0 auto; 
  padding: 0 24px; 
}
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ANIMACIONES (Scroll Reveal) */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.5, 0, 0, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* TOPBAR GLASSMORPHISM Y CENTRADO ABSOLUTO */
.topbar {
  padding: 16px 0; position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.topbar__inner { 
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; 
}

.logo {
  display: flex; align-items: center; gap: 12px;
  font-family: "Space Grotesk", sans-serif; font-weight: 800; font-size: 1.3rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.03em;
}

.logo__mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  display: grid; place-items: center; color: #ffffff; box-shadow: 0 8px 20px var(--brand-glow);
}

/* LA CLAVE DEL MENÚ CENTRADO EN PC */
.nav-container { 
  display: flex; align-items: center; flex-grow: 1; 
}
.nav { 
  display: flex; gap: 32px; align-items: center; 
  margin: 0 auto; /* Esto empuja la navegación exactamente al centro de la pantalla */
}
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.nav a:hover { color: var(--ink); }

.topbar-actions { 
  display: flex; gap: 12px; 
  margin-left: auto; /* Mantiene los botones pegados a la derecha */
}

.mobile-menu-btn { display: none; background: none; border: none; font-size: 2rem; color: var(--ink); cursor: pointer; }

/* BOTONES PREMIUM */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 36px; border-radius: 99px; font-weight: 700; font-size: 1.05rem;
  text-decoration: none; cursor: pointer; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.button--primary { background: var(--brand); color: #ffffff; box-shadow: 0 8px 25px var(--brand-glow); border: 1px solid transparent; }
.button--primary:hover { transform: translateY(-3px) scale(1.02); background: var(--brand-dark); box-shadow: 0 15px 35px rgba(16, 185, 129, 0.3); }
.button--ghost { border: 2px solid var(--border); background: rgba(255,255,255,0.5); backdrop-filter: blur(10px); color: var(--ink); }
.button--ghost:hover { border-color: var(--ink); background: var(--card); }

/* UTILIDADES Y SECCIONES */
.section { padding: 120px 0; }
.section-alt { background: var(--bg-deep); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; letter-spacing: -0.04em; color: var(--ink); margin-top: 0; line-height: 1.2; }
.lead { color: var(--muted); font-size: 1.2rem; max-width: 750px; margin: 0 auto 32px; line-height: 1.7; }

/* GRIDS: Evitamos que se estiren al 100% de la pantalla usando tamaños máximos */
.grid-3 { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 380px)); /* No usar 1fr ilimitado */
  gap: 32px; 
  justify-content: center; /* Agrupa las tarjetas en el centro */
}
.grid-2 { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(340px, 480px)); 
  gap: 40px; 
  justify-content: center; 
}
.responsive-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

/* EL GRID DEL CAOS (Especial para Index) */
.chaos-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 60px; align-items: stretch; justify-content: center; }

/* TARJETAS SAAS */
.card {
  background: var(--card); padding: 48px; border-radius: 32px;
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
}
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-xl); border-color: var(--brand-light); }

/* CAJAS OSCURAS (Glassmorphism Pro) */
.dark-box {
  background: linear-gradient(145deg, var(--ink), #1E293B); color: #ffffff; position: relative; border-radius: 32px; padding: 60px;
  border: 1px solid rgba(255,255,255,0.08); box-shadow: var(--shadow-xl); overflow: hidden;
}
.dark-box::before {
  content: ''; position: absolute; width: 400px; height: 400px;
  background: var(--brand); filter: blur(150px); opacity: 0.15; top: -100px; right: -100px; pointer-events: none;
}

/* FORMULARIOS */
input, select, textarea {
  width: 100%; padding: 18px; border: 2px solid var(--border); border-radius: 16px;
  font-family: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); transition: all 0.3s ease;
}
input:focus, textarea:focus { outline: none; border-color: var(--brand); background: var(--card); box-shadow: 0 0 0 4px var(--brand-glow); }

/* RESPONSIVE MÓVIL (Anula el centrado de PC para apilar) */
@media (max-width: 900px) {
  .section { padding: 60px 0; }
  .responsive-split { grid-template-columns: 1fr !important; gap: 40px !important; text-align: center; }
  .chaos-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .vs-badge { display: none !important; }
  .dark-box { padding: 32px 20px; }
  .card { padding: 32px 24px; }
  
  /* Menú Hamburguesa Lógica */
  .mobile-menu-btn { display: block; }
  .nav-container { display: none; width: 100%; flex-direction: column; gap: 20px; padding-top: 24px; padding-bottom: 16px; margin-left: 0; }
  .nav-container.active { display: flex; }
  .nav { flex-direction: column; width: 100%; align-items: flex-start; gap: 16px; margin: 0; }
  .topbar-actions { flex-direction: column; width: 100%; margin-left: 0; }
  .button { width: 100%; } 
}