/* =================================================================
   SERCO LOGISTICS — Hoja de estilos principal
   Lenguaje visual: "B - Global Vibrante" (aprobado por el cliente)
   Degradado multicolor azul -> morado -> naranja, blobs en movimiento,
   ondas curvas, tarjetas con barra de color y halo, tipografía fuerte.
   ================================================================= */

/* ---------------- Variables de marca ---------------- */
:root {
  /* Paleta — fuente única de verdad (Dirección B azul-forward) */
  --azul:      #1565C0;   /* Azul Logístico (principal, base) — Marítimo */
  --azul-2:    #2767DC;   /* Azul claro de marca (único): hover/stat/map/gradientes */
  --verde:     #2FA64F;   /* Verde Global (esmeralda) — Aduanas */
  --morado:    #6536BE;   /* Morado Internacional — Aéreo */
  --naranja:   #FB8A12;   /* Naranja Comercial (ámbar/cobre) — Terrestre */
  --rojo:      #E03333;   /* Rojo Courier (AA en blanco 4.98:1) */
  --gris:      #2A3140;   /* Gris Corporativo (solo footer / superficies oscuras) */
  --azulgris:  #3B5680;   /* Almacenaje */
  --blanco:    #FFFFFF;

  /* Tonos "fuertes" (solo glifo blanco / texto de color, AA): mismo hue, más profundos */
  --naranja-strong: #C2410C;   /* blanco 5.18:1 — CTA, panel, hover, kicker, iconos Terrestre */
  --verde-strong:   #2E7D32;   /* blanco 5.13:1 — iconos/hover Aduanas */
  --rojo-strong:    #C62828;   /* texto extra-seguro (rojo ya AA con #E03333) */

  /* Verde WhatsApp (oficial de marca) */
  --wa:        #25D366;   /* Verde WhatsApp (acento de marca, referencia; demasiado claro para texto blanco 1.98:1 — no pintar bajo glifos/etiquetas) */
  --wa-d:      #0C8C42;   /* Verde WhatsApp oscuro (base de los degradados de botón, oscurecido vía color-mix para AA) */

  /* Cálidos del hero (puente cromático azul<->naranja, Dirección B) */
  --gold:      #FFD54F;   /* acento dorado (pill, stat) */
  --gold-soft: #FFE27A;   /* dorado claro (highlight título) */
  --gold-2:    #FFB347;   /* dorado ámbar (highlight título) */

  /* Texto */
  --ink:       #1b2230;
  --ink-soft:  #4A5872;   /* secundario, sesgo azul, 6.36:1 (cerca de AAA) */
  --gris-soft: #C9D2E0;   /* subtítulo footer sobre fondo oscuro (~9:1) */
  --line:      #eef0f4;
  --bg-soft:   #fafbfd;

  /* Tokens de estado de formulario (derivados de marca) */
  --ok-ink:  #1b7a3d;
  --ok-bg:   color-mix(in srgb, var(--verde) 12%, #fff);
  --ok-line: color-mix(in srgb, var(--verde) 30%, #fff);
  --err-ink:  #b3261e;
  --err-bg:   color-mix(in srgb, var(--rojo) 7%, #fff);
  --err-line: color-mix(in srgb, var(--rojo) 35%, #fff);

  /* Degradado principal del hero / acentos */
  --grad-hero: linear-gradient(125deg, #0D47A1 0%, #1565C0 40%, var(--azul-2) 64%, #6A53C8 84%, var(--naranja) 100%);
  --grad-line: linear-gradient(90deg, #0D47A1, #1565C0 42%, var(--azul-2) 72%, var(--naranja));
  /* Variante para texto pequeño (kicker): termina en terracota-cobre para contraste AA */
  --grad-kicker: linear-gradient(90deg, var(--azul), var(--azul-2) 58%, var(--naranja-strong));
  /* Panel de contacto: cola segura (#C2410C) para texto blanco encima (no hereda grad-hero) */
  --grad-panel: linear-gradient(135deg, #0D47A1 0%, #1565C0 45%, var(--azul-2) 72%, var(--naranja-strong) 100%);

  /* Layout */
  --maxw: 1140px;
  --radius: 20px;
  --radius-lg: 24px;   /* Radio unificado para piezas grandes (paneles, mapa, foto) */
  --nav-h: 76px;
  --mobile-bar-h: 70px;   /* altura real de la barra fija inferior (móvil) */

  /* Escala de espaciado consistente (ritmo de 4px) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;

  /* Transiciones consistentes (curva y duración unificadas) */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .18s;
  --t-base: .28s;
  --t-slow: .5s;

  /* Sombras escalonadas (profundidad consistente) */
  --sh-sm: 0 4px 14px rgba(28,40,70,.06);
  --sh-md: 0 6px 18px rgba(28,40,70,.05);
  --sh-lg: 0 18px 38px rgba(28,40,70,.14);

  /* Foto del hero (ya activa por defecto: la clase .has-photo está aplicada en el
     HTML y usa esta variable). El cliente puede servir un AVIF/WebP optimizado
     más adelante actualizando esta ruta. */
  --hero-img: url('../assets/hero.jpg');
}

/* ---------------- Reset ligero ---------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  font-family: "Manrope", system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--blanco);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }

/* ---------------- Accesibilidad ---------------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 999;
  background: var(--azul);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Solo para lectores de pantalla (visually-hidden). Texto invisible
   pero accesible, p.ej. el aviso "(se abre en una pestaña nueva)". */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Animaciones de aparición */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  /* Neutraliza también las transiciones de movimiento (translateY/scale en
     .btn, .card, .why__item, .mode, .wa-float, .to-top, nav, etc.): un usuario
     con reduced-motion no debe ver desplazamientos animados (WCAG 2.3.3). */
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =================================================================
   MARCA / LOGO
   ================================================================= */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__logo {
  width: 48px; height: 48px; flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(28,40,70,.16));
}
@keyframes spin { to { transform: rotate(360deg); } }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name {
  font-weight: 800;
  font-size: clamp(15px, 2.2vw, 18px);
  letter-spacing: .4px;
  color: var(--ink);
}
.brand__sub {
  font-size: 11px; font-weight: 600; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--ink-soft);
}

/* =================================================================
   NAV (sticky)
   ================================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.nav.is-scrolled {
  box-shadow: 0 8px 30px rgba(28,40,70,.10);
  background: rgba(255,255,255,.96);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(18px, 4vw, 40px);
}
.nav__links {
  display: flex; align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}
.nav__link {
  text-decoration: none; color: var(--ink-soft);
  font-weight: 600; font-size: 14.5px;
  position: relative; padding: 6px 0;
  transition: color var(--t-fast) var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  height: 2px; width: 0; border-radius: 2px;
  background: var(--grad-line); transition: width var(--t-base) var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link.is-active::after { width: 100%; }
.nav__link.is-active { color: var(--ink); }

.nav__cta {
  text-decoration: none; color: #fff;
  font-weight: 700; font-size: 14.5px;
  padding: 11px 22px; border-radius: 40px; white-space: nowrap;
  /* Texto blanco 'Cotiza' encima: ambos extremos del degradado >=4.5:1 con blanco
     (#C2410C 5.18:1, #9A3412 7.31:1) — WCAG 2.1 AA 1.4.3. No arrancar en --naranja
     (#FB8A12 2.51:1), que fallaría bajo el texto. */
  background: linear-gradient(120deg, var(--naranja-strong), #9A3412);
  box-shadow: 0 8px 20px rgba(194,65,12,.38);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.nav__cta:hover,
.nav__cta:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(194,65,12,.5); }
.nav__cta:active { transform: translateY(0); box-shadow: 0 6px 16px rgba(194,65,12,.4); }

/* Hamburguesa */
.nav__burger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; border-radius: 12px;
}
.nav__burger span {
  display: block; width: 24px; height: 2.5px; border-radius: 3px;
  background: var(--ink); transition: transform .3s ease, opacity .2s ease;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* =================================================================
   HERO
   ================================================================= */
.hero {
  position: relative; overflow: hidden; color: #fff;
  padding: clamp(52px, 7vw, 96px) clamp(18px, 4vw, 40px) clamp(70px, 8vw, 110px);
  background:
    radial-gradient(120% 130% at 12% 8%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 42%),
    radial-gradient(90% 90% at 92% 100%, rgba(13,40,90,.32) 0%, rgba(13,40,90,0) 55%),
    var(--grad-hero);
}
/* Foto real de fondo (YA activa: .has-photo aplicada en el HTML y --hero-img
   definido en :root). Lleva un velo azul oscuro encima para que el texto siga
   legible. Para optimizar: servir un AVIF/WebP actualizando --hero-img. */
.hero.has-photo {
  background:
    linear-gradient(120deg, rgba(9,26,60,.88), rgba(13,71,161,.62) 52%, rgba(9,22,52,.86)),
    var(--hero-img) center / cover no-repeat,
    var(--grad-hero);
}
/* Malla de longitudes/latitudes sutil: añade profundidad sin recargar */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 18%, #000 0%, transparent 72%);
  mask-image: radial-gradient(120% 90% at 70% 18%, #000 0%, transparent 72%);
  opacity: .7;
}
/* Viñeta inferior que asienta el hero sobre la ola */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(13,40,90,.22), rgba(13,40,90,0));
}
.hero__inner { position: relative; z-index: 3; max-width: 760px; margin: 0 auto; width: 100%; }
.hero__blob { position: absolute; z-index: 2; border-radius: 50%; filter: blur(44px); opacity: .4; pointer-events: none; }
.hero__blob--1 {
  width: 420px; height: 420px; top: -150px; right: -120px;
  background: radial-gradient(circle, rgba(255,255,255,.5), rgba(255,255,255,0) 70%);
}
.hero__blob--2 {
  width: 380px; height: 380px; bottom: -160px; left: -120px;
  background: radial-gradient(circle, rgba(46,106,214,.6), rgba(46,106,214,0) 70%);
}
.hero__blob--3 {
  width: 240px; height: 240px; top: 30%; left: 58%;
  background: radial-gradient(circle, rgba(255,255,255,.28), rgba(255,255,255,0) 72%);
}
@keyframes float { 0%,100% { transform: translate(0,0); } 50% { transform: translate(18px,-22px); } }

.hero__wave {
  position: absolute; left: 0; right: 0; bottom: -1px;
  width: 100%; display: block; line-height: 0; z-index: 2;
}

.pill {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: 12.5px; font-weight: 700; letter-spacing: .6px;
  padding: 7px 15px; border-radius: 40px; text-transform: uppercase;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.32);
  backdrop-filter: blur(4px);
  box-shadow: 0 6px 18px rgba(13,40,90,.18);
}
.pill__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 4px rgba(255,213,79,.3);
  animation: pillPulse 2.4s ease-in-out infinite;
}
@keyframes pillPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,213,79,.45); }
  50% { box-shadow: 0 0 0 6px rgba(255,213,79,0); }
}

.hero__title {
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1.04; font-weight: 800; letter-spacing: -1px;
  margin: var(--sp-5) 0 var(--sp-4);
  text-shadow: 0 4px 24px rgba(13,40,90,.25);
  text-wrap: balance;
}
.hero__title em {
  font-style: normal;
  color: #fff; /* fallback sólido de alto contraste si el clip falla */
  background: linear-gradient(90deg, var(--gold-soft), var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* Contorno sutil para legibilidad del dorado sobre el tramo naranja del fondo */
  text-shadow: 0 1px 6px rgba(13,40,90,.35);
}
.hero__sub {
  font-size: clamp(15px, 2.2vw, 18.5px);
  max-width: 620px; color: rgba(255,255,255,.93); font-weight: 500;
  text-wrap: pretty;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }

.hero__stats { display: flex; flex-wrap: wrap; gap: clamp(16px, 3vw, 40px); margin-top: var(--sp-7); }
.stat { display: flex; flex-direction: column; }
.stat b {
  font-size: clamp(20px, 3.2vw, 28px); font-weight: 800; line-height: 1; letter-spacing: -.5px;
  position: relative; padding-left: 12px;
}
/* Acento de la barra de stat. Sobre el degradado del hero (azul->morado->naranja)
   un acento por-stat se perdía de contraste (p.ej. el azul del primer stat sobre
   fondo azul). Se usa un amarillo cálido fijo (el mismo del pill__dot) que mantiene
   alto contraste a lo largo de todo el degradado y sigue dentro de Dirección B. */
.stat b::before {
  content: ""; position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 4px; border-radius: 3px; background: var(--gold);
}
.stat small { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.88); margin-top: 6px; letter-spacing: .3px; text-shadow: 0 1px 2px rgba(13,40,90,.3); }
.stat + .stat { padding-left: clamp(16px, 3vw, 40px); border-left: 1px solid rgba(255,255,255,.28); }

/* =================================================================
   BOTONES
   ================================================================= */
.btn {
  text-decoration: none; font-weight: 700; font-size: 15.5px;
  padding: 14px 28px; border-radius: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  white-space: nowrap; cursor: pointer; border: 0;
  position: relative;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
  min-height: 48px;
}
.btn svg { width: 19px; height: 19px; flex: 0 0 auto; transition: transform var(--t-base) var(--ease); }
/* La flecha empuja ligeramente al pasar el cursor (micro-interacción) */
.btn--light:hover svg, .btn--grad:hover svg,
.btn--light:focus-visible svg, .btn--grad:focus-visible svg { transform: translateX(3px); }
.btn--light { color: #13224a; background: #fff; box-shadow: 0 12px 30px rgba(13,40,90,.3); }
.btn--light:hover,
.btn--light:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(13,40,90,.42); }
/* Etiqueta blanca 'WhatsApp' encima: el degradado se deriva del token de marca
   --wa-d (#0C8C42) oscurecido para garantizar >=4.5:1 con blanco (90% -> 5.17:1,
   85% -> 5.66:1) — WCAG 2.1 AA 1.4.3. El verde claro de marca --wa (#25D366, 1.98:1)
   queda solo como acento decorativo (halo/sombra), nunca bajo texto.
   Fallback literal (#0B7E3B/#0A7738) para navegadores sin color-mix. */
.btn--wa {
  color: #fff;
  background: linear-gradient(135deg, #0B7E3B 0%, #0A7738 100%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--wa-d) 90%, #000) 0%, color-mix(in srgb, var(--wa-d) 85%, #000) 100%);
  box-shadow: 0 12px 30px rgba(12,140,66,.45);
}
.btn--wa:hover,
.btn--wa:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(12,140,66,.55); }
.btn--grad {
  color: #fff;
  background: linear-gradient(120deg, var(--azul), var(--azul-2) 55%, var(--naranja-strong));
  box-shadow: 0 12px 30px rgba(21,95,196,.38);
}
.btn--grad:hover,
.btn--grad:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(21,95,196,.46); }
.btn--block { width: 100%; }
/* Estado activo unificado: feedback táctil al presionar */
.btn:active { transform: translateY(-1px) scale(.99); }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }

/* =================================================================
   SECCIONES (genérico)
   ================================================================= */
.section {
  padding: clamp(54px, 7vw, 92px) clamp(18px, 4vw, 40px);
}
.section__head { text-align: center; max-width: 660px; margin: 0 auto var(--sp-7); }
.kicker {
  display: inline-block;
  font-size: 12.5px; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase;
  margin-bottom: var(--sp-2);
  color: var(--azul); /* fallback de alto contraste si falla el clip */
  background: var(--grad-kicker);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.section__title {
  font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.6px;
  line-height: 1.12;
  color: var(--ink); margin: var(--sp-3) 0 var(--sp-3);
  text-wrap: balance;
}
.section__lead { font-size: 16px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }

/* =================================================================
   SERVICIOS
   ================================================================= */
.serv { background: var(--bg-soft); }
.serv__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2.2vw, 22px);
  max-width: var(--maxw); margin: 0 auto;
}
.card {
  position: relative; background: #fff; border-radius: var(--radius);
  padding: 28px 24px 26px; overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--sh-md);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--c); }
.card::after {
  content: ""; position: absolute; right: -46px; top: -46px;
  width: 130px; height: 130px; border-radius: 50%;
  background: var(--c); opacity: .1; transition: transform var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease);
}
.card:hover,
.card:focus-within {
  transform: translateY(-6px); box-shadow: var(--sh-lg);
  border-color: var(--c); /* fallback sin color-mix (tinte de marca) */
  border-color: color-mix(in srgb, var(--c) 22%, var(--line));
}
.card:hover::after,
.card:focus-within::after { transform: scale(1.5); opacity: .16; }
.card__ic {
  width: 54px; height: 54px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-ic, var(--c)); color: #fff; margin-bottom: var(--sp-4);
  position: relative; z-index: 1;
  box-shadow: 0 10px 22px rgba(28,40,70,.22);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 45%, transparent);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.card:hover .card__ic,
.card:focus-within .card__ic {
  transform: translateY(-2px) scale(1.05) rotate(-3deg);
  box-shadow: 0 16px 30px color-mix(in srgb, var(--c) 52%, transparent);
}
.card__ic svg { width: 28px; height: 28px; }
.card__name {
  font-size: 18px; font-weight: 800; color: var(--ink);
  position: relative; z-index: 1;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: .5px;
  /* Texto oscuro neutro: garantiza >=4.5:1 (WCAG 2.1 AA, 1.4.3) sobre el fondo
     claro tintado para TODOS los acentos, incluidos los más claros (--naranja
     #FB8A12, --verde #2FA64F) que fallarían al derivar el color del propio acento. */
  color: color-mix(in srgb, var(--c) 38%, #1a1f2b);
  background: rgba(0,0,0,.06);
  background: color-mix(in srgb, var(--c) 14%, #fff);
  padding: 3px 9px; border-radius: 30px; text-transform: uppercase;
}
.card__desc { font-size: 14px; color: var(--ink-soft); margin-top: 9px; position: relative; z-index: 1; overflow-wrap: anywhere; }

/* =================================================================
   POR QUÉ ELEGIRNOS
   ================================================================= */
.why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2.4vw, 24px);
  max-width: var(--maxw); margin: 0 auto;
}
.why__item {
  position: relative; background: #fff; border-radius: var(--radius);
  padding: 30px 26px; border: 1px solid var(--line);
  box-shadow: var(--sh-md);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.why__item:hover,
.why__item:focus-within {
  transform: translateY(-6px); box-shadow: var(--sh-lg);
  border-color: var(--c); /* fallback sin color-mix (tinte de marca) */
  border-color: color-mix(in srgb, var(--c) 22%, var(--line));
}
.why__num {
  position: absolute; top: 18px; right: 22px;
  font-size: 40px; font-weight: 800; line-height: 1;
  color: var(--c); opacity: .16;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.why__item:hover .why__num,
.why__item:focus-within .why__num { opacity: .26; transform: scale(1.08); }
.why__ic {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.06);
  background: color-mix(in srgb, var(--c) 14%, #fff);
  color: var(--c-ink, var(--c)); margin-bottom: var(--sp-4);
  transition: transform var(--t-base) var(--ease);
}
.why__item:hover .why__ic,
.why__item:focus-within .why__ic { transform: translateY(-2px) scale(1.05); }
.why__ic svg { width: 26px; height: 26px; }
.why__title { font-size: 17.5px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.why__desc { font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }

/* =================================================================
   COBERTURA
   ================================================================= */
.cov { background: var(--bg-soft); }
.cov__map {
  max-width: var(--maxw); margin: 0 auto;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 18px 50px rgba(28,40,70,.12);
}
.cov__map svg { width: 100%; height: auto; }
.cov__modes {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(12px, 2vw, 22px);
  max-width: var(--maxw); margin: 36px auto 0;
}
.mode {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14.5px; color: var(--ink);
  background: #fff; border: 1px solid var(--line);
  padding: 12px 20px; border-radius: 40px;
  box-shadow: var(--sh-sm);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.mode:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(28,40,70,.12); border-color: color-mix(in srgb, var(--c) 28%, var(--line)); }
.mode__ic {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-ic, var(--c)); color: #fff;
  transition: transform var(--t-base) var(--ease);
}
.mode:hover .mode__ic { transform: scale(1.08) rotate(-4deg); }
.mode__ic svg { width: 20px; height: 20px; }

/* =================================================================
   NOSOTROS
   ================================================================= */
.about__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
.about__p { font-size: 16px; line-height: 1.6; color: var(--ink-soft); margin: 16px 0 28px; }
/* En la sección Historia los párrafos van seguidos: separación uniforme entre ellos */
.about-story .about__text .about__p { margin: 0 0 18px; }
.about-story .about__text .about__p:last-child { margin-bottom: 0; }
.about__art {
  /* Una sola capa de radio + sombra azul (Dirección B). Sin overflow:hidden ni
     sombra morada heredada del antiguo SVG-art (que apilaba dos sombras y recortaba
     la azul de la imagen). La imagen hereda el radio y no aporta su propia sombra. */
  border-radius: var(--radius-lg);
  box-shadow: 0 26px 54px -26px rgba(13,40,90,.55);
}
.about__photo { width: 100%; height: auto; display: block; border-radius: inherit; box-shadow: none; }

/* =================================================================
   HISTORIA, MISIÓN Y VISIÓN
   Reutiliza .about__grid (historia) y .why__item (misión/visión).
   Solo añade el centrado del bloque de historia y los chips de valores.
   ================================================================= */
/* Fondo soft para recuperar la alternancia soft/blanco entre Nosotros (blanco),
   Historia (soft) y Proceso (blanco) — evita tres lienzos blancos seguidos. */
.about-story { background: var(--bg-soft); }
.about-story .about__grid { margin-bottom: clamp(24px, 4vw, 36px); }
.about-story .about__text { text-align: left; }
/* Chips de valores (bajo el dúo misión/visión) */
.values {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--sp-2);
  max-width: 920px; margin: clamp(20px, 3vw, 28px) auto 0;
}
.value {
  font-size: 13px; font-weight: 800; letter-spacing: .3px; color: var(--ink);
  background: #fff; border: 1px solid var(--line);
  padding: 8px 16px; border-radius: 40px;
  box-shadow: var(--sh-sm);
}

/* =================================================================
   PROCESO
   ================================================================= */
.process__steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(18px, 2.4vw, 28px);
  max-width: var(--maxw); margin: 0 auto;
  list-style: none; padding: 0;
}
.step {
  position: relative; background: #fff; border-radius: var(--radius);
  padding: 30px 24px; border: 1px solid var(--line);
  box-shadow: var(--sh-md);
}
/* Línea conectora entre pasos (solo en pantallas anchas) */
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 48px; right: -16px;
  width: 16px; height: 2px; background: var(--line);
}
.step__num {
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 19px; color: #fff;
  background: var(--c-ic, var(--c));
  box-shadow: 0 10px 22px rgba(28,40,70,.22);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--c) 45%, transparent);
  margin-bottom: 16px;
}
.step__title { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 7px; }
.step__desc { font-size: 14px; color: var(--ink-soft); }

/* =================================================================
   FAQ
   ================================================================= */
.faq { background: var(--bg-soft); }
.faq__list {
  max-width: 820px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 14px;
}
.faq__item {
  position: relative; background: #fff; border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden;
  box-shadow: var(--sh-md);
  transition: box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.faq__item:hover { box-shadow: 0 10px 26px rgba(28,40,70,.10); }
.faq__item::before {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0;
  width: 5px; background: var(--c);
}
.faq__item[open] { box-shadow: 0 14px 34px rgba(28,40,70,.12); }
.faq__q {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px 20px 28px;
  font-size: 16.5px; font-weight: 800; color: var(--ink);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--c-ink, var(--c)); }
.faq__q .faq__icon {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.06); /* fallback sin color-mix */
  background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c);
  transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.faq__q:hover .faq__icon {
  background: rgba(0,0,0,.1); /* fallback sin color-mix */
  background: color-mix(in srgb, var(--c) 22%, #fff);
}
.faq__q .faq__icon svg { width: 16px; height: 16px; }
.faq__item[open] .faq__q .faq__icon { transform: rotate(45deg); }
.faq__a {
  padding: 0 22px 20px 28px;
  font-size: 14.5px; color: var(--ink-soft);
  overflow-wrap: anywhere;
}

/* =================================================================
   CONTACTO
   ================================================================= */
.contact__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: .85fr 1.15fr;
  gap: clamp(24px, 4vw, 44px); align-items: start;
}

/* Panel de datos de contacto (degradado de marca) */
.contact__info {
  position: relative; overflow: hidden; color: #fff;
  border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 40px);
  background:
    radial-gradient(120% 120% at 10% 0%, rgba(255,255,255,.14), rgba(255,255,255,0) 45%),
    var(--grad-panel);
  box-shadow: 0 22px 60px rgba(13,40,90,.30);
}
.contact__person { font-size: 24px; font-weight: 800; }
.contact__role { font-size: 14px; font-weight: 600; color: rgba(255,255,255,.92); margin-bottom: 14px; }
/* Línea de urgencia suave sobre el panel con degradado */
.contact__urgent {
  font-size: 14px; font-weight: 600; line-height: 1.5;
  color: rgba(255,255,255,.94); margin-bottom: 22px;
  text-shadow: 0 1px 2px rgba(13,40,90,.3);
}
.contact__list { display: flex; flex-direction: column; gap: 16px; }
.contact__list li { display: flex; align-items: center; gap: 14px; }
.contact__ic {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.16); color: #fff;
  border: 1px solid rgba(255,255,255,.22);
}
.contact__ic svg { width: 22px; height: 22px; }
/* Etiquetas pequeñas sobre el panel con degradado: subimos opacidad y añadimos
   una sombra sutil para asegurar contraste AA incluso sobre el tramo naranja. */
.contact__list small { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.92); text-shadow: 0 1px 2px rgba(13,40,90,.35); }
.contact__list span { min-width: 0; }
.contact__ic { transition: transform var(--t-base) var(--ease), background var(--t-base) var(--ease); }
.contact__list li:hover .contact__ic { transform: scale(1.06); background: rgba(255,255,255,.24); }
.contact__list a { color: #fff; text-decoration: none; font-weight: 700; font-size: 15.5px; overflow-wrap: anywhere; }
.contact__list a:hover,
.contact__list a:focus-visible { text-decoration: underline; }

/* Formulario */
.contact__form {
  background: #fff; border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(28,40,70,.08);
}
.field-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.req { color: var(--rojo); }
.field input,
.field select,
.field textarea {
  font-family: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 1.5px solid #e2e6ee; border-radius: 12px;
  background: #fafbfd; transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-base) var(--ease);
  width: 100%; min-height: 48px;
}
.field input:hover:not(:focus),
.field select:hover:not(:focus),
.field textarea:hover:not(:focus) { border-color: #cdd4e2; }
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--azul);
  box-shadow: 0 0 0 4px rgba(21,101,192,.14);
  background: #fff;
}
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: color-mix(in srgb, var(--rojo) 45%, #fff);
}
.contact__form .btn { margin-top: 22px; }

/* Microcopy de confianza bajo el botón de envío (discreto) */
.form-trust {
  margin-top: 12px; font-size: 13px; line-height: 1.5;
  color: var(--ink-soft); text-align: center;
}

/* Honeypot oculto (no debe verse ni tabularse) */
.hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden; opacity: 0;
}

/* Estado del formulario */
.form-status {
  margin-top: 16px; font-size: 14.5px; font-weight: 600;
  padding: 0; border-radius: 12px; display: none;
}
.form-status.is-ok {
  display: block; color: var(--ok-ink); background: var(--ok-bg);
  padding: 12px 16px; border: 1px solid var(--ok-line);
}
.form-status.is-err {
  display: block; color: var(--err-ink); background: var(--err-bg);
  padding: 12px 16px; border: 1px solid var(--err-line);
}

/* =================================================================
   FRANJA DE CONFIANZA / SECTORES
   ================================================================= */
.trust {
  padding: clamp(40px, 5vw, 64px) clamp(18px, 4vw, 40px);
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}
.trust__inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.trust__lead {
  font-size: clamp(16px, 2.2vw, 19px); font-weight: 700; color: var(--ink);
  max-width: 720px; margin: 0 auto var(--sp-6); text-wrap: balance;
}
.trust__lead b {
  color: var(--azul); /* fallback de alto contraste si falla el clip */
  background: var(--grad-kicker);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.trust__modes {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--sp-3);
  max-width: 920px; margin: 0 auto;
}
.trust__mode {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--line);
  padding: 10px 18px 10px 12px; border-radius: 40px;
  box-shadow: var(--sh-sm);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.trust__mode:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(28,40,70,.12);
  border-color: color-mix(in srgb, var(--c) 30%, var(--line));
}
.trust__dot {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-ic, var(--c)); color: #fff;
  transition: transform var(--t-base) var(--ease);
}
.trust__dot svg { width: 17px; height: 17px; }
.trust__mode:hover .trust__dot { transform: scale(1.08) rotate(-4deg); }

/* =================================================================
   BANDA CTA (antes del footer)
   ================================================================= */
.cta-band {
  position: relative; overflow: hidden;
  padding: clamp(48px, 7vw, 88px) clamp(18px, 4vw, 40px);
  color: #fff;
  background:
    radial-gradient(110% 130% at 8% 0%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 46%),
    radial-gradient(90% 120% at 100% 100%, rgba(13,40,90,.34) 0%, rgba(13,40,90,0) 52%),
    var(--grad-hero);
}
/* Blobs sutiles que dan profundidad sin recargar */
.cta-band__blob {
  position: absolute; z-index: 0; border-radius: 50%;
  filter: blur(2px); opacity: .45; pointer-events: none;
}
.cta-band__blob--1 {
  width: 300px; height: 300px; top: -120px; right: -60px;
  background: radial-gradient(circle at 35% 35%, rgba(240,138,36,.8), rgba(240,138,36,0) 68%);
  animation: float 15s ease-in-out infinite;
}
.cta-band__blob--2 {
  width: 260px; height: 260px; bottom: -120px; left: -50px;
  background: radial-gradient(circle at 60% 40%, rgba(61,154,85,.7), rgba(61,154,85,0) 66%);
  animation: float 18s ease-in-out infinite reverse;
}
.cta-band__inner {
  position: relative; z-index: 1;
  max-width: 860px; margin: 0 auto; text-align: center;
}
.cta-band__title {
  font-size: clamp(26px, 4.4vw, 40px); font-weight: 800; letter-spacing: -.6px;
  line-height: 1.08; text-wrap: balance;
  text-shadow: 0 4px 24px rgba(13,40,90,.25);
}
.cta-band__sub {
  font-size: clamp(15px, 2.2vw, 18px); font-weight: 500;
  color: rgba(255,255,255,.94); max-width: 560px;
  margin: var(--sp-4) auto var(--sp-6); text-wrap: pretty;
}
.cta-band__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3);
}

/* =================================================================
   FOOTER
   ================================================================= */
.footer {
  position: relative; overflow: hidden;
  color: rgba(255,255,255,.85);
  background: linear-gradient(160deg, #16243B 0%, #1E2C44 55%, var(--gris) 100%);
  padding: clamp(48px, 6vw, 72px) clamp(18px, 4vw, 40px) 28px;
}
.footer__blob {
  position: absolute; top: -120px; right: -100px;
  width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(94,58,168,.32), rgba(94,58,168,0) 68%);
  pointer-events: none;
}
.footer__grid {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
}
.brand--footer .brand__name { color: #fff; }
.brand--footer .brand__sub { color: var(--gris-soft); }
.footer__tag { font-size: 14px; margin: 16px 0 18px; max-width: 320px; }
.footer__social {
  width: 42px; height: 42px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  transition: background var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.footer__social:hover,
.footer__social:focus-visible { background: var(--azul-2); transform: translateY(-3px); }
.footer__social svg { width: 22px; height: 22px; }
.footer__col h3 { color: #fff; font-size: 15px; font-weight: 800; margin-bottom: 16px; }
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col a {
  text-decoration: none; font-size: 14px; color: rgba(255,255,255,.8);
  transition: color var(--t-fast) var(--ease);
  background-image: linear-gradient(var(--naranja), var(--naranja));
  background-size: 0% 1.5px; background-position: 0 100%; background-repeat: no-repeat;
  transition: color var(--t-fast) var(--ease), background-size var(--t-base) var(--ease);
}
.footer__col a:hover,
.footer__col a:focus-visible { color: #fff; background-size: 100% 1.5px; }
.footer__bottom {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 36px auto 0;
  padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,.7);
}
.footer__made { font-weight: 700; color: rgba(255,255,255,.85); }

/* =================================================================
   BOTÓN FLOTANTE WHATSAPP
   ================================================================= */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  /* Glifo blanco centrado: degradado verde oscuro derivado de --wa-d (>=5:1) para que
     ninguna zona del icono caiga sobre el verde claro --wa (2.66:1) — WCAG 2.1 AA 1.4.11 (>=3:1). */
  background: linear-gradient(135deg, #0B7E3B 0%, #0A7738 100%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--wa-d) 90%, #000) 0%, color-mix(in srgb, var(--wa-d) 85%, #000) 100%);
  color: #fff; box-shadow: 0 12px 30px rgba(12,140,66,.45);
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  animation: waPulse 2.6s ease-in-out infinite;
}
.wa-float svg { width: 32px; height: 32px; }
.wa-float:hover,
.wa-float:focus-visible { transform: scale(1.08); box-shadow: 0 16px 38px rgba(12,140,66,.6); }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(12,140,66,.45), 0 0 0 0 rgba(12,140,66,.45); }
  50% { box-shadow: 0 12px 30px rgba(12,140,66,.45), 0 0 0 14px rgba(12,140,66,0); }
}

/* =================================================================
   BARRA DE PROGRESO DE LECTURA (tope de la página)
   ================================================================= */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70;
  height: 3px; pointer-events: none;
  background: transparent;
}
.scroll-progress__bar {
  display: block; height: 100%; width: 0;
  background: var(--grad-line);
  transform-origin: left center;
  transition: width .08s linear;
}

/* =================================================================
   BOTÓN VOLVER ARRIBA
   ================================================================= */
.to-top {
  position: fixed; right: 20px; bottom: 88px; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--azul);
  border: 1px solid var(--line); cursor: pointer;
  box-shadow: var(--sh-lg);
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.92);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease),
              visibility var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.to-top:hover,
.to-top:focus-visible { transform: translateY(-3px) scale(1.06); box-shadow: 0 18px 40px rgba(28,40,70,.2); color: var(--azul); }
.to-top svg { width: 22px; height: 22px; }

/* =================================================================
   BARRA FIJA INFERIOR (solo móvil)
   ================================================================= */
.mobile-bar {
  display: none; /* visible solo en móvil (ver media query) */
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 65;
  gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 28px rgba(28,40,70,.12);
}
.mobile-bar__btn {
  flex: 1 1 0; min-width: 0; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; font-weight: 800; font-size: 15px;
  border-radius: 14px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.mobile-bar__btn svg { width: 19px; height: 19px; flex: 0 0 auto; }
.mobile-bar__btn:active { transform: scale(.98); }
.mobile-bar__btn--quote {
  color: #fff;
  background: linear-gradient(120deg, var(--azul), var(--azul-2) 60%, var(--naranja-strong));
  box-shadow: 0 8px 20px rgba(21,95,196,.34);
}
.mobile-bar__btn--wa {
  color: #fff;
  /* Etiqueta blanca encima: degradado derivado de --wa-d (igual que .btn--wa), >=5:1. */
  background: linear-gradient(135deg, #0B7E3B 0%, #0A7738 100%);
  background: linear-gradient(135deg, color-mix(in srgb, var(--wa-d) 90%, #000) 0%, color-mix(in srgb, var(--wa-d) 85%, #000) 100%);
  box-shadow: 0 8px 20px rgba(12,140,66,.4);
}

/* =================================================================
   FORMULARIO — ESTADOS DE VALIDACIÓN INLINE
   ================================================================= */
/* Mensaje de error por campo (oculto hasta marcar .has-error) */
.field__error {
  display: none;
  font-size: 12.5px; font-weight: 700; color: var(--err-ink);
  margin-top: 2px;
}
.field.has-error .field__error { display: block; }
.field.has-error label { color: var(--err-ink); }
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: color-mix(in srgb, var(--rojo) 55%, #fff);
  background: color-mix(in srgb, var(--rojo) 5%, #fff);
}
.field.has-error input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
  border-color: color-mix(in srgb, var(--rojo) 55%, #fff);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rojo) 14%, transparent);
}
/* Estado válido sutil (campo correcto tras interacción) */
.field.is-valid input,
.field.is-valid select,
.field.is-valid textarea {
  border-color: color-mix(in srgb, var(--verde) 40%, #fff);
}
/* Mensaje de éxito enriquecido */
.form-status.is-ok {
  display: flex; align-items: flex-start; gap: 10px;
}
.form-status__ic {
  flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px;
}
.form-status__ic svg { width: 22px; height: 22px; }

/* Margen de holgura del nav justo por encima del umbral de la hamburguesa
   (981-1080px): con 7 enlaces + CTA + marca el contenido queda muy ajustado.
   Reducir ligeramente la tipografía y el gap mínimo evita que los enlaces se
   toquen o salten de línea si la fuente real (Manrope) carga algo más ancha. */
@media (min-width: 981px) and (max-width: 1080px) {
  .nav__links { gap: clamp(12px, 2vw, 30px); }
  .nav__link { font-size: 14px; }
}

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

/* Tablet */
@media (max-width: 980px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__art { order: -1; max-width: 460px; margin: 0 auto; }
  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .step:not(:last-child)::after { display: none; }
  /* Sin divisor vertical huérfano si las stats hacen wrap (móviles
     grandes / tablets pequeñas, p.ej. 561-620px). */
  .stat + .stat { padding-left: 0; border-left: 0; }
}

/* Menú hamburguesa < 980px (unificado con el breakpoint de layout tablet) */
@media (max-width: 980px) {
  .nav__burger { display: flex; }
  /* Alto del nav exactamente --nav-h en móvil: así el menú se ancla al borde real */
  .nav__inner { padding-top: 0; padding-bottom: 0; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    /* Por encima de la barra fija inferior (65) y la de progreso (70). */
    z-index: 80;
    flex-direction: column; align-items: stretch;
    gap: 4px;
    /* Padding base. En 769-980px la barra fija inferior (.mobile-bar) NO se muestra
       (solo aparece <=768px), así que aquí basta el padding base sin reservar su alto;
       de lo contrario quedaba un hueco vacío grande al final del menú en tablets.
       La reserva del alto de la barra se añade dentro de @media (max-width:768px). */
    padding: 16px clamp(18px, 4vw, 40px) 28px;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(28,40,70,.12);
    /* Limitar la altura y permitir scroll dentro del panel (móvil en horizontal).
       dvh respeta la altura visible real en móviles (barra de URL presente). */
    max-height: calc(100vh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: transform .28s ease, opacity .28s ease, visibility .28s;
  }
  .nav__links.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__link { font-size: 16px; padding: 15px 4px; border-bottom: 1px solid var(--line); }
  .nav__link::after { display: none; }
  .nav__cta { text-align: center; margin-top: 10px; }
}

/* Bloqueo de scroll del body con el menú móvil abierto */
body.menu-open { overflow: hidden; }

/* Móvil */
@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
  .field input,
  .field select,
  .field textarea { font-size: 16px; } /* refuerzo: desactiva el auto-zoom de iOS */
  .hero__actions .btn { flex: 1 1 100%; }
  .cta-band__actions .btn { flex: 1 1 100%; }
  /* Sin divisor vertical huérfano cuando las stats se apilan */
  .stat + .stat { padding-left: 0; border-left: 0; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .wa-float { right: 16px; bottom: 16px; }
  /* Áreas táctiles ~44px en listas de enlaces del footer y contacto */
  .footer__col ul { gap: 4px; }
  .footer__col a { display: inline-block; padding: 8px 0; }
  .contact__list { gap: 8px; }
  .contact__list a { display: inline-block; padding: 6px 0; }
}

/* =================================================================
   BARRA FIJA INFERIOR — activación en móvil (<=768px)
   Debe ir al final para ganar a reglas previas de .wa-float/.to-top.
   ================================================================= */
@media (max-width: 768px) {
  .mobile-bar { display: flex; }
  /* La barra fija inferior SÍ se muestra aquí: el panel del menú reserva su alto
     (+ safe-area) para que el último enlace/CTA no quede oculto tras .mobile-bar. */
  .nav__links {
    padding-bottom: calc(28px + var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px));
  }
  /* Reserva espacio para que la barra no tape el contenido/footer.
     Igualada a la altura real de la barra (--mobile-bar-h) en lugar de 64px,
     que era menor que el alto efectivo (botones 48px + 2x10px padding). */
  body { padding-bottom: calc(var(--mobile-bar-h) + env(safe-area-inset-bottom, 0px)); }
  /* Subir los flotantes por encima de la barra inferior (offsets relativos a la altura real) */
  .wa-float { bottom: calc(var(--mobile-bar-h) + 14px + env(safe-area-inset-bottom, 0px)); right: 16px; }
  .to-top { bottom: calc(var(--mobile-bar-h) + 76px + env(safe-area-inset-bottom, 0px)); right: 16px; }
  /* Con el menú móvil abierto, ocultar la barra inferior: el panel ya reserva su
     espacio y así no compite por la capa en viewports muy cortos (horizontal). */
  body.menu-open .mobile-bar { display: none; }
}

/* Iniciar sesion (Portal Serco) */
.nav__login{display:inline-flex;align-items:center;gap:7px;font-size:14.5px;font-weight:600;color:var(--ink-soft);text-decoration:none;padding:8px 12px;border-radius:9px;transition:color .2s,background .2s}
.nav__login svg{width:17px;height:17px;flex:0 0 auto}
.nav__login:hover,.nav__login:focus-visible{color:var(--azul);background:rgba(21,101,192,.08)}

/* Justificacion de texto (prosa) para mejor visualizacion */
.about__p,.card__desc,.why__desc,.step__desc,.faq__a{text-align:justify;text-justify:inter-word;hyphens:auto;-webkit-hyphens:auto}
