/* ==========================================================================
   Home rediseñada (/inicio). Prefijo hm-. Depende de rediseno.css (tokens,
   botones, .rv, banda CTA), de productos.css (tarjetas .pr-*) y de styles.css.
   Fuente: Main.dc.html (escritorio) y Mobile.dc.html (celular).

   Trampas heredadas que este archivo esquiva:
   - styles.css fuerza `h1,h2,h3,span { line-height: .8 !important }`: cada título
     lleva su propio line-height con !important (la clase gana por especificidad).
   - styles.css centra con margin:0 100px los ids #servicios, #nosotros y #casos-de-exito: por eso
     las secciones de esta página usan ids hm-* (NuestrosClientes se conserva: lo enlaza el pie).
   - Los elementos con hover van dentro de una celda .rv: el transform de la
     entrada al hacer scroll y el del hover no pueden vivir en el mismo nodo.
   ========================================================================== */

/* styles.css fija `p { text-align: justify; color: gray }` para todo el sitio: aquí cada contenedor decide */
.hm-hero p, .hm-sec p, .hm-cta p { text-align: inherit; }

/* ---------- movimiento ----------
   Las nebulosas se desplazan y cambian de opacidad, pero NO de escala. Una capa
   promovida se rasteriza una sola vez y el compositor la mueve gratis; animar
   scale() la obliga a rasterizar de nuevo en cada paso, y con blur(72px) encima
   eso hunde los fps en equipos sin aceleracion por hardware. El tamano medio de
   la escala anterior quedo horneado en el width/height de cada blob. */
@keyframes hm-drift-a {
  from { transform: translate3d(-130px, -70px, 0); opacity: 0.5; }
  to   { transform: translate3d(190px, 140px, 0); opacity: 1; }
}
@keyframes hm-drift-b {
  from { transform: translate3d(150px, 90px, 0); opacity: 1; }
  to   { transform: translate3d(-170px, -110px, 0); opacity: 0.45; }
}
@keyframes hm-drift-c {
  from { transform: translate3d(-90px, 120px, 0); opacity: 0.4; }
  to   { transform: translate3d(160px, -130px, 0); opacity: 0.95; }
}
@keyframes hm-float { 0%, 100% { transform: translateY(-13px); } 50% { transform: translateY(13px); } }
@keyframes hm-scrolldown {
  0%   { transform: translateY(-18px); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(46px); opacity: 0; }
}
@keyframes hm-chevbob {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50%      { transform: translateY(4px); opacity: 1; }
}
@keyframes hm-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes hm-panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   HERO
   ========================================================================== */
.hm-hero {
  --hm-sp: 1.3; /* multiplicador de velocidad de la nebulosa: más bajo = más rápido */
  position: relative; overflow: hidden;
  padding: calc(var(--rd-bar-h) + 104px) var(--rd-px) 92px;
}
.hm-neb { position: absolute; inset: -18% -8%; pointer-events: none; opacity: 0.82; }
.hm-blob { position: absolute; border-radius: 50%; filter: blur(72px); will-change: transform, opacity; }
.hm-blob--a {
  width: 792px; height: 682px; right: -20px; top: -130px;
  background: radial-gradient(circle at 42% 42%, rgba(57, 226, 240, 0.44), rgba(57, 226, 240, 0) 66%);
  animation: hm-drift-a calc(var(--hm-sp) * 19s) ease-in-out infinite alternate;
}
.hm-blob--b {
  width: 651px; height: 609px; right: 300px; top: 130px;
  background: radial-gradient(circle at 50% 50%, rgba(31, 113, 184, 0.58), rgba(31, 113, 184, 0) 68%);
  animation: hm-drift-b calc(var(--hm-sp) * 24s) ease-in-out infinite alternate;
}
.hm-blob--c {
  width: 603px; height: 541px; left: -110px; top: 170px;
  background: radial-gradient(circle at 50% 50%, rgba(75, 222, 226, 0.30), rgba(75, 222, 226, 0) 68%);
  animation: hm-drift-c calc(var(--hm-sp) * 17s) ease-in-out infinite alternate;
}
.hm-hero__glow {
  position: absolute; top: -260px; right: -160px; width: 900px; height: 900px; pointer-events: none;
  background: radial-gradient(circle, rgba(57, 226, 240, 0.07) 0%, rgba(57, 226, 240, 0.02) 38%, rgba(0, 33, 69, 0) 68%);
  animation: rd-breathe 13s ease-in-out infinite alternate;
}
.hm-hero__grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 25%, transparent 78%);
}
.hm-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
.hm-hero__row {
  position: relative; display: grid; align-items: center; gap: 72px;
  grid-template-columns: minmax(0, 1fr) 520px;
}
.hm-hero__copy { min-width: 0; text-align: center; }
.rd .hm-h1 { font-size: 48px; line-height: 1.1 !important; margin-top: 26px; }
.rd .hm-h1 em { font-style: italic; font-weight: 600; white-space: nowrap; color: var(--intap-cyan); }
.hm-hero__sub { font-size: 21px; line-height: 1.5; color: var(--intap-white); margin-top: 56px; }
.hm-hero__sub em { font-style: italic; font-weight: 700; color: var(--intap-cyan); }
.hm-hero__cta { display: flex; justify-content: center; gap: 16px; margin-top: 48px; }
.hm-hero__art { min-width: 0; }
.hm-float { animation: hm-float 7.6s ease-in-out infinite; will-change: transform; }
.hm-float img { display: block; width: 520px; max-width: 100%; height: auto; }

/* Indicador de scroll: vertical, como la navegación de la página */
.hm-scroll {
  display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 62px;
  color: var(--intap-ink-mute); font-family: var(--intap-font-display); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.hm-scroll__rail { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 18px; }
.hm-scroll__track { width: 1px; height: 46px; background: rgba(148, 163, 184, 0.28); position: relative; overflow: hidden; }
.hm-scroll__track::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 18px;
  background: linear-gradient(180deg, rgba(57, 226, 240, 0) 0%, var(--intap-cyan) 100%);
  animation: hm-scrolldown 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.hm-scroll__chev { color: var(--intap-cyan); animation: hm-chevbob 2.4s ease-in-out infinite; }

/* ==========================================================================
   MARQUESINA DE TECNOLOGÍAS
   ========================================================================== */
.hm-marquee {
  background: var(--intap-white); padding: 30px 0; overflow: hidden;
  border-top: 1px solid rgba(0, 33, 69, 0.10); border-bottom: 1px solid rgba(0, 33, 69, 0.10);
}
.hm-marquee__track { display: flex; width: max-content; animation: hm-marquee 46s linear infinite; will-change: transform; }
.hm-marquee__set { display: flex; align-items: center; gap: 46px; padding-right: 46px; }
.hm-tech {
  font-family: var(--intap-font-display); font-size: 17px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; white-space: nowrap; color: rgba(0, 33, 69, 0.42);
}
.hm-dot { flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--intap-blue); opacity: 0.5; }

/* ==========================================================================
   SECCIONES (cabecera centrada + contenido)
   ========================================================================== */
.hm-sec { padding: calc(var(--rd-py) + 18px) var(--rd-px); background: var(--intap-white); color: var(--intap-ink); }
.hm-sec--tint { background: var(--intap-tint); }
.hm-head { max-width: 780px; margin: 0 auto; text-align: center; }
.rd .hm-h2 { font-size: 54px; line-height: 1.02 !important; margin-top: 20px; color: var(--intap-ink); }
.hm-sub { font-size: 18px; line-height: 1.7; color: var(--intap-ink); opacity: 0.78; margin: 24px auto 0; max-width: 640px; }
/* los acentos de texto usan .rd-acc (rediseno.css): azul sobre claro, cyan sobre bandas oscuras */

/* ==========================================================================
   SERVICIOS: tarjetas con acordeón (una abierta a la vez)
   ========================================================================== */
.hm-svc-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 72px; align-items: start;
}
.hm-svc-cell { min-width: 0; }
.hm-svc {
  border: 1px solid rgba(0, 33, 69, 0.08); border-radius: var(--intap-r-card);
  padding: 34px 32px 30px; background: var(--intap-white); overflow: hidden; cursor: pointer;
  box-shadow: 0 10px 40px rgba(0, 33, 69, 0.08);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.hm-svc:hover { border-color: rgba(31, 113, 184, 0.35); box-shadow: 0 16px 44px rgba(0, 33, 69, 0.16); transform: translateY(-4px); }
.hm-svc.is-open { border-color: var(--intap-blue); box-shadow: 0 16px 48px rgba(0, 33, 69, 0.18); }
/* 16:9 exacto contra el ancho de la tarjeta: si no, object-fit corta los anillos de abajo */
.hm-svc__media {
  margin: -34px -32px 26px; aspect-ratio: 16 / 9; position: relative; overflow: hidden; background: var(--intap-navy-deep);
}
.hm-svc__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-svc__num { font-family: var(--intap-font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.16em; color: var(--intap-blue); }
.rd .hm-svc__title {
  margin: 20px 0 0; font-family: var(--intap-font-display); font-size: 23px; font-weight: 600;
  line-height: 1.18 !important; letter-spacing: -0.015em; color: var(--intap-ink);
}
.hm-svc__toggle {
  display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; letter-spacing: inherit; line-height: inherit !important; color: inherit; text-align: left;
}
/* cuerpo plegable: grid 0fr -> 1fr anima la altura sin medirla; visibility lo saca del árbol de accesibilidad */
.hm-svc__body {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows .35s var(--rd-ease), visibility 0s linear .35s;
}
.hm-svc.is-open .hm-svc__body { grid-template-rows: 1fr; visibility: visible; transition-delay: 0s; }
.hm-svc__body-in { min-height: 0; overflow: hidden; }
.hm-svc__desc { font-size: 15px; line-height: 1.72; opacity: 0.8; margin-top: 18px; }
.hm-svc__more {
  display: flex; width: fit-content; align-items: center; gap: 8px; margin-top: 24px;
  font-family: var(--intap-font-display); font-size: 13.5px; font-weight: 600; color: var(--intap-blue);
  transition: color .2s ease;
}
.hm-svc__more:hover { color: var(--intap-navy); }
.hm-svc__more svg { transition: transform .2s ease; }
.hm-svc__more:hover svg { transform: translateX(4px); }

/* ---------- productos (las tarjetas son las de /productos) ---------- */
.hm-prod-grid { margin-top: 64px; }

/* ==========================================================================
   ¿QUÉ NOS HACE ÚNICOS?
   ========================================================================== */
.hm-split { display: grid; grid-template-columns: minmax(0, 1fr) 520px; gap: 96px; align-items: center; }
.hm-split__copy { min-width: 0; }
.hm-split__copy .hm-sub { margin-left: 0; margin-right: 0; }
.hm-facts { display: flex; gap: 18px; margin-top: 42px; }
.hm-fact { flex: 1; min-width: 0; border: 1px solid rgba(0, 33, 69, 0.10); border-radius: var(--intap-r-card); padding: 22px 24px; background: var(--intap-white); }
.hm-fact__k { font-family: var(--intap-font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; color: var(--intap-blue); }
.hm-fact__v { font-size: 13.5px; line-height: 1.5; color: var(--intap-ink-gray); margin-top: 8px; }
.hm-split__cta { display: flex; margin-top: 44px; }
.rd-btn.hm-btn-ghost { border-color: var(--intap-navy); color: var(--intap-navy); background: transparent; }
.rd-btn.hm-btn-ghost:hover, .rd-btn.hm-btn-ghost:focus-visible { background: var(--intap-navy); color: var(--intap-white); }
.hm-split__art { min-width: 0; }
.hm-split__art img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }

/* ==========================================================================
   CASOS DE ÉXITO: selector de sector + panel
   ========================================================================== */
.hm-sectors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 64px; }
.hm-sector {
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px; min-height: 128px; margin: 0;
  padding: 26px 24px; border: 1px solid rgba(0, 33, 69, 0.10); border-radius: var(--intap-r-card);
  background: var(--intap-white); color: var(--intap-blue); cursor: pointer; text-align: left; font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.hm-sector:hover { border-color: rgba(31, 113, 184, 0.4); box-shadow: 0 10px 30px rgba(0, 33, 69, 0.10); }
.hm-sector.is-on { border-color: var(--intap-blue); background: rgba(57, 226, 240, 0.10); box-shadow: 0 10px 30px rgba(0, 33, 69, 0.12); }
.hm-sector__name { font-family: var(--intap-font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; color: var(--intap-ink); }
.hm-panel {
  margin-top: 20px; padding: 44px 48px; border: 1px solid rgba(31, 113, 184, 0.28); border-radius: var(--intap-r-card);
  background: rgba(57, 226, 240, 0.07); display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px;
  animation: hm-panel-in .35s var(--rd-ease);
}
.hm-panel[hidden] { display: none; }
.hm-panel__k {
  font-family: var(--intap-font-display); font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--intap-blue);
}
.rd .hm-panel__name { font-size: 34px; line-height: 1.08 !important; margin-top: 14px; color: var(--intap-ink); }
.hm-panel__clientes { font-size: 14px; line-height: 1.6; color: var(--intap-ink-gray); margin-top: 16px; }
.hm-panel__v { font-size: 15px; line-height: 1.7; opacity: 0.85; margin-top: 12px; }

/* ==========================================================================
   CLIENTES (logos a color sobre claro)
   ========================================================================== */
.hm-logos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 60px; }
.hm-logo-cell { min-width: 0; }
.hm-logo {
  height: 132px; display: flex; align-items: center; justify-content: center; padding: 16px 20px;
  background: var(--intap-white); border: 1px solid rgba(0, 33, 69, 0.07); border-radius: 16px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.hm-logo:hover { box-shadow: 0 10px 30px rgba(0, 33, 69, 0.10); transform: translateY(-3px); }
.hm-logo img { max-width: 100%; max-height: 84px; object-fit: contain; }

/* ---------- llamada a la acción ---------- */
.hm-cta { padding-top: 108px; padding-bottom: 108px; }
.rd .hm-cta .rd-cta-band__title { font-size: 56px; margin-top: 22px; }

/* ==========================================================================
   RESPONSIVE (mismos cortes que el resto del rediseño: 1279 · 991 · 767 · 575)
   ========================================================================== */
@media (max-width: 1279.98px) {
  .hm-hero__row { grid-template-columns: minmax(0, 1fr) 440px; gap: 48px; }
  .hm-float img { width: 440px; }
  .rd .hm-h1 { font-size: 44px; }
  .hm-split { grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; }
  .hm-svc { padding: 30px 26px 26px; }
  .hm-svc__media { margin: -30px -26px 24px; }
  .rd .hm-svc__title { font-size: 21px; }
  .hm-panel { padding: 36px 36px; gap: 40px; grid-template-columns: 240px minmax(0, 1fr); }
}

@media (max-width: 991.98px) {
  .hm-hero { padding-top: calc(var(--rd-bar-h) + 52px); padding-bottom: 56px; }
  .hm-hero__row { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hm-hero__art { display: flex; justify-content: center; }
  .hm-float img { width: 100%; max-width: 350px; }
  .hm-scroll { display: none; }
  .hm-blob { filter: blur(56px); }
  .hm-blob--a { width: 473px; height: 407px; }
  .hm-blob--b { width: 399px; height: 368px; right: 120px; }
  .hm-blob--c { width: 364px; height: 333px; }
  .hm-hero__glow { width: 560px; height: 560px; top: -180px; right: -220px; }
  .rd .hm-h1 { font-size: 40px; }
  .hm-hero__sub { font-size: 19px; margin-top: 36px; }
  .hm-hero__cta { margin-top: 36px; }
  .hm-marquee { padding: 22px 0; }
  .hm-marquee__set { gap: 30px; padding-right: 30px; }
  .hm-marquee__track { animation-duration: 34s; }
  .hm-tech { font-size: 13px; letter-spacing: 0.14em; }
  .hm-dot { width: 4px; height: 4px; }
  .hm-sec { padding-top: var(--rd-py); padding-bottom: var(--rd-py); }
  .rd .hm-h2 { font-size: 40px; }
  .hm-sub { font-size: 16.5px; }
  .hm-svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 48px; }
  .hm-prod-grid { margin-top: 44px; }
  .hm-split { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hm-split__art { max-width: 520px; }
  .hm-sectors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 40px; }
  .hm-panel { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 30px 26px; }
  .hm-logos { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 44px; }
  .hm-logo { height: 112px; }
  .hm-logo img { max-height: 64px; }
  .hm-cta { padding-top: 80px; padding-bottom: 80px; }
  .rd .hm-cta .rd-cta-band__title { font-size: 40px; }
}

@media (max-width: 767.98px) {
  .hm-svc-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* en celular el número y el título comparten renglón (Mobile.dc.html) */
  .hm-svc { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 24px 20px; }
  .hm-svc__media { grid-column: 1 / -1; margin: -24px -20px 20px; }
  .hm-svc__body, .hm-svc__more { grid-column: 1 / -1; }
  .hm-svc__num { font-size: 12px; }
  .rd .hm-svc__title { margin: 0; font-size: 18px; line-height: 1.2 !important; }
  .hm-svc__desc { font-size: 14.5px; line-height: 1.7; margin-top: 16px; }
  .hm-facts { flex-direction: column; gap: 10px; margin-top: 28px; }
  .hm-fact { display: flex; align-items: baseline; gap: 16px; padding: 18px 20px; }
  .hm-fact__k { flex: none; min-width: 72px; font-size: 26px; }
  .hm-fact__v { margin-top: 0; font-size: 13px; }
  .hm-split__cta { margin-top: 32px; }
}

@media (max-width: 575.98px) {
  .hm-hero { padding-top: calc(var(--rd-bar-h) + 40px); padding-bottom: 48px; }
  .rd .hm-h1 { font-size: 26px; line-height: 1.15 !important; margin-top: 18px; }
  .hm-hero__sub { font-size: 17px; margin-top: 32px; }
  .hm-hero__cta .rd-btn { width: 100%; }
  .hm-hero__row { gap: 40px; }
  .hm-sec { padding-top: 64px; padding-bottom: 64px; }
  .rd .hm-h2 { font-size: 32px; line-height: 1.08 !important; margin-top: 14px; }
  .hm-sub { font-size: 15.5px; line-height: 1.68; margin-top: 16px; }
  .hm-sectors { margin-top: 30px; }
  .hm-sector { min-height: 100px; gap: 12px; padding: 18px 16px; }
  .hm-sector__name { font-size: 14.5px; }
  .hm-panel { margin-top: 12px; padding: 26px 20px; }
  .rd .hm-panel__name { font-size: 28px; }
  .hm-panel__v { font-size: 14px; line-height: 1.65; }
  .hm-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 30px; }
  .hm-logo { height: 84px; padding: 14px 16px; }
  .hm-logo img { max-height: 46px; }
  .hm-cta { padding-top: 62px; padding-bottom: 62px; }
  .rd .hm-cta .rd-cta-band__title { font-size: 30px; }
}

/* ==========================================================================
   Todo el movimiento se apaga con prefers-reduced-motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .hm-blob, .hm-hero__glow, .hm-float, .hm-marquee__track,
  .hm-scroll__track::after, .hm-scroll__chev, .hm-panel { animation: none !important; }
  .hm-hero__glow { transform: none; opacity: 1; }
  .hm-svc, .hm-svc__body, .hm-sector, .hm-logo, .hm-svc__more, .hm-svc__more svg { transition: none !important; }
  .hm-svc:hover, .hm-logo:hover { transform: none; }
  .hm-svc__more:hover svg { transform: none; }
}

/* Equipos que no sostienen la tasa de fotogramas (aceleracion por hardware
   desactivada, maquinas modestas, escritorio remoto): la guardia de
   js/rediseno.js marca <html class="rd-sin-fluidez"> y aqui se apaga el
   movimiento caro. Se apaga lo mismo que con prefers-reduced-motion:
   el contenido no cambia, solo deja de moverse. */
.rd-sin-fluidez .hm-blob, .rd-sin-fluidez .hm-hero__glow, .rd-sin-fluidez .hm-float,
.rd-sin-fluidez .hm-marquee__track, .rd-sin-fluidez .hm-scroll__track::after,
.rd-sin-fluidez .hm-scroll__chev, .rd-sin-fluidez .hm-panel { animation: none !important; }
.rd-sin-fluidez .hm-hero__glow { transform: none; opacity: 1; }
/* sin animacion no hace falta reservar capa: se libera la memoria de GPU */
.rd-sin-fluidez .hm-blob, .rd-sin-fluidez .hm-float,
.rd-sin-fluidez .hm-marquee__track { will-change: auto; }
