/* =========================================================================
   ECUGT — Landing Page
   assets/css/styles.css
   Hoja de estilos unica. Sin dependencias ni build: CSS3 nativo con
   custom properties, grid/flex y tipografia fluida via clamp().
   Orden: 1) tokens  2) reset  3) utilidades  4) componentes  5) secciones
          6) responsive  7) accesibilidad y animaciones
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. TOKENS DE DISENO
   ------------------------------------------------------------------------- */
:root {
  /* Azules medicos (marca) */
  --brand-950: #082F49;
  --brand-900: #0C4A6E;
  --brand-800: #075985;
  --brand-700: #0369A1;
  --brand-600: #0284C7; /* primario */
  --brand-500: #0EA5E9;
  --brand-400: #38BDF8;
  --brand-100: #E0F2FE;
  --brand-50:  #F0F9FF;

  /* Verde esmeralda (acentos de salud) */
  --accent-700: #047857;
  --accent-600: #059669;
  --accent-500: #10B981;
  --accent-400: #34D399;
  --accent-50:  #ECFDF5;

  /* Neutros */
  --navy:      #0F172A;
  --navy-800:  #1E293B;
  --navy-700:  #334155;
  --ink:       #0F172A;
  --muted:     #475569;
  --muted-soft:#64748B;
  --line:      #E2E8F0;
  --line-soft: #F1F5F9;
  --surface:   #FFFFFF;
  --canvas:    #F8FAFC;

  /* Tipografia fluida */
  --fs-display: clamp(2.05rem, 1.45rem + 2.5vw, 3.4rem);
  --fs-h2:      clamp(1.75rem, 1.28rem + 1.95vw, 2.7rem);
  --fs-h3:      clamp(1.06rem, 0.99rem + 0.3vw, 1.22rem);
  --fs-lead:    clamp(1.02rem, 0.95rem + 0.36vw, 1.2rem);
  --fs-body:    0.975rem;
  --fs-sm:      0.875rem;
  --fs-xs:      0.8rem;

  /* Radios */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  /* Sombras suaves */
  --sh-xs: 0 1px 2px rgba(15, 23, 42, .06);
  --sh-sm: 0 2px 8px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
  --sh-md: 0 10px 24px -8px rgba(15, 23, 42, .12), 0 2px 6px rgba(15, 23, 42, .05);
  --sh-lg: 0 24px 48px -16px rgba(15, 23, 42, .18), 0 6px 14px rgba(15, 23, 42, .06);
  --sh-brand: 0 14px 30px -10px rgba(2, 132, 199, .45);

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(1.15rem, 0.7rem + 1.9vw, 2.5rem);
  --header-h: 92px;
  --section-y: clamp(4rem, 2.6rem + 5.6vw, 7.25rem);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* -------------------------------------------------------------------------
   2. RESET Y BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Compensa el header fijo al saltar por anclas */
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI',
               Helvetica, Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  overflow-x: hidden;
}

/* Bloquea el scroll de fondo con el menu movil abierto */
body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.022em;
  font-weight: 700;
  color: var(--navy);
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--brand-100); color: var(--brand-950); }

/* -------------------------------------------------------------------------
   3. UTILIDADES DE LAYOUT
   ------------------------------------------------------------------------- */
.contenedor {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.seccion { padding-block: var(--section-y); }
.seccion--canvas { background: var(--canvas); }
.seccion--borde-sup { border-top: 1px solid var(--line); }

/* Encabezado de seccion reutilizable */
.encabezado-seccion {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.5rem, 1.8rem + 2.6vw, 3.9rem);
}
.encabezado-seccion--izq { margin-inline: 0; text-align: left; }

.etiqueta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--fs-xs);
  font-weight: 650;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  padding: .34rem .78rem;
  border-radius: var(--r-full);
  margin-bottom: 1.15rem;
}
.etiqueta::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, .18);
}
.etiqueta--acento { color: var(--accent-700); background: var(--accent-50); border-color: #A7F3D0; }
.etiqueta--oscura {
  color: var(--brand-100);
  background: rgba(56, 189, 248, .1);
  border-color: rgba(56, 189, 248, .25);
}

.titulo-seccion { font-size: var(--fs-h2); }

.bajada {
  margin-top: 1rem;
  font-size: var(--fs-lead);
  color: var(--muted);
  line-height: 1.68;
}
.bajada--oscura { color: #94A3B8; }

/* -------------------------------------------------------------------------
   4. COMPONENTES
   ------------------------------------------------------------------------- */

/* --- 4.1 Botones --- */
.boton {
  --b-bg: var(--brand-600);
  --b-fg: #fff;
  --b-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .82rem 1.5rem;
  font-size: var(--fs-sm);
  font-weight: 620;
  letter-spacing: -0.005em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--b-fg);
  background: var(--b-bg);
  border: 1px solid var(--b-bd);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease);
}
.boton:hover { transform: translateY(-1.5px); }
.boton:active { transform: translateY(0); }

.boton--primario { box-shadow: var(--sh-brand); }
.boton--primario:hover { --b-bg: var(--brand-700); box-shadow: 0 18px 34px -12px rgba(2, 132, 199, .55); }

.boton--secundario { --b-bg: #fff; --b-fg: var(--navy); --b-bd: var(--line); box-shadow: var(--sh-sm); }
.boton--secundario:hover { --b-bd: var(--brand-400); --b-fg: var(--brand-700); box-shadow: var(--sh-md); }

.boton--fantasma { --b-bg: transparent; --b-fg: var(--navy); --b-bd: var(--line); }
.boton--fantasma:hover { --b-bg: var(--brand-50); --b-bd: var(--brand-400); --b-fg: var(--brand-700); }

.boton--bloque { width: 100%; }
.boton--grande { padding: .98rem 1.9rem; font-size: .95rem; }

.boton .ico { width: 17px; height: 17px; flex: none; }
.boton--primario:hover .ico-flecha { transform: translateX(3px); }
.ico-flecha { transition: transform .18s var(--ease); }

/* --- 4.2 Tarjeta base --- */
.tarjeta {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.35rem, 1.1rem + 0.7vw, 1.75rem);
  box-shadow: var(--sh-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
              border-color .22s var(--ease);
}
.tarjeta:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
  border-color: #CBD8E8;
}

.tarjeta__titulo {
  font-size: var(--fs-h3);
  margin-bottom: .55rem;
}
.tarjeta__texto { color: var(--muted); font-size: var(--fs-sm); line-height: 1.68; }

/* --- 4.3 Iconos en cuadro --- */
.caja-ico {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: var(--r-md);
  margin-bottom: 1.05rem;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  transition: background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease);
}
.caja-ico .ico { width: 23px; height: 23px; }
.tarjeta:hover .caja-ico { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.caja-ico--acento { color: var(--accent-600); background: var(--accent-50); border-color: #A7F3D0; }
.tarjeta:hover .caja-ico--acento { background: var(--accent-600); border-color: var(--accent-600); }

/* Icono generico */
.ico { width: 20px; height: 20px; stroke-width: 1.75; flex: none; }

/* -------------------------------------------------------------------------
   5. SECCIONES
   ------------------------------------------------------------------------- */

/* --- 5.1 HEADER / NAVEGACION --- */
.cabecera {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease);
}
/* Estado al desplazar (lo activa main.js) */
.cabecera.esta-fija {
  background: rgba(255, 255, 255, .93);
  border-bottom-color: var(--line);
  box-shadow: var(--sh-sm);
}

.cabecera__fila {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

/* Logo: isotipo (imagen) + logotipo (texto) */
.marca { display: inline-flex; align-items: center; gap: .68rem; margin-right: auto; }
.marca__isotipo { width: 80px; height: auto; flex: none; }
.marca__texto { display: flex; flex-direction: column; line-height: 1; }
.marca__nombre {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--brand-900);
}
.marca__descriptor {
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .105em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-top: 3px;
}

/* Navegacion de escritorio */
.nav { display: flex; align-items: center; gap: .15rem; }
.nav__enlace {
  position: relative;
  padding: .5rem .78rem;
  font-size: .875rem;
  font-weight: 550;
  color: var(--muted);
  border-radius: var(--r-sm);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.nav__enlace:hover { color: var(--brand-700); background: var(--brand-50); }
.nav__enlace.esta-activo { color: var(--brand-700); font-weight: 640; }
.nav__enlace.esta-activo::after {
  content: '';
  position: absolute;
  left: .78rem; right: .78rem; bottom: .16rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-600);
}

.cabecera__cta { margin-left: .6rem; }

/* Boton hamburguesa (solo movil) */
.hamburguesa {
  display: none;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.hamburguesa:hover { border-color: var(--brand-400); background: var(--brand-50); }
.hamburguesa__caja { position: relative; width: 18px; height: 12px; }
.hamburguesa__caja span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--navy);
  transition: transform .26s var(--ease), opacity .18s var(--ease), top .26s var(--ease);
}
.hamburguesa__caja span:nth-child(1) { top: 0; }
.hamburguesa__caja span:nth-child(2) { top: 5px; }
.hamburguesa__caja span:nth-child(3) { top: 10px; }
.hamburguesa[aria-expanded='true'] .hamburguesa__caja span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.hamburguesa[aria-expanded='true'] .hamburguesa__caja span:nth-child(2) { opacity: 0; }
.hamburguesa[aria-expanded='true'] .hamburguesa__caja span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

/* Panel de navegacion movil */
.nav-movil {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 99;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  padding: 1rem var(--gutter) 1.5rem;
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  transform: translateY(-14px);
  opacity: 0;
  visibility: hidden;
  /* `visibility` NO se interpola (duracion 0s): solo se retrasa el ocultado
     hasta que termina el desvanecido. Interpolarla dejaba a los hijos con el
     valor heredado obsoleto y el panel se abria sin pintar su contenido. */
  transition: transform .26s var(--ease), opacity .26s var(--ease),
              visibility 0s linear .26s;
}
.nav-movil.esta-abierto {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform .26s var(--ease), opacity .26s var(--ease),
              visibility 0s linear 0s;
}
.nav-movil__enlace {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .86rem .25rem;
  font-size: 1rem;
  font-weight: 560;
  color: var(--navy);
  border-bottom: 1px solid var(--line-soft);
}
.nav-movil__enlace .ico { width: 16px; height: 16px; color: var(--muted-soft); }
.nav-movil__enlace.esta-activo { color: var(--brand-700); }
.nav-movil__cta { margin-top: 1.25rem; }

/* Velo detras del panel movil */
.velo {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 98;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .26s var(--ease), visibility 0s linear .26s;
}
.velo.esta-abierto {
  opacity: 1;
  visibility: visible;
  transition: opacity .26s var(--ease), visibility 0s linear 0s;
}

/* --- 5.2 HERO --- */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(2.75rem, 1.8rem + 4vw, 5rem));
  padding-bottom: clamp(3rem, 2.2rem + 3vw, 4.5rem);
  background:
    radial-gradient(64rem 34rem at 12% -12%, #E0F2FE 0%, rgba(224, 242, 254, 0) 62%),
    radial-gradient(48rem 30rem at 92% 6%, #ECFDF5 0%, rgba(236, 253, 245, 0) 58%),
    linear-gradient(180deg, #FBFDFF 0%, #FFFFFF 100%);
  overflow: hidden;
}
/* Retícula tenue de fondo */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(2, 132, 199, .055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(2, 132, 199, .055) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(70% 55% at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 55% at 50% 30%, #000 0%, transparent 78%);
  pointer-events: none;
}
.hero > .contenedor { position: relative; z-index: 1; }

.hero__rejilla {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr);
  gap: clamp(2.5rem, 1.5rem + 4vw, 4.25rem);
  align-items: center;
}

.hero__titulo { font-size: var(--fs-display); letter-spacing: -0.035em; }
.hero__resalte {
  background: linear-gradient(100deg, var(--brand-600) 8%, var(--accent-600) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__bajada {
  margin-top: 1.35rem;
  font-size: var(--fs-lead);
  color: var(--muted);
  line-height: 1.7;
  max-width: 34rem;
}
.hero__acciones {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2.1rem;
}

/* Indicadores destacados */
.indicadores {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .55rem;
  margin-top: 2.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.indicador {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: var(--fs-xs);
  font-weight: 560;
  color: var(--navy-700);
  background: rgba(255, 255, 255, .8);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: .4rem .8rem .4rem .5rem;
  box-shadow: var(--sh-xs);
}
.indicador .ico {
  width: 15px; height: 15px;
  padding: 2px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent-600);
  stroke-width: 3;
}

/* --- 5.2.1 Mockup de aplicacion (visual del hero) --- */
.mockup {
  position: relative;
  border-radius: var(--r-xl);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-7deg) rotateX(2.5deg);
  transition: transform .5s var(--ease);
}
.mockup:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg) translateY(-4px); }

.mockup__barra {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem .9rem;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.mockup__punto { width: 9px; height: 9px; border-radius: 50%; background: #CBD5E1; }
.mockup__punto:nth-child(1) { background: #FCA5A5; }
.mockup__punto:nth-child(2) { background: #FCD34D; }
.mockup__punto:nth-child(3) { background: #6EE7B7; }
.mockup__url {
  margin-left: .5rem;
  flex: 1;
  font-size: .66rem;
  font-weight: 560;
  color: var(--muted-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: .22rem .7rem;
  text-align: center;
  letter-spacing: .01em;
}
.mockup__cuerpo { padding: 1.05rem; display: grid; gap: .8rem; }

.mockup__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.kpi {
  background: linear-gradient(180deg, #fff 0%, var(--canvas) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: .65rem .7rem;
}
.kpi__etq { font-size: .6rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-soft); }
.kpi__valor { font-size: 1.22rem; font-weight: 750; color: var(--navy); letter-spacing: -0.03em; margin-top: .12rem; }
.kpi__delta { font-size: .62rem; font-weight: 650; color: var(--accent-600); }

.mockup__panel {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.mockup__panel-cab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .75rem;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  font-size: .68rem;
  font-weight: 680;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.mockup__panel-cab span:last-child { font-weight: 560; color: var(--muted-soft); }

.turno {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .52rem .75rem;
  border-bottom: 1px solid var(--line-soft);
}
.turno:last-child { border-bottom: 0; }
.turno__hora {
  font-size: .64rem;
  font-weight: 680;
  color: var(--brand-700);
  background: var(--brand-50);
  border-radius: 5px;
  padding: .16rem .38rem;
  flex: none;
}
.turno__datos { flex: 1; min-width: 0; }
.turno__nombre {
  display: block;
  font-size: .715rem;
  font-weight: 620;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.turno__esp { display: block; font-size: .625rem; color: var(--muted-soft); line-height: 1.3; }
.chip {
  font-size: .575rem;
  font-weight: 680;
  letter-spacing: .02em;
  padding: .2rem .5rem;
  border-radius: var(--r-full);
  flex: none;
  white-space: nowrap;
}
.chip--verde { color: var(--accent-700); background: var(--accent-50); border: 1px solid #A7F3D0; }
.chip--azul  { color: var(--brand-700); background: var(--brand-50); border: 1px solid var(--brand-100); }
.chip--ambar { color: #B45309; background: #FFFBEB; border: 1px solid #FDE68A; }

/* Burbuja flotante del asistente IA */
.burbuja-ia {
  position: absolute;
  right: -14px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: .58rem;
  max-width: 236px;
  padding: .62rem .85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  animation: flotar 5.5s ease-in-out infinite;
}
.burbuja-ia__ico {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  flex: none;
}
.burbuja-ia__ico .ico { width: 17px; height: 17px; }
/* Los <span> internos deben apilarse: si quedan en linea el texto se mezcla */
.burbuja-ia__tit { display: block; font-size: .69rem; font-weight: 700; color: var(--navy); line-height: 1.25; }
.burbuja-ia__txt { display: block; font-size: .63rem; color: var(--muted-soft); line-height: 1.35; margin-top: 2px; }

@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

/* --- 5.3 QUE ES ECUGT --- */
.rejilla-pilares {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.15rem;
}

/* --- 5.4 MODULOS --- */
.rejilla-modulos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 1.15rem;
}
/* En pantallas anchas se fuerzan 4 columnas: los 8 modulos quedan en dos
   filas completas y se evita la fila final desbalanceada (3 + 3 + 2). */
@media (min-width: 1160px) {
  .rejilla-modulos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tarjeta-modulo { display: flex; flex-direction: column; }
.tarjeta-modulo__cab {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.tarjeta-modulo__num {
  font-size: .74rem;
  font-weight: 750;
  color: #CBD5E1;
  letter-spacing: -0.02em;
  transition: color .22s var(--ease);
}
.tarjeta-modulo:hover .tarjeta-modulo__num { color: var(--brand-400); }
/* Filo superior que aparece al pasar el cursor */
.tarjeta-modulo::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: linear-gradient(90deg, var(--brand-600), var(--accent-500));
  opacity: 0;
  transition: opacity .22s var(--ease);
}
.tarjeta-modulo:hover::before { opacity: 1; }

/* --- 5.5 BENEFICIOS (banda oscura) --- */
.beneficios {
  position: relative;
  background:
    radial-gradient(52rem 30rem at 82% 0%, rgba(2, 132, 199, .32) 0%, rgba(2, 132, 199, 0) 60%),
    radial-gradient(44rem 26rem at 8% 100%, rgba(5, 150, 105, .24) 0%, rgba(5, 150, 105, 0) 62%),
    var(--navy);
  color: #E2E8F0;
  overflow: hidden;
}
.beneficios::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, .07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, .07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(78% 70% at 50% 40%, #000 0%, transparent 82%);
  -webkit-mask-image: radial-gradient(78% 70% at 50% 40%, #000 0%, transparent 82%);
  pointer-events: none;
}
.beneficios > .contenedor { position: relative; z-index: 1; }
.beneficios .titulo-seccion { color: #fff; }

.rejilla-beneficios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
  gap: 1.15rem;
}
.tarjeta-beneficio {
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: var(--r-lg);
  padding: 1.6rem 1.45rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .22s var(--ease), background-color .22s var(--ease),
              border-color .22s var(--ease);
}
.tarjeta-beneficio:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, .09);
  border-color: rgba(56, 189, 248, .42);
}
.tarjeta-beneficio .caja-ico {
  background: rgba(56, 189, 248, .13);
  border-color: rgba(56, 189, 248, .28);
  color: var(--brand-400);
}
.tarjeta-beneficio:hover .caja-ico { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.tarjeta-beneficio__metrica {
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.7rem);
  font-weight: 780;
  letter-spacing: -0.042em;
  line-height: 1;
  color: #fff;
  margin-bottom: .45rem;
}
.tarjeta-beneficio__metrica .unidad {
  background: linear-gradient(100deg, var(--brand-400), var(--accent-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tarjeta-beneficio__titulo { font-size: var(--fs-h3); color: #fff; margin-bottom: .45rem; }
.tarjeta-beneficio__texto { font-size: var(--fs-sm); color: #94A3B8; line-height: 1.66; }

/* --- 5.6 SEGURIDAD --- */
.seguridad__rejilla {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: clamp(2.25rem, 1.4rem + 3.6vw, 4rem);
  align-items: center;
}
.lista-seguridad { display: grid; gap: 1rem; }
.item-seguridad {
  display: flex;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xs);
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease),
              transform .22s var(--ease);
}
.item-seguridad:hover { border-color: #CBD8E8; box-shadow: var(--sh-md); transform: translateX(3px); }
.item-seguridad .caja-ico { margin-bottom: 0; width: 42px; height: 42px; }
.item-seguridad__titulo { font-size: .975rem; font-weight: 680; margin-bottom: .28rem; }
.item-seguridad__texto { font-size: var(--fs-sm); color: var(--muted); line-height: 1.62; }

/* Panel visual de escudo + roles */
.panel-escudo {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 1.4rem + 2.4vw, 3rem) 1.5rem;
  background:
    radial-gradient(34rem 22rem at 50% 8%, rgba(2, 132, 199, .12) 0%, rgba(2, 132, 199, 0) 68%),
    linear-gradient(180deg, #F8FBFF 0%, #F1F7FD 100%);
  border: 1px solid var(--brand-100);
  border-radius: var(--r-xl);
  overflow: hidden;
}
/* Ondas concentricas */
.panel-escudo::before,
.panel-escudo::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -50%;
  border: 1px solid rgba(2, 132, 199, .16);
  border-radius: 50%;
  pointer-events: none;
}
.panel-escudo::before { width: 258px; height: 258px; }
.panel-escudo::after  { width: 360px; height: 360px; border-color: rgba(2, 132, 199, .1); }

.escudo-ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px; height: 104px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 22px 44px -14px rgba(2, 132, 199, .6);
  margin-bottom: 1.6rem;
}
.escudo-ico .ico { width: 50px; height: 50px; stroke-width: 1.5; }

.panel-escudo__titulo {
  position: relative;
  font-size: .8rem;
  font-weight: 650;
  letter-spacing: .075em;
  text-transform: uppercase;
  color: var(--muted-soft);
  text-align: center;
  margin-bottom: .95rem;
}
.roles {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  max-width: 400px;
}
.rol {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--fs-xs);
  font-weight: 580;
  color: var(--navy-700);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: .42rem .82rem;
  box-shadow: var(--sh-xs);
  transition: transform .18s var(--ease), border-color .18s var(--ease),
              color .18s var(--ease);
}
.rol:hover { transform: translateY(-2px); border-color: var(--brand-400); color: var(--brand-700); }
.rol .ico { width: 14px; height: 14px; color: var(--brand-600); }

/* --- 5.7 CONTACTO --- */
.contacto { background: var(--canvas); }
.contacto__rejilla {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);
  align-items: start;
}

.contacto__ventajas { display: grid; gap: .95rem; margin-top: 2rem; }
.ventaja { display: flex; align-items: flex-start; gap: .7rem; font-size: var(--fs-sm); color: var(--muted); }
.ventaja .ico {
  width: 19px; height: 19px;
  padding: 3px;
  border-radius: 50%;
  color: #fff;
  background: var(--accent-600);
  stroke-width: 3;
  margin-top: 1px;
}
.ventaja strong { color: var(--navy); font-weight: 650; }

/* Formulario */
.formulario {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: clamp(1.4rem, 1rem + 1.5vw, 2.1rem);
  box-shadow: var(--sh-md);
}
.formulario__rejilla {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.05rem;
}
.campo { display: flex; flex-direction: column; gap: .4rem; }
.campo--ancho { grid-column: 1 / -1; }

.campo__etiqueta { font-size: var(--fs-xs); font-weight: 640; color: var(--navy); letter-spacing: -0.005em; }
.campo__etiqueta .req { color: #DC2626; margin-left: 1px; }
.campo__opcional { color: var(--muted-soft); font-weight: 500; }

.campo__control {
  width: 100%;
  padding: .72rem .9rem;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease);
  appearance: none;
}
.campo__control::placeholder { color: #94A3B8; }
.campo__control:hover { border-color: #CBD5E1; }
.campo__control:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3.5px rgba(14, 165, 233, .16);
}
textarea.campo__control { resize: vertical; min-height: 104px; line-height: 1.6; }

/* Flecha del select */
select.campo__control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.4rem;
  cursor: pointer;
}

/* Estado de error */
.campo__control.tiene-error { border-color: #EF4444; background: #FEF2F2; }
.campo__control.tiene-error:focus { box-shadow: 0 0 0 3.5px rgba(239, 68, 68, .15); }
.campo__error {
  display: none;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 550;
  color: #DC2626;
}
.campo__error.esta-visible { display: flex; }

.formulario__pie {
  margin-top: 1.4rem;
  display: grid;
  gap: .85rem;
  justify-items: center;
}
.formulario__nota {
  font-size: var(--fs-xs);
  color: var(--muted-soft);
  text-align: center;
  line-height: 1.5;
}

/* Mensaje de exito */
.exito {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(2rem, 1.4rem + 2vw, 3.25rem) 1.5rem;
}
.exito.esta-visible { display: flex; }
.formulario.esta-enviado .formulario__contenido { display: none; }
.exito__ico {
  display: grid;
  place-items: center;
  width: 62px; height: 62px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--accent-500), var(--accent-700));
  box-shadow: 0 16px 32px -12px rgba(5, 150, 105, .6);
  margin-bottom: 1.25rem;
  animation: aparecer-pop .45s var(--ease) both;
}
.exito__ico .ico { width: 30px; height: 30px; stroke-width: 2.6; }
.exito__titulo { font-size: 1.28rem; margin-bottom: .55rem; }
.exito__texto { font-size: var(--fs-sm); color: var(--muted); max-width: 32rem; line-height: 1.66; }
.exito__boton { margin-top: 1.5rem; }

@keyframes aparecer-pop {
  0%   { transform: scale(.55); opacity: 0; }
  60%  { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- 5.8 FOOTER --- */
.pie {
  background: var(--navy);
  color: #94A3B8;
  padding-top: clamp(3rem, 2.2rem + 3vw, 4.5rem);
  padding-bottom: 1.75rem;
}
.pie__rejilla {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, .18);
}

/* Marca en fondo oscuro: el isotipo va sobre pastilla clara */
.pie .marca__isotipo {
  width: 64px;
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .5);
}
.pie .marca__nombre { color: #fff; }
.pie .marca__descriptor { color: #64748B; }

.pie__desc { margin-top: 1.15rem; font-size: var(--fs-sm); line-height: 1.66; max-width: 30rem; }
.pie__insignias { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.35rem; }
.insignia {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  font-weight: 600;
  color: #CBD5E1;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: var(--r-full);
  padding: .34rem .72rem;
}
.insignia .ico { width: 13px; height: 13px; color: var(--accent-400); }

.pie__titulo {
  font-size: .78rem;
  font-weight: 680;
  letter-spacing: .085em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.1rem;
}
.pie__lista { display: grid; gap: .68rem; }
.pie__enlace {
  font-size: var(--fs-sm);
  color: #94A3B8;
  transition: color .16s var(--ease), padding-left .16s var(--ease);
}
.pie__enlace:hover { color: var(--brand-400); padding-left: 3px; }

.pie__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  padding-top: 1.75rem;
  font-size: var(--fs-xs);
  color: #64748B;
}
.pie__legal { display: flex; flex-wrap: wrap; gap: .45rem 1.15rem; }
.pie__legal a { transition: color .16s var(--ease); }
.pie__legal a:hover { color: var(--brand-400); }

/* Boton volver arriba */
.ir-arriba {
  position: fixed;
  right: clamp(1rem, .5rem + 1.6vw, 1.85rem);
  bottom: clamp(1rem, .5rem + 1.6vw, 1.85rem);
  z-index: 90;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  color: #fff;
  background: var(--brand-600);
  border: 0;
  border-radius: 50%;
  box-shadow: var(--sh-brand);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.9);
  transition: opacity .25s var(--ease), transform .25s var(--ease),
              visibility 0s linear .25s, background-color .18s var(--ease);
}
.ir-arriba.esta-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity .25s var(--ease), transform .25s var(--ease),
              visibility 0s linear 0s, background-color .18s var(--ease);
}
.ir-arriba:hover { background: var(--brand-700); transform: translateY(-2px) scale(1.04); }

/* -------------------------------------------------------------------------
   6. RESPONSIVE
   ------------------------------------------------------------------------- */

/* Tablet grande: el hero pasa a una columna */
@media (max-width: 1000px) {
  .hero__rejilla { grid-template-columns: 1fr; gap: 3rem; }
  .hero__bajada { max-width: 46rem; }
  .mockup { transform: none; max-width: 560px; margin-inline: auto; }
  .mockup:hover { transform: translateY(-4px); }
  .burbuja-ia { right: 4px; }
  .seguridad__rejilla,
  .contacto__rejilla { grid-template-columns: 1fr; }
  .panel-escudo { order: -1; }
  .pie__rejilla { grid-template-columns: 1fr 1fr; }
  .pie__marca-col { grid-column: 1 / -1; }
}

/* Punto de quiebre de la navegacion */
@media (max-width: 880px) {
  .nav, .cabecera__cta { display: none; }
  .hamburguesa { display: flex; }
}

/* Movil */
@media (max-width: 640px) {
  :root { --header-h: 82px; }
  .marca__isotipo { width: 64px; }
  .marca__nombre { font-size: 1.2rem; }
  .marca__descriptor { font-size: .58rem; letter-spacing: .085em; }

  .hero__acciones { flex-direction: column; align-items: stretch; }
  .hero__acciones .boton { width: 100%; }
  .indicadores { gap: .45rem; }

  .mockup__kpis { grid-template-columns: 1fr; }
  .burbuja-ia { position: static; max-width: none; margin-top: .85rem; animation: none; }

  .formulario__rejilla { grid-template-columns: 1fr; }
  .formulario__pie .boton { width: 100%; }

  .pie__rejilla { grid-template-columns: 1fr; gap: 2.25rem; }
  .pie__base { justify-content: center; text-align: center; }
  .pie__legal { justify-content: center; }
}

@media (max-width: 380px) {
  .marca__descriptor { display: none; }
}

/* -------------------------------------------------------------------------
   7. ACCESIBILIDAD Y ANIMACIONES
   ------------------------------------------------------------------------- */

/* Salto al contenido para lectores de pantalla / teclado */
.salto-contenido {
  position: absolute;
  left: 50%;
  top: -100px;
  translate: -50% 0;
  z-index: 200;
  padding: .7rem 1.25rem;
  font-size: var(--fs-sm);
  font-weight: 620;
  color: #fff;
  background: var(--brand-700);
  border-radius: 0 0 var(--r-md) var(--r-md);
  transition: top .2s var(--ease);
}
.salto-contenido:focus { top: 0; }

/* Solo para lectores de pantalla */
.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;
}

/* Foco visible coherente en toda la pagina */
:focus-visible {
  outline: 2.5px solid var(--brand-500);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.campo__control:focus-visible { outline: none; }

/* Revelado al hacer scroll (lo activa main.js).
   El estado oculto se aplica SOLO si hay JavaScript (clase .js en <html>):
   sin JS el contenido se ve siempre, nunca queda invisible. */
.js .revelar {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.js .revelar.esta-visible { opacity: 1; transform: none; }

/* Respeta la preferencia de menos movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Se anula la transicion por completo en lugar de acortarla: al forzar solo
     `transition-duration` seguia transicionandose `visibility` (la propiedad
     inicial es `all`) y los descendientes del menu movil conservaban el valor
     heredado obsoleto, quedando sin pintar. */
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .js .revelar { opacity: 1; transform: none; }
  .mockup { transform: none; }
}

/* Impresion */
@media print {
  .cabecera, .nav-movil, .velo, .ir-arriba, .hero__acciones, .formulario { display: none !important; }
  body { color: #000; }
  .beneficios, .pie { background: #fff !important; color: #000 !important; }
}
