:root {
  --white: #ffffff;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-600: #4B5563;
  --gray-900: #111827;
  --dark: #0D1117;
  --accent: #1A56DB;
  --accent-light: #E8EFFF;
  --radius: 10px;
  --font: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--gray-900); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ANIMACIONES DE ENTRADA */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-down { animation: fadeDown 0.6s ease both; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.65s cubic-bezier(0.4,0,0.2,1), transform 0.65s cubic-bezier(0.4,0,0.2,1); }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* Flash de color al navegar a sección */
@keyframes sectionFlash {
  0%   { background-color: inherit; }
  30%  { background-color: rgba(26,86,219,0.08); }
  100% { background-color: inherit; }
}
.section-flash { animation: sectionFlash 0.9s ease; }

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; height: 90px; background: rgba(255,255,255,0.97); backdrop-filter: blur(16px); border-bottom: 1px solid var(--gray-200); z-index: 100; display: flex; align-items: center; }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; width: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { height: 80px; object-fit: contain; }
.nav-links { display: flex; gap: 24px; }
.nav-links a, .nav-link { text-decoration: none; color: var(--gray-600); font-size: 0.9rem; font-weight: 500; transition: color 0.2s; position: relative; padding-bottom: 3px; }
.nav-links a::after, .nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent); transition: width 0.25s ease; border-radius: 1px; }
.nav-links a:hover, .nav-link:hover { color: var(--accent); }
.nav-links a:hover::after, .nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--accent); }
.nav-link.active::after { width: 100%; }
.btn-nav { background: var(--accent); color: var(--white); padding: 0.6rem 1.25rem; border-radius: 999px; font-size: 0.9rem; font-weight: 600; text-decoration: none; transition: opacity 0.2s, transform 0.2s; }
.btn-nav:hover { opacity: 0.85; transform: translateY(-1px); }

/* HERO VIDEO */
.hero-video { position: relative; height: 100vh; min-height: 600px; overflow: hidden; }
.hero-bg-video { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 100%; min-height: 100%; width: auto; height: auto; object-fit: cover; z-index: 0; }

/* HERO TEXT */
.hero-text-section { background: var(--white); padding: 80px 0 64px; border-bottom: 1px solid var(--gray-200); }
.hero-text-section h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 24px; color: var(--gray-900); }
.eyebrow { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 16px; display: block; }
.eyebrow.centered { text-align: center; }
.eyebrow-xl { font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); margin-bottom: 16px; display: block; }
.eyebrow-xl.centered { text-align: center; }
.highlight { color: var(--accent); }
.hero-desc-light { font-size: 1.1rem; color: var(--gray-600); max-width: 720px; margin-bottom: 40px; line-height: 1.75; }
.hero-company-name { font-size: 1.17rem; font-weight: 700; color: var(--gray-900); letter-spacing: 0.02em; margin-bottom: 20px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary { background: var(--accent); color: var(--white); padding: 0.85rem 1.75rem; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 0.95rem; transition: transform 0.2s, opacity 0.2s; }
.btn-primary:hover { transform: translateY(-2px); opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--gray-900); padding: 0.85rem 1.75rem; border-radius: 999px; font-weight: 600; text-decoration: none; font-size: 0.95rem; border: 1px solid var(--gray-200); transition: background 0.2s; }
.btn-ghost:hover { background: var(--gray-100); }
.btn-ghost.light { border-color: rgba(255,255,255,0.4); color: #fff; }
.btn-ghost.light:hover { background: rgba(255,255,255,0.1); }
.btn-privacy { display: inline-block; border: 1px solid rgba(255,255,255,0.4); color: #fff; padding: 0.6rem 1.5rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; text-decoration: none; transition: background 0.2s; }
.btn-privacy:hover { background: rgba(255,255,255,0.1); }

/* STATS BAR */
.stats-bar { background: var(--gray-900); }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,0.1); }
.stat { background: var(--gray-900); padding: 32px 24px; }
.stat h3 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.stat p { font-size: 0.9rem; color: rgba(255,255,255,0.55); }

/* FLOATING ICONS */
.floating-icons { position: fixed; right: 20px; bottom: 100px; display: flex; flex-direction: column; gap: 12px; z-index: 999; }
.float-icon { width: 50px; height: 50px; background: var(--accent); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; box-shadow: 0 4px 16px rgba(26,86,219,0.45); transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.25s; }
.float-icon svg { width: 24px; height: 24px; }
.float-icon:hover { transform: scale(1.18) translateY(-3px); box-shadow: 0 8px 24px rgba(26,86,219,0.6); }
#icon-wa  { animation: floatBounce 3s ease-in-out infinite; }
#icon-ig  { animation: floatBounce 3s ease-in-out 0.4s infinite; }
#icon-fb  { animation: floatBounce 3s ease-in-out 0.8s infinite; }
@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* IMAGE SECTIONS */
.img-section { padding: 72px 0 0; }
.img-section .container { margin-bottom: 40px; }
.img-section.bg-gray-section { background: var(--gray-50); padding-bottom: 72px; }
.full-section-img { width: 100%; display: block; }
.divisions-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
.division-img { width: 100%; display: block; }

/* SECTIONS */
.section { padding: 96px 0; }
.bg-white { background: var(--white); }
.bg-gray { background: var(--gray-50); }
.bg-dark-section { background: var(--dark); }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 16px; }
h2.centered { text-align: center; }
h2.light { color: #fff; }
h2.ecosistema-title { font-size: clamp(2.4rem, 4.5vw, 3.5rem); margin-bottom: 40px; line-height: 1.15; }
.section-subtitle { color: var(--gray-600); font-size: 1.1rem; margin-bottom: 48px; max-width: 680px; margin-inline: auto; }
.section-subtitle.centered { text-align: center; }
.section-subtitle.light { color: rgba(255,255,255,0.65); }
.eyebrow.light { color: rgba(255,255,255,0.6); }

/* DARK EXPANSION CARDS */
.dark-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.dark-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 28px; transition: background 0.2s; }
.dark-card:hover { background: rgba(255,255,255,0.08); }
.dark-card h3 { color: #fff; font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.dark-card p { color: rgba(255,255,255,0.6); font-size: 0.9rem; line-height: 1.7; }

/* MOCKUPS */
.mockup-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.mockup-card { border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.mockup-card img { width: 100%; display: block; }
.mockup-label { padding: 12px 16px; font-size: 0.85rem; font-weight: 600; color: var(--gray-600); background: var(--gray-50); text-align: center; }

/* CLIENTS */
.clients-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.client-chip { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 12px 20px; font-size: 0.95rem; font-weight: 600; color: var(--gray-900); transition: border-color 0.2s, color 0.2s; }
.client-chip:hover { border-color: var(--accent); color: var(--accent); }

.cta-section { background: var(--gray-900); text-align: center; padding: 96px 0; }
.cta-section h2 { color: var(--white); margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.65); max-width: 600px; margin-inline: auto; margin-bottom: 32px; font-size: 1.1rem; }
.cta-contact-info { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 0; }
.cta-contact-link { color: rgba(255,255,255,0.85); font-size: 1.05rem; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.cta-contact-link:hover { color: #fff; text-decoration: underline; }
.cta-divider { color: rgba(255,255,255,0.3); font-size: 1.2rem; }
.contact-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* FOOTER */
.footer { background: var(--white); border-top: 1px solid var(--gray-200); padding: 56px 0 24px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; padding-bottom: 40px; border-bottom: 1px solid var(--gray-200); margin-bottom: 24px; }
.footer-logo { height: 70px; object-fit: contain; margin-bottom: 16px; display: block; }
.footer-tagline { color: var(--gray-600); font-style: italic; font-size: 0.9rem; max-width: 320px; line-height: 1.6; }
.footer-contact p { color: var(--gray-600); font-size: 0.9rem; margin-bottom: 6px; }
.footer-contact strong { color: var(--gray-900); }
.footer-copy { color: var(--gray-400); font-size: 0.8rem; text-align: center; }
.footer-copy strong { color: var(--gray-600); }

/* QUIENES SOMOS */
.who-section { padding: 80px 0; background: var(--white); border-bottom: 1px solid var(--gray-200); }
.who-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.who-text h2 { margin-bottom: 20px; }
.who-text p { color: var(--gray-600); font-size: 1.05rem; line-height: 1.8; }
.who-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.who-stat { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.who-num { font-size: 1.6rem; font-weight: 800; color: var(--accent); }
.who-label { font-size: 0.85rem; color: var(--gray-600); font-weight: 500; }

/* RESPONSIVE */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .dark-cards-grid, .mockup-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .divisions-grid { grid-template-columns: 1fr 1fr; }
}

/* TIMELINE HORIZONTAL */
.timeline-track { width: 100%; overflow-x: auto; padding: 40px 0 56px; -webkit-overflow-scrolling: touch; }
.timeline-track::-webkit-scrollbar { height: 6px; }
.timeline-track::-webkit-scrollbar-track { background: var(--gray-100); }
.timeline-track::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
.timeline-h { display: flex; position: relative; min-width: max-content; padding: 0 48px; gap: 0; }
.timeline-h::before { content: ''; position: absolute; top: 60px; left: 0; right: 0; height: 2px; background: var(--gray-200); z-index: 0; }
.timeline-node { display: flex; flex-direction: column; align-items: center; width: 260px; flex-shrink: 0; }
.tnode-year { font-size: 0.75rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; height: 20px; }
.tnode-dot { width: 14px; height: 14px; background: var(--accent); border-radius: 50%; border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--accent); z-index: 1; margin-bottom: 20px; flex-shrink: 0; }
.tnode-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; margin: 0 8px; width: 240px; transition: box-shadow 0.2s, transform 0.2s; }
.tnode-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-3px); }
.tnode-logo { font-size: 1.8rem; margin-bottom: 8px; }
.tnode-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; color: var(--gray-900); }
.tnode-loc { font-size: 0.78rem; color: var(--accent); font-weight: 600; margin-bottom: 8px; display: block; }
.tnode-card p { font-size: 0.82rem; color: var(--gray-600); line-height: 1.5; margin: 0; }

/* VIDEO CONSTRUCCIÓN */
.construction-video { width: 100%; display: block; max-height: 600px; object-fit: cover; margin-top: 48px; }

.section-title-label {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 14px;
  display: block;
  text-align: center;
}
.section-title-label.light-label { color: rgba(100,160,255,0.9); }

/* TECH VIDEOS GRID — 2x2 */
.tech-videos-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.tech-video-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.tech-video-card video {
  width: 100%;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

@media (max-width: 1000px) {
  .tech-videos-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .tech-videos-grid { grid-template-columns: 1fr; }
}

/* CLIENT BADGE — logo azul en timeline */
.client-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 44px;
}

/* LOGOS REALES EN TIMELINE */
.tnode-logo-img {
  height: 36px;
  max-width: 100px;
  object-fit: contain;
  display: block;
}
.tnode-logo-double {
  display: flex;
  gap: 8px;
  align-items: center;
}
.tnode-logo-double .tnode-logo-img {
  height: 28px;
  max-width: 72px;
}

/* ============================================
   MOBILE FIXES — @media max-width: 768px
   NO AFECTAN DESKTOP
   ============================================ */
@media (max-width: 768px) {

  /* 1. QUIÉNES SOMOS — stack limpio, sin ruptura */
  .who-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .who-stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .who-stat {
    padding: 16px 12px;
  }
  .who-num { font-size: 1.2rem; }

  /* 2. ESPACIOS ENTRE SECCIONES — reducidos en mobile */
  .section { padding: 48px 0; }
  .img-section { padding-top: 40px; }
  .img-section .container { padding-bottom: 24px; }
  .who-section { padding: 48px 0; }
  .stats-bar .stats-row { gap: 12px; }
  .hero-text-section { padding: 48px 0 40px; }

  /* 3. TIMELINE — indicador de scroll visible */
  .timeline-track {
    position: relative;
  }
  .timeline-track::after {
    content: 'Desliza para ver más →';
    display: block;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
    padding: 10px 0 4px;
    animation: pulseHint 2s ease-in-out infinite;
  }
  @keyframes pulseHint {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
  }
  .timeline-node { width: 220px; }
  .tnode-card { width: 200px; }

  /* 4. VIDEOS TÉCNICOS — 2 por fila, más pequeños */
  .tech-videos-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .tech-video-card video {
    aspect-ratio: 4/3;
  }
  .mockup-label {
    font-size: 0.75rem;
    padding: 6px 4px;
  }

  /* 5. VIDEO CONSTRUCCIÓN — ocupa todo el ancho */
  .construction-video {
    max-height: 280px;
  }

  /* NAV mobile */
  .nav-links { display: none; }
  .nav { height: 72px; }
  .nav-logo { height: 52px; }

  /* Footer mobile */
  .footer-inner { grid-template-columns: 1fr; }
  .footer-logo { height: 52px; }

  /* Mockups en 1 col */
  .mockup-row { grid-template-columns: 1fr; }
  .dark-cards-grid { grid-template-columns: 1fr; }
}

/* HAMBURGUESA + MENÚ MOBILE */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-900);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  z-index: 99;
  flex-direction: column;
  padding: 16px 24px 24px;
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transform: translateY(-10px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
.mobile-link {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-100);
  transition: color 0.2s;
}
.mobile-link:hover, .mobile-link:active { color: var(--accent); }
.mobile-cta {
  display: block;
  text-align: center;
  margin-top: 16px;
  padding: 0.85rem;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .desktop-only { display: none; }
  .mobile-menu { display: flex; }
}
