/* ==========================================================================
   Tres frentes: medición, calidad de usuario e incrementalidad. Una tarjeta con visual interactivo por frente.
   ========================================================================== */

.stack {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid;
  gap: 28px;
  timeline-scope: --p2, --p3;
}
.pcard {
  position: sticky;
  top: 96px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  padding: clamp(28px, 4vw, 56px);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-height: 540px;
  transform-origin: 50% 0;
}
.p2 {
  top: 112px;
  background: var(--panel);
  color: var(--panel-ink);
  view-timeline-name: --p2;
}
.p3 {
  top: 128px;
  view-timeline-name: --p3;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .p1 {
      animation: recede linear both;
      animation-timeline: --p2;
      animation-range: entry 0% entry 100%;
    }
  }
  @media (prefers-reduced-motion: no-preference) {
    .p2 {
      animation: recede linear both;
      animation-timeline: --p3;
      animation-range: entry 0% entry 100%;
    }
  }
}
.p-copy h3 {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  letter-spacing: -0.025em;
  line-height: 1.12;
}
.p-copy > p {
  color: var(--ink-2);
  margin-top: 16px;
  max-width: 46ch;
}
.p2 .p-copy > p {
  color: var(--panel-muted);
}
.p-do {
  margin-top: 24px;
}
.p-do small {
  display: block;
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.p2 .p-do small {
  color: var(--panel-muted);
}
.p2 .chip {
  background: transparent;
  border-color: var(--panel-line);
  color: var(--panel-ink);
}
.p-viz {
  position: relative;
  min-width: 0;
}
.opt {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.opt-v {
  display: grid;
}
.opt-v b {
  grid-area: 1/1;
  font: 600 1.0625rem/1.3 var(--f-display);
  color: var(--ink);
  transition:
    opacity 320ms var(--ease-out),
    filter 320ms var(--ease-out),
    transform 380ms var(--ease-out);
}
.opt-v .o-a {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-color: var(--line-2);
}
.opt-v .o-b {
  text-decoration: underline;
  text-decoration-color: var(--brand-red);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.p-viz:not(.pre) .o-a {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(-6px);
}
.p-viz.pre .o-b {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(6px);
}
.cmp-layer {
  position: absolute;
  inset: 0;
}
.cmp-handle span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--panel-ink);
  color: var(--brand-navy);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  font-size: 20px;
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.55);
  transition: transform 160ms var(--ease-out);
}
.compare.drag .cmp-handle span {
  transform: translate(-50%, -50%) scale(0.92);
}
.cmp-handle:focus-visible span {
  box-shadow: 0 0 0 3px var(--brand-red);
}
.m-read {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.m-read small {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-3);
}
.m-read b {
  display: block;
  font: 700 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.1 var(--f-display);
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.m-read em {
  font-style: normal;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
#resp {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 14px;
  overflow: visible;
}
#resp text {
  fill: var(--ink-3);
  font: 400 11px var(--f-body);
  font-variant-numeric: tabular-nums;
}
#resp .lbl {
  fill: var(--ink);
  font-weight: 500;
}
.m-range {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.m-range b {
  font: 600 0.9375rem/1 var(--f-display);
  color: var(--ink);
}
#inv {
  width: 100%;
  margin: 10px 0 0;
  -webkit-appearance: none;
  appearance: none;
  height: 28px;
  background: transparent;
  cursor: pointer;
}
#inv::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-violet), var(--brand-red));
}
#inv::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--brand-violet), var(--brand-red));
}
#inv::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--ink);
  margin-top: -10px;
  box-shadow: 0 2px 8px rgba(36, 40, 77, 0.25);
  transition: transform 160ms var(--ease-out);
}
#inv::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--ink);
}
#inv:active::-webkit-slider-thumb {
  transform: scale(1.12);
}
#inv:focus-visible {
  outline: none;
}
#inv:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--sel);
}

@media (max-width: 960px) {
  .pcard {
    grid-template-columns: minmax(0, 1fr);
    position: relative;
    top: auto;
    min-height: 0;
  }
  .p1,
  .p2 {
    animation: none !important;
  }
}
.compare {
  cursor: ew-resize;
  overflow: hidden;
  border-radius: 16px;
  position: relative;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  aspect-ratio: auto;
  height: clamp(270px, 25vw, 310px);
  background: transparent;
}
.cmp-layer.before {
  background: var(--panel-2);
}
.cmp-layer.after {
  clip-path: inset(0 0 0 var(--pos));
  background: #f4f4f6;
}
.cmp-c {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
}
.cmp-c small {
  font-size: 0.8125rem;
  color: var(--panel-muted);
}
.after .cmp-c small {
  color: #4e5276;
}
.big {
  font: 700 clamp(4.5rem, 3rem + 5vw, 7rem)/0.9 var(--f-display);
  letter-spacing: -0.04em;
  color: #8e93c8;
  font-variant-numeric: tabular-nums;
}
.after .big {
  color: var(--brand-red);
}
.ppl {
  display: grid;
  grid-template-columns: repeat(20, 1fr);
  gap: 3px;
  width: min(320px, 88%);
}
.ppl svg {
  width: 100%;
  height: auto;
  display: block;
  color: #3b4072;
}
.ppl svg.on {
  color: #b9bcd8;
}
.after .ppl svg {
  color: #dcdde7;
}
.after .ppl svg.on {
  color: var(--brand-red);
}
.cmp-c p {
  font-size: 0.8125rem;
  color: var(--panel-muted);
  display: flex;
  gap: 10px;
  align-items: center;
}
.cmp-c p i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}
.after .cmp-c p {
  color: #4e5276;
}
.cmp-tag {
  position: absolute;
  top: 14px;
  font: 600 0.8125rem/1 var(--f-display);
  padding: 7px 11px;
  border-radius: 999px;
  z-index: 1;
}
.before .cmp-tag {
  left: 14px;
  background: var(--panel);
  color: var(--panel-ink);
}
.after .cmp-tag {
  right: 14px;
  background: var(--brand-navy);
  color: #f4f4f6;
}
.cmp-handle {
  outline: none;
  transform: translateX(-1px);
  width: 2px;
  left: var(--pos);
  top: 0;
  position: absolute;
  bottom: 0;
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(36, 40, 77, 0.25),
    0 0 24px rgba(0, 0, 0, 0.35);
}
.resp-box {
  position: relative;
}
#resp .grid {
  stroke: var(--line);
  stroke-dasharray: 2 4;
}
#resp .curve-b {
  filter: drop-shadow(0 8px 10px rgba(234, 71, 78, 0.28));
}
#resp .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1400ms var(--ease-io);
}
.resp-box.pre #resp .draw {
  stroke-dashoffset: 1;
  transition: none;
}
.resp-box.pre #resp .inc {
  opacity: 0;
}
#resp .inc {
  transition: opacity 600ms ease 900ms;
}
.flag {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(14px, -50%);
  background: var(--ink);
  color: var(--bg);
  border-radius: 12px;
  padding: 9px 12px;
  pointer-events: none;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.flag.left {
  transform: translate(calc(-100% - 14px), -50%);
}
.flag b {
  display: block;
  font: 700 1.0625rem/1 var(--f-display);
  color: var(--coral);
}
.flag span {
  display: block;
  font-size: 0.6875rem;
  opacity: 0.8;
  margin-top: 3px;
}
.model {
  border: 1px solid var(--line);
  padding: 20px 20px 16px;
  border-radius: 16px;
  background: var(--bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 1px 2px rgba(36, 40, 77, 0.05);
}
@media (max-width: 640px) {
  .big {
    font-size: 4.25rem;
  }
  .compare {
    height: 280px;
  }
}
.vrow {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) 76px;
  gap: 12px;
  align-items: center;
}
.vl b {
  display: block;
  font: 600 0.875rem/1.2 var(--f-display);
}
.vl small {
  font-size: 0.6875rem;
  color: var(--ink-3);
}
.vl {
  transition: opacity 300ms ease;
}
.vb {
  position: relative;
  height: 14px;
}
.vb i,
.vb::before {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--w);
  border-radius: 99px;
}
.vb i {
  background: var(--ink);
  transform-origin: left;
  transition: transform 760ms var(--ease-out);
  transition-delay: calc((var(--k) - 2) * 150ms + 250ms);
}
.vb::before {
  content: '';
  border: 1.5px dashed var(--line-2);
  opacity: 0;
  transition: opacity 300ms ease;
}
.vrow.hot .vb i {
  background: var(--brand-red);
}
.vv {
  font: 700 0.9375rem/1 var(--f-display);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.p1v.pre .late .vb i {
  transform: scaleX(0);
  transition: none;
}
.p1v.pre .late .vb::before {
  opacity: 1;
}
.p1v.pre .late .vl {
  opacity: 0.55;
}
.p1v.pre .late .vv {
  color: var(--ink-3);
  font-weight: 500;
  font-size: 0.8125rem;
}
@media (max-width: 640px) {
  .vrow {
    grid-template-columns: 96px minmax(0, 1fr) 62px;
    gap: 8px;
  }
}
.vis2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px;
  column-gap: 18px;
  row-gap: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
}
.vis-head2 {
  grid-column: 1/-1;
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.vis2 .vrow {
  grid-column: 1;
}
.brk {
  grid-column: 2;
  position: relative;
  display: flex;
  align-items: center;
  padding-left: 22px;
}
.brk::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 12px;
  border: 2px solid var(--line-2);
  border-left: 0;
  border-radius: 0 12px 12px 0;
}
.brk-a {
  grid-row: 2/4;
}
.brk-b {
  grid-row: 4/9;
  transition:
    clip-path 900ms var(--ease-io) 300ms,
    opacity 400ms ease 300ms;
  clip-path: inset(0 0 0 0);
}
.brk span {
  font-size: 0.8125rem;
  color: var(--ink-3);
  line-height: 1.4;
}
.brk-b::before {
  border-color: var(--brand-red);
  border-width: 2.5px;
}
.brk-b span {
  color: var(--ink-2);
}
.brk-b b {
  display: block;
  font: 600 1.625rem/1 var(--f-hand);
  color: var(--coral);
  margin-bottom: 6px;
  transform: rotate(-2deg);
  transform-origin: left;
}
.p1v.pre .brk-b {
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  transition: none;
}
@media (max-width: 640px) {
  .vis2 {
    grid-template-columns: minmax(0, 1fr) 96px;
    column-gap: 10px;
    padding: 16px 14px;
  }
  .vis2 .vrow {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .vis2 .vb {
    display: none;
  }
  .brk {
    padding-left: 16px;
  }
  .brk-b b {
    font-size: 0.9375rem;
  }
}
.p-partners {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.p-partners b {
  color: var(--ink-2);
  font-weight: 600;
}
@media (hover: hover) and (pointer: fine) {
  .p2 .chip:hover {
    color: var(--panel-ink);
    border-color: color-mix(in srgb, var(--brand-red) 60%, var(--panel-line));
  }
}
@keyframes recede {
  to {
    transform: scale(0.94);
  }
}
/* Pulsing ring on the improved curve */
.ping {
  transform-box: fill-box;
  transform-origin: center;
  animation: ping 2.4s var(--ease-out) infinite;
}

/* Enlace al servicio de cada frente (SEO: lo tenia la home anterior). */
.p-mas {
  margin-top: 14px;
  font-size: 0.95rem;
}
/* En dos lineas la flecha sigue al texto en vez de irse al borde. */
@media (max-width: 640px) {
  .p-mas {
    display: inline;
    line-height: 1.6;
  }
  .p-mas .i {
    display: inline-block;
    margin-left: 6px;
    vertical-align: -0.15em;
  }
  #resp text {
    font-size: 13px;
  }
}
