/* Sitio de NEXA MHG COLOMBIA S.A.S. (nexamhgcolombia.com). Diseño "D": página clara en verde menta, con luces que
   flotan, una portada en panel verde azulado con ilustración propia, tarjetas de producto con la identidad de cada app y
   tarjetas de servicio con color propio.
   Letras: Barlow y Barlow Condensed (SIL Open Font License, fuentes/LICENCIA.txt), servidas desde el propio sitio.
   Accesibilidad: nada se dice solo con color, y todo texto cumple 4,5:1 sobre su fondo. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("/fuentes/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("/fuentes/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("/fuentes/barlow-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url("/fuentes/barlow-condensed-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url("/fuentes/barlow-condensed-700.woff2") format("woff2"); }

:root {
  --fondo: #eef7f2;
  --tinta: #0b1220;
  --tinta-suave: #334155;
  --linea: rgba(15, 23, 42, 0.1);
  --acento: #0e5a55;
  --acento-fuerte: #0b3d3b;
  --sobre-acento: #ffffff;
  --profundo-1: #0b3d3b;
  --profundo-2: #0e5a55;
  --profundo-3: #0f6b60;
  --sobre-profundo: #ffffff;
  --sobre-profundo-suave: #e6f7f2;
  --foco: #b45309;
  --texto: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --titulos: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --ancho: 1180px;
  --curva: cubic-bezier(0.16, 1, 0.3, 1);
  --vidrio: linear-gradient(160deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.56));
  --sombra: 0 24px 56px -28px rgba(15, 23, 42, 0.3);
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  scrollbar-color: #7a9b90 var(--fondo);
}

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  caret-color: var(--acento);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--acento); color: var(--sobre-acento); }
img, svg { max-width: 100%; }

a { color: var(--acento); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--acento-fuerte); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--foco); outline-offset: 3px; border-radius: 6px; }

.saltar {
  position: absolute; left: 16px; top: -60px; z-index: 30;
  padding: 10px 16px; background: #ffffff; color: var(--tinta); border-radius: 8px;
}
.saltar:focus { top: 12px; }

.visualmente-oculto {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.ancho { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 {
  font-family: var(--titulos); font-weight: 700; line-height: 1.04; letter-spacing: -0.01em;
  text-wrap: balance; margin: 0 0 14px;
}
h1 { font-size: clamp(2.6rem, 5.6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.55rem; font-weight: 600; line-height: 1.12; }
p { margin: 0 0 14px; text-wrap: pretty; }

/* ── Luces de fondo: verde menta, verde agua y celeste que flotan despacio (sin ámbar, que con verde se confunde) ── */
.fondo-luces { position: absolute; inset: 0 0 auto 0; height: 1100px; z-index: -1; overflow: hidden; pointer-events: none; }
.fondo-luces span { position: absolute; border-radius: 50%; filter: blur(80px); animation: flotar 18s ease-in-out infinite alternate; }
.fondo-luces span:nth-child(1) { width: 560px; height: 560px; background: rgba(52, 211, 153, 0.34); top: -160px; left: -120px; }
.fondo-luces span:nth-child(2) { width: 480px; height: 480px; background: rgba(45, 212, 191, 0.3); top: -120px; right: -140px; animation-delay: -6s; }
.fondo-luces span:nth-child(3) { width: 380px; height: 380px; background: rgba(56, 189, 248, 0.22); top: 420px; left: 40%; animation-delay: -11s; }
@keyframes flotar { to { transform: translate3d(40px, 30px, 0) scale(1.08); } }

body { position: relative; isolation: isolate; }

/* ── Cabecera clara ── */
.barra {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 76px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px;
}
.marca {
  display: inline-flex; align-items: center; gap: 10px; color: var(--tinta); text-decoration: none;
  font-family: var(--titulos); font-weight: 700; font-size: 1.375rem; letter-spacing: 0.04em;
}
.marca:hover { color: var(--tinta); }
.marca svg { width: 34px; height: 34px; }
.menu { display: flex; flex-wrap: wrap; gap: 2px 22px; }
.menu a { color: var(--tinta-suave); text-decoration: none; padding: 12px 0; font-weight: 600; font-size: 0.975rem; }
.menu a:hover, .menu a[aria-current="page"] {
  color: var(--tinta); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px;
}

/* ── Botones ── */
.botones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 12px 24px;
  border-radius: 999px; font-family: var(--texto); font-weight: 600; font-size: 1rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.25s var(--curva);
}
.boton:active { transform: translateY(1px); }
.boton svg { width: 20px; height: 20px; flex-shrink: 0; }
.boton-acento { background: var(--acento); color: var(--sobre-acento); }
.boton-acento:hover { background: var(--acento-fuerte); color: var(--sobre-acento); }
.boton-linea { border-color: var(--acento); color: var(--acento); background: rgba(255, 255, 255, 0.6); }
.boton-linea:hover { background: var(--acento); color: var(--sobre-acento); }
.boton-blanco { background: #ffffff; color: var(--profundo-1); }
.boton-blanco:hover { background: #dff3ec; color: var(--profundo-1); }
.boton-claro { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.6); color: #ffffff; }
.boton-claro:hover { background: rgba(255, 255, 255, 0.18); color: #ffffff; }

/* ── Panel profundo: portada, franja de Nosotros y llamada final ── */
.profundo {
  position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; color: var(--sobre-profundo);
  background: linear-gradient(150deg, var(--profundo-1) 0%, var(--profundo-2) 55%, var(--profundo-3) 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 40px 80px -40px rgba(11, 61, 59, 0.65);
}
.profundo::before, .profundo::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
}
.profundo::before {
  width: 520px; height: 520px; right: -140px; top: -220px;
  background: radial-gradient(circle, rgba(110, 231, 183, 0.45), transparent 65%);
  animation: flotar 16s ease-in-out infinite alternate;
}
.profundo::after {
  width: 440px; height: 440px; left: -160px; bottom: -240px;
  background: radial-gradient(circle, rgba(125, 211, 252, 0.35), transparent 65%);
  animation: flotar 20s ease-in-out infinite alternate-reverse;
}
.profundo h1, .profundo h2 { color: var(--sobre-profundo); }
.profundo p { color: var(--sobre-profundo-suave); }
.profundo a:not(.boton) { color: #ffffff; }

.portada { margin-top: 20px; padding: 84px 40px 76px; text-align: center; }
.portada h1 { max-width: 21ch; margin: 0 auto; }
.portada .lema { margin: 22px auto 0; max-width: 58ch; font-size: 1.15rem; }
.portada .botones { justify-content: center; }
.ilustracion {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 38% 55% at 50% 48%, transparent 0%, transparent 55%, #000 100%);
  mask-image: radial-gradient(ellipse 38% 55% at 50% 48%, transparent 0%, transparent 55%, #000 100%);
}
.ilustracion img { width: 100%; height: 100%; object-fit: cover; }
/* En el celular la ilustración queda recortada y sus nodos tocan los botones: ahí no se muestra. */
@media (max-width: 680px) { .ilustracion { display: none; } }

/* ── Secciones ── */
section.bloque { padding: 72px 0 8px; }
.encabezado-bloque { display: grid; gap: 8px 48px; margin-bottom: 30px; }
@media (min-width: 900px) {
  .encabezado-bloque { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
}
.encabezado-bloque h2 { margin: 0; }
.encabezado-bloque p { color: var(--tinta-suave); margin: 0; max-width: 52ch; }

/* ── Tarjetas de producto con la identidad de cada app ── */
.apps { display: grid; gap: 18px; }
@media (min-width: 760px) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tarjeta-app {
  position: relative; overflow: hidden; isolation: isolate; min-height: 270px; padding: 26px; border-radius: 26px;
  display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--texto-app);
  background: linear-gradient(140deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: 0 24px 50px -26px rgba(15, 23, 42, 0.45);
  transition: transform 0.45s var(--curva), box-shadow 0.45s;
}
a.tarjeta-app:hover { color: var(--texto-app); transform: translateY(-6px); box-shadow: 0 34px 60px -26px rgba(15, 23, 42, 0.55); }
.tarjeta-app .imagen {
  position: absolute; inset: 0; z-index: -1; background: var(--fondo-img); opacity: 0.55;
  transition: transform 0.8s var(--curva), opacity 0.45s;
  -webkit-mask-image: linear-gradient(110deg, transparent 30%, #000 75%);
  mask-image: linear-gradient(110deg, transparent 30%, #000 75%);
}
a.tarjeta-app:hover .imagen { transform: scale(1.06); opacity: 0.75; }
.tarjeta-app .cabeza { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tarjeta-app .cabeza > img, .tarjeta-app .cabeza > svg {
  width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.4);
}
.tarjeta-app h3 { font-size: 2.4rem; font-weight: 700; line-height: 1; margin: auto 0 0; color: var(--texto-app); }
.tarjeta-app p { color: var(--suave-app); max-width: 36ch; margin: 0; }
.tarjeta-app .ir {
  font-weight: 600; color: var(--texto-app); border-bottom: 2px solid var(--acento-app);
  align-self: flex-start; padding-bottom: 2px; transition: transform 0.3s var(--curva);
}
a.tarjeta-app:hover .ir { transform: translateX(4px); }
.tarjeta-app .nota-app { font-size: 0.95rem; color: var(--suave-app); }
/* Los enlaces dentro de una tarjeta oscura toman el color claro de la tarjeta, no el verde de la página. */
.tarjeta-app .nota-app a { color: var(--texto-app); font-weight: 600; text-decoration: underline; text-decoration-color: var(--acento-app); text-decoration-thickness: 2px; }

/* Estado de cada producto: con palabra y su ícono, no solo con color. */
.estado {
  display: inline-flex; align-items: center; gap: 7px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 3px 11px 3px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.4); color: inherit;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.estado svg { width: 15px; height: 15px; flex-shrink: 0; }

/* ── Tarjetas de servicio y de misión: fondo claro teñido, franja y placa de color ── */
.servicios-color { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .servicios-color { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .servicios-color { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.serv-color {
  position: relative; overflow: hidden; padding: 26px 24px 28px; border-radius: 24px;
  background: linear-gradient(165deg, var(--tinte) 0%, #ffffff 115%);
  box-shadow: 0 20px 44px -26px rgba(15, 23, 42, 0.35); transition: transform 0.4s var(--curva), box-shadow 0.4s;
}
.serv-color:hover { transform: translateY(-5px); box-shadow: 0 28px 54px -26px rgba(15, 23, 42, 0.45); }
/* Ícono y título en la misma línea: el color de la placa identifica la tarjeta sin apilarse encima del título. */
.serv-color .titulo-serv { display: flex; align-items: center; gap: 14px; margin: 6px 0 12px; }
.serv-color .titulo-serv h3 { margin: 0; }
.serv-color .placa {
  display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; background: var(--fuerte);
  color: #ffffff; box-shadow: 0 10px 22px -10px var(--fuerte); transition: transform 0.4s var(--curva);
}
.serv-color:hover .placa { transform: rotate(-6deg) scale(1.05); }
.serv-color .placa svg { width: 26px; height: 26px; }
.serv-color h3 { color: var(--tinta); }
.serv-color p { color: var(--tinta-suave); margin: 0 0 10px; }
.serv-color p:last-child { margin-bottom: 0; }
.puntos { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.puntos li { display: flex; align-items: flex-start; gap: 8px; color: var(--tinta); font-weight: 600; font-size: 0.95rem; line-height: 1.35; }
.puntos svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; padding: 2px; border-radius: 50%; background: var(--fuerte); color: #ffffff; }

.dos { display: grid; gap: 18px; }
@media (min-width: 800px) { .dos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mas { margin-top: 18px; font-weight: 600; }
.separado { margin-top: 18px; }

/* ── Vidrio claro: empresa, contacto, historia ── */
.vidrio {
  background: var(--vidrio); border-radius: 24px;
  box-shadow: inset 0 1px 0 #ffffff, var(--sombra);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
}

.empresa { padding: 40px; }
.empresa p { color: var(--tinta-suave); max-width: 62ch; }
.datos { display: grid; gap: 18px 40px; margin: 26px 0 0; padding-top: 24px; border-top: 1px solid var(--linea); }
@media (min-width: 760px) { .datos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.datos dt { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tinta-suave); }
.datos dd { margin: 4px 0 0; font-family: var(--titulos); font-size: 1.45rem; font-weight: 600; line-height: 1.2; }

/* ── Contacto ── */
.contacto-rejilla { display: grid; gap: 28px; }
@media (min-width: 900px) { .contacto-rejilla { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; } }
.vias-tarjeta { padding: 32px; }
.vias-tarjeta > p { color: var(--tinta-suave); }
.vias { list-style: none; margin: 18px 0 0; padding: 0; }
.vias li { padding: 14px 0; border-top: 1px solid var(--linea); }
.vias span { display: block; font-size: 0.875rem; color: var(--tinta-suave); font-weight: 600; }
.vias a { font-family: var(--titulos); font-size: 1.45rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.vias a:hover { text-decoration: underline; }

form.contacto { display: grid; gap: 18px; padding: 32px; }
form.contacto > p { color: var(--tinta-suave); font-size: 0.9375rem; margin: 0; }
.campo { display: grid; gap: 6px; }
.campo label { font-weight: 600; }
.campo small { color: var(--tinta-suave); font-size: 0.875rem; }
.campo input, .campo select, .campo textarea {
  font: inherit; font-size: 1rem; padding: 12px 14px; border-radius: 12px; border: 1px solid #64748b;
  background: #ffffff; color: var(--tinta); min-height: 50px; transition: border-color 0.2s;
}
.campo input:hover, .campo select:hover, .campo textarea:hover { border-color: var(--tinta); }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { border-color: var(--acento); }
.campo textarea { min-height: 130px; resize: vertical; }
.error-form { color: #b42318; font-weight: 600; }

/* ── Nosotros ── */
.cabecera-pagina { margin-top: 20px; padding: 64px 40px 60px; }
.cabecera-pagina h1 { max-width: 18ch; }
.cabecera-pagina p { max-width: 60ch; font-size: 1.15rem; margin: 0; }
.historia { list-style: none; margin: 0; padding: 12px 32px; }
.historia li { display: grid; gap: 4px 32px; padding: 22px 0; border-top: 1px solid var(--linea); }
.historia li:first-child { border-top: 0; }
@media (min-width: 760px) { .historia li { grid-template-columns: 220px minmax(0, 1fr); } }
.historia time { font-family: var(--titulos); font-size: 1.5rem; font-weight: 600; color: var(--acento); font-variant-numeric: tabular-nums; }
.historia h3 { font-size: 1.375rem; margin-bottom: 4px; }
.historia p { color: var(--tinta-suave); margin: 0; max-width: 62ch; }
.llamada { margin: 72px 0 0; padding: 56px 40px; text-align: center; }
.llamada p { max-width: 52ch; margin: 0 auto; }
.llamada .botones { justify-content: center; }

/* ── Pie ── */
.pie { margin-top: 80px; background: var(--profundo-1); color: var(--sobre-profundo-suave); padding: 26px 0; font-size: 0.8125rem; line-height: 1.5; }
.pie .ancho { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.pie a { color: #ffffff; }
.pie .marca { color: #ffffff; font-size: 1.0625rem; gap: 8px; }
.pie .marca svg { width: 24px; height: 24px; }
.pie nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
.pie nav a { display: inline-block; padding: 10px 0; }
.pie p { flex-basis: 100%; margin: 0; }

/* ── Páginas de texto (legales) ── */
.texto { max-width: 760px; margin: 24px auto 0; padding: 48px 40px 56px; }
.texto h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }
.texto h2 { font-size: 1.75rem; margin-top: 34px; }
.texto .version { color: var(--tinta-suave); }
@media (max-width: 600px) { .texto, .empresa, .vias-tarjeta, form.contacto, .portada, .cabecera-pagina, .llamada { padding-left: 22px; padding-right: 22px; } }

/* ── Autorización de cookies: "Aceptar" y "Rechazar" con el mismo tamaño y el mismo peso ── */
.aviso-cookies {
  position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; z-index: 20;
  background: #ffffff; color: var(--tinta); border-radius: 18px; padding: 18px 20px;
  box-shadow: 0 2px 4px rgba(2, 6, 23, 0.08), 0 18px 40px -12px rgba(2, 6, 23, 0.3);
}
.aviso-cookies h2 { font-size: 1.375rem; margin: 0 0 6px; }
.aviso-cookies p { margin: 0 0 14px; font-size: 0.9375rem; }
.aviso-cookies div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.aviso-cookies button {
  min-height: 46px; padding: 8px 18px; border-radius: 999px; border: 0; background: var(--acento); color: var(--sobre-acento);
  font: inherit; font-weight: 600; cursor: pointer;
}
.aviso-cookies button:hover { background: var(--acento-fuerte); }

/* ─────────────────────────────────────────────────────────────────────────────
   ENTRADA AL ABRIR Y TARJETAS QUE APARECEN AL BAJAR
   Lo que esconde contenido depende de las clases que pone anima.js (solo si la persona no pidió menos movimiento).
   ───────────────────────────────────────────────────────────────────────────── */
.anima .portada h1, .anima .cabecera-pagina h1 { clip-path: inset(0 0 100% 0); transform: translateY(28px); }
.anima .portada .lema, .anima .portada .botones, .anima .cabecera-pagina p { opacity: 0; transform: translateY(14px); }
.anima .portada .ilustracion { opacity: 0; }
.anima.anima-lista .portada h1, .anima.anima-lista .cabecera-pagina h1 {
  clip-path: inset(-10% -5% -20% -5%); transform: none; transition: clip-path 0.95s var(--curva), transform 0.95s var(--curva);
}
.anima.anima-lista .portada .lema, .anima.anima-lista .portada .botones, .anima.anima-lista .cabecera-pagina p {
  opacity: 1; transform: none; transition: opacity 0.7s var(--curva), transform 0.7s var(--curva);
}
.anima.anima-lista .portada .lema, .anima.anima-lista .cabecera-pagina p { transition-delay: 0.25s; }
.anima.anima-lista .portada .botones { transition-delay: 0.38s; }
.anima.anima-lista .portada .ilustracion { opacity: 1; transition: opacity 1.6s ease 0.5s; }

.anima .aparece { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--curva), transform 0.7s var(--curva); }
.anima .aparece.visto { opacity: 1; transform: none; }
.anima .aparece.visto:nth-child(2) { transition-delay: 0.08s; }
.anima .aparece.visto:nth-child(3) { transition-delay: 0.16s; }
.anima .aparece.visto:nth-child(4) { transition-delay: 0.24s; }
.anima .aparece.visto:hover { transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
