/* ==========================================================================
   Portada 1.6.0: oscura, en grilla de tarjetas y con un solo botón.
   Casi negro de fondo; el acento #00827c (el de las landings) en el botón, los
   brillos y los trazos, y su tono claro #4fc3b9 para cifras y puntos sobre negro.
   Títulos en Space Grotesk, cuerpo en la sans del sitio.
   El único movimiento es el pulso del diagrama del hero (se pausa y respeta
   "reducir movimiento"). Todo cuelga de body.pm-home-direct: las landings no
   cargan esta hoja.
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.pm-home-direct {
  --hd-ink: #05070a;          /* fondo de toda la portada (2.0.0: #05070A) */
  --hd-panel: #111514;        /* tarjetas */
  --hd-line-ink: #232a28;     /* bordes de tarjetas y separadores */
  --hd-line-hi: #3a4744;      /* trazos del diagrama y bordes de nodos */
  --hd-on-ink: #c9d1cf;       /* cuerpo sobre casi negro (12:1) */
  --hd-muted: #a3adaa;        /* texto secundario sobre tarjeta (7,9:1) */
  --hd-accent: #00827c;       /* botón, brillos y trazos (4,7:1 con blanco) */
  --hd-accent-press: #006b66;
  --hd-accent-soft: #4fc3b9;  /* mismo tono, claro: cifras y puntos sobre negro (9:1) */
  --hd-accent-glow: rgba(0, 130, 124, 0.45);
  --hd-accent-on: #ffffff;
  --hd-display: "Space Grotesk", var(--pm-font);
  --hd-wrap: 1200px;
  --hd-gutter: clamp(20px, 5vw, 48px);
  --hd-section: clamp(64px, 9vw, 120px);
  --hd-gap: clamp(16px, 2vw, 24px);
  --hd-radius: 16px;
  background: var(--hd-ink);
  color: var(--hd-on-ink);
}

/* --------------------------------------------------------------- Bloques */
.pm-home { background: var(--hd-ink); color: var(--hd-on-ink); font-size: 1.0625rem; line-height: 1.55; }
.pm-home__wrap { width: 100%; max-width: var(--hd-wrap); margin: 0 auto; padding: 0 var(--hd-gutter); }
.pm-home__section { padding: var(--hd-section) 0; border-top: 1px solid var(--hd-line-ink); background: var(--hd-ink); }
.pm-home :is(h1, h2, h3) { margin: 0; color: #ffffff; font-family: var(--hd-display); font-weight: 600; overflow-wrap: break-word; min-width: 0; }
.pm-home p { margin: 0; }
.pm-home .pm-home__h2 { max-width: 20ch; margin-bottom: clamp(28px, 4vw, 48px); font-size: clamp(1.875rem, 4.2vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; }

/* ---------------------------------------------------------------- Botón */
.pm-home__btn { display: inline-flex; }
.pm-home__btn,
.pm-home-direct #pm-header .pm-header__cta,
.pm-home-direct .pm-dock__cta,
.pm-home-direct .pm-mobile__foot .pm-btn {
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 10px;
  background: var(--hd-accent);
  color: var(--hd-accent-on);
  font-family: var(--pm-font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(79, 195, 185, 0.25), 0 8px 28px rgba(0, 130, 124, 0.35);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.pm-home__btn:hover,
.pm-home-direct #pm-header .pm-header__cta:hover,
.pm-home-direct .pm-dock__cta:hover,
.pm-home-direct .pm-mobile__foot .pm-btn:hover { background: var(--hd-accent-press); color: var(--hd-accent-on); filter: none; transform: none; }
.pm-home__btn:active { background: var(--hd-accent-press); }
.pm-home-direct #pm-header .pm-header__cta::after,
.pm-home-direct .pm-dock__cta::after,
.pm-home-direct .pm-mobile__foot .pm-btn::after { content: none; }
.pm-home-direct #pm-header .pm-header__cta { min-height: 44px; padding: 0 20px; font-size: 0.9375rem; box-shadow: none; }
.pm-home-direct .pm-mobile__foot .pm-btn .pm-ico { display: none; }

/* Foco: contorno blanco de 2 px (toda la portada es oscura) */
.pm-home-direct :focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; border-radius: 4px; }

/* ----------------------------------------------------------------- Hero
   Grilla tenue que se desvanece y un brillo del acento detrás del diagrama. */
.pm-home__hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px); background: var(--hd-ink); color: var(--hd-on-ink); }
.pm-home__hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 65% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 65% 45%, #000 20%, transparent 75%);
  pointer-events: none;
}
/* 2.0.0: el brillo es una capa del tamaño del hero (inset: 0) con el degradado ubicado adentro.
   Antes era una caja de 760 px corrida con top/bottom + translate: cuando la fuente cambiaba y el
   hero crecía unos píxeles, Chrome la contaba como un salto enorme (CLS 0,14 con fuentes lentas).
   Una caja que empieza en la esquina del hero no se mueve nunca. */
.pm-home__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  --hd-glow-at: 50% calc(100% - 160px);
  background: radial-gradient(circle 537px at var(--hd-glow-at), rgba(0, 130, 124, 0.24), transparent 62%);
  pointer-events: none;
}
.pm-home__hero-grid { display: grid; gap: clamp(36px, 6vw, 56px); align-items: center; }
.pm-home__title { max-width: 17ch; color: #ffffff; font-size: clamp(2.5rem, 8.2vw, 5rem); line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.pm-home .pm-home__title { color: #ffffff; }
.pm-home__lead { max-width: 34em; color: var(--hd-on-ink); font-size: clamp(1.125rem, 1.8vw, 1.375rem); line-height: 1.45; }
.pm-home .pm-home__lead { margin: clamp(20px, 3vw, 28px) 0 clamp(28px, 4vw, 40px); }

@media (min-width: 1120px) {
  .pm-home__hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); }
  .pm-home__title { max-width: none; font-size: clamp(3rem, 4.4vw, 4rem); }
  .pm-home__hero::after { --hd-glow-at: calc(100% - 260px) 50%; }
}

/* ------------------------------------------------- Diagrama (Animated Beam)
   Los nodos son HTML ubicados en porcentaje con las mismas coordenadas de los
   viewBox de inc/home.php; los trazos van de centro a centro, por debajo. */
.pm-home__visual { position: relative; width: 100%; max-width: 600px; margin: 0 auto; }
/* Marco de tarjeta alrededor del diagrama (por fuera de su caja, así no cambia la geometría) */
@media (min-width: 601px) {
  .pm-home__visual::before {
    content: "";
    position: absolute;
    inset: -24px;
    border: 1px solid var(--hd-line-ink);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(17, 21, 20, 0.9), rgba(10, 10, 10, 0.55));
    pointer-events: none;
  }
}
.pm-beam { position: relative; width: 100%; aspect-ratio: 600 / 440; }
.pm-beam__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pm-beam__lines--tall { display: none; }
.pm-beam__track { fill: none; stroke: var(--hd-line-hi); stroke-width: 2; }
/* 2.0.0: paquetes de datos (<animateMotion> en inc/home.php): un punto blanco con halo. */
.pm-beam__core { fill: #ffffff; }
.pm-beam__track { transition: stroke 0.3s ease, opacity 0.3s ease; }

/* Entrada: el marco sube, los trazos aparecen y los nodos llegan en orden. (Sin clip-path sobre
   el SVG: Chrome dejaba de pintar los trazos al volver a rasterizar después de esa animación.) */
@keyframes fx-fade {
  from { opacity: 0; }
}
@keyframes fx-node {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}
.pm-home__visual { animation: fx-rise-in 0.9s var(--fx-ease, ease) 0.2s backwards; }
.pm-beam__lines { animation: fx-fade 0.9s ease 0.55s backwards; }

.pm-beam__node {
  --x: 50%;
  --y: 50%;
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--hd-line-hi);
  border-radius: 12px;
  background: var(--hd-panel);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}
.pm-beam__node--meta { --x: 13%; --y: 20%; }
.pm-beam__node--google { --x: 13%; --y: 80%; }
.pm-beam__node--hub {
  flex-direction: column;
  gap: 2px;
  padding: 16px 22px;
  border-color: var(--hd-accent);
  box-shadow: 0 0 0 1px rgba(0, 130, 124, 0.5), 0 0 36px rgba(0, 130, 124, 0.35), 0 12px 32px rgba(0, 0, 0, 0.45);
}
.pm-beam__node--hub::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  box-shadow: 0 0 56px 8px var(--hd-accent-glow);
  opacity: 0.35;
  animation: pm-glow 3.6s ease-in-out infinite;
}
@keyframes pm-glow {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}
.pm-beam__node--hub strong { color: #ffffff; font-family: var(--hd-display); font-size: 1.375rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.pm-beam__node--hub span { color: var(--hd-on-ink); font-weight: 500; }
.pm-beam__node--out { --x: 87%; --y: 50%; flex-direction: column; border-color: rgba(79, 195, 185, 0.55); }
.pm-beam__node--out span { display: block; }
.pm-beam__node { cursor: default; animation: fx-node 0.6s var(--fx-ease, ease) backwards; transition: border-color 0.25s ease; }
.pm-beam__node--meta { animation-delay: 0.5s; }
.pm-beam__node--google { animation-delay: 0.62s; }
.pm-beam__node--hub { animation-delay: 0.85s; }
.pm-beam__node--out { animation-delay: 1.1s; }

/* Rutas: al pasar por un nodo (o tocarlo) se enciende su recorrido y se atenúa el resto. */
.pm-beam[data-route] .pm-beam__track { opacity: 0.35; }
.pm-beam[data-route="meta"] :is(.pm-beam__track--1, .pm-beam__track--3),
.pm-beam[data-route="google"] :is(.pm-beam__track--2, .pm-beam__track--3),
.pm-beam:is([data-route="hub"], [data-route="out"]) .pm-beam__track { opacity: 1; stroke: var(--hd-accent-soft); }
.pm-beam[data-route="meta"] .pm-beam__packet--2,
.pm-beam[data-route="google"] .pm-beam__packet--1 { opacity: 0.2; }
.pm-beam[data-route="meta"] .pm-beam__node--meta,
.pm-beam[data-route="google"] .pm-beam__node--google,
.pm-beam[data-route="hub"] .pm-beam__node--hub,
.pm-beam[data-route="out"] .pm-beam__node--out { z-index: 3; border-color: var(--hd-accent-soft); }

/* Nota técnica de cada nodo */
.pm-beam__tip {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 4;
  display: block;
  width: min(250px, 70vw);
  padding: 12px 14px;
  border: 1px solid rgba(79, 195, 185, 0.35);
  border-radius: 12px;
  background: #070b0d;
  color: var(--hd-on-ink);
  font-family: var(--pm-font);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(0, 130, 124, 0.18);
  opacity: 0;
  translate: 0 6px;
  transition: opacity 0.25s ease, translate 0.3s var(--fx-ease, ease);
  pointer-events: none;
}
.pm-beam__node--hub .pm-beam__tip { left: 50%; translate: -50% 6px; }
.pm-beam__node--out .pm-beam__tip { left: auto; right: 0; }
.pm-beam__node--google .pm-beam__tip { top: auto; bottom: calc(100% + 12px); translate: 0 -6px; }
.pm-beam[data-route="meta"] .pm-beam__node--meta .pm-beam__tip,
.pm-beam[data-route="google"] .pm-beam__node--google .pm-beam__tip,
.pm-beam[data-route="out"] .pm-beam__node--out .pm-beam__tip { opacity: 1; translate: 0 0; }
.pm-beam[data-route="hub"] .pm-beam__node--hub .pm-beam__tip { opacity: 1; translate: -50% 0; }

.pm-beam.is-paused .pm-beam__node--hub::after { animation-play-state: paused; }

/* Pausa: abajo a la derecha del diagrama, donde no hay nodos */
.pm-home__pause {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--hd-line-hi);
  border-radius: 50%;
  background: var(--hd-ink);
  color: var(--hd-on-ink);
  cursor: pointer;
}
.pm-home__pause[hidden] { display: none; }
.pm-home__pause:hover { border-color: var(--hd-on-ink); color: #ffffff; }
.pm-home__pause span { display: block; width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.pm-home__pause[aria-pressed="true"] span { width: 0; height: 0; margin-left: 3px; border: 7px solid transparent; border-left: 11px solid currentColor; border-right: 0; }
/* 1.9.0: en celular la pausa va abajo a la izquierda; a la derecha está el botón flotante de WhatsApp. */
@media (max-width: 700px) {
  .pm-home__pause { right: auto; left: 0; }
}

/* Celular: el diagrama en vertical y compacto, debajo del botón */
@media (max-width: 600px) {
  .pm-home__visual { max-width: 380px; }
  .pm-beam { aspect-ratio: 340 / 320; }
  .pm-beam__lines--wide { display: none; }
  .pm-beam__lines--tall { display: block; }
  .pm-beam__node--meta { --x: 25%; --y: 12.5%; }
  .pm-beam__node--google { --x: 75%; --y: 12.5%; }
  .pm-beam__node--hub { --x: 50%; --y: 46.875%; }
  .pm-beam__node--out { --x: 50%; --y: 86.875%; }
  /* Notas en vertical: Google (arriba a la derecha) alineada a la derecha, la salida hacia arriba */
  .pm-beam__node--google .pm-beam__tip { top: calc(100% + 12px); bottom: auto; left: auto; right: 0; translate: 0 6px; }
  .pm-beam__node--out .pm-beam__tip { top: auto; bottom: calc(100% + 12px); left: 50%; right: auto; translate: -50% -6px; }
  .pm-beam[data-route="out"] .pm-beam__node--out .pm-beam__tip { translate: -50% 0; }
}

/* ------------------------------------------------------------ Resultados */
.pm-home__cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hd-gap); margin: 0; padding: 0; list-style: none; }
.pm-home__cases--1 { grid-template-columns: minmax(0, 560px); }
.pm-home__cases--2, .pm-home__cases--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pm-home__case { display: flex; flex-direction: column; padding: clamp(24px, 2.8vw, 36px); border: 1px solid var(--hd-line-ink); border-radius: var(--hd-radius); background: var(--hd-panel); }
.pm-home .pm-home__case-result { padding-bottom: clamp(24px, 3vw, 36px); margin-bottom: clamp(20px, 2.4vw, 28px); border-bottom: 1px solid var(--hd-line-ink); color: #ffffff; font-size: 1rem; font-weight: 500; line-height: 1.3; }
.pm-home__case-result strong { display: block; margin-bottom: 8px; color: var(--hd-accent-soft); font-family: var(--hd-display); font-size: clamp(2.75rem, 5vw, 4rem); font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pm-home__case-result span { display: block; }
.pm-home .pm-home__case-sector { font-family: var(--pm-font); font-size: 1rem; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.pm-home .pm-home__case-work { margin-top: 6px; color: var(--hd-muted); }

/* ---------------------------------------------- Cómo trabajamos (riel)
   2.0.0: un riel une 01 → 02 → 03 y se llena al scrollear (assets/js/fx.js escribe --rail y
   enciende cada paso al pasar por su número). Sin JavaScript queda lleno y todo encendido. */
.pm-home__process { position: relative; padding-top: 56px; }
.pm-home__rail { position: absolute; top: 15px; left: 0; right: 0; height: 2px; border-radius: 2px; background: var(--hd-line-ink); container-type: inline-size; pointer-events: none; }
.pm-home__rail-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--hd-accent), var(--hd-accent-soft)); box-shadow: 0 0 12px var(--hd-accent-glow); transform-origin: 0 50%; transform: scaleX(var(--rail, 1)); }
.pm-home__rail-head { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #e6fffb; box-shadow: 0 0 0 4px rgba(79, 195, 185, 0.25), 0 0 18px 4px var(--hd-accent-glow); translate: calc(var(--rail, 1) * 100cqw) 0; }
@supports not (width: 1cqw) { .pm-home__rail-head { display: none; } }
.pm-home__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hd-gap); margin: 0; padding: 0; list-style: none; }
.pm-home__steps > li { position: relative; padding: clamp(28px, 2.8vw, 36px) clamp(24px, 2.4vw, 32px); border: 1px solid var(--hd-line-ink); border-radius: var(--hd-radius); background: var(--hd-panel); }
.pm-home__step-n {
  position: absolute;
  top: -56px;
  left: clamp(24px, 2.4vw, 32px);
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--hd-accent-soft);
  border-radius: 999px;
  background: var(--hd-ink);
  color: #ffffff;
  font-family: var(--hd-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 4px rgba(0, 130, 124, 0.16), 0 0 22px var(--hd-accent-glow);
  transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.4s ease;
}
.pm-rail-on .pm-home__steps > li:not(.is-lit) .pm-home__step-n { border-color: var(--hd-line-hi); color: var(--hd-muted); box-shadow: none; }
.pm-rail-on .pm-home__steps > li.is-lit { border-color: rgba(79, 195, 185, 0.32); }
.pm-home__steps h3 { margin-bottom: 10px; font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.15; letter-spacing: -0.015em; }
.pm-home__steps p { color: var(--hd-on-ink); }

/* ---------------------------------------------------------- Qué hacemos */
.pm-home__services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--hd-gap); margin: 0; padding: 0; list-style: none; }
.pm-home__services li { position: relative; overflow: hidden; padding: clamp(28px, 3vw, 40px) clamp(24px, 2.4vw, 32px); border: 1px solid var(--hd-line-ink); border-radius: var(--hd-radius); background: var(--hd-panel); }
.pm-home__services li::before { content: ""; position: absolute; top: 0; left: clamp(24px, 2.4vw, 32px); width: 48px; height: 2px; background: var(--hd-accent-soft); box-shadow: 0 0 14px var(--hd-accent-glow); }
.pm-home__services h3 { margin-bottom: 12px; font-size: clamp(1.25rem, 2vw, 1.625rem); line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; }
.pm-home__services p { color: var(--hd-on-ink); }

/* 2.0.0: bento. Meta y Google apiladas a la izquierda; medición ocupa dos columnas y dos filas
   y lleva el esquema animado de eventos. Íconos de trazo propios. */
.pm-home__bento > li { display: flex; flex-direction: column; }
@media (min-width: 901px) {
  .pm-home__bento > li:nth-child(1) { grid-column: 1; grid-row: 1; }
  .pm-home__bento > li:nth-child(2) { grid-column: 1; grid-row: 2; }
  .pm-home__bento > li:nth-child(3) { grid-column: 2 / 4; grid-row: 1 / 3; }
}
.pm-home__icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 20px; border: 1px solid rgba(79, 195, 185, 0.28); border-radius: 12px; background: rgba(0, 130, 124, 0.08); color: var(--hd-accent-soft); box-shadow: 0 0 22px rgba(0, 130, 124, 0.18); }
.pm-home__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pm-home .pm-home__bento-main h3 { max-width: 24ch; font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.1; }
.pm-home__bento-main p { max-width: 48ch; }

/* Esquema de eventos (ilustrativo, sin cifras) */
.pm-home__widget { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: clamp(24px, 3vw, 32px); }
.pm-home .pm-home__widget-bar { display: flex; align-items: center; gap: 10px; color: var(--hd-muted); font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.pm-home__widget-live { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--hd-accent-soft); }
.pm-home__widget-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--hd-accent-soft); animation: fx-ping 1.8s ease-out infinite; }
@keyframes fx-ping {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(3.2); opacity: 0; }
}
.pm-home__widget-feed { position: relative; height: 200px; overflow: hidden; border: 1px solid var(--hd-line-ink); border-radius: 12px; background: rgba(5, 7, 10, 0.65); -webkit-mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(180deg, transparent, #000 16%, #000 84%, transparent); }
.pm-home__widget-list { margin: 0; padding: 0; list-style: none; animation: fx-feed 16s linear 3; }
.pm-home__widget:hover .pm-home__widget-list { animation-play-state: paused; }
@keyframes fx-feed { to { transform: translateY(-50%); } }
.pm-home__widget-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 50px; padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.pm-home__widget-list code { color: #ffffff; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.8125rem; }
.pm-home__widget-dest { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-home__widget-to { padding: 3px 9px; border: 1px solid rgba(79, 195, 185, 0.3); border-radius: 999px; background: rgba(0, 130, 124, 0.1); color: var(--hd-accent-soft); font-size: 0.75rem; font-weight: 600; line-height: 1.3; }
.pm-home__widget-ok { margin-left: auto; color: var(--hd-muted); font-size: 0.75rem; }
.pm-home__widget-ok::before { content: "\2713\00a0"; color: var(--hd-accent-soft); }
.pm-home .pm-home__widget-note { color: var(--hd-muted); font-size: 0.75rem; letter-spacing: 0.04em; }
@media (max-width: 600px) {
  .pm-home__widget-feed { height: 232px; }
  .pm-home__widget-ok { margin-left: 0; }
}

/* --------------------------------------------------------------- Cierre */
.pm-home__close { position: relative; overflow: hidden; isolation: isolate; padding: var(--hd-section) 0; border-top: 1px solid var(--hd-line-ink); background: var(--hd-ink); color: var(--hd-on-ink); text-align: center; }
.pm-home__close::before { content: ""; position: absolute; z-index: -1; left: 50%; bottom: -380px; width: 900px; height: 600px; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(0, 130, 124, 0.3), transparent 65%); pointer-events: none; }
/* 2.0.0: botón del cierre más grande y con más brillo */
.pm-home__close .pm-home__btn { min-height: 60px; padding: 0 36px; border-radius: 12px; font-size: 1.0625rem; box-shadow: 0 0 0 1px rgba(79, 195, 185, 0.35), 0 12px 40px rgba(0, 130, 124, 0.5), 0 0 64px rgba(0, 130, 124, 0.25); }
.pm-home .pm-home__statement { max-width: 22ch; margin: 0 auto clamp(28px, 4vw, 44px); color: #ffffff; font-family: var(--hd-display); font-size: clamp(1.875rem, 4.6vw, 3.5rem); font-weight: 600; line-height: 1.06; letter-spacing: -0.025em; text-wrap: balance; }

/* --------------------------------- Cabecera, barra inferior y pie en la portada */
.pm-home-direct #pm-header { background: var(--hd-ink); border-bottom: 1px solid var(--hd-line-ink); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.pm-home-direct #pm-header .pm-brand,
.pm-home-direct #pm-header .pm-brand__name,
.pm-home-direct #pm-header .pm-nav a { color: #ffffff; }
.pm-home-direct #pm-header .pm-nav a { font-weight: 500; }
.pm-home-direct #pm-header a.pm-lang__opt { color: var(--hd-on-ink); }
.pm-home-direct #pm-header .pm-nav li.is-active > a,
.pm-home-direct #pm-header .pm-nav a:hover { color: #ffffff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.pm-home-direct #pm-header .pm-nav li > a::after { content: none; }
.pm-home-direct #pm-header .pm-burger span,
.pm-home-direct #pm-header .pm-burger span::before,
.pm-home-direct #pm-header .pm-burger span::after { background: #ffffff; }
.pm-home-direct .pm-dock { background: var(--hd-ink); border-top: 1px solid var(--hd-line-ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
.pm-home-direct .pm-dock__cta { flex: 1; }
.pm-home-direct .pm-dock__wa { display: none; } /* una sola acción; WhatsApp sigue en el pie y en el menú */
/* 1.9.0: el botón flotante de WhatsApp sólo en celular; en la PC la portada sigue sin él. */
@media (min-width: 701px) {
  .pm-home-direct .pm-wa { display: none; }
}
.pm-home-direct .pm-mobile { background: var(--hd-ink); }
.pm-home-direct .pm-footer { background: var(--hd-ink); border-top: 1px solid var(--hd-line-ink); }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 900px) {
  .pm-home__cases, .pm-home__cases--2, .pm-home__cases--4, .pm-home__services, .pm-home__steps { grid-template-columns: minmax(0, 1fr); }
  /* Pasos en columna: el riel baja por la izquierda, de número en número */
  .pm-home__process { padding: 0 0 0 58px; }
  .pm-home__rail { top: 38px; bottom: 0; left: 21px; right: auto; width: 2px; height: auto; container-type: size; }
  .pm-home__rail-fill { background: linear-gradient(180deg, var(--hd-accent), var(--hd-accent-soft)); transform-origin: 50% 0; transform: scaleY(var(--rail, 1)); }
  .pm-home__rail-head { top: 0; left: 50%; translate: 0 calc(var(--rail, 1) * 100cqh); }
  .pm-home__step-n { top: 22px; left: -58px; }
  .pm-home__case-result strong { font-size: clamp(2.75rem, 13vw, 3.75rem); }
}
@media (max-width: 600px) {
  .pm-home__btn { width: 100%; }
  .pm-home__title { max-width: none; }
}
/* 1.9.0: "reducir movimiento" sólo cuenta con la opción del Personalizador (html.pm-respect-motion).
   Sin ella, Windows con los efectos de animación apagados dejaba la portada quieta en la PC. */
@media (prefers-reduced-motion: reduce) {
  html.pm-respect-motion :is(.pm-home__btn, .pm-home-direct #pm-header .pm-header__cta, .pm-home-direct .pm-dock__cta) { transition: none; }
  /* Sin paquetes ni entrada: los trazos quedan encendidos y quietos */
  html.pm-respect-motion .pm-beam__packet { display: none; }
  html.pm-respect-motion .pm-beam__track { stroke: var(--hd-accent); }
  html.pm-respect-motion :is(.pm-home__visual, .pm-beam__lines, .pm-beam__node, .pm-home__widget-list) { animation: none; }
  html.pm-respect-motion .pm-home__widget-live::after { animation: none; display: none; }
  html.pm-respect-motion :is(.pm-beam__tip, .pm-beam__track, .pm-home__step-n) { transition: none; }
  html.pm-respect-motion .pm-beam__node--hub::after { animation: none; opacity: 0.6; }
  html.pm-respect-motion :is(.pm-home__case, .pm-home__steps > li, .pm-home__services > li, .pm-home__btn, .pm-home-direct #pm-header .pm-header__cta) { transition: none; transform: none; }
}

/* ===================================================== 1.8.0: escritorio con más vida
   Sólo desde 1024 px. 2.0.0: los haces de trazo pasaron a ser paquetes (más arriba). */
@media (min-width: 1024px) {
  /* Grilla de fondo un poco más presente, centrada en el diagrama y desvanecida en los bordes */
  .pm-home__hero::before {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    -webkit-mask-image: radial-gradient(ellipse 70% 78% at 70% 48%, #000 16%, transparent 72%);
    mask-image: radial-gradient(ellipse 70% 78% at 70% 48%, #000 16%, transparent 72%);
  }
  /* Brillo ambiental #00827c detrás del diagrama, dentro de su marco */
  .pm-home__visual { isolation: isolate; }
  .pm-home__visual::before { z-index: -2; }
  .pm-home__visual::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 4% 8%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0, 130, 124, 0.3), rgba(0, 130, 124, 0.1) 58%, transparent);
    pointer-events: none;
  }
}

@media (min-width: 1024px) {
  /* CAPI respira al ritmo de los paquetes */
  .pm-beam__node--hub::after {
    box-shadow: 0 0 64px 12px rgba(0, 130, 124, 0.55);
    animation: pm-hub-breathe 3.2s ease-in-out infinite;
  }
}
@keyframes pm-hub-breathe {
  0%, 100% { opacity: 0.45; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* Mouse: borde iluminado, elevación mínima y brillo suave en tarjetas y botones */
@media (min-width: 1024px) and (hover: hover) {
  .pm-home__case:hover,
  .pm-home__steps > li:hover,
  .pm-home__services > li:hover {
    border-color: rgba(79, 195, 185, 0.45);
    box-shadow: 0 0 0 1px rgba(79, 195, 185, 0.12), 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 36px rgba(0, 130, 124, 0.16);
  }
  .pm-home__btn:hover,
  .pm-home-direct #pm-header .pm-header__cta:hover {
    box-shadow: 0 0 0 1px rgba(79, 195, 185, 0.55), 0 10px 34px rgba(0, 130, 124, 0.55), 0 0 24px rgba(79, 195, 185, 0.28);
  }
}
@media (min-width: 1024px) and (hover: hover) {
  .pm-home__case:not(.fx-busy),
  .pm-home__steps > li:not(.fx-busy),
  .pm-home__services > li:not(.fx-busy) { transition: transform 0.3s var(--fx-ease, ease), border-color 0.25s ease, box-shadow 0.3s ease; }
  .pm-home__case:hover,
  .pm-home__steps > li:hover,
  .pm-home__services > li:hover { transform: translateY(-3px); }
  .pm-home__btn,
  .pm-home-direct #pm-header .pm-header__cta { transition: background-color 0.15s ease, box-shadow 0.2s ease, transform 0.2s ease; }
  .pm-home__btn:hover,
  .pm-home-direct #pm-header .pm-header__cta:hover { transform: translateY(-1px); }
}
