/* =========================================================
   Google Stitch Foundation - CBC Soluciones
   ========================================================= */
:root {
  /* Corporativos recuperados de la web antigua */
  --brand: #615DB9;      /* Indigo / Muted Purple */
  --brand-2: #5eb9f0;    /* Light Blue / Cyan */
  --brand-3: #d16b86;    /* Pink */
  
  --bg-primary: #f6f7f9; /* Fondo predominante claro (Stitch Default) */
  --bg-secondary: #ffffff;
  
  /* Acentos y Tipografía */
  --bg-tech-deep: #0f172a; /* Slate 900 */
  --text-primary: #343f52; /* Ink corporativo antiguo */
  --text-secondary: #60697b; /* Muted corporativo antiguo */
  --text-inverse: #ffffff;

  --accent-blue: var(--brand);    
  --accent-blue-hover: #4f46a6;
  --accent-cyan: var(--brand-2);

  /* Spacing y Estructuras */
  --radius-xl: 16px;
  --radius-lg: 12px;
  --shadow-sm: 0 10px 24px rgba(17,24,39,.06);
  
  font-family: 'Google Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-blue);
  text-decoration: underline;
}

a:hover {
  color: var(--accent-blue-hover);
  text-decoration: none;
}

/* Modulares de Stitch Architect */
.stitch-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation Base */
.stitch-navbar {
  backdrop-filter: saturate(180%) blur(8px);
  background: rgba(255,255,255,.8);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
}

/* Mobile menu base hidden for desktop */
.mobile-menu-btn, .mobile-menu-close {
  display: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-primary);
}
.drawer-overlay {
  display: none;
}

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

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

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--brand);
}

/* Identidad Gráfica - Texto Degradado */
.brand-gradient {
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 800;
}

/* Secciones Clave */
.hero-section {
  padding: 6rem 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid #e2e8f0;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2rem;
}

/* Panel Tecnológico Dark */
.tech-panel {
  background: var(--bg-tech-deep);
  color: var(--text-inverse);
  padding: 4rem 0;
  margin-top: 2rem;
  border-radius: var(--radius-lg);
}

/* Lead Gen Asymmetric Friction */
.lead-machine-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(17,24,39,0.08);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  max-width: 480px;
  text-align: center;
}

.btn-primary {
  display: inline-block;
  background: var(--accent-blue);
  color: #fff;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  font-size: 1.1rem;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
  color: #fff;
}

/* Footer Estándar Stitch */
.stitch-footer {
  background: linear-gradient(180deg, var(--bg-tech-deep) 0%, #050811 100%);
  color: rgba(255,255,255,.86);
  padding: 4rem 0;
  margin-top: 0;
  border-top: 1px solid rgba(255,255,255,.05);
}

.stitch-footer a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
}
.stitch-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* =========================================================
   Responsive Design - Mobile Optimizations
   ========================================================= */
@media (max-width: 768px) {
  .stitch-navbar-inner {
    justify-content: space-between;
  }
  .mobile-menu-btn {
    display: flex;
    align-items: center;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 2rem;
    box-shadow: 10px 0 25px rgba(0,0,0,0.1);
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    gap: 1.5rem !important;
  }
  .drawer-active .nav-links {
    transform: translateX(0);
  }
  .drawer-active .drawer-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.5); /* tech-deep con opacidad */
    backdrop-filter: blur(4px);
    z-index: 10000;
  }
  body.drawer-active {
    overflow: hidden;
  }
  .mobile-menu-close {
    display: flex;
    align-self: flex-end;
    margin-bottom: 2rem;
  }
  
  .nav-link {
    font-size: 1.2rem;
    padding: 0.5rem 0;
  }

  .brand-gradient {
    font-size: 1.3rem !important;
    white-space: nowrap;
  }
  
  .hero-title {
    font-size: 2.2rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.1rem !important;
  }
  
  .hero-section {
    padding-top: 4rem !important;
    padding-bottom: 3rem !important;
  }
  
  .btn-primary {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* =========================================================
   Utility Classes - Responsive Grid & Typography
   ========================================================= */
.stitch-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .stitch-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stitch-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .stitch-grid-auto-fill {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

.text-justify-desktop {
  text-align: left;
}

@media (min-width: 768px) {
  .text-justify-desktop {
    text-align: justify;
  }
}

.text-balance {
  text-wrap: balance;
}

.columns-responsive {
  column-count: 1;
  column-gap: 2rem;
}

@media (min-width: 1024px) {
  .columns-responsive {
    column-count: 2;
  }
}

.tech-panel-responsive {
  padding: 2.5rem 1.25rem;
}

@media (min-width: 768px) {
  .tech-panel-responsive {
    padding: 4rem;
  }
}
