/* ============================================================
   GAMA · Diagnóstico de Ecosistema Digital — accesos en el home
   Estilos aislados (prefijo dxh-). No modifica reglas existentes.
   ============================================================ */

/* ---------- B · Enlace bajo los botones de la portada ---------- */
.hero-dx {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 6px 18px 6px 6px;
  min-height: 48px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-sm);
  color: var(--ink-400);
  font-size: 15px;
  line-height: 1.35;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.9s var(--out) 0.56s forwards;
}
.hero-dx .dxh-ico {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--ink-100);
  box-shadow: var(--sh-sm);
  display: grid;
  place-items: center;
  transition: transform 0.25s var(--out);
}
.hero-dx:hover {
  border-color: var(--ink-200);
  box-shadow: var(--sh-md);
}
.hero-dx .dxh-ico svg {
  width: 20px;
  height: 20px;
}
.hero-dx b {
  color: var(--ink);
  font-weight: 600;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.35s var(--out);
}
.hero-dx .dxh-time {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  white-space: nowrap;
}
.hero-dx .dxh-arrow {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--ink);
  transition: transform 0.25s var(--out);
}
.hero-dx:hover b {
  background-size: 100% 1px;
}
.hero-dx:hover .dxh-arrow {
  transform: translateX(3px);
}
.hero-dx:hover .dxh-ico {
  transform: rotate(-12deg);
}
.hero-dx .dxh-txt span {
  margin-right: 4px;
}

/* ---------- Anillo de puntaje (compartido) ---------- */
.dxh-ring circle {
  fill: none;
}
.dxh-ring .trk {
  stroke: var(--ink-100);
}
.dxh-ring .val {
  stroke: var(--purple);
  stroke-linecap: round;
}

/* ---------- A · Bloque después de "Situaciones" ---------- */
.dxh {
  padding-top: 0;
}
.dxh-panel {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding: 64px;
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
  overflow: hidden;
  isolation: isolate;
}
.dxh-mosaic {
  position: absolute;
  right: -18px;
  bottom: -18px;
  display: grid;
  grid-template-columns: repeat(7, 64px);
  grid-auto-rows: 64px;
  gap: 8px;
  z-index: -1;
  -webkit-mask-image: radial-gradient(120% 120% at 100% 100%, #000 20%, transparent 62%);
  mask-image: radial-gradient(120% 120% at 100% 100%, #000 20%, transparent 62%);
  opacity: 0.55;
  pointer-events: none;
}
.dxh-mosaic i {
  border-radius: 14px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 60%), var(--c);
}
.dxh-copy .h2 {
  font-size: clamp(30px, 3.4vw, 44px);
}
.dxh-copy .lead {
  margin-top: 20px;
  max-width: 520px;
}
.dxh-steps {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  counter-reset: dxh;
  max-width: 520px;
}
.dxh-steps li {
  counter-increment: dxh;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px dashed var(--ink-100);
  font-size: 15.5px;
  color: var(--ink-500);
  line-height: 1.45;
}
.dxh-steps li:last-child {
  border-bottom: 1px dashed var(--ink-100);
}
.dxh-steps li::before {
  content: counter(dxh, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--purple);
}
.dxh-steps b {
  color: var(--ink);
  font-weight: 600;
}
.dxh-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
}
.dxh-note {
  font-size: 13.5px;
  color: var(--ink-300);
}

/* Muestra del informe */
.dxh-report {
  position: relative;
  background: #fff;
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 26px 28px 24px;
  max-width: 460px;
  justify-self: end;
  width: 100%;
}
.dxh-report-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dxh-report-top .mono {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-300);
}
.dxh-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
  background: var(--ink-50);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-pill);
  padding: 4px 10px;
}
.dxh-co {
  margin-top: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink-100);
}
.dxh-co b {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dxh-co span {
  font-size: 13px;
  color: var(--ink-400);
}
.dxh-score {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 22px;
  align-items: center;
  padding: 20px 0 18px;
}
.dxh-gauge {
  position: relative;
  width: 112px;
  height: 112px;
}
.dxh-gauge svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.dxh-gauge .val {
  stroke-dasharray: 289;
  stroke-dashoffset: 289;
  transition: stroke-dashoffset 1.4s var(--out) 0.2s;
}
.dxh-report.inview .dxh-gauge .val {
  stroke-dashoffset: 156;
}
.dxh-gauge .num {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.dxh-gauge .num b {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  color: var(--navy);
  letter-spacing: -0.02em;
}
.dxh-gauge .num small {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-300);
  margin-top: 4px;
}
.dxh-level {
  font-size: 13px;
  color: var(--ink-400);
}
.dxh-level b {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 2px;
}
.dxh-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 12px;
}
.dxh-scale i {
  height: 6px;
  border-radius: 3px;
  background: var(--ink-100);
}
.dxh-scale i.past {
  background: var(--purple-200);
}
.dxh-scale i.on {
  background: var(--purple);
}
.dxh-dims {
  display: grid;
  gap: 12px;
}
.dxh-dim {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  font-size: 13.5px;
}
.dxh-dim span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-500);
}
.dxh-dim span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}
.dxh-dim .mono {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.dxh-bar {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 3px;
  background: var(--ink-50);
  overflow: hidden;
}
.dxh-bar i {
  display: block;
  height: 100%;
  width: calc(var(--v) * 1%);
  border-radius: inherit;
  background: var(--c);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--out);
}
.dxh-report.inview .dxh-bar i {
  transform: scaleX(1);
}
.dxh-dim:nth-child(2) .dxh-bar i {
  transition-delay: 0.12s;
}
.dxh-dim:nth-child(3) .dxh-bar i {
  transition-delay: 0.24s;
}
.dxh-start {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
}
.dxh-start .k {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.dxh-start b {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
}
.dxh-start em {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border-radius: var(--r-pill);
  padding: 5px 10px;
  white-space: nowrap;
}

/* ---------- C · Alternativa en Contacto ---------- */
.dxh-contact {
  pointer-events: auto;
  margin-top: 40px;
  max-width: 470px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 16px;
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: rgba(13, 20, 40, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.dxh-contact .dxh-ico {
  grid-row: 1 / span 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
}
.dxh-contact .dxh-ico svg {
  width: 24px;
  height: 24px;
}
.dxh-contact .dxh-ring .trk {
  stroke: rgba(255, 255, 255, 0.18);
}
.dxh-contact .dxh-ring .val {
  stroke: var(--purple-200);
}
.dxh-contact b {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.dxh-contact p {
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.68);
}
.dxh-contact .btn {
  justify-self: start;
  margin-top: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .dxh-panel {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px;
  }
  .dxh-report {
    justify-self: start;
  }
}
@media (max-width: 700px) {
  .hero-dx {
    border-radius: 18px;
    padding: 8px 14px 8px 8px;
    font-size: 14.5px;
  }
  .hero-dx .dxh-txt {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }
  .hero-dx .dxh-time {
    display: none;
  }
  .dxh-mosaic {
    display: none;
  }
  .dxh-panel {
    padding: 30px 22px 24px;
    border-radius: var(--r-lg);
    gap: 32px;
  }
  .dxh-actions .btn {
    width: 100%;
    justify-content: center;
    white-space: normal;
  }
  .dxh-report {
    padding: 22px 20px 20px;
    max-width: none;
  }
  .dxh-score {
    grid-template-columns: 92px 1fr;
    gap: 16px;
  }
  .dxh-gauge {
    width: 92px;
    height: 92px;
  }
  .dxh-gauge .num b {
    font-size: 28px;
  }
  .dxh-contact {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .dxh-contact .dxh-ico {
    grid-row: auto;
    width: 40px;
    height: 40px;
    margin-bottom: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-dx {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .dxh-gauge .val,
  .dxh-bar i {
    transition: none;
  }
  .dxh-gauge .val {
    stroke-dashoffset: 156;
  }
  .dxh-bar i {
    transform: none;
  }
}

@media (max-width: 700px) {
  .dxh-report {
    display: none;
  }
}
