/* =========================================
   1. VARIABLES Y TEMA (Paleta 70/20/10)
   ========================================= */
:root {
  color-scheme: light dark;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-surface: #f1f5f9;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.90);
  --border-subtle: #e2e8f0;
  --blue-corp: #1e3a8a;
  --blue-corp-hover: #1e40af;
  --blue-corp-glow: rgba(30, 58, 138, 0.12);
  --border-hover: #3b82f6;
  --orange-accent: #f97316;
  --orange-accent-hover: #ea580c;
  --orange-glow: rgba(249, 115, 22, 0.25);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg-primary: #070b14;
  --bg-secondary: #0d1322;
  --bg-surface: #111827;
  --bg-card: #1e293b;
  --bg-glass: rgba(7, 11, 20, 0.90);
  --border-subtle: #334155;
  --border-hover: #38bdf8;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --blue-corp: #38bdf8;
  --blue-corp-hover: #0ea5e9;
  --blue-corp-glow: rgba(56, 189, 248, 0.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.6);
}

/* =========================================
   2. RESET Y BASE
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Fondo con grid sutil */
body::before {
  content: '';
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image: linear-gradient(rgba(30, 58, 138, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(30, 58, 138, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: -1;
  pointer-events: none;
}

.container { max-width: 1280px; width: 92%; margin: 0 auto; }
.section { padding: clamp(4rem, 8vh, 6rem) 0; position: relative; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; color: var(--text-primary); }
p { color: var(--text-secondary); }

.tag {
  display: inline-block; padding: 6px 14px; border-radius: 100px;
  background: var(--blue-corp-glow); color: var(--blue-corp);
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px;
  text-transform: uppercase; margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--blue-corp), var(--orange-accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.accent-text { color: var(--orange-accent); }

/* =========================================
   3. HEADER & NAV
   ========================================= */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 20px 0; transition: all 0.4s ease; }
header.scrolled { background: var(--bg-glass); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border-subtle); padding: 14px 0; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--blue-corp); text-decoration: none; }
.logo img { max-height: 36px; width: auto; transition: filter 0.3s; }
.logo span { color: var(--orange-accent); }
nav { display: flex; gap: 32px; align-items: center; }
nav a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
nav a:hover { color: var(--blue-corp); }

.theme-btn {
  background: var(--bg-secondary); border: 1px solid var(--border-subtle);
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); transition: all 0.3s;
}
.theme-btn:hover { border-color: var(--blue-corp); color: var(--blue-corp); }
.theme-btn svg { width: 20px; height: 20px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

/* =========================================
   4. BOTONES
   ========================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 100px;
  font-weight: 600; text-decoration: none; font-size: 0.95rem;
  transition: all 0.3s var(--ease-spring); cursor: pointer; border: none;
}
.btn-primary { background: var(--orange-accent); color: #ffffff; box-shadow: 0 4px 16px var(--orange-glow); }
.btn-primary:hover { transform: translateY(-2px) scale(1.02); background: var(--orange-accent-hover); }
.btn-secondary { background: transparent; border: 1px solid var(--border-subtle); color: var(--blue-corp); }
.btn-secondary:hover { background: var(--blue-corp-glow); border-color: var(--blue-corp); }
.nav-cta { padding: 10px 24px; font-size: 0.9rem; }

/* =========================================
   5. HERO
   ========================================= */
.hero {
  min-height: 90vh; display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden; padding-top: 100px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--blue-corp-glow) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, var(--orange-glow) 0%, transparent 50%);
  pointer-events: none; z-index: 0;
}
.hero-content { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(3rem, 5vw, 5rem); margin-bottom: 24px; letter-spacing: -1px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--blue-corp));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: clamp(1.1rem, 2vw, 1.4rem); max-width: 700px; margin: 0 auto 40px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Stats del hero */
.hero-stats {
  display: flex; gap: 40px; margin-top: 40px; padding-top: 30px;
  border-top: 1px solid var(--border-subtle); justify-content: center; flex-wrap: wrap;
}
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 2rem; color: var(--blue-corp); font-family: var(--font-heading); }
.hero-stats span { font-size: 0.9rem; color: var(--text-secondary); }

/* Dashboard mockup visual */
.hero-visual {
  position: absolute; right: 5%; bottom: 10%;
  width: 400px; max-width: 45vw; z-index: 1;
}
@media (max-width: 1024px) { .hero-visual { display: none; } }

.dashboard-mockup {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow-lg);
}
.mock-header { display: flex; gap: 8px; margin-bottom: 16px; }
.mock-dot { width: 12px; height: 12px; border-radius: 50%; }
.mock-dot.red { background: #ef4444; }
.mock-dot.yellow { background: #f59e0b; }
.mock-dot.green { background: #10b981; }
.mock-content { display: flex; flex-direction: column; gap: 12px; }
.mock-chart { display: flex; align-items: flex-end; gap: 8px; height: 100px; }
.bar { flex: 1; background: var(--blue-corp); border-radius: 4px 4px 0 0; opacity: 0.8; transition: height 0.5s; }
.mock-status { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-secondary); }
.status-dot { width: 8px; height: 8px; background: #10b981; border-radius: 50%; }

/* =========================================
   6. COMPARACIÓN (Diseño Compacto y Centrado)
   ========================================= */
.comparison-section { background: var(--bg-secondary); }

.comparison-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center; /* Centra las tarjetas */
  margin-top: 48px;
}

.comp-card {
  flex: 1 1 300px;
  max-width: 450px; /* LIMITA EL ANCHO para evitar espacio vacío */
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  transition: all 0.4s var(--ease-out);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden; /* Para que el número no se salga */
}

.comp-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-corp);
}

/* Header de la tarjeta con número e ícono */
.comp-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

/* Número grande de fondo (estilo Pipeline) */
.comp-num {
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 800;
  color: var(--text-primary);
  opacity: 0.08; /* Muy sutil */
  position: absolute;
  top: 10px;
  right: 20px;
  line-height: 1;
  transition: opacity 0.3s;
}

.comp-card:hover .comp-num { opacity: 0.15; }

/* Círculo del ícono */
.comp-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  transition: transform 0.4s var(--ease-spring);
}

.comp-icon svg {
  width: 32px;
  height: 32px;
}

/* Colores específicos */
.comp-old .comp-icon { color: #ef4444; background: rgba(239, 68, 68, 0.08); }
.comp-new .comp-icon { color: var(--blue-corp); background: rgba(30, 58, 138, 0.08); }

.comp-card:hover .comp-icon { transform: scale(1.05) rotate(3deg); }

/* Textos */
.comp-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  position: relative;
  z-index: 2;
}

.comp-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  max-width: 320px; /* Limita el ancho del texto para lectura cómoda */
  margin: 0 auto;
}

/* =========================================
   7. PIPELINE (TU AJUSTE PRESERVADO)
   ========================================= */
.section-header { text-align: center; max-width: 800px; margin: 0 auto 64px; }
.section-header h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 16px; }
.subtitle { font-size: 1.2rem; }

.pipeline-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

.pipe-card {
  flex: 1 1 220px;
  max-width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.4s var(--ease-out);
  position: relative;
  box-shadow: var(--shadow-md);
}

.pipe-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: var(--blue-corp); }
.pipe-card:hover .pipe-icon svg { transform: scale(1.1) rotate(3deg); }

.pipe-top { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 24px; width: 100%; }

.step-num {
  font-family: var(--font-heading); font-size: 4.5rem; font-weight: 800;
  color: var(--blue-corp); opacity: 0.15; line-height: 1; transition: opacity 0.3s;
}
.pipe-card:hover .step-num { opacity: 0.3; }

.pipe-icon {
  width: 88px; height: 88px; border-radius: 24px; display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s var(--ease-spring); background: var(--bg-secondary);
}
.pipe-icon svg { width: 44px; height: 44px; transition: transform 0.4s var(--ease-spring); }
.pipe-icon.infra { color: var(--blue-corp); background: rgba(30, 58, 138, 0.08); }
.pipe-icon.data { color: var(--blue-corp); background: rgba(30, 58, 138, 0.06); }
.pipe-icon.plat { color: var(--blue-corp); background: rgba(30, 58, 138, 0.04); }
.pipe-icon.auto { color: var(--orange-accent); background: rgba(249, 115, 22, 0.08); }

.pipe-card h3 { font-size: 1.3rem; margin-bottom: 20px; color: var(--text-primary); font-weight: 700; }

.pipe-list { list-style: none; padding: 0; margin: 0; text-align: left; width: 100%; margin-top: auto; }
.pipe-list li {
  padding: 10px 0; padding-left: 24px; position: relative; font-size: 1rem;
  color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle);
}
.pipe-list li:last-child { border-bottom: none; }
.pipe-list li::before {
  content: ''; position: absolute; left: 0; top: 18px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--orange-accent); opacity: 0.8;
}

.pipe-arrow { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; opacity: 0.3; }
.pipe-arrow svg { width: 32px; height: 32px; stroke: var(--blue-corp); }
@keyframes dashFlow { to { stroke-dashoffset: -12; } }
.pipe-arrow svg path { stroke-dasharray: 4 3; animation: dashFlow 1.2s linear infinite; }

/* Responsive Pipeline */
@media (max-width: 1024px) {
  .pipeline-flow { flex-direction: column; align-items: center; gap: 48px; }
  .pipe-card { width: 100%; max-width: 500px; flex-direction: row; text-align: left; padding: 32px; gap: 24px; }
  .pipe-top { margin-bottom: 0; flex-direction: column; gap: 10px; width: auto; }
  .pipe-icon { width: 64px; height: 64px; }
  .pipe-icon svg { width: 32px; height: 32px; }
  .step-num { font-size: 3rem; }
  .pipe-arrow { transform: rotate(90deg); margin: -16px 0; }
}

/* =========================================
   8. CAPACIDADES (Unificado con Pipeline)
   ========================================= */
.capabilities-grid {
  display: flex; flex-wrap: wrap; gap: 40px; justify-content: center; margin-top: 64px;
}

.cap-card {
  flex: 1 1 220px;
  max-width: 250px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.4s var(--ease-out);
  position: relative;
  box-shadow: var(--shadow-md);
}

.cap-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: var(--blue-corp); }
.cap-card:hover .cap-icon svg { transform: scale(1.1) rotate(3deg); }

.cap-top { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 24px; width: 100%; }

.cap-num {
  font-family: var(--font-heading); font-size: 4.5rem; font-weight: 800;
  color: var(--blue-corp); opacity: 0.15; line-height: 1; transition: opacity 0.3s;
}
.cap-card:hover .cap-num { opacity: 0.3; }

.cap-icon {
  width: 88px; height: 88px; border-radius: 24px; display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s var(--ease-spring); background: var(--bg-secondary);
}
.cap-icon svg { width: 44px; height: 44px; transition: transform 0.4s var(--ease-spring); }
.cap-icon.infra { color: var(--blue-corp); background: rgba(30, 58, 138, 0.08); }
.cap-icon.telem { color: var(--blue-corp); background: rgba(30, 58, 138, 0.06); }
.cap-icon.soft { color: var(--blue-corp); background: rgba(30, 58, 138, 0.04); }
.cap-icon.auto { color: var(--orange-accent); background: rgba(249, 115, 22, 0.08); }

.cap-card h3 { font-size: 1.3rem; margin-bottom: 20px; color: var(--text-primary); font-weight: 700; }

.cap-list { list-style: none; padding: 0; margin: 0; text-align: left; width: 100%; margin-top: auto; }
.cap-list li {
  padding: 10px 0; padding-left: 24px; position: relative; font-size: 1rem;
  color: var(--text-secondary); border-bottom: 1px solid var(--border-subtle);
}
.cap-list li:last-child { border-bottom: none; }
.cap-list li::before {
  content: ''; position: absolute; left: 0; top: 18px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--orange-accent); opacity: 0.8;
}

/* =========================================
   9. TARGET / ¿PARA QUIÉN?
   ========================================= */
.target-section { background: var(--bg-secondary); }
.target-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; margin-top: 48px; }

.target-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  transition: all 0.4s var(--ease-out);
  box-shadow: var(--shadow-md);
}
.target-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-corp);
}

/* NUEVO ESTILO PARA ÍCONOS SVG */
.target-icon {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--bg-surface); /* Fondo gris sutil */
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  color: var(--blue-corp); /* Color del trazo SVG (Azul Corporativo) */
  transition: transform 0.4s var(--ease-spring), background 0.3s;
}

.target-icon svg {
  width: 32px; height: 32px;
  stroke-width: 2;
}

/* Efecto hover en el ícono */
.target-card:hover .target-icon {
  transform: scale(1.1) rotate(5deg);
  background: var(--blue-corp);
  color: #ffffff; /* SVG se vuelve blanco al hacer hover */
}

.target-card h3 { margin-bottom: 12px; font-size: 1.2rem; color: var(--text-primary); }
.target-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }

/* =========================================
   10. CASOS & STACK
   ========================================= */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; margin-top: 48px; }
.case-card {
  position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16/10;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  transition: transform 0.4s var(--ease-spring), box-shadow 0.4s;
  box-shadow: var(--shadow-sm);
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.case-card:hover { transform: scale(1.02); box-shadow: var(--shadow-lg), 0 0 0 1px var(--blue-corp); }
.case-overlay {
  position: absolute; inset: 0; padding: 32px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(to top, rgba(15,23,42,0.85) 0%, transparent 100%);
}
.case-tag { font-size: 0.75rem; color: var(--orange-accent); margin-bottom: 8px; font-weight: 600; text-transform: uppercase; }
.case-title { font-size: 1.3rem; font-weight: 600; line-height: 1.3; color: #ffffff; }

/* =========================================
   STACK / TECNOLOGÍAS (Textura fija + Dark Mode)
   ========================================= */
.stack-section {
  text-align: center;
  padding: 4rem 0;
  overflow: hidden;
  /* Color base claro */
  background-color: #003366;
  background-image: linear-gradient(
    45deg,
    rgba(255,255,255,0.04) 25%, transparent 25%, transparent 50%,
    rgba(255,255,255,0.04) 50%, rgba(255,255,255,0.04) 75%, transparent 75%, transparent
  );
  background-size: 20px 20px;
}

/* Forzar colores claros en modo claro */
.stack-section h2 { color: #ffffff !important; margin-bottom: 32px; }
.stack-section .marquee-item {
  color: rgba(255,255,255,0.6); opacity: 1;
  transition: all 0.3s;
}
.stack-section .marquee:hover .marquee-item { color: #ffffff; }

/* 🌙 OSCURECER EN MODO NOCHE */
[data-theme="dark"] .stack-section {
  background-color: #001529; /* Azul navy profundo */
  background-image: linear-gradient(
    45deg,
    rgba(255,255,255,0.03) 25%, transparent 25%, transparent 50%,
    rgba(255,255,255,0.03) 50%, rgba(255,255,255,0.03) 75%, transparent 75%, transparent
  );
}
[data-theme="dark"] .stack-section .marquee-item { color: rgba(255,255,255,0.4); }
[data-theme="dark"] .stack-section .marquee:hover .marquee-item { color: rgba(255,255,255,0.9); }

/* Marquee */
.marquee-wrapper { position: relative; width: 100%; mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.marquee { display: flex; gap: 64px; width: max-content; animation: scroll 30s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee-item { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--text-muted); opacity: 0.6; transition: all 0.3s; white-space: nowrap; }
.marquee:hover .marquee-item { opacity: 1; color: var(--blue-corp); }

/* =========================================
   11. METODOLOGÍA
   ========================================= */
.methodology-section { background: var(--bg-secondary); }
.methodology-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; margin-top: 48px; position: relative; }
.method-step {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: 32px; position: relative; z-index: 2;
}
.method-step:hover { border-color: var(--blue-corp); box-shadow: var(--shadow-md); }
.step-badge {
  width: 48px; height: 48px; background: var(--blue-corp); color: white; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-heading);
  margin-bottom: 20px; box-shadow: 0 4px 12px var(--blue-corp-glow);
}
.method-step h3 { margin-top: 12px; margin-bottom: 12px; color: var(--text-primary); }
.method-step p { color: var(--text-secondary); font-size: 0.95rem; }

/* =========================================
   12. CONTACTO & FORMULARIO
   ========================================= */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; margin-top: 64px; align-items: start; }
.contact-info h3 { font-size: 2rem; margin-bottom: 16px; color: var(--blue-corp); }
.contact-info p { color: var(--text-secondary); margin-bottom: 32px; font-size: 1.05rem; }
.contact-meta { display: flex; flex-direction: column; gap: 20px; }
.meta-item { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: 1.05rem; }
.meta-icon { color: var(--orange-accent); font-size: 1.4rem; width: 32px; text-align: center; }

.form-card { background: var(--bg-card); border: 1px solid var(--border-subtle); padding: 40px; border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.form-group { margin-bottom: 24px; }
.form-group label { display: block; font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea {
  width: 100%; padding: 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
  background: var(--bg-secondary); color: var(--text-primary); font-family: var(--font-body);
  font-size: 1rem; transition: all 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--orange-accent); box-shadow: 0 0 0 3px var(--orange-glow); background: var(--bg-primary);
}
.form-group textarea { resize: vertical; min-height: 140px; }
.form-submit { width: 100%; justify-content: center; font-size: 1rem; }
.form-status { margin-top: 16px; font-size: 0.9rem; text-align: center; min-height: 20px; }
.form-status.success { color: #10b981; }
.form-status.error { color: #ef4444; }

/* =========================================
   13. FOOTER
   ========================================= */
footer { padding: 80px 0 40px; border-top: 1px solid var(--border-subtle); background: var(--bg-secondary); margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 64px; }
.footer-brand .logo { margin-bottom: 16px; display: inline-flex; }
.footer-brand .logo img { max-height: 36px; width: auto; display: block; }
.footer-tagline { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-top: 20px; margin-bottom: 24px; max-width: 350px; }
.social-links { display: flex; gap: 12px; margin-top: 8px; }
.social-links a { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-secondary); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: all 0.3s; }
.social-links a:hover { background: var(--blue-corp); border-color: var(--blue-corp); color: #ffffff; transform: translateY(-3px); }
.social-links a svg { width: 18px; height: 18px; }
.footer-col h4 { font-size: 1rem; margin-bottom: 20px; color: var(--blue-corp); font-weight: 700; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--orange-accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-top: 32px; border-top: 1px solid var(--border-subtle); color: var(--text-muted); font-size: 0.9rem; }
.footer-legal { display: flex; gap: 24px; }
.footer-legal a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-legal a:hover { color: var(--blue-corp); }

/* =========================================
   14. ANIMACIONES GENERALES
   ========================================= */
@keyframes gradientShift { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-30px) rotate(4deg); } }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s var(--ease-out); }
.reveal.active { opacity: 1; transform: translateY(0); }
.stagger-1 { transition-delay: 0.1s; } .stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; } .stagger-4 { transition-delay: 0.4s; }

.floating-shape {
  position: absolute; border-radius: 50%; background: linear-gradient(135deg, var(--blue-corp), var(--orange-accent));
  opacity: 0.08; filter: blur(60px); pointer-events: none; z-index: 1;
  animation: float 8s ease-in-out infinite;
}
.shape-1 { width: 350px; height: 350px; top: 10%; left: -5%; }
.shape-2 { width: 250px; height: 250px; bottom: 15%; right: -5%; animation-delay: -3s; }

/* =========================================
   15. RESPONSIVE (MÓVIL)
   ========================================= */
@media (max-width: 1024px) {
  .pipeline-flow, .capabilities-grid { flex-direction: column; align-items: center; gap: 48px; }
  .pipe-card, .cap-card { width: 100%; max-width: 500px; flex-direction: row; text-align: left; padding: 32px; gap: 24px; }
  .pipe-top, .cap-top { margin-bottom: 0; flex-direction: column; gap: 10px; width: auto; }
  .pipe-icon, .cap-icon { width: 64px; height: 64px; }
  .pipe-icon svg, .cap-icon svg { width: 32px; height: 32px; }
  .step-num, .cap-num { font-size: 3rem; }
  .pipe-arrow { transform: rotate(90deg); margin: -16px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-wrapper { padding: 0 16px; }
  nav { display: none; }
  .hero h1 { font-size: 2.5rem; }
  .hero-stats { gap: 24px; }
  .hero-stats strong { font-size: 1.5rem; }
  .comparison-grid, .target-grid, .cases-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .pipe-card, .cap-card { flex-direction: column; text-align: center; padding: 32px 24px; }
  .step-num, .cap-num { top: 10px; right: 10px; font-size: 2.5rem; transform: none; }
  .pipe-list, .cap-list { text-align: center; }
  .pipe-arrow { transform: none; margin: 0; width: 100%; }
  .pipe-arrow svg { width: 24px; height: 24px; opacity: 0.3; }
  .methodology-steps { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { width: 95%; padding: 0 16px; }
  .pipe-card, .cap-card { padding: 24px 16px; }
  .pipe-list li, .cap-list li { font-size: 0.9rem; padding: 8px 0; }
}

/* =========================================
   16. BOTÓN VOLVER ARRIBA
   ========================================= */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--blue-corp); color: #ffffff; border: none; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: all 0.3s var(--ease-out); z-index: 999;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--orange-accent); transform: translateY(-4px); box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35); }
.back-to-top svg { width: 24px; height: 24px; }

@media (max-width: 640px) {
  .back-to-top { bottom: 20px; right: 20px; width: 46px; height: 46px; }
  .back-to-top svg { width: 20px; height: 20px; }
}

/* =========================================
   17. ACCESIBILIDAD
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =========================================
   FORZAR TAMAÑO UNIFICADO DE LOGOS
   ========================================= */
.logo img,
.footer-brand img,
#navLogo,
#fooLogo {
  max-height: 38px !important;
  height: auto !important;
  width: auto !important;
  display: block;
  object-fit: contain;
}

/* =========================================
   CONTACTO: Links integrados al texto
   ========================================= */
.contact-meta a {
  text-decoration: none;
  color: var(--text-secondary); /* Hereda el color exacto del texto del bloque */
  font-weight: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.contact-meta a:hover {
  opacity: 0.7; /* Efecto sutil que indica que es clicable sin romper la estética */
}