/* ─────────────────────────────────────────────────────────
   EMA Logistics — styles.css
   v1 multi-page · vanilla CSS

   Bloques (en orden):
     1. Tokens (custom properties)
     2. Reset y base
     3. Tipografía
     4. Utilidades (.wrap, .eyebrow, .placeholder, .hidden)
     5. Botones (.btn)
     6. Reveal-on-scroll
     7. Nav (compartido)
     8. Footer (compartido)
     9. WhatsApp flotante
    10-19. Bloques de Home
    20-23. Páginas internas
    24. Media queries
   ───────────────────────────────────────────────────────── */

/* ═════════ 1. Tokens — Paleta oficial EMA Trade ═════════ */
:root {
  /* Brand colors (per coloresMarca.jpeg) */
  --brand-navy:        #163A63;  /* Azul profundo principal */
  --brand-navy-dark:   #0E2A47;  /* Variante más oscura para fondos extra-profundos */
  --brand-navy-deep:   #0A1F36;  /* Aún más profundo para el hero */
  --brand-gray-steel:  #7D8794;  /* Gris acero */
  --brand-purple:      #6F5BB3;  /* Morado acento — CTAs y acción */
  --brand-purple-soft: #9586C9;  /* Morado claro para italics sobre oscuro */
  --brand-purple-dark: #5B4796;  /* Morado oscuro para hover */
  --brand-gray-smoke:  #D8DDE3;  /* Gris claro / humo */
  --brand-bone:        #F7F8FA;  /* Blanco hueso técnico */
  --white:             #FFFFFF;

  /* Aliases semánticos (mantienen compat con el resto del CSS) */
  --navy-deep:     var(--brand-navy-deep);
  --navy:          var(--brand-navy);
  --navy-700:      var(--brand-navy-dark);
  --blue:          var(--brand-purple);        /* CTAs primarios y links */
  --blue-soft:     var(--brand-purple-soft);   /* italics sobre oscuro */
  --blue-hover:    var(--brand-purple-dark);   /* hover del primario */
  --amber:         var(--brand-gray-steel);    /* acentos puntuales (numeración italic en cards) */
  --ink:           var(--brand-navy);          /* texto cuerpo sobre claro */
  --neutral-light: var(--brand-bone);
  --neutral-mid:   var(--brand-gray-steel);
  --neutral-line:  var(--brand-gray-smoke);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;
  --ease:      cubic-bezier(.22, .61, .36, 1);
  --maxw:      1240px;

  --space-section:    80px;
  --space-section-sm: 56px;
}

/* ═════════ 2. Reset y base ═════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'IBM Plex Sans', 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--white);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 8px;
  background: var(--navy-deep);
  color: var(--white);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  z-index: 100;
}
.skip-link:focus { top: 8px; }

/* ═════════ 3. Tipografía ═════════ */
h1, h2, h3 {
  font-family: 'Manrope', 'IBM Plex Sans', sans-serif;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}
h1 { font-size: clamp(40px, 6vw, 72px); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.1; font-weight: 700; }
h3 { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
em  { font-style: italic; color: var(--blue); }
h1 em, h2 em, h3 em { color: var(--blue); font-style: normal; font-weight: 800; }

.on-dark, .on-dark h1, .on-dark h2, .on-dark h3 { color: var(--white); }
.on-dark h1 em, .on-dark h2 em, .on-dark h3 em { color: var(--blue-soft); }
.on-dark h2 em { color: var(--blue-soft); }

/* ═════════ 4. Utilidades ═════════ */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-purple);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}
.on-dark .eyebrow { color: var(--blue-soft); }

.placeholder {
  opacity: 0.5;
  font-style: italic;
}

.hidden { display: none !important; }

section { padding: var(--space-section) 0; }
@media (max-width: 700px) {
  section { padding: var(--space-section-sm) 0; }
}

.section-head { margin-bottom: 64px; max-width: 740px; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head p {
  color: var(--neutral-mid);
  font-size: 18px;
  margin: 18px 0 0;
  max-width: 620px;
}
.on-dark .section-head p { color: rgba(255, 255, 255, 0.7); }

/* ═════════ 5. Botones ═════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .25s var(--ease), background .25s var(--ease),
              color .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 8px 28px -10px rgba(111, 91, 179, 0.6);
}
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); }

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.5); }

.btn-line {
  color: var(--ink);
  border: 1px solid var(--neutral-line);
}
.btn-line:hover { border-color: var(--ink); }

.btn .arrow { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ═════════ 6. Reveal-on-scroll ═════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ═════════ 7. Nav (compartido) ═════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  transition: background .3s var(--ease), padding .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled,
.nav.opaque {
  background: rgba(6, 22, 41, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 0;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 40px;
  width: auto;
  display: block;
  transition: opacity .2s var(--ease);
}
.logo:hover .logo-img { opacity: 0.85; }
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14.5px;
  font-weight: 500;
  transition: color .2s;
  position: relative;
}
.nav-links a:hover { color: var(--white); }
.nav-links a[aria-current="page"] {
  color: var(--white);
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--blue-soft);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }

/* Language toggle — text-only button next to the primary CTA */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: var(--white);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.lang-toggle:hover,
.lang-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
  outline: none;
}
/* On opaque/scrolled navs (subpages or home after scroll), invert colors */
.nav.opaque .lang-toggle,
.nav.scrolled .lang-toggle {
  border-color: rgba(22, 58, 99, 0.22);
  color: var(--brand-navy, var(--ink));
}
.nav.opaque .lang-toggle:hover,
.nav.scrolled .lang-toggle:hover,
.nav.opaque .lang-toggle:focus-visible,
.nav.scrolled .lang-toggle:focus-visible {
  background: rgba(22, 58, 99, 0.06);
  border-color: rgba(22, 58, 99, 0.45);
}

/* Mobile drawer toggle */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  color: var(--white);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 820px) {
  .nav-links {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--navy-deep);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 24px 28px;
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .35s var(--ease), visibility 0s linear .35s;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-links.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform .35s var(--ease), visibility 0s linear 0s;
  }
  .nav-links a {
    padding: 14px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  /* Keep the language toggle visible on mobile — it's the only way to switch */
  .lang-toggle { min-width: 36px; height: 32px; padding: 0 10px; font-size: 11px; }
}

/* ═════════ 8. Footer (compartido) ═════════ */
footer.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.6);
  padding: 60px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}
.foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.foot h5 {
  color: rgba(255, 255, 255, 0.55);
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: 10px; }
.foot a:hover { color: var(--white); }
.foot p { margin: 12px 0 0; line-height: 1.55; }
.foot-logo { margin-bottom: 16px; }
/* Distintivo ESR (Empresa Socialmente Responsable) en footer */
.badge-esr {
  display: block;
  width: 140px;
  height: auto;
  margin-top: 18px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.25);
}
.foot-bottom {
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 760px) {
  .foot { grid-template-columns: 1fr 1fr; }
}

/* ═════════════════════════════════════════════════════════
   Páginas legales (aviso-privacidad, privacy-notice)
   - Tipografía pensada para lectura larga
   - Ancho cómodo ~720px para evitar líneas demasiado largas
   - .legal-action: callout morado para acciones del usuario (ARCO, etc.)
   ═════════════════════════════════════════════════════════ */
.page-header-meta {
  margin-top: 14px !important;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}
.page-header-meta.legal-binding-note {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 8px !important;
}
.page-header-meta.legal-binding-note a {
  color: var(--brand-purple-soft);
  text-decoration: underline;
}
.legal-doc {
  background: var(--white);
  padding: var(--space-section) 0;
}
.legal-wrap {
  max-width: 760px;
}
.legal-section {
  margin-bottom: 48px;
}
.legal-section:last-of-type {
  margin-bottom: 32px;
}
.legal-section h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.legal-section p,
.legal-section li {
  color: var(--neutral-mid);
  font-size: 15.5px;
  line-height: 1.7;
}
.legal-section p { margin: 0 0 14px; }
.legal-section ul,
.legal-section ol {
  margin: 0 0 14px;
  padding-left: 22px;
}
.legal-section li { margin-bottom: 8px; }
.legal-section strong { color: var(--ink); font-weight: 600; }
.legal-section a {
  color: var(--brand-purple);
  text-decoration: underline;
  font-weight: 500;
}
.legal-section a:hover { color: var(--brand-purple-dark, #5B4796); }
.legal-action {
  background: rgba(111, 91, 179, 0.06);
  border-left: 3px solid var(--brand-purple);
  padding: 18px 22px;
  border-radius: 0 8px 8px 0;
  margin: 18px 0;
}
.legal-action p:last-child { margin-bottom: 0; }
.legal-meta {
  color: var(--neutral-mid);
  font-size: 14px;
  font-style: italic;
  margin-top: 24px !important;
}
.legal-back {
  margin-top: 56px !important;
  padding-top: 24px;
  border-top: 1px solid var(--neutral-line);
}
.legal-back a {
  color: var(--brand-purple);
  font-weight: 600;
  text-decoration: none;
}
.legal-back a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .legal-section h2 { font-size: 19px; }
  .legal-section p, .legal-section li { font-size: 15px; }
  .legal-action { padding: 14px 16px; }
}

/* ═════════ 9. WhatsApp flotante ═════════
   El botón es la propia silueta del logo (sin círculo de fondo).
   drop-shadow respeta la transparencia del PNG, así que la sombra
   sigue la forma del bocadillo, no un rectángulo. */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  background: transparent;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.30));
  transition: transform .25s var(--ease), filter .25s var(--ease);
  z-index: 40;
}
.wa-float:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.38));
}
.wa-float:focus-visible {
  outline: 3px solid #25D366;
  outline-offset: 4px;
  border-radius: 12px;
}
.wa-float-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* Conservamos estilo svg legacy por si alguna página vieja lo usa */
.wa-float svg { width: 28px; height: 28px; }

@media (max-width: 560px) {
  .wa-float { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .wa-float svg { width: 26px; height: 26px; }
}

/* ═════════ 10. Home: Hero ═════════ */
.hero {
  position: relative;
  min-height: 100vh;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
  padding: 140px 0 80px;
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(111, 91, 179, 0.18), transparent 70%),
    linear-gradient(180deg, var(--navy-deep) 0%, #08203a 60%, #0a2647 100%);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  z-index: -1;
  opacity: 0;
  transition: opacity .8s var(--ease);
}
.hero-video.ready { opacity: 0.92; }

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.hero-floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18%;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55)),
    linear-gradient(180deg, #0a1f36, #02080f);
}

.hero-grid {
  position: relative;
  width: 100%;
}
.hero-copy { max-width: 720px; }
.hero-copy .eyebrow { color: var(--blue-soft); margin-bottom: 24px; }
.hero-copy h1 {
  color: var(--white);
  margin-bottom: 22px;
}
.hero-copy h1 em {
  color: var(--blue-soft);
  font-style: italic;
}
.hero-sub {
  font-size: clamp(17px, 1.4vw, 20px);
  color: rgba(255, 255, 255, 0.78);
  max-width: 560px;
  margin: 0 0 36px;
  line-height: 1.55;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


/* ═════════ 11. Home: Casos de éxito (carrusel horizontal) ═════════ */
.success-cases {
  background: var(--navy-deep);
  padding: var(--space-section) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
}
.success-cases .section-head { margin-bottom: 36px; }
.cases-scroller {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(149, 134, 201, 0.45) transparent;
  padding: 0 max(24px, calc((100% - 1180px) / 2)) 8px;
  -webkit-overflow-scrolling: touch;
}
.cases-scroller:focus-visible { outline: 2px solid var(--brand-purple-soft); outline-offset: 4px; }
.cases-scroller::-webkit-scrollbar { height: 6px; }
.cases-scroller::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.04); border-radius: 999px; }
.cases-scroller::-webkit-scrollbar-thumb { background: rgba(149, 134, 201, 0.45); border-radius: 999px; }
.cases-list {
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.case-card {
  flex: 0 0 320px;
  min-height: 230px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
  padding: 24px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.case-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(149, 134, 201, 0.45);
  transform: translateY(-2px);
}
.case-sector {
  display: inline-block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand-purple-soft);
  align-self: flex-start;
}
.case-card h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin: 0;
}
.case-card p {
  font-family: 'IBM Plex Sans', sans-serif;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0;
}
.cases-hint {
  margin: 18px auto 0;
  text-align: center;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.45);
}
@media (min-width: 1024px) {
  .case-card { flex: 0 0 360px; min-height: 240px; }
}
@media (max-width: 600px) {
  .case-card { flex: 0 0 82vw; min-height: 200px; padding: 20px; }
  .case-card h3 { font-size: 17px; }
}

/* ═════════ 11.b. Home: Carrusel de clientes (legacy, conservado por si vuelve) ═════════ */
.clients-strip {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.6);
  padding: 32px 0 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.clients-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 18px;
}
.clients-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: clients-scroll 60s linear infinite;
}
.clients-strip:hover .clients-track { animation-play-state: paused; }
.clients-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 48px;
  align-items: center;
  flex-shrink: 0;
}
.clients-list li {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  height: 56px;
}
.clients-list img {
  height: 36px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  /* Uniformiza los logos a blanco translúcido sobre el navy del carousel;
     hover restaura presencia. */
  filter: brightness(0) invert(1);
  opacity: 0.6;
  transition: opacity .25s var(--ease), filter .25s var(--ease);
}
.clients-list li:hover img {
  opacity: 1;
}
@keyframes clients-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 24px)); }
}
@media (prefers-reduced-motion: reduce) {
  .clients-track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
}

/* ═════════ 12. Home: 3 Targets ═════════ */
.targets { background: var(--white); }
.targets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 980px) {
  .targets-grid { grid-template-columns: 1fr; }
}
.target-card {
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  min-height: 280px;
}
.target-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-purple-soft);
  box-shadow: 0 24px 60px -30px rgba(14, 42, 71, 0.22);
}
.target-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(111, 91, 179, 0.08);
  color: var(--brand-purple);
  margin-bottom: 20px;
}
.target-icon svg { width: 22px; height: 22px; }
.target-card h3 {
  margin: 0 0 14px;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.target-quote {
  font-family: 'Manrope', 'IBM Plex Sans', sans-serif;
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--neutral-mid);
  border-left: 2px solid var(--neutral-line);
  margin: 0 0 24px;
  padding: 4px 0 4px 14px;
}
.target-link {
  margin-top: auto;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .2s, gap .2s var(--ease);
}
.target-link svg { width: 14px; height: 14px; }
.target-card:hover .target-link { color: var(--blue-hover); gap: 10px; }

/* ═════════ 13. Home: 4 Servicios destacados ═════════ */
.services { background: var(--neutral-light); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}
.service {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  border: 1px solid var(--neutral-line);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  display: flex;
  flex-direction: column;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}
.service:hover {
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: 0 24px 60px -30px rgba(14, 42, 71, 0.25);
}
.service.big   { grid-column: span 3; min-height: 360px; }
.service.med   { grid-column: span 2; }
.service.small { grid-column: span 2; }
@media (max-width: 980px) {
  .service.big, .service.med, .service.small { grid-column: span 1; }
}
.service-num {
  font-family: 'Manrope', 'IBM Plex Sans', sans-serif;
  font-style: italic;
  color: var(--blue);
  font-size: 22px;
  margin-bottom: 12px;
}
.service h3 { margin-bottom: 14px; }
.service p {
  color: var(--neutral-mid);
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
}
.service-meta {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--neutral-light);
  color: var(--neutral-mid);
  border: 1px solid var(--neutral-line);
  font-weight: 500;
}
.service.featured {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.service.featured h3, .service.featured p { color: var(--white); }
.service.featured p { color: rgba(255, 255, 255, 0.7); }
.service.featured .service-num { color: var(--amber); }
.service.featured .chip {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.12);
}
.services-more {
  margin: 36px 0 0;
  text-align: center;
}

/* ═════════ 14. Home: Diferenciador ═════════ */
.why {
  background:
    linear-gradient(180deg, rgba(10, 31, 54, 0.88) 0%, rgba(10, 31, 54, 0.94) 100%),
    url('assets/img/porque-ema-bg.jpg') center/cover no-repeat;
  background-color: var(--navy-deep);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.why::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(111, 91, 179, 0.10), transparent 60%);
  pointer-events: none;
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 820px) { .why-grid { grid-template-columns: 1fr; } }

.reason {
  padding: 36px 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
}
.reason h3 { margin-bottom: 10px; font-size: 24px; color: var(--white); }
.reason p { color: rgba(255, 255, 255, 0.66); margin: 0; font-size: 15.5px; }

/* ═════════ 15. Home: Proceso ═════════ */
.process { background: var(--white); }
.process-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
  margin-bottom: 64px;
}
@media (max-width: 900px) {
  .process-intro { grid-template-columns: 1fr; gap: 36px; margin-bottom: 48px; }
}
.process-intro .section-head { margin-bottom: 0; }
.process-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(14, 42, 71, 0.35);
}
.process-figure img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
@media (max-width: 900px) {
  .process-figure img { aspect-ratio: 16 / 11; }
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 820px) {
  .process-grid { grid-template-columns: 1fr; }
}
.step-card {
  padding: 32px 24px 28px;
  border-top: 1px solid var(--neutral-line);
  position: relative;
}
.step-card::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 56px; height: 2px;
  background: var(--blue);
}
.step-label {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-purple);
  margin-bottom: 24px;
  display: block;
}
.step-card h3 { font-size: 26px; margin-bottom: 12px; }
.step-card p { color: var(--neutral-mid); margin: 0; font-size: 15px; }

/* ═════════ 16. Home: Sectores (grid 2x2 con problema concreto + mapa) ═════════ */
.sectors { background: var(--neutral-light); }
.sectors-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 64px;
  align-items: center;
  margin-bottom: 56px;
}
@media (max-width: 900px) {
  .sectors-intro { grid-template-columns: 1fr; gap: 36px; margin-bottom: 40px; }
}
.sectors-intro .section-head { margin-bottom: 0; }
.sectors-map {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--brand-navy-deep);
  box-shadow: 0 30px 70px -40px rgba(14, 42, 71, 0.4);
}
.sectors-map img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
@media (max-width: 900px) {
  .sectors-map img { aspect-ratio: 4 / 3; }
}
.sector-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 820px) { .sector-cards { grid-template-columns: 1fr; } }

.sector-card {
  display: flex;
  flex-direction: column;
  padding: 32px 30px 26px;
  background: var(--white);
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-lg);
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  text-decoration: none;
}
.sector-card:hover,
.sector-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--brand-purple-soft);
  box-shadow: 0 24px 60px -30px rgba(14, 42, 71, 0.22);
}
.sector-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(111, 91, 179, 0.08);
  color: var(--brand-purple);
  margin-bottom: 22px;
}
.sector-icon svg { width: 24px; height: 24px; }
.sector-card h3 {
  margin: 0 0 14px;
  font-size: 20px;
  color: var(--ink);
}
.sector-problem {
  font-family: 'Manrope', 'IBM Plex Sans', sans-serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--neutral-mid);
  margin: 0 0 24px;
}
.sector-link {
  margin-top: auto;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .2s var(--ease), color .2s;
}
.sector-link svg { width: 14px; height: 14px; }
.sector-card:hover .sector-link { color: var(--blue-hover); gap: 10px; }

/* ═════════ 17. Home: Frase institucional ═════════ */
.institutional {
  background:
    linear-gradient(180deg, rgba(247, 248, 250, 0.55) 0%, rgba(247, 248, 250, 0.70) 100%),
    url('assets/img/institucional-bg.jpg') center/cover no-repeat;
  background-color: var(--brand-bone);
  padding: 88px 0;
  position: relative;
}
.institutional-inner {
  max-width: 920px;
  text-align: left;
}
.institutional p {
  font-family: 'Manrope', 'IBM Plex Sans', sans-serif;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}
.institutional em { color: var(--blue); }

/* ═════════ 18. Home: Lead magnet (oculto en v1) ═════════ */
.lead-magnet { background: var(--neutral-light); }
.lead-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 820px) {
  .lead-inner { grid-template-columns: 1fr; }
}
.lead-cover {
  background: var(--white);
  border: 1px dashed var(--neutral-line);
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  color: var(--neutral-mid);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ═════════ 19. Home: CTA final ═════════ */
.cta {
  background: var(--navy-deep);
  color: var(--white);
  padding: 88px 0;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  top: -20%; right: -10%;
  width: 60%; height: 140%;
  background: radial-gradient(ellipse at center, rgba(111, 91, 179, 0.15), transparent 60%);
  pointer-events: none;
}
.cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 60px;
  align-items: end;
}
@media (max-width: 820px) {
  .cta-inner { grid-template-columns: 1fr; gap: 40px; align-items: start; }
}
/* Cuando la CTA tiene un solo bloque hijo (sin contact-card), centra el
   contenido y limita su ancho para evitar el "azul vacío a la derecha"
   que se notaba en /industrias '¿Tu sector no está aquí?' y similares. */
.cta-inner:has(> *:only-child) {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
  text-align: center;
}
.cta-inner:has(> *:only-child) p { margin-left: auto; margin-right: auto; }
.cta-inner:has(> *:only-child) .cta-actions { justify-content: center; }
.cta:has(.cta-inner > *:only-child)::before {
  top: -10%; right: -25%; left: -25%;
  width: auto; height: 130%;
  background: radial-gradient(ellipse at center, rgba(111, 91, 179, 0.18), transparent 55%);
}
.cta h2 { color: var(--white); }
.cta h2 em { color: var(--blue-soft); }
.cta p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 440px;
  font-size: 17px;
}
.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.cta-actions .btn-primary {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 12px 32px -10px rgba(255, 255, 255, 0.25);
}
.cta-actions .btn-primary:hover { background: var(--blue); color: var(--white); }

.contact-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(8px);
}
.contact-card h4 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 20px;
}
.contact-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 15px;
}
.contact-line:last-child { border: 0; padding-bottom: 0; }
.contact-line span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.contact-line b {
  color: var(--white);
  font-weight: 500;
  font-family: 'IBM Plex Sans', sans-serif;
}

/* ═════════ 20. Página: Servicios ═════════ */
.page-header {
  background: var(--navy-deep);
  color: var(--white);
  padding: 140px 0 64px;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(111, 91, 179, 0.12), transparent 60%);
  pointer-events: none;
}

/* Variante de /servicios.html con imagen de almacén al fondo */
.page-header-servicios {
  background:
    linear-gradient(180deg, rgba(10, 31, 54, 0.78) 0%, rgba(14, 42, 71, 0.88) 100%),
    url('assets/img/servicios-bg.jpg') center/cover no-repeat;
}
.page-header-servicios::before { display: none; }

/* Variante de /industrias.html con vista aérea de puerto al fondo */
.page-header-industrias {
  background:
    linear-gradient(180deg, rgba(10, 31, 54, 0.74) 0%, rgba(14, 42, 71, 0.90) 100%),
    url('assets/img/industrias-bg.jpg') center/cover no-repeat;
}
.page-header-industrias::before { display: none; }

/* Variante de /contacto.html con foto de oficina al fondo */
.page-header-contacto {
  background:
    linear-gradient(180deg, rgba(10, 31, 54, 0.76) 0%, rgba(14, 42, 71, 0.88) 100%),
    url('assets/img/contacto-bg.jpg') center/cover no-repeat;
}
.page-header-contacto::before { display: none; }
.page-header h1 { color: var(--white); margin-bottom: 22px; }
.page-header h1 em { color: var(--blue-soft); font-style: italic; }
.page-header p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  max-width: 640px;
  margin: 0;
}

/* Catálogo de 23 servicios agrupados en categorías */
.services-catalog { background: var(--white); }
.service-category {
  padding: 60px 0;
  border-top: 1px solid var(--neutral-line);
}
.service-category:first-of-type { border-top: 0; padding-top: 16px; }
.category-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 36px;
  max-width: 760px;
}
.category-num {
  font-family: 'Manrope', 'IBM Plex Sans', sans-serif;
  font-style: italic;
  font-size: 56px;
  line-height: 1;
  color: var(--amber);
}
.category-head h2 { font-size: clamp(28px, 3.4vw, 36px); margin-bottom: 8px; }
.category-head p { color: var(--neutral-mid); font-size: 16px; margin: 0; }

.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 820px) { .service-list { grid-template-columns: 1fr; } }
.service-list li {
  padding: 24px 26px;
  background: var(--neutral-light);
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius);
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.service-list li:hover {
  border-color: var(--blue-soft);
  background: var(--white);
  transform: translateY(-2px);
}
.service-list h3 {
  font-size: 19px;
  margin: 0 0 8px;
  color: var(--ink);
}
.service-list p {
  margin: 0 0 12px;
  font-size: 14.5px;
  color: var(--neutral-mid);
  line-height: 1.55;
}

/* Mini-CTA por servicio: link inline al formulario con UTM */
.service-mini-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0.01em;
  transition: color .2s var(--ease), gap .2s var(--ease);
}
.service-mini-cta:hover { color: var(--blue-hover); gap: 10px; }
.service-mini-cta:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.service-mini-cta svg { width: 14px; height: 14px; }

/* Frase orientada a personas debajo del H1 (servicios.html) */
.page-header-personas {
  font-family: 'Manrope', 'IBM Plex Sans', sans-serif;
  font-style: italic;
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
  max-width: 720px;
  margin-top: 18px;
}

/* Carrusel de categorías (5 slides, scroll-snap horizontal) */
.services-carousel {
  position: relative;
  margin: 16px 0 0;
}
.services-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.services-track::-webkit-scrollbar { display: none; }

.service-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 0 4px;
}
/* Visualmente, los slides ocultos se mantienen renderizados para que
   IntersectionObserver pueda detectar el activo. `hidden` deja de aplicar
   visualmente — JS gestiona aria-hidden y la posición. */
.service-slide[hidden] {
  display: block;
}

.slide-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  margin-bottom: 36px;
  max-width: 800px;
}
.slide-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(111, 91, 179, 0.10);
  color: var(--brand-purple);
  border-radius: 14px;
  flex-shrink: 0;
}
.slide-icon svg { width: 28px; height: 28px; }
.slide-head h2 { font-size: clamp(28px, 3.4vw, 36px); margin-bottom: 8px; }
.slide-head p { color: var(--neutral-mid); font-size: 16px; margin: 0; }
@media (max-width: 560px) {
  .slide-head { gap: 16px; }
  .slide-icon { width: 48px; height: 48px; }
  .slide-icon svg { width: 24px; height: 24px; }
}

/* Flechas de navegación */
.carousel-arrow {
  position: absolute;
  top: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--neutral-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 24px -12px rgba(14, 42, 71, 0.18);
  transition: transform .2s var(--ease), border-color .2s var(--ease), color .2s;
  z-index: 2;
}
.carousel-arrow:hover { color: var(--blue); border-color: var(--brand-purple-soft); transform: scale(1.05); }
.carousel-arrow:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.carousel-arrow[disabled] { opacity: 0.35; pointer-events: none; }
.carousel-arrow svg { width: 18px; height: 18px; }
.carousel-prev { right: 64px; top: 6px; }
.carousel-next { right: 8px; top: 6px; }
@media (max-width: 720px) {
  .carousel-arrow { display: none; }
}

/* Tab-bar de categorías: 5 botones tipo pildoritas con la activa resaltada */
.services-tabbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 6px;
  margin: 0 0 36px;
  background: var(--brand-bone);
  border: 1px solid var(--neutral-line);
  border-radius: 999px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.services-tabbar::-webkit-scrollbar { display: none; }
.services-tab {
  flex: 0 0 auto;
  padding: 10px 18px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-mid);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  scroll-snap-align: center;
  transition: background .25s var(--ease), color .25s var(--ease), transform .15s var(--ease);
}
.services-tab:hover { color: var(--ink); background: rgba(111, 91, 179, 0.06); }
.services-tab.is-active {
  background: var(--brand-purple);
  color: var(--white);
  box-shadow: 0 6px 16px -8px rgba(111, 91, 179, 0.55);
}
.services-tab:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
/* Hint de scroll horizontal para el carrusel de servicios */
.services-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 18px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--neutral-mid);
  text-align: center;
}
.services-scroll-hint .scroll-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--brand-purple);
  animation: hint-bounce 1.8s ease-in-out infinite;
}
.services-scroll-hint .scroll-arrow-left { animation-delay: 0s; }
.services-scroll-hint .scroll-arrow-right { animation-delay: 0.9s; }
.services-scroll-hint .scroll-arrow svg { width: 18px; height: 18px; }
@keyframes hint-bounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}
.services-scroll-hint .scroll-arrow-left {
  animation-name: hint-bounce-left;
}
@keyframes hint-bounce-left {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-3px); }
}
@media (prefers-reduced-motion: reduce) {
  .services-scroll-hint .scroll-arrow { animation: none; }
}

/* Featured tab (NOMs y Manifestación de Valor) — destaca como "dolor actual" */
.services-tab-featured {
  position: relative;
  color: var(--brand-purple);
  border: 1px solid rgba(111, 91, 179, 0.35);
}
.services-tab-featured:hover { background: rgba(111, 91, 179, 0.10); }
.services-tab-featured.is-active {
  background: var(--brand-purple);
  color: var(--white);
  border-color: var(--brand-purple);
}
.services-tab-featured::before {
  content: "★";
  margin-right: 6px;
  font-size: 11px;
  vertical-align: middle;
}
@media (max-width: 720px) {
  .services-tabbar { border-radius: var(--radius); padding: 4px; }
  .services-tab { padding: 9px 14px; font-size: 13px; }
}

/* Featured slide (NOMs y Manifestación de Valor) — visualmente distintivo */
.service-slide-featured .slide-head {
  background: linear-gradient(135deg, rgba(111, 91, 179, 0.06), rgba(111, 91, 179, 0.01));
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(111, 91, 179, 0.18);
}
.service-slide-featured .slide-icon {
  background: var(--brand-purple);
  color: var(--white);
}
.slide-flag {
  display: inline-block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--brand-purple);
  background: rgba(111, 91, 179, 0.10);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* CTA intermedio (después del carrusel, antes del CTA final) */
.services-mid-cta {
  background: var(--brand-bone);
  padding: 72px 0;
  text-align: center;
  border-top: 1px solid var(--neutral-line);
  border-bottom: 1px solid var(--neutral-line);
}
.services-mid-cta h2 {
  font-size: clamp(26px, 2.8vw, 34px);
  margin-bottom: 14px;
  color: var(--ink);
}
.services-mid-cta p {
  color: var(--neutral-mid);
  font-size: 17px;
  max-width: 560px;
  margin: 0 auto 28px;
}

/* .chips-row y .case-list se conservan para industrias.html */
.chips-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 24px 0 28px;
}
.case-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.case-list li {
  position: relative;
  padding: 8px 0 8px 22px;
  color: var(--ink);
  font-size: 15.5px;
}
.case-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 17px;
  width: 8px; height: 1px;
  background: var(--blue);
}

/* ═════════ 21. Página: Industrias ═════════ */

/* Tarjetas de industrias (índice visual con problema concreto por sector).
   Antes del detalle expandido — sirve como entry point claro. */
.industries-cards { background: var(--brand-bone); padding: 80px 0; }
.industries-lead {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(18px, 1.6vw, 22px);
  color: var(--brand-navy);
  max-width: 640px;
  margin: 0 0 40px;
  line-height: 1.45;
}
.industries-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 820px) { .industries-grid { grid-template-columns: 1fr; } }

/* Tarjeta de industria con imagen de fondo + gradient overlay para legibilidad */
.industry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
  padding: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--white);
  background-color: var(--brand-navy);
  isolation: isolate;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.industry-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  z-index: -2;
  transition: transform .8s var(--ease);
}
.industry-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 31, 54, 0.20) 0%,
    rgba(10, 31, 54, 0.55) 45%,
    rgba(10, 31, 54, 0.92) 100%);
  z-index: -1;
  transition: background .35s var(--ease);
}
.industry-card:hover,
.industry-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.5);
}
.industry-card:hover::before { transform: scale(1.04); }
.industry-card:hover::after {
  background: linear-gradient(180deg,
    rgba(10, 31, 54, 0.30) 0%,
    rgba(10, 31, 54, 0.65) 45%,
    rgba(91, 71, 150, 0.92) 100%);
}
.industry-card-body {
  padding: 36px 32px 32px;
}
.industry-card h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.industry-problem {
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-style: italic;
  line-height: 1.45;
  margin: 0 0 14px;
}
.industry-persona {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 20px;
  font-weight: 500;
}
.industry-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}
.industry-link .arrow { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.industry-card:hover .industry-link .arrow { transform: translateX(4px); }

.industries-detail { background: var(--white); }
.industry-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 64px;
  align-items: center;
  padding: 80px 0;
  border-top: 1px solid var(--neutral-line);
}
.industry-block:first-of-type { border-top: 0; padding-top: 32px; }
/* Zigzag: bloques pares invierten el orden (texto izq, imagen der) */
.industry-block:nth-of-type(even) .industry-figure { order: 2; }
.industry-block:nth-of-type(even) .industry-content { order: 1; }
@media (max-width: 900px) {
  .industry-block { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; }
  .industry-block:nth-of-type(even) .industry-figure,
  .industry-block:nth-of-type(even) .industry-content { order: initial; }
}
.industry-content h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin-bottom: 18px;
  letter-spacing: -0.015em;
}
.industry-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(14, 42, 71, 0.3);
  align-self: stretch;
}
.industry-figure img {
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
@media (max-width: 900px) {
  .industry-figure img { aspect-ratio: 16 / 11; }
}
.industry-body p {
  color: var(--neutral-mid);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 14px;
}
.industry-body h4 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-mid);
  margin: 24px 0 12px;
}

/* ═════════ 22. Página: Nosotros ═════════ */
.story { background: var(--white); }
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; gap: 36px; }
}
.story-text p {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 18px;
}
.story-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(14, 42, 71, 0.35);
}
.story-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 1 / 1;
}
@media (max-width: 900px) {
  .story-figure img { aspect-ratio: 16 / 11; }
}

/* Compat: bloques antiguos .story-body (si los usa otra página) */
.story-body p {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 18px;
  max-width: 640px;
}

/* Misión + Visión (dos cards sobre fondo oscuro) */
.mission-vision { background: var(--navy-deep); color: var(--white); position: relative; overflow: hidden; }
.mission-vision::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(111, 91, 179, 0.10), transparent 60%);
  pointer-events: none;
}
.mv-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 820px) { .mv-grid { grid-template-columns: 1fr; } }
.mv-card {
  padding: 36px 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}
.mv-label {
  display: block;
  font-family: 'Manrope', 'IBM Plex Sans', sans-serif;
  font-style: italic;
  color: var(--blue-soft);
  font-size: 28px;
  margin-bottom: 14px;
}
.mv-card p {
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
}

/* Lo que nos hace distintos en la práctica — grid 2x2 sobre fondo claro */
.distinct { background: var(--brand-bone); }
.distinct-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .distinct-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .distinct-grid { grid-template-columns: 1fr; } }
.distinct-card {
  padding: 28px 26px;
  background: var(--white);
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.distinct-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-purple-soft);
  box-shadow: 0 24px 60px -30px rgba(14, 42, 71, 0.22);
}
.distinct-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(111, 91, 179, 0.08);
  color: var(--brand-purple);
  transition: background .3s var(--ease), color .3s var(--ease);
}
.distinct-icon svg { width: 22px; height: 22px; }
.distinct-card:hover .distinct-icon {
  background: var(--brand-purple);
  color: var(--white);
}
.distinct-card h3 {
  font-size: 18px;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.distinct-card p {
  color: var(--neutral-mid);
  font-size: 14.5px;
  margin: 0;
  line-height: 1.55;
}

/* Página /trabaja — perfiles de talento (cards con icono morado) */
.talent-profiles { background: var(--brand-bone); }
.talent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .talent-grid { grid-template-columns: 1fr; gap: 16px; } }
.talent-card {
  background: var(--white);
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.talent-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-purple-soft);
  box-shadow: 0 24px 60px -30px rgba(14, 42, 71, 0.20);
}
.talent-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(111, 91, 179, 0.10);
  color: var(--brand-purple);
}
.talent-icon svg { width: 24px; height: 24px; }
.talent-card:hover .talent-icon {
  background: var(--brand-purple);
  color: var(--white);
}
.talent-card h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.talent-card p {
  color: var(--neutral-mid);
  font-size: 15px;
  margin: 0;
  line-height: 1.55;
}

/* Cómo postularte: lista numerada + card mailto lateral */
.talent-apply { background: var(--white); border-top: 1px solid var(--neutral-line); }
.talent-apply-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .talent-apply-grid { grid-template-columns: 1fr; gap: 36px; } }
.talent-steps {
  list-style: none;
  counter-reset: talent;
  padding: 0;
  margin: 18px 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.talent-steps li {
  counter-increment: talent;
  position: relative;
  padding-left: 56px;
  font-size: 16px;
  color: var(--neutral-mid);
  line-height: 1.55;
}
.talent-steps li::before {
  content: counter(talent);
  position: absolute;
  left: 0;
  top: -4px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-purple);
  color: var(--white);
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  border-radius: 50%;
}
.talent-steps li b {
  color: var(--ink);
  display: inline;
}

/* Trabaja con nosotros: copy + card con mailto */
.join-us { background: var(--white); border-top: 1px solid var(--neutral-line); }
.join-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .join-grid { grid-template-columns: 1fr; gap: 36px; } }
.join-grid h2 { font-size: clamp(28px, 3.2vw, 38px); margin: 18px 0 18px; }
.join-grid > div p {
  color: var(--neutral-mid);
  font-size: 16.5px;
  line-height: 1.6;
  margin: 0;
  max-width: 520px;
}
.join-card {
  padding: 36px 32px 32px;
  background: var(--brand-bone);
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-lg);
}
.join-card h3 {
  font-size: 20px;
  margin: 0 0 12px;
}
.join-card p {
  color: var(--neutral-mid);
  font-size: 15px;
  margin: 0 0 24px;
  line-height: 1.55;
}
.join-card .btn { width: auto; }
.join-note {
  font-size: 13px;
  color: var(--neutral-mid);
  margin: 18px 0 0 !important;
  font-family: 'IBM Plex Sans', monospace;
}

/* Valores: 3 items + foto lateral handshake sobre fondo claro */
.values { background: var(--neutral-light); }
.values-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) {
  .values-grid { grid-template-columns: 1fr; gap: 36px; }
}
.values-copy .section-head { margin-bottom: 32px; }
.values-figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(14, 42, 71, 0.35);
}
.values-figure img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
@media (max-width: 900px) {
  .values-figure img { aspect-ratio: 16 / 11; }
}
.values-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-width: 760px;
}
.values-list li {
  padding: 22px 28px;
  background: var(--white);
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--ink);
  line-height: 1.55;
}
.values-list li b {
  font-family: 'Manrope', 'IBM Plex Sans', sans-serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-right: 8px;
}

/* Personalidad: 4 items en 2 cols */
.personality { background: var(--white); }
.personality-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 820px) { .personality-grid { grid-template-columns: 1fr; } }
.personality-grid li {
  padding: 24px 28px;
  background: var(--neutral-light);
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--ink);
  border: 1px solid var(--neutral-line);
}
.personality-grid li b { display: block; margin-bottom: 6px; }

/* Agentes aduanales: 4 cards sobre fondo oscuro */
.agents {
  background:
    linear-gradient(180deg, rgba(10, 31, 54, 0.85) 0%, rgba(14, 42, 71, 0.92) 100%),
    url('assets/img/agentes-bg.jpg') center/cover no-repeat;
  background-color: var(--navy);
}

/* Banner full-width con video de la oficina en Shanghai */
.origen-banner {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  padding: 0;
  background-color: var(--navy-deep);
  display: flex;
  align-items: center;
  isolation: isolate;
}
.origen-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.origen-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 100px 0;
  background: linear-gradient(90deg,
    rgba(10, 31, 54, 0.92) 0%,
    rgba(10, 31, 54, 0.78) 40%,
    rgba(10, 31, 54, 0.35) 80%,
    rgba(10, 31, 54, 0.15) 100%);
}
.origen-overlay h2 {
  margin: 18px 0 18px;
  font-size: clamp(28px, 3.6vw, 44px);
  max-width: 640px;
}
.origen-overlay p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  margin: 0 0 24px;
  max-width: 540px;
  line-height: 1.55;
}
.origen-locations,
.agents-locations {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agents-locations { gap: 10px; justify-content: flex-start; margin-top: 8px; }
.agents-locations li,
.origen-locations li {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 7px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
@media (max-width: 700px) {
  .origen-banner { min-height: 320px; }
  .origen-overlay { padding: 64px 0; }
  .origen-overlay {
    background: linear-gradient(180deg, rgba(10, 31, 54, 0.6) 0%, rgba(10, 31, 54, 0.88) 70%);
  }
}
.agents-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 820px) { .agents-grid { grid-template-columns: 1fr; } }
.agent-card {
  padding: 28px 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
}
.agent-card h3 {
  font-size: 19px;
  color: var(--white);
  margin: 0 0 16px;
  line-height: 1.3;
}
.agent-name {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  font-size: 15.5px;
  font-weight: 500;
}
.agent-patent {
  color: var(--blue-soft);
  margin: 0 0 14px;
  font-size: 13.5px;
  font-family: 'Manrope', 'IBM Plex Sans', sans-serif;
  font-style: italic;
}
.agent-card .agent-patent:last-child { margin-bottom: 0; }

/* ═════════ 23. Página: Contacto + Form ═════════ */
.contact-section { background: var(--white); }
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 60px;
  align-items: start;
}
@media (max-width: 920px) {
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
}

.contact-form h2 { margin-bottom: 28px; font-size: clamp(28px, 3.4vw, 36px); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-field { display: flex; flex-direction: column; margin-bottom: 18px; }
.form-field label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  font-size: 15.5px;
  padding: 12px 14px;
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}
.form-field textarea { resize: vertical; min-height: 120px; }

.form-segment {
  border: 0;
  padding: 0;
  margin: 0 0 24px;
}
.form-segment legend {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
  padding: 0;
}
.segment-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.segment-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--neutral-line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.segment-option:hover { border-color: var(--blue-soft); }
.segment-option input { margin-top: 4px; accent-color: var(--blue); }
.segment-option:has(input:checked) {
  border-color: var(--blue);
  background: rgba(111, 91, 179, 0.04);
}
.segment-option span { display: flex; flex-direction: column; gap: 2px; }
.segment-option b { font-weight: 600; font-size: 15px; color: var(--ink); }
.segment-option small { font-size: 13.5px; color: var(--neutral-mid); }

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 8px;
}
.form-note {
  font-size: 13px;
  color: var(--neutral-mid);
  margin: 0;
  max-width: 480px;
  line-height: 1.5;
}
.form-status {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--blue);
}
.form-status.error { color: #d23a3a; }

.contact-direct {
  background: var(--neutral-light);
  padding: 32px;
  border-radius: var(--radius-lg);
}
.contact-direct h4 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-mid);
  margin: 0 0 12px;
}
.direct-intro {
  font-size: 14px;
  color: var(--ink);
  margin: 0 0 20px;
  line-height: 1.5;
}
.direct-intro b { font-weight: 600; color: var(--brand-purple); }
.direct-line-featured {
  background: var(--white);
  border: 1px solid var(--brand-purple-soft);
  border-radius: var(--radius);
  padding: 16px 18px !important;
  margin-bottom: 8px;
  box-shadow: 0 8px 24px -16px rgba(111, 91, 179, 0.4);
}
.direct-line-featured span { color: var(--brand-purple) !important; }
.direct-line-featured b { color: var(--brand-navy); font-weight: 700 !important; font-size: 17px; }
.direct-line-featured:hover { border-color: var(--brand-purple); transform: translateY(-1px); transition: transform .2s var(--ease), border-color .2s; }
.direct-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--neutral-line);
  font-size: 15px;
  color: var(--ink);
}
a.direct-line { transition: color .2s; }
a.direct-line:hover { color: var(--blue); }
.direct-line:last-of-type { border-bottom: 0; }
.direct-line span {
  color: var(--neutral-mid);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.direct-line b { color: var(--ink); font-weight: 500; }
/* Para direcciones largas, apilar label arriba y texto abajo con aire */
.direct-address {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px 0 !important;
}
.direct-address b {
  font-size: 14.5px;
  line-height: 1.55;
  font-weight: 400;
}
.direct-note {
  font-size: 13.5px;
  color: var(--neutral-mid);
  margin: 20px 0 0;
  line-height: 1.5;
}

.thanks { background: var(--neutral-light); padding: 80px 0; }
.thanks h2 { margin-bottom: 14px; }
.thanks p { color: var(--neutral-mid); max-width: 540px; }

/* Sección de mapa con dirección y embed Google Maps */
.map-section { background: var(--brand-bone); padding: 80px 0; border-top: 1px solid var(--neutral-line); }
.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 60px;
  align-items: stretch;
}
@media (max-width: 900px) { .map-grid { grid-template-columns: 1fr; gap: 36px; } }
.map-copy h2 {
  font-size: clamp(28px, 3.2vw, 38px);
  margin: 18px 0 16px;
}
.map-copy > p {
  color: var(--neutral-mid);
  font-size: 16.5px;
  margin: 0 0 32px;
  line-height: 1.6;
}
.map-line {
  padding: 24px 0;
  border-top: 1px solid var(--neutral-line);
}
.map-line-label {
  display: block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-purple);
  margin-bottom: 10px;
}
.map-line-text {
  color: var(--ink);
  font-size: 15.5px;
  margin: 0 0 14px;
  line-height: 1.55;
}
.map-line-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  transition: gap .2s var(--ease), color .2s;
}
.map-line-link:hover { color: var(--blue-hover); gap: 10px; }
.map-line-link svg { width: 14px; height: 14px; }
.map-frame {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 70px -40px rgba(14, 42, 71, 0.3);
  min-height: 380px;
  background: var(--brand-gray-smoke);
}
.map-frame iframe { display: block; min-height: 380px; }
@media (max-width: 900px) {
  .map-frame, .map-frame iframe { min-height: 320px; }
}

/* ═════════ 24. A11y polish + sweep ═════════ */

/* Card-shaped interactive elements need their own focus ring to match radius */
.target-card:focus-visible,
.service:focus-visible,
.industry-block:focus-visible {
  outline-offset: 4px;
  border-radius: var(--radius);
}
.target-card:focus-visible .target-link,
.target-card:hover .target-link {
  color: var(--blue-hover);
}

/* Micro-CTA al final de secciones (inline link con flecha) */
.section-micro-cta {
  margin: 40px 0 0;
  font-size: 15px;
  font-weight: 500;
}
.section-micro-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-purple);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.on-dark .section-micro-cta a { color: var(--brand-purple-soft); }
.section-micro-cta a:hover,
.section-micro-cta a:focus-visible {
  color: var(--brand-purple-dark);
  border-color: currentColor;
}
.on-dark .section-micro-cta a:hover { color: var(--white); }
.section-micro-cta .arrow { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.section-micro-cta a:hover .arrow { transform: translateX(3px); }

/* Hero mobile portrait: video relative + 16:9 + texto debajo
   Resuelve el recorte feo de cover en portrait donde el video perdía
   contexto. Aquí el video ocupa el ancho completo del viewport con su
   aspect ratio nativo, y el texto queda debajo en flujo normal. */
@media (max-width: 700px) {
  .hero {
    min-height: auto;
    padding: 96px 0 56px;
    display: block;
    background:
      radial-gradient(ellipse 60% 50% at 80% 10%, rgba(111, 91, 179, 0.18), transparent 70%),
      linear-gradient(180deg, var(--brand-navy-deep) 0%, var(--brand-navy-dark) 60%, var(--brand-navy) 100%);
  }
  .hero-bg, .hero-scene { display: none; }
  .hero-video {
    position: relative;
    inset: auto;
    height: auto;
    width: calc(100% - 48px);
    aspect-ratio: 16 / 9;
    margin: 0 24px 32px;
    object-fit: cover;
    object-position: center bottom;
    border-radius: var(--radius);
    box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.5);
  }
  .hero-video.ready { opacity: 1; }
  .hero-grid { max-width: none; }
  .hero-copy h1 { font-size: clamp(34px, 9vw, 48px); }
  .hero-sub { font-size: 16px; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
}

/* ═════════════════════════════════════════════════════════
   Chatbot — botón flotante + panel
   - FAB morado a la izquierda del WhatsApp (right: 96 cuando
     existe .wa-float; right: 24 cuando no, vía :has())
   - Panel: 380x540 desktop, slide-up casi full-screen en mobile
   - z-index 45 (un nivel arriba de .wa-float que es 40)
   ═════════════════════════════════════════════════════════ */
.chat-widget { font-family: 'IBM Plex Sans', sans-serif; }

.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--brand-purple);
  color: var(--white);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 28px -10px rgba(111, 91, 179, 0.55);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s var(--ease);
  z-index: 45;
}
.chat-fab:hover {
  background: var(--brand-purple-dark, #5B4796);
  transform: scale(1.05);
  box-shadow: 0 14px 32px -10px rgba(111, 91, 179, 0.7);
}
.chat-fab:focus-visible { outline: 3px solid var(--brand-purple-soft); outline-offset: 3px; }
.chat-fab svg { width: 26px; height: 26px; }
.chat-open .chat-fab { display: none; }

/* Cuando hay WhatsApp en la página, separar el chat a la izquierda */
body:has(.wa-float) .chat-fab { right: 96px; }
@media (max-width: 560px) {
  .chat-fab { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .chat-fab svg { width: 24px; height: 24px; }
  body:has(.wa-float) .chat-fab { right: 84px; }
}

.chat-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: min(560px, calc(100vh - 48px));
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(14, 42, 71, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 50;
  animation: chat-slide-up .25s var(--ease);
}
/* Bug fix: el atributo HTML [hidden] necesita ganarle a display:flex */
.chat-panel[hidden] { display: none; }
@keyframes chat-slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 560px) {
  .chat-panel {
    right: 8px;
    left: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    height: calc(100vh - 16px);
    border-radius: 16px;
  }
}

.chat-panel-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 20px;
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: var(--white);
}
/* Línea acento morada en la base del header — combina navy + morado */
.chat-panel-head::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-purple) 0%, var(--brand-purple-soft) 100%);
}
.chat-panel-head-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.chat-panel-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand-purple);
  display: grid;
  place-items: center;
  color: var(--white);
  box-shadow: 0 4px 12px -4px rgba(111, 91, 179, 0.55);
}
.chat-panel-avatar svg { width: 20px; height: 20px; }
.chat-panel-head h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
  color: var(--white);
  letter-spacing: -0.01em;
}
.chat-panel-sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #25D366;
  display: inline-block;
  animation: chat-pulse 2s ease-in-out infinite;
}
@keyframes chat-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.chat-panel-close {
  width: 32px; height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--white);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s var(--ease);
}
.chat-panel-close:hover { background: rgba(255, 255, 255, 0.20); }
.chat-panel-close svg { width: 18px; height: 18px; }

.chat-messages {
  list-style: none;
  padding: 18px;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--brand-bone);
  scrollbar-width: thin;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(125, 135, 148, 0.4); border-radius: 999px; }

.chat-msg { display: flex; max-width: 88%; }
.chat-msg-user { align-self: flex-end; justify-content: flex-end; }
.chat-msg-assistant { align-self: flex-start; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}
.chat-msg-user .chat-bubble {
  background: var(--brand-purple);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.chat-msg-assistant .chat-bubble {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--neutral-line);
  border-bottom-left-radius: 4px;
}
.chat-msg-lead-ok .chat-bubble {
  background: rgba(37, 211, 102, 0.10);
  border-color: rgba(37, 211, 102, 0.35);
  color: var(--ink);
}

.chat-typing-dots { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.chat-typing-dots span {
  width: 6px; height: 6px;
  background: var(--neutral-mid);
  border-radius: 50%;
  animation: chat-dot-bounce 1.2s ease-in-out infinite;
}
.chat-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing-dots span:nth-child(3) { animation-delay: 0.30s; }
@keyframes chat-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--neutral-line);
  background: var(--white);
}
.chat-input input {
  flex: 1;
  border: 1px solid var(--neutral-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--brand-bone);
  outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.chat-input input:focus {
  border-color: var(--brand-purple);
  background: var(--white);
}
.chat-input input:disabled { opacity: 0.6; }
.chat-send {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  background: var(--brand-purple);
  color: var(--white);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s var(--ease);
}
.chat-send:hover { background: var(--brand-purple-dark, #5B4796); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-send svg { width: 18px; height: 18px; }

.chat-panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 10px;
  background: var(--white);
  border-top: 1px solid var(--neutral-line);
  font-size: 11px;
  color: var(--neutral-mid);
}
.chat-reset {
  background: transparent;
  border: 0;
  color: var(--brand-purple);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 6px;
}
.chat-reset:hover { background: rgba(111, 91, 179, 0.08); }
.chat-disclaimer { font-style: italic; opacity: 0.75; }

@media (prefers-reduced-motion: reduce) {
  .chat-panel { animation: none; }
  .chat-typing-dots span { animation: none; opacity: 0.6; }
  .chat-dot { animation: none; }
}
