/* =========================================================================
   IAbyLio, home (propuesta 2026-11-26)

   Hereda de estilo.css: tokens, tipografias, .barra, .marca, .boton, .pie.
   Aqui vive solo lo propio de esta pagina, todo con prefijo hm- para no
   pisarse con las reglas de la home anterior que siguen en estilo.css (las
   usa la copia archivada en _archivo/home-2026-08/).

   El hero ("El lunes que se repite") vive aparte: css/hero-historia.css (hh-),
   js/hero-historia.js. La version anterior del hero esta archivada en
   _archivo/home-2026-11-28/.

   Lenguaje: el mismo vidrio de /contacto/ y del tutorial de Video Studio
   (placas translucidas, luces detras, un toque ambar para lo humano).

   Modos:
   - Sin JS: todo visible y estatico.
   - html.hm-anim (JS y sin reduced motion): los bloques .hm-rev entran al llegar.
   - Reduced motion: todo quieto y completo.

   Solo se animan transform y opacity (y sus sueltos translate/scale/rotate).
   Radios de la escala bloqueada: 6 / 12 / 18.
   ========================================================================= */

:root {
  --hm-cab: 72px;
  --hm-vidrio-borde: rgba(150, 200, 235, 0.24);
  --hm-texto-2: #c3ced6;
  /* Curva del vuelo de las piezas del hero: sale con decision y frena largo,
     sin el latigazo de la curva firma (se tiene que ver de donde viene cada una). */
  --hm-vuelo: cubic-bezier(0.22, 0.82, 0.2, 1);
}

/* Grano fino sobre toda la pagina: quita el aspecto de degradado digital. */
body.hm::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.055;
  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='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hm [id] { scroll-margin-top: calc(var(--hm-cab) + 0.75rem); }

/* La escena del hero y sus luces asoman fuera de su columna. `clip` (no
   `hidden`): recorta en el borde de la ventana sin crear un contenedor de
   scroll, asi el `position: sticky` de la seccion fijada sigue funcionando. */
.hm main { overflow-x: clip; }

/* --------------------------------------------------------------- cabecera */
.hm-cabecera {
  position: sticky;
  top: 0;
  z-index: 60;
  /* Fundida con el fondo (pedido de Lio): sin franja ni linea; un velo que se
     deshace hacia abajo para que lo que pasa por debajo no pise el logo. */
  background: linear-gradient(to bottom, rgba(15, 21, 36, 0.97) 0%, rgba(15, 21, 36, 0.9) 62%, rgba(15, 21, 36, 0) 100%);
  border-bottom: 1px solid transparent;
}
.hm-cabecera::before {
  content: "";
  position: absolute;
  inset: 0 0 -1.25rem 0;
  z-index: -1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
.hm-cabecera--sobre::before,
.hm-cabecera--clara::before { display: none; }
.hm-cabecera.is-scroll { border-bottom-color: transparent; }
.hm-cabecera .barra { gap: clamp(0.75rem, 2vw, 1.75rem); }
.hm-nav { margin-left: auto; }
.hm-cabecera__cta {
  padding: 0.68rem 1.05rem;
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------- utilidades */
.hm-titulo {
  font-size: clamp(2rem, 3.7vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.036em;
  max-width: 17ch;
}

/* Luces: discos suaves de marca que viven detras del vidrio. */
.hm-luz {
  position: absolute;
  display: block;
  border-radius: 50%;
  pointer-events: none;
}

/* Boton grande de la accion principal: mismo boton de marca, con peso. */
.hm-boton-xl {
  position: relative;
  overflow: hidden;
  padding: 1.15rem 1.6rem;
  font-size: 1.0625rem;
  gap: 0.7rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 14px 34px -14px rgba(10, 143, 208, 0.85),
    0 2px 0 rgba(4, 7, 16, 0.4);
}
.hm-boton-xl::after {
  content: '→';
  font-family: var(--f-display);
  font-size: 1.15em;
  line-height: 0.8;
  transition: transform var(--medio) var(--ease);
}
/* Un brillo cruza el boton al pasar: avisa que es EL boton de la pagina. */
.hm-boton-xl::before {
  content: '';
  position: absolute;
  inset: -40% -30%;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, 0.5) 50%, transparent 58%);
  transform: translateX(-70%);
  pointer-events: none;
}
@media (hover: hover) {
  .hm-boton-xl:hover::after { transform: translateX(4px); }
  .hm-boton-xl:hover::before { transform: translateX(70%); transition: transform 700ms var(--ease); }
}

/* Enlace de texto con flecha. */
.hm-enlace {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  color: var(--texto);
  text-decoration: none;
  padding: 0.35rem 0;
  background-image: linear-gradient(var(--azul-claro), var(--azul-claro));
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color var(--rapido) var(--ease);
}
.hm-enlace::after {
  font-family: var(--f-display);
  color: var(--azul-claro);
  transition: transform var(--medio) var(--ease);
}
.hm-enlace--abajo::after { content: '↓'; }
.hm-enlace--ir::after { content: '→'; }
.hm-enlace:hover { color: var(--azul-claro); }
@media (hover: hover) {
  .hm-enlace--abajo:hover::after { transform: translateY(3px); }
  .hm-enlace--ir:hover::after { transform: translateX(4px); }
}
.hm-enlace:active::after { transform: scale(0.9); }

/* ---------------------------------------------------------------- reveals */
/* Solo con html.hm-anim (JS vivo y sin reduced motion). Si home.js no llega,
   la red del <head> quita la clase y todo queda visible. */
.hm-anim .hm-rev {
  opacity: 0;
  transform: translateY(26px);
}
.hm-anim .hm-rev.is-in {
  opacity: 1;
  transform: none;
  /* El retraso escalonado es solo de la entrada: los sueltos (hover de las
     tarjetas) responden al instante. */
  transition:
    opacity 800ms var(--ease) calc(var(--i, 0) * 110ms),
    transform 800ms var(--ease) calc(var(--i, 0) * 110ms),
    translate var(--medio) var(--ease),
    rotate var(--medio) var(--ease),
    border-color var(--medio) var(--ease);
}

.hm-anim .hm-titulo--partido,
.hm-anim .hm-titulo--partido.is-in {
  opacity: 1;
  transform: none;
  transition: none;
}

/* Dibujos de las dos formas de trabajar (la ventana con renglones y casillas). */
.hm-renglones { display: grid; align-content: center; gap: 0.5rem; }
.hm-renglones i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: rgba(230, 230, 225, 0.55);
}
.hm-renglones i.corto { width: 56%; }
.hm-checks { display: grid; align-content: center; gap: 0.6rem; }
.hm-checks i {
  position: relative;
  display: block;
  height: 6px;
  margin-left: 1.35rem;
  border-radius: 3px;
  background: rgba(230, 230, 225, 0.55);
}
.hm-checks i::before {
  content: '';
  position: absolute;
  left: -1.35rem;
  top: 50%;
  width: 0.8rem;
  height: 0.8rem;
  margin-top: -0.4rem;
  border-radius: 4px;
  border: 1.5px solid rgba(143, 205, 241, 0.9);
}
.hm-checks i:nth-child(2) { width: 62%; }

/* ----------------------------------------------------------------- formas */
.hm-formas {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--margen) clamp(4rem, 9vw, 7.5rem);
}
.hm-formas__par {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.9rem, 1.6vw, 1.25rem);
  perspective: 1600px;
}
.hm-forma {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-content: start;
  padding: clamp(1.4rem, 2.6vw, 2.25rem);
  border-radius: var(--r-lg);
  border: 1px solid var(--linea-fuerte);
  background: linear-gradient(165deg, #1a2340 0%, #121830 48%, #0d1224 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 30px 60px -40px rgba(0, 0, 0, 0.95);
}
/* Luz que sigue al cursor (--mx / --my los escribe home.js). */
.hm-forma::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(26rem circle at var(--mx, 50%) var(--my, 0%), rgba(79, 180, 232, 0.24), transparent 62%);
  transition: opacity var(--medio) var(--ease);
}
@media (hover: hover) {
  .hm-forma { transition: rotate var(--medio) var(--ease), translate var(--medio) var(--ease), border-color var(--medio) var(--ease); }
  .hm-forma:hover { translate: 0 -4px; border-color: rgba(79, 180, 232, 0.55); }
  .hm-forma:hover::before { opacity: 1; }
}
/* Toda la tarjeta es un enlace a contacto: el <a> del titulo se estira sobre ella. */
.hm-forma__enlace { color: inherit; text-decoration: none; }
.hm-forma__enlace::after { content: ''; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.hm-forma__enlace:focus-visible { outline: none; }
.hm-forma:has(.hm-forma__enlace:focus-visible) { outline: 2px solid var(--azul); outline-offset: 3px; }

.hm-forma__dibujo {
  position: relative;
  height: clamp(9.5rem, 15vw, 11.5rem);
  margin: -0.25rem 0 clamp(1.25rem, 2.4vw, 1.75rem);
  display: grid;
  place-items: center;
  perspective: 900px;
}
.hm-forma__dibujo::before {
  content: '';
  position: absolute;
  width: 70%;
  aspect-ratio: 1.6;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(10, 143, 208, 0.4), rgba(10, 143, 208, 0) 72%);
}
.hm-forma--juntos .hm-forma__dibujo::after {
  content: '';
  position: absolute;
  right: 16%;
  bottom: 8%;
  width: 26%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(232, 161, 92, 0.32), rgba(232, 161, 92, 0) 70%);
}
.hm-ventana {
  position: relative;
  width: min(74%, 19rem);
  height: 86%;
  padding: 2.35rem 1.1rem 1rem;
  display: grid;
  align-content: center;
  border-radius: var(--r-md);
  border: 1px solid var(--hm-vidrio-borde);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 46%, rgba(10, 143, 208, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 24px 40px -22px rgba(0, 0, 0, 0.95);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  transform: rotateX(12deg) rotateY(-14deg);
}
.hm-forma--listo .hm-ventana { transform: rotateX(12deg) rotateY(14deg); }
.hm-ventana__barra {
  position: absolute;
  left: 0.85rem;
  top: 0.8rem;
  display: flex;
  gap: 0.32rem;
}
.hm-ventana__barra i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: rgba(230, 230, 225, 0.32);
}
.hm-cursor {
  position: absolute;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}
.hm-cursor--tu { left: 58%; top: 56%; color: var(--ambar); }
.hm-cursor--lio { left: 30%; top: 34%; color: var(--azul-claro); }
@media (prefers-reduced-motion: no-preference) {
  .hm-cursor--tu { animation: hm-cursor-tu 6.5s var(--ease) infinite; }
  .hm-cursor--lio { animation: hm-cursor-lio 6.5s var(--ease) infinite; }
}
/* Los dos cursores trabajan sobre los mismos renglones: uno marca, el otro sigue. */
@keyframes hm-cursor-lio {
  0%, 12% { transform: translate(0, 0); }
  32%, 48% { transform: translate(70%, 60%); }
  68%, 84% { transform: translate(240%, 20%); }
  100% { transform: translate(0, 0); }
}
@keyframes hm-cursor-tu {
  0%, 22% { transform: translate(0, 0); }
  42%, 58% { transform: translate(-160%, -40%); }
  78%, 92% { transform: translate(90%, -70%); }
  100% { transform: translate(0, 0); }
}

.hm-checks--hechos { padding-right: 3.6rem; }
.hm-checks--hechos i::before {
  border-color: transparent;
  background: var(--azul-claro) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.2 2.2 4.6-5' fill='none' stroke='%230b0f1e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.hm-interruptor {
  position: absolute;
  right: 1rem;
  top: 0.7rem;
  width: 2.5rem;
  height: 1.4rem;
  border-radius: 0.7rem;
  background: var(--azul);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 18px rgba(10, 143, 208, 0.85);
}
.hm-interruptor i {
  position: absolute;
  right: 0.17rem;
  top: 0.17rem;
  width: 1.06rem;
  height: 1.06rem;
  border-radius: 50%;
  background: var(--texto);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}
@media (prefers-reduced-motion: no-preference) {
  .hm-interruptor { animation: hm-latido 3.2s ease-in-out infinite; }
}
@keyframes hm-latido {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.72; }
}

.hm-forma__titulo {
  font-size: clamp(1.6rem, 2.5vw, 2.25rem);
  line-height: 1.04;
  letter-spacing: -0.032em;
}
.hm-forma__texto {
  margin-top: 0.85rem;
  max-width: 44ch;
  color: var(--hm-texto-2);
}

/* La llamada: el unico bloque de la pagina con caja destacada. */
.hm-llamada {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: clamp(0.9rem, 1.6vw, 1.25rem);
  padding: clamp(1.6rem, 3.6vw, 2.9rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 1.5rem 2.5rem;
  border-radius: var(--r-lg);
  border: 1px solid rgba(79, 180, 232, 0.42);
  background: linear-gradient(118deg, rgba(10, 143, 208, 0.3) 0%, rgba(19, 26, 48, 0.94) 46%, rgba(11, 15, 30, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 40px 80px -46px rgba(10, 143, 208, 0.7);
}
.hm-llamada__luz {
  z-index: -1;
  left: -8%;
  top: -70%;
  width: 46%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(79, 180, 232, 0.5), rgba(79, 180, 232, 0) 72%);
}
@media (prefers-reduced-motion: no-preference) {
  .hm-llamada__luz { animation: hm-gota 15s ease-in-out infinite alternate; }
}
.hm-llamada__texto {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 1.9vw, 1.65rem);
  line-height: 1.26;
  letter-spacing: -0.022em;
  max-width: 34ch;
  color: var(--texto);
}
.hm-llamada .hm-boton-xl { justify-self: start; }

/* -------------------------------------------------------------------- pie */
.hm-pie__marca { text-decoration: none; }
.hm-pie__nav { flex-wrap: wrap; gap: 0.5rem 1.5rem; }

/* ============================================================ escritorio */
@media (min-width: 941px) {
  .hm-formas__par { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-llamada { grid-template-columns: minmax(0, 1fr) auto; }
  .hm-llamada .hm-boton-xl { justify-self: end; }

}

/* ================================================================= movil */
@media (max-width: 940px) {
}

@media (max-width: 760px) {
  .hm-nav { display: none; }
  .hm-cabecera__cta { margin-left: auto; }
}

@media (max-width: 520px) {
  :root { --hm-cab: 64px; }
  .hm .marca__nombre { display: inline; }
  .hm-boton-xl { padding: 1.05rem 1.25rem; }
  .hm-pie { justify-content: flex-start; }
}

@media (max-width: 380px) {
  .hm-boton-xl { padding: 1rem 1rem; font-size: 1rem; gap: 0.5rem; }
  /* Dentro de la caja de la llamada no cabe en una linea a 320: que parta. */
  .hm-llamada { padding: 1.25rem; }
  .hm-llamada .hm-boton-xl { white-space: normal; line-height: 1.2; text-align: left; }
  .hm-cabecera__cta { padding: 0.62rem 0.8rem; font-size: 0.875rem; }
}

/* -------------------------------------------------- transparencia reducida */
/* El vidrio de esta pagina es una aproximacion web (desenfoque de fondo,
   bisel y borde interior). Quien pide menos transparencia recibe las mismas
   piezas sobre superficie solida. */
@media (prefers-reduced-transparency: reduce) {
  .hm-ventana {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--superficie-alta);
  }
}

/* ------------------------------------------------------------ tactil */
/* html.hm-tactil lo pone el <head> de index.html con (pointer: coarse). En un iPhone cada capa a pantalla completa o desenfoque de
   fondo cuesta una pasada de GPU por cuadro a 3x de resolucion: fuera el grano fijo, el desenfoque de la cabecera y el del cristal.
   En escritorio nada de esto aplica. */
html.hm-tactil body.hm::after { display: none; }
html.hm-tactil .hm-cabecera::before {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  display: none;
}
html.hm-tactil .hm-ventana {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* ------------------------------------------------------------- impresion */
@media print {
  .hm-rev {
    opacity: 1 !important;
    transform: none !important;
  }
}
