/* =========================================================
   BASE & RESET
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0f1115;
  color: #f5f5f5;
  line-height: 1.65;
}

/* Layout ----------------------------- */

.container {
  width: 92%;
  max-width: 1120px;
  margin: 0 auto;
}

.section {
  padding: 85px 0;
}

.section-alt {
  background: radial-gradient(circle at top left, #111827, #020617 60%);
  border-top: 1px solid #111827;
  border-bottom: 1px solid #111827;
}

.section-header {
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
}

.section-header p {
  color: #9ca3af;
  font-size: 15px;
}

/* =========================================================
   ENLACES DE CONTENIDO
   ========================================================= */

:root {
  --link-color: #8ab4ff;
  --link-color-hover: #a5c4ff;
}

/* Enlaces dentro del contenido, no navegación ni botones */
.hero-lead a,
.section p a,
.section li a,
.section h1 a,
.section h2 a,
.section h3 a,
.section h4 a,
.section h5 a,
.section h6 a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.hero-lead a:hover,
.hero-lead a:focus,
.section p a:hover,
.section p a:focus,
.section li a:hover,
.section li a:focus,
.section h1 a:hover,
.section h1 a:focus,
.section h2 a:hover,
.section h2 a:focus,
.section h3 a:hover,
.section h3 a:focus,
.section h4 a:hover,
.section h4 a:focus,
.section h5 a:hover,
.section h5 a:focus,
.section h6 a:hover,
.section h6 a:focus {
  color: var(--link-color-hover);
  text-decoration: underline;
}

/* Evita que botones hereden estilo de enlace de contenido */
.btn,
.btn:hover,
.btn:focus {
  text-decoration: none;
}

/* =========================================================
   LOGO
   ========================================================= */

/* Contenedor del logo (SVG + texto) */
.logo,
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Enlace del logo */
.logo a,
.footer-logo a,
.logo-link,
.footer-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

/* Evita subrayado o cambios raros en estados del enlace */
.logo a:hover,
.logo a:focus,
.logo a:visited,
.footer-logo a:hover,
.footer-logo a:focus,
.footer-logo a:visited,
.logo-link:hover,
.logo-link:focus,
.logo-link:visited,
.footer-logo-link:hover,
.footer-logo-link:focus,
.footer-logo-link:visited {
  text-decoration: none;
  color: inherit;
}

/* Iconos */
.logo-icon,
.logo-icon-footer {
  display: inline-block;
  vertical-align: middle;
}

/* Texto */
.logo-text {
  font-weight: 600;
  color: #e5e7eb;
  font-size: 16px;
  text-decoration: none;
}

.footer-logo-text {
  font-weight: 600;
  color: #ffffff;
  font-size: 16px;
  text-decoration: none;
}

/* Animación del logo */
.animated-logo {
  transition: transform 0.3s ease;
}

.logo-line {
  transition: stroke 0.3s ease, stroke-width 0.3s ease, filter 0.3s ease;
}

.animated-logo:hover .logo-line {
  stroke-width: 2.9;
  filter: drop-shadow(0 0 6px rgba(94, 126, 255, 0.7));
}

.animated-logo:hover {
  transform: translateY(-1px);
}

/* =========================================================
   SELECTOR DE IDIOMA
   ========================================================= */

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 16px;
}

.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #e5e7eb;
  background: transparent;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.lang-link:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transform: translateY(-1px);
}

.lang-link.is-active {
  background: rgba(94, 126, 255, 0.16);
  border-color: rgba(94, 126, 255, 0.45);
  color: #ffffff;
}

/* Móvil */
@media (max-width: 920px) {
  .lang-switcher {
    margin-left: 0;
    margin-right: 10px;
  }

  .lang-link {
    min-width: 36px;
    height: 34px;
    font-size: 12px;
    padding: 0 9px;
  }
}

/* =========================================================
   HEADER + MENÚ HAMBURGUESA
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 21, 0.92);
  border-bottom: 1px solid #252833;
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

/* Navegación desktop */
.main-nav {
  display: flex;
  align-items: center;
}

.main-nav a {
  margin-left: 22px;
  color: #d1d5db;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.75;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active,
.nav-link.is-active,
.submenu a.is-active {
  color: #ffffff;
  opacity: 1;
  font-weight: 600;
}

/* Icono LinkedIn header */
.header-social {
  margin-left: 18px;
  display: inline-flex;
  align-items: center;
  color: #cbd5e1;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.header-social:hover {
  color: #ffffff;
  opacity: 1;
}

/* Botón hamburguesa (base, se muestra en móvil con media query) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  margin-left: auto;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 999px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: transform 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

.nav-toggle-bar + .nav-toggle-bar {
  margin-top: 5px;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   MENÚ PRINCIPAL
   ========================================================= */

/* Dropdown de navegación */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown .nav-link {
  text-decoration: none;
}

.nav-link.is-active,
.submenu a.is-active {
  color: #ffffff;
  font-weight: 600;
}

.main-nav a {
  opacity: 0.75;
}

.nav-link.is-active,
.submenu a.is-active {
  opacity: 1;
}

/* Puente invisible para que no se cierre al bajar el ratón */
.nav-dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}

/* Submenú */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 0;
  display: none;
  z-index: 1000;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* Enlaces del submenú */
.submenu a {
  display: block;
  padding: 10px 16px;
  color: #e5e7eb;
  text-decoration: none;
  white-space: nowrap;
  margin-right: 15px;
  margin-left: 15px;
}

.submenu a:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Mostrar submenú en escritorio */
.nav-dropdown:hover .submenu,
.nav-dropdown:focus-within .submenu {
  display: block;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  padding: 120px 0 100px;
  background: radial-gradient(circle at top left, #111827, #020617 60%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 55px;
  align-items: center;
}

.hero-kicker {
  color: #a5b4fc;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 16px;
}

.hero-lead {
  color: #d1d5db;
  font-size: 17px;
  max-width: 650px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Side card */
.hero-side {
  display: flex;
  justify-content: flex-end;
}

.hero-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 18px;
  padding: 24px 22px;
  border: 1px solid #1f2933;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.hero-card h2 {
  font-size: 18px;
  margin-bottom: 10px;
}

.hero-card ul {
  list-style: none;
  font-size: 14px;
}

.hero-card li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}

.hero-card li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
}

.hero-card ul li a {
  color: inherit;
  text-decoration: none;
}

.hero-card ul li a:hover {
  text-decoration: underline;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  color: #ffffff;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn-ghost {
  border: 1px solid #4b5563;
  color: #e5e7eb;
  background: transparent;
}

.btn-ghost:hover {
  border-color: #9ca3af;
}

/* =========================================================
   CTA LATIDO / HEARTBEAT
   ========================================================= */

.cta-beat {
  display: inline-block;
  animation: heartbeat 1.6s ease-in-out infinite;
  transform-origin: center;
}

@keyframes heartbeat {
  0%   { transform: scale(1); }
  10%  { transform: scale(1.06); }
  20%  { transform: scale(1); }
  30%  { transform: scale(1.08); }
  40%  { transform: scale(1); }
  100% { transform: scale(1); }
}

/* =========================================================
   GRID SYSTEM
   ========================================================= */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px;
}

/* =========================================================
   LISTS
   ========================================================= */

.list-marked {
  list-style: none;
  margin: 10px 0 20px;
}

.list-marked li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 6px;
  color: #e5e7eb;
}

.list-marked li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
}

/* =========================================================
   CARDS
   ========================================================= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.card {
  background: #020617;
  border: 1px solid #1f2933;
  padding: 22px 20px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
}

.card h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.card p {
  color: #d1d5db;
  font-size: 14px;
}

.card-foot {
  margin-top: 12px;
  font-size: 13px;
  color: #9ca3af;
}

.card-link {
  margin-top: 12px;
}

.card-link a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 500;
}

.card-link a:hover,
.card-link a:focus {
  color: var(--link-color-hover);
  text-decoration: underline;
}

/* =========================================================
   TIMELINE
   ========================================================= */

.timeline {
  display: grid;
  gap: 22px;
}

.timeline-item {
  background: rgba(15, 23, 42, 0.92);
  border-radius: 18px;
  border: 1px solid #1f2933;
  padding: 22px;
}

.timeline-item h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.timeline-meta {
  color: #9ca3af;
  font-size: 13px;
  margin-bottom: 8px;
}

/* =========================================================
   ECOSISTEMA
   ========================================================= */

.brands-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.brand-card {
  background: #020617;
  border: 1px solid #1f2933;
  border-radius: 18px;
  padding: 20px;
  font-size: 14px;
}

.brand-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.brand-card p {
  color: #d1d5db;
  margin-bottom: 10px;
}

.brand-card a {
  font-size: 13px;
  color: #a5b4fc;
  text-decoration: none;
}

.brand-card a:hover {
  text-decoration: underline;
}

/* =========================================================
   CONTACT FORM
   ========================================================= */

.contact-form {
  background: #020617;
  padding: 22px 20px;
  border-radius: 18px;
  border: 1px solid #1f2933;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: #020617;
  color: #f9fafb;
  border: 1px solid #374151;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s linear, box-shadow 0.2s linear;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.3);
}

/* Mensajes del formulario */
.form-alert {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.form-alert-success {
  background: rgba(22, 163, 74, 0.14);
  border: 1px solid rgba(22, 163, 74, 0.6);
  color: #bbf7d0;
}

.form-alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.9);
  color: #fecaca;
}

/* Mensaje de error bajo cada campo */
.form-error {
  margin-top: 4px;
  font-size: 12px;
  color: #fca5a5; /* rojo claro legible sobre fondo oscuro */
}

/* Campo con error marcado en rojo (lo añade JS si quieres) */
.field-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.4);
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background: #020617;
  padding: 22px 0 26px;
  border-top: 1px solid #111827;
}

.footer-inner {
  text-align: center;
}

.footer-inner p {
  font-size: 13px;
  color: #9ca3af;
}

.footer-small {
  margin-top: 4px;
  font-size: 12px;
}

/* Footer social */
.footer-social {
  margin-top: 12px;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  opacity: 0.75;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: center;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-social-link:hover {
  color: #ffffff;
  opacity: 1;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-side {
    justify-content: flex-start;
    margin-top: 20px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }

  /* Mostrar hamburguesa en móvil */
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Menú móvil oculto por defecto */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 0 12px;
    background: rgba(15, 17, 21, 0.98);
    border-bottom: 1px solid #252833;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    z-index: 99;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    margin: 0;
    padding: 6px 22px;
    font-size: 15px;
    display: block;
  }

  .header-social {
    margin-left: 22px;
    padding: 4px 22px;
  }

  /* Grids */
  .cards-grid,
  .brands-grid {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  /* Hero más compacto */
  .hero h1 {
    font-size: 28px;
    line-height: 1.25;
  }
}