/* ==========================================================================
   Cor-E Dark — bloques específicos de la home (public/css/home-dark.css)
   Namespace .hm-* — solo carga en paginaActual === 'home' (ver cabecera.ejs).
   Los tokens :root y los componentes genéricos viven en dark-base.css, que
   se carga antes que este archivo. Ver prompt/servicesNew.md §2.2.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Header sobre el hero — transparente hasta hacer scroll.
   Vive aquí a propósito: body.theme-dark ya no es exclusivo de la home,
   pero este tratamiento sí. Las demás vistas oscuras usan el navbar opaco
   definido en core.css.
   -------------------------------------------------------------------------- */
body.theme-dark .custom-navbar {
  background: transparent;
  border-bottom: 0;
}
body.theme-dark .custom-navbar.scrolled {
  background: rgba(8,7,26,0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--dk-line);
}

/* ==========================================================================
   Bloque 1 — Hero
   ========================================================================== */
.hm-hero {
  position: relative;
  min-height: 88svh;
  min-height: 88vh;
  display: grid;
  align-content: end;
  background: var(--dk-canvas);
  overflow: hidden;
  padding-top: 64px;
}
.hm-hero-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}
.hm-hero-inner {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(64px, 10vh, 128px);
}
.hm-hero-title {
  font-size: var(--fs-d1);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--tx-1);
  max-width: 16ch;
  margin: 0 0 28px;
}
.hm-hero-sub {
  font-size: var(--fs-lg);
  color: var(--tx-2);
  max-width: 52ch;
  line-height: 1.65;
  margin: 0 0 28px;
}
.hm-fx-toggle {
  position: absolute;
  right: var(--pad-inline);
  bottom: 24px;
  z-index: 1;
  width: 32px;
  height: 32px;
  border: 1px solid var(--dk-line);
  background: transparent;
  color: var(--tx-3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.hm-fx-toggle:hover,
.hm-fx-toggle:focus-visible {
  color: var(--tx-1);
  border-color: var(--dk-line-strong);
}
.hm-fx-toggle .hm-icon-pause,
.hm-fx-toggle .hm-icon-play { display: block; }
.hm-fx-toggle[aria-pressed="true"] .hm-icon-pause { display: none; }
.hm-fx-toggle[aria-pressed="false"] .hm-icon-play { display: none; }

@media (max-width: 767.98px) {
  .hm-hero-title { max-width: 100%; }
  .hm-hero-fx { opacity: 0.4; }
}

/* ==========================================================================
   Bloque 2 — Franja de prueba
   ========================================================================== */
.hm-proof {
  background: var(--dk-canvas);
  border-block: 1px solid var(--dk-line);
  padding-block: clamp(40px, 5vw, 72px);
}
.hm-proof .hm-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
}
.hm-logo-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 64px);
  margin: 0;
  padding: 0;
}
.hm-logo-row li {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
}
.hm-logo {
  width: auto;
  opacity: 0.9;
  transition: opacity var(--dur-1) var(--ease);
}
.hm-logo-row li:hover .hm-logo { opacity: 1; }
.hm-logo--fiserv { height: 34px; }
.hm-logo--vantis { height: 30px; }
.hm-logo--fac    { height: 84px; }
.hm-logo-row li span {
  color: var(--tx-1);
  font-weight: 600;
  display: block;
}
.hm-logo-row li em {
  color: var(--tx-3);
  font-style: normal;
  font-size: var(--fs-sm);
  display: block;
}
.hm-partner {
  padding-left: clamp(32px, 5vw, 64px);
  border-left: 1px solid var(--dk-line);
}
@media (max-width: 767.98px) {
  .hm-partner {
    padding-left: 0;
    border-left: 0;
    padding-top: 24px;
    border-top: 1px solid var(--dk-line);
    width: 100%;
  }
}

/* ==========================================================================
   Bloque 3 — Mosaico de líneas de negocio
   ========================================================================== */
.hm-lines {
  background: var(--dk-canvas);
  padding-block: var(--rhythm);
}
.hm-lines-title {
  font-size: var(--fs-d2);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--tx-1);
  margin: 0 0 clamp(32px, 4vw, 56px);
}
.hm-lines-grid {
  display: grid;
  grid-template-columns: 1.618fr 1fr;
  grid-template-rows: repeat(2, minmax(260px, auto));
  gap: var(--gap);
}
.hm-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--dk-line);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-2) var(--ease);
  overflow: hidden;
}
.hm-cell:hover { border-color: var(--dk-line-strong); }
.hm-cell:hover .hm-link-arrow::after { transform: translateX(4px); }
.hm-cell:hover .hm-link-arrow { border-color: var(--ac-yellow); }
.hm-cell h3 {
  font-size: var(--fs-h3);
  color: var(--tx-1);
  margin: 0 0 8px;
}
.hm-cell p {
  color: var(--tx-2);
  max-width: 42ch;
  margin: 0;
}
.hm-cell .hm-link-arrow { margin-top: 16px; }

.hm-cell--lead {
  grid-row: span 2;
  background-size: cover;
  background-position: center;
}
.hm-cell--lead::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--dk-canvas) 0%, rgba(8,7,26,0.55) 30%, rgba(8,7,26,0) 65%);
}
.hm-cell--lead > * { position: relative; z-index: 1; }
.hm-cell--lead img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-3) var(--ease);
  z-index: 0;
}
.hm-cell--lead:hover img { transform: scale(1.04); }

.hm-cell--consulting {
  background:
    repeating-linear-gradient(45deg, rgba(64,159,243,0.12) 0 1px, transparent 1px 24px),
    var(--dk-surface);
}
.hm-cell--training {
  background: var(--ac-orange);
  color: var(--dk-canvas);
}
.hm-cell--training h3,
.hm-cell--training p { color: var(--dk-canvas); }
.hm-cell--training .hm-link-arrow {
  color: var(--dk-canvas);
  border-color: rgba(8,7,26,0.4);
}
.hm-cell--training .hm-link-arrow::after { color: var(--dk-canvas); }

@media (max-width: 1023.98px) {
  .hm-lines-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .hm-cell { grid-row: auto; min-height: 240px; }
}
@media (max-width: 599.98px) {
  .hm-tags li:nth-child(n+4) { display: none; }
}

/* ==========================================================================
   Bloque 4 — Declaración de posicionamiento
   ========================================================================== */
.hm-statement {
  background: var(--dk-surface-2);
  padding-block: var(--rhythm);
}
.hm-statement-text {
  font-size: var(--fs-d3);
  font-weight: 500;
  line-height: 1.2;
  color: var(--tx-1);
  max-width: 26ch;
  margin: 0;
}
.hm-statement-text em {
  color: var(--ac-yellow);
  font-style: normal;
}
.hm-statement-sig {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--dk-line);
  color: var(--tx-3);
  font-size: var(--fs-sm);
  max-width: 26ch;
}

/* ==========================================================================
   Bloque 5 — El modelo Cor-E
   ========================================================================== */
.hm-model {
  background: var(--dk-canvas);
  padding-block: var(--rhythm);
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
.hm-wordmark {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--tx-3);
  margin: 0 0 clamp(32px, 5vw, 56px);
}
.hm-slider {
  position: relative;
  min-height: 320px;
}
.hm-slide {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--gap);
  align-items: center;
}
.hm-js .hm-slide { display: none; }
.hm-js .hm-slide.hm-active { display: grid; }
.hm-slide-visual {
  font-size: clamp(6rem, 14vw, 12rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--dk-line-strong);
}
.hm-slide-body h3 {
  font-size: var(--fs-d3);
  color: var(--tx-1);
  margin: 0 0 12px;
}
.hm-slide-body p {
  color: var(--tx-2);
  max-width: 52ch;
  margin: 0 0 20px;
}
.hm-slider-ctl {
  display: none;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}
.hm-js .hm-slider-ctl { display: flex; }
.hm-slider-ctl button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--tx-3);
  cursor: pointer;
  transition: color var(--dur-1) var(--ease);
}
.hm-slider-ctl button:hover,
.hm-slider-ctl button:focus-visible {
  color: var(--tx-1);
}
.hm-slider-ctl button:focus-visible {
  outline: 1px solid var(--dk-line);
}
.hm-counter {
  font-size: var(--fs-sm);
  color: var(--tx-3);
}
@media (max-width: 767.98px) {
  .hm-slide { grid-template-columns: 1fr; }
  .hm-slide-visual { font-size: clamp(4rem, 20vw, 6rem); }
}

/* ==========================================================================
   Bloque 7 — Trayectoria y confianza
   ========================================================================== */
.hm-stats {
  background: var(--dk-canvas);
  padding-block: var(--rhythm);
  border-top: 1px solid var(--dk-line);
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
.hm-stats-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 2fr;
}
.hm-stats-cell {
  border-top: 1px solid var(--dk-line);
  padding: clamp(24px, 3vw, 40px) clamp(24px, 3vw, 40px) 0 0;
}
.hm-stats-cell + .hm-stats-cell {
  border-inline-start: 1px solid var(--dk-line);
  padding-left: clamp(24px, 3vw, 40px);
}
.hm-stat-number {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--tx-1);
  margin: 0 0 12px;
}
.hm-stat-label {
  font-size: var(--fs-sm);
  color: var(--tx-3);
  max-width: 26ch;
  margin: 0;
}
@media (max-width: 899.98px) {
  .hm-stats-grid { grid-template-columns: 1fr; }
  .hm-stats-cell + .hm-stats-cell {
    border-inline-start: 0;
    padding-left: 0;
    margin-top: 32px;
  }
}

/* ==========================================================================
   Bloque 8 — Alcance global
   ========================================================================== */
.hm-reach {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
.hm-reach img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hm-reach::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--dk-canvas) 0%, rgba(8,7,26,.72) 30%, rgba(8,7,26,0) 55%);
  z-index: 1;
}
.hm-reach-content {
  position: relative;
  z-index: 2;
  padding-block: clamp(64px, 10vw, 120px);
}
.hm-reach-title {
  font-size: var(--fs-d2);
  color: var(--tx-1);
  margin: 0 0 8px;
}
.hm-reach-tagline {
  color: var(--ac-yellow);
  font-size: var(--fs-lg);
  margin: 0 0 16px;
}
.hm-reach-desc {
  color: var(--tx-2);
  max-width: 46ch;
  margin: 0;
}

/* ==========================================================================
   Bloque 9 — Careers
   ========================================================================== */
.hm-careers {
  display: grid;
  grid-template-columns: 58% 42%;
  min-height: 420px;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
.hm-careers-img-wrap {
  position: relative;
  overflow: hidden;
}
.hm-careers-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hm-careers-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 70%, var(--dk-surface-2) 100%);
}
.hm-careers-content {
  background: var(--dk-surface-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 4vw, 64px);
}
.hm-careers-content h2 {
  font-size: var(--fs-d2);
  color: var(--tx-1);
  margin: 0 0 16px;
}
.hm-careers-content p {
  color: var(--tx-2);
  margin: 0 0 24px;
}
@media (max-width: 899.98px) {
  .hm-careers { grid-template-columns: 1fr; }
  .hm-careers-img-wrap { min-height: 280px; }
  .hm-careers-img-wrap::after { display: none; }
}
