/* ═══════════════════════════════════════════════════════════════
   GRUPO RIVFER — Estilos principales
   Todos los colores y variables están definidos aquí arriba.
   Para cambiar el tema completo: edita solo las variables de :root
   y [data-theme="dark"].
═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────
   1. VARIABLES (TEMA CLARO)
───────────────────────────────────── */
:root {
  /* Colores de marca */
  --brand-navy:        #1B2A6B;
  --brand-navy-deep:   #0F1C3F;
  --brand-steel:       #7BA7C2;

  /* Fondos */
  --bg-base:           #F8FAFD;
  --bg-alt:            #EEF3FA;
  --bg-card:           #FFFFFF;
  --bg-dark:           #0F1C3F;
  --bg-dark-alt:       #162248;

  /* Textos */
  --text-primary:      #0F1C3F;
  --text-secondary:    #3D506E;
  --text-muted:        #7A8FAD;
  --text-on-dark:      #E8EDF8;
  --text-on-dark-sub:  #8FA3C0;

  /* Acento (CTA, highlights) */
  --accent:            #0A6EFF;
  --accent-hover:      #0054CC;
  --accent-bright:     #00C2FF;
  --accent-glow:       rgba(10, 110, 255, 0.18);

  /* Bordes */
  --border:            rgba(27, 42, 107, 0.10);
  --border-strong:     rgba(27, 42, 107, 0.22);

  /* Sombras */
  --shadow-sm:         0 2px 8px rgba(15, 28, 63, 0.06);
  --shadow-md:         0 4px 20px rgba(15, 28, 63, 0.09);
  --shadow-lg:         0 12px 40px rgba(15, 28, 63, 0.13);
  --shadow-hover:      0 16px 48px rgba(15, 28, 63, 0.16);

  /* Navbar */
  --nav-bg:            rgba(248, 250, 253, 0.94);
  --nav-border:        rgba(27, 42, 107, 0.08);
  --nav-scrolled-bg:   rgba(248, 250, 253, 0.98);

  /* Gradientes */
  --gradient-hero:     linear-gradient(140deg, #0A1428 0%, #1B2A6B 55%, #0D4A8A 100%);
  --gradient-accent:   linear-gradient(135deg, #0A6EFF 0%, #00C2FF 100%);
  --gradient-card:     linear-gradient(160deg, rgba(255,255,255,0) 0%, rgba(10,110,255,0.04) 100%);

  /* Tipografía */
  --font-head:         'Sora', system-ui, sans-serif;
  --font-body:         'DM Sans', system-ui, sans-serif;

  /* Espaciado base */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;

  /* Radios */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Transiciones */
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─────────────────────────────────────
   2. VARIABLES (TEMA OSCURO)
   Para cambiar el look oscuro: edita solo este bloque
───────────────────────────────────── */
[data-theme="dark"] {
  --bg-base:           #070D1A;
  --bg-alt:            #0D1628;
  --bg-card:           #111E35;
  --bg-dark:           #030812;
  --bg-dark-alt:       #070D1A;

  --text-primary:      #E2EAF8;
  --text-secondary:    #8FA3C0;
  --text-muted:        #4D6485;
  --text-on-dark:      #E2EAF8;
  --text-on-dark-sub:  #8FA3C0;

  --accent:            #00C2FF;
  --accent-hover:      #00AAEE;
  --accent-bright:     #00E5FF;
  --accent-glow:       rgba(0, 194, 255, 0.15);

  --border:            rgba(0, 194, 255, 0.10);
  --border-strong:     rgba(0, 194, 255, 0.22);

  --shadow-sm:         0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md:         0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg:         0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-hover:      0 16px 48px rgba(0, 194, 255, 0.12);

  --nav-bg:            rgba(7, 13, 26, 0.94);
  --nav-border:        rgba(0, 194, 255, 0.08);
  --nav-scrolled-bg:   rgba(7, 13, 26, 0.98);

  --gradient-hero:     linear-gradient(140deg, #020509 0%, #070D1A 55%, #0A1428 100%);
  --gradient-card:     linear-gradient(160deg, rgba(255,255,255,0) 0%, rgba(0,194,255,0.04) 100%);
}

/* ─────────────────────────────────────
   3. RESET & BASE
───────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-base);
  transition: background-color var(--transition), color var(--transition);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea { font: inherit; }

/* ─────────────────────────────────────
   4. TIPOGRAFÍA GLOBAL
───────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

/* ─────────────────────────────────────
   5. LAYOUT UTILITIES
───────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.section--light {
  background-color: var(--bg-base);
}

.section--alt {
  background-color: var(--bg-alt);
}

.section--dark {
  background-color: var(--bg-dark);
}

.section--accent {
  background-color: var(--bg-alt);
}

/* ─────────────────────────────────────
   6. SECTION HEADERS
───────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-xl);
}

.section-header--light {
  color: var(--text-on-dark);
}

.section-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-glow);
  padding: 0.3em 0.9em;
  border-radius: var(--radius-full);
  border: 1px solid var(--accent);
  margin-bottom: var(--space-sm);
}

.section-tag--light {
  color: var(--accent-bright);
  background: rgba(0, 194, 255, 0.1);
  border-color: rgba(0, 194, 255, 0.4);
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.section-title--light {
  color: var(--text-on-dark);
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.section-desc--light {
  color: var(--text-on-dark-sub);
}

/* ─────────────────────────────────────
   7. BUTTONS
───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn--primary {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 18px var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.btn--outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.btn--outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
}

.btn--accent {
  background: var(--gradient-accent);
  color: #fff;
  border-color: transparent;
  font-size: 0.875rem;
  padding: 0.65rem 1.4rem;
}

.btn--accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,194,255,0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--text-on-dark-sub);
  border-color: rgba(255,255,255,0.15);
  font-size: 0.875rem;
  padding: 0.65rem 1.4rem;
}

.btn--ghost:hover {
  color: var(--accent-bright);
  border-color: var(--accent-bright);
  background: rgba(0,194,255,0.06);
}

.btn--full { width: 100%; justify-content: center; }

/* ─────────────────────────────────────
   8. NAVIGATION
───────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--transition), box-shadow var(--transition);
}

.navbar.scrolled {
  background: var(--nav-scrolled-bg);
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem var(--space-md);
  gap: var(--space-md);
  position: relative; /* ancla del panel móvil (.nav-links absolute) */
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-light { display: block; height: 44px; width: auto; object-fit: contain; }
.logo-dark  { display: none;  height: 44px; width: auto; object-fit: contain; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark  { display: block; }

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

.nav-link {
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%; right: 50%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: left var(--transition), right var(--transition);
}

.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { left: 0.85rem; right: 0.85rem; }

.nav-link--cta {
  background: var(--brand-navy);
  color: #fff !important;
  padding: 0.45rem 1.1rem;
}

.nav-link--cta:hover {
  background: var(--accent);
}

.nav-link--cta::after { display: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.theme-toggle:hover {
  color: var(--accent);
  background: var(--accent-glow);
  border-color: var(--accent);
}

.theme-toggle svg { width: 18px; height: 18px; }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.hamburger span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 900px) {
  .hamburger    { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--nav-scrolled-bg);
    padding: var(--space-md);
    gap: 0.25rem;
    border-bottom: 1px solid var(--nav-border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
    z-index: 99;
    max-height: calc(100vh - 100%);
    overflow-y: auto;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-link { width: 100%; text-align: center; padding: 0.75rem; }
  .nav-link--cta { margin-top: 0.5rem; }
}

/* ─────────────────────────────────────
   9. HERO
───────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient-hero);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(10,110,255,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(0,194,255,0.08) 0%, transparent 50%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  padding: var(--space-xl) var(--space-md);
  padding-top: calc(var(--space-xl) + 4rem);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-bright);
  background: rgba(0, 194, 255, 0.1);
  border: 1px solid rgba(0, 194, 255, 0.3);
  padding: 0.35em 1em;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
  letter-spacing: 0.04em;
}

.badge-dot {
  width: 6px; height: 6px;
  background: var(--accent-bright);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
}

.hero-title em {
  font-style: normal;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: rgba(232, 237, 248, 0.8);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

/* Stats bar */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  gap: var(--space-xs);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--space-md);
  gap: 0.2rem;
}

.stat-number {
  font-family: var(--font-head);
  font-size: 1.875rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.75rem;
  color: rgba(232, 237, 248, 0.55);
  text-align: center;
  line-height: 1.3;
}

.stat-label-cert {
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(232, 237, 248, 0.75);
  text-align: center;
  line-height: 1.35;
}

.stat-label-cert strong {
  display: block;
  color: var(--accent-bright);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.12);
  flex-shrink: 0;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-scroll-indicator span {
  display: block;
  width: 22px; height: 36px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  position: relative;
}

.hero-scroll-indicator span::after {
  content: '';
  position: absolute;
  top: 5px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  animation: scroll-bounce 2s ease infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50% { transform: translateX(-50%) translateY(10px); opacity: 0.3; }
}

/* ─────────────────────────────────────
   10. DIAGONAL DIVIDER
───────────────────────────────────── */
.section-divider {
  line-height: 0;
  overflow: hidden;
  margin-top: -1px;
}

.section-divider svg {
  display: block;
  width: 100%;
}

.divider--hero svg polygon {
  fill: var(--bg-base);
}

/* ─────────────────────────────────────
   11. SERVICIOS
───────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  background-image: var(--gradient-card);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card__icon {
  width: 52px; height: 52px;
  background: var(--accent-glow);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-md);
  transition: all var(--transition);
}

.service-card__icon svg {
  width: 24px; height: 24px;
  color: var(--accent);
}

.service-card:hover .service-card__icon {
  background: var(--accent);
  border-color: var(--accent);
}

.service-card:hover .service-card__icon svg {
  color: #fff;
}

.service-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.service-card__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ─────────────────────────────────────
   12. PRODUCTOS
───────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
  align-items: stretch;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* dark section overrides */
.section--dark .product-card {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

.section--dark .product-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--accent);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.product-card--featured {
  border-color: var(--accent);
  background: linear-gradient(160deg, rgba(10,110,255,0.08) 0%, rgba(0,194,255,0.04) 100%);
}

/* Push the CTA to the bottom so every card ends at the same line,
   and let it use the full card width so the label always fits */
.product-card .btn {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  padding-left: 1rem;
  padding-right: 1rem;
}

.product-card__badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: rgba(0, 194, 255, 0.12);
  border: 1px solid rgba(0, 194, 255, 0.3);
  padding: 0.25em 0.8em;
  border-radius: var(--radius-full);
  align-self: flex-start;
}

.product-card__icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
}

.product-card__icon svg {
  width: 26px; height: 26px;
  color: var(--brand-steel);
}

.product-card__icon--erp {
  background: linear-gradient(135deg, rgba(10,110,255,0.2) 0%, rgba(0,194,255,0.1) 100%);
  border-color: rgba(0,194,255,0.3);
}

.product-card__icon--erp svg { color: var(--accent-bright); }

.product-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-on-dark);
}

.product-card__sub {
  font-size: 0.8125rem;
  color: var(--accent-bright);
  font-weight: 500;
  margin-top: -0.5rem;
}

.product-card__desc {
  font-size: 0.9rem;
  color: var(--text-on-dark-sub);
  line-height: 1.65;
}

.product-card__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.product-card__features li {
  font-size: 0.875rem;
  color: var(--text-on-dark-sub);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-card__features li::before {
  content: '';
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
  flex-shrink: 0;
}

/* ─────────────────────────────────────
   13. NOSOTROS / TIMELINE
───────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* Timeline */
.about-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.about-timeline::before {
  content: '';
  position: absolute;
  left: 11px; top: 12px; bottom: 12px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--brand-steel), transparent);
}

.timeline-item {
  display: flex;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
  position: relative;
}

.timeline-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 3px solid var(--brand-steel);
  flex-shrink: 0;
  margin-top: 2px;
  transition: border-color var(--transition);
}

.timeline-dot--current {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.timeline-content { flex: 1; }

.timeline-year {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.timeline-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.timeline-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Certifications & Values */
.certs-row {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.cert-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  flex: 1;
  min-width: 160px;
  transition: all var(--transition);
}

.cert-badge:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.cert-badge__icon {
  width: 36px; height: 36px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.cert-badge__icon svg {
  width: 18px; height: 18px;
  color: var(--accent);
}

.cert-badge strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.cert-badge span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.values-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.values-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.value-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.value-item svg {
  width: 18px; height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

/* ─────────────────────────────────────
   14. CLIENTES
───────────────────────────────────── */
.clients-featured {
  margin-bottom: var(--space-xl);
}

.client-highlight {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
  .client-highlight { flex-direction: column; text-align: center; }
}

.client-highlight__logo {
  width: 100px;
  height: 60px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  color: var(--text-primary);
}

.client-highlight__logo svg { width: 100%; height: 100%; }

.client-highlight__text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-sm);
}

.client-logo-placeholder {
  aspect-ratio: 2 / 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: all var(--transition);
}

.client-logo-placeholder:hover {
  border-style: solid;
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* ─────────────────────────────────────
   15. POR QUÉ ELEGIRNOS
───────────────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.why-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.why-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0,194,255,0.1);
}

.why-card__number {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  position: absolute;
  top: 1rem; right: 1.25rem;
  letter-spacing: -0.04em;
  pointer-events: none;
}

.why-card__icon {
  width: 44px; height: 44px;
  background: rgba(0,194,255,0.1);
  border: 1px solid rgba(0,194,255,0.2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-sm);
}

.why-card__icon svg {
  width: 20px; height: 20px;
  color: var(--accent-bright);
}

.why-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-on-dark);
  margin-bottom: 0.5rem;
}

.why-card p {
  font-size: 0.9rem;
  color: var(--text-on-dark-sub);
  line-height: 1.65;
}

/* ─────────────────────────────────────
   16. CONTACTO
───────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Form */
.contact-form-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
}

.form-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

/* El atributo [hidden] debe ganarle a display:flex de .form-notice */
.form-notice[hidden] { display: none; }

.form-notice svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.form-notice strong { display: block; font-weight: 700; }
.form-notice p { margin: 0.15rem 0 0; font-size: 0.85rem; }

.form-notice--success {
  color: #0f7b3f;
  background: rgba(16, 185, 99, 0.1);
  border-color: rgba(16, 185, 99, 0.35);
  margin: var(--space-md) 0 0;
}

.form-notice--error {
  color: #b42318;
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.35);
  margin: var(--space-md) 0 0;
}

/* Honeypot anti-spam: fuera de pantalla, sin afectar el layout */
.form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-group label span { color: var(--accent); }

.form-group input,
.form-group textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.95rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Contact info */
.contact-info__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.contact-info__items {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: var(--space-lg);
}

.contact-info__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}

a.contact-info__item:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.contact-info__icon {
  width: 40px; height: 40px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.contact-info__icon svg {
  width: 18px; height: 18px;
  color: var(--accent);
}

.contact-info__label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1px;
}

.contact-info__value {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}

.whatsapp-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.85rem;
  background: #25D366;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  border: none;
}

.whatsapp-contact-btn svg { width: 20px; height: 20px; }

.whatsapp-contact-btn:hover {
  background: #1ebe5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

/* ─────────────────────────────────────
   17. FOOTER
───────────────────────────────────── */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark-sub);
  position: relative;
  overflow: hidden;
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-geo {
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10,110,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-logo {
  height: 44px; width: auto;
  object-fit: contain;
  margin-bottom: var(--space-sm);
  filter: brightness(1.1);
}

.footer-tagline {
  font-size: 0.875rem;
  line-height: 1.65;
  margin-bottom: var(--space-sm);
  max-width: 280px;
}

.footer-certs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.footer-cert-badge {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-bright);
  background: rgba(0,194,255,0.08);
  border: 1px solid rgba(0,194,255,0.2);
  padding: 0.2em 0.7em;
  border-radius: var(--radius-full);
}

.footer-nav__title {
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-on-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a,
.footer-contact a,
.footer-contact p {
  font-size: 0.875rem;
  color: var(--text-on-dark-sub);
  transition: color var(--transition);
  display: block;
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--accent-bright);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: var(--space-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.footer-bottom p { font-size: 0.8125rem; color: var(--text-muted); }
.footer-bottom__sub { font-size: 0.75rem; }

/* ─────────────────────────────────────
   18. WHATSAPP FAB
───────────────────────────────────── */
.whatsapp-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  width: 56px; height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
  transition: all var(--transition);
  text-decoration: none;
}

.whatsapp-fab svg { width: 28px; height: 28px; }

.whatsapp-fab:hover {
  transform: scale(1.1) translateY(-3px);
  box-shadow: 0 8px 28px rgba(37,211,102,0.45);
}

.whatsapp-tooltip {
  position: absolute;
  right: 68px;
  background: #1a1a2e;
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4em 0.9em;
  border-radius: var(--radius-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity var(--transition), transform var(--transition);
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  right: -6px; top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-right: none;
  border-left-color: #1a1a2e;
}

.whatsapp-fab:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ─────────────────────────────────────
   19. SCROLL REVEAL ANIMATIONS
───────────────────────────────────── */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-up    { transform: translateY(36px); }
.reveal-left  { transform: translateX(-40px); }
.reveal-right { transform: translateX(40px); }

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}

/* Stagger children */
.services-grid .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.12s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.19s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.26s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.33s; }

.products-grid .product-card:nth-child(1) { transition-delay: 0.05s; }
.products-grid .product-card:nth-child(2) { transition-delay: 0.15s; }
.products-grid .product-card:nth-child(3) { transition-delay: 0.25s; }
.products-grid .product-card:nth-child(4) { transition-delay: 0.35s; }
.products-grid .product-card:nth-child(5) { transition-delay: 0.45s; }
.products-grid .product-card:nth-child(6) { transition-delay: 0.55s; }
.products-grid .product-card:nth-child(7) { transition-delay: 0.65s; }

.why-grid .why-card:nth-child(1) { transition-delay: 0.0s; }
.why-grid .why-card:nth-child(2) { transition-delay: 0.08s; }
.why-grid .why-card:nth-child(3) { transition-delay: 0.16s; }
.why-grid .why-card:nth-child(4) { transition-delay: 0.24s; }
.why-grid .why-card:nth-child(5) { transition-delay: 0.32s; }
.why-grid .why-card:nth-child(6) { transition-delay: 0.40s; }

.clients-grid .client-logo-placeholder:nth-child(odd)  { transition-delay: 0.05s; }
.clients-grid .client-logo-placeholder:nth-child(even) { transition-delay: 0.12s; }

/* ─────────────────────────────────────
   20. HERO ANIMATIONS
───────────────────────────────────── */
.hero-badge   { animation: fadeSlideUp 0.8s cubic-bezier(0.4,0,0.2,1) 0.2s both; }
.hero-title   { animation: fadeSlideUp 0.8s cubic-bezier(0.4,0,0.2,1) 0.4s both; }
.hero-subtitle{ animation: fadeSlideUp 0.8s cubic-bezier(0.4,0,0.2,1) 0.55s both; }
.hero-ctas    { animation: fadeSlideUp 0.8s cubic-bezier(0.4,0,0.2,1) 0.7s both; }
.hero-stats   { animation: fadeSlideUp 0.8s cubic-bezier(0.4,0,0.2,1) 0.85s both; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────
   21. RESPONSIVE TWEAKS
───────────────────────────────────── */
@media (max-width: 640px) {
  .hero-stats {
    flex-direction: column;
    gap: var(--space-sm);
    padding: 1.25rem;
  }
  .stat-divider { width: 80%; height: 1px; }

  .services-grid { grid-template-columns: 1fr; }
  .why-grid      { grid-template-columns: 1fr; }

  .section { padding: var(--space-xl) 0; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}

/* ─────────────────────────────────────
   22. ACCESSIBILITY
───────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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