/* ==========================================================================
   Contacto: panel navy con los pasos que siguen y el formulario de HubSpot.
   ========================================================================== */

.ct-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 32px;
  padding: clamp(36px, 5.5vw, 80px);
  color: #fff;
  background:
    radial-gradient(110% 90% at 100% 100%, rgba(84, 48, 239, 0.42), transparent 62%),
    radial-gradient(70% 60% at 0% 0%, rgba(235, 71, 78, 0.16), transparent 58%),
    var(--brand-navy, #24284d);
  box-shadow: 0 48px 96px -48px rgba(36, 40, 77, 0.6);
}
/* La cinta de marca baja desde la esquina y se esconde detras del formulario. */
.contact-rb {
  position: absolute;
  z-index: -1;
  width: min(600px, 52%);
  right: -10%;
  top: -10%;
  opacity: 0.75;
  pointer-events: none;
}
.ct-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 88px);
  align-items: center;
}

/* Texto */
.ct-copy .h2 {
  max-width: 16ch;
  font-size: clamp(2.1rem, 1.1rem + 2.9vw, 3.4rem);
  line-height: 1.04;
  color: #fff;
}
.ct-copy .lede {
  max-width: 42ch;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
}

/* Lo que pasa despues de escribir */
.ct-pasos {
  display: grid;
  gap: 22px;
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: ct-paso;
}
.ct-pasos li {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 16px;
  counter-increment: ct-paso;
}
.ct-pasos li::before {
  content: counter(ct-paso);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font: 600 1rem/1 var(--f-display);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.ct-pasos li:first-child::before {
  background: linear-gradient(135deg, #5430ef, #eb474e);
  box-shadow: none;
}
.ct-pasos li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 21.5px;
  top: 52px;
  bottom: -18px;
  width: 1px;
  background: linear-gradient(rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
}
.ct-pasos b {
  display: block;
  padding-top: 2px;
  font: 600 1.08rem/1.3 var(--f-display);
  color: #fff;
}
.ct-pasos span {
  margin-top: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

/* Tarjeta del formulario */
.bv2-hs-card {
  position: relative;
  min-height: 520px;
  padding: clamp(26px, 3vw, 40px);
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  box-shadow:
    0 36px 72px -28px rgba(10, 12, 40, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}
.bv2-hs-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, #5430ef, #eb474e);
}
.ct-form-titulo {
  margin: 0;
  font: 600 clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem) / 1.2 var(--f-display);
  color: var(--ink);
}
.ct-form-nota {
  margin: 6px 0 22px;
  font-size: 0.875rem;
  color: var(--ink-3);
}
.bv2-hs iframe {
  display: block;
  width: 100% !important;
}

/* Esqueleto que brilla mientras carga el formulario */
.bv2-hs-esqueleto {
  display: grid;
  gap: 14px;
}
.bv2-hs.is-listo .bv2-hs-esqueleto {
  display: none;
}
.bv2-hs-esqueleto i {
  height: 50px;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--sunk) 30%, #fafbff 50%, var(--sunk) 70%) 0 0 / 200% 100%;
  animation: bv2-hs-brillo 1.4s linear infinite;
}
.bv2-hs-esqueleto i.alto {
  height: 112px;
}
.bv2-hs-esqueleto i.boton {
  height: 54px;
  margin-top: 6px;
  border-radius: 999px;
}
@keyframes bv2-hs-brillo {
  from {
    background-position: 150% 0;
  }
  to {
    background-position: -50% 0;
  }
}

/* Entrada: la cinta se dibuja hacia el formulario y la tarjeta sube. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .contact-rb path {
      stroke-dasharray: 1;
      animation: ct-traza linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }
    .bv2-hs-card,
    .ct-pasos li {
      animation: ct-sube linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}
@keyframes ct-traza {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes ct-sube {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
  }
}

@media (max-width: 960px) {
  .ct-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ct-copy .h2 {
    max-width: 16ch;
  }
}
@media (max-width: 640px) {
  .ct-panel {
    margin-inline: -8px;
    padding: 36px 20px 20px;
    border-radius: 24px;
  }
  .contact-rb {
    display: none;
  }
  .ct-pasos {
    gap: 18px;
  }
  .bv2-hs-card {
    min-height: 560px;
    padding: 24px 18px;
    border-radius: 18px;
  }
  .bv2-hs-card::before {
    border-radius: 18px 18px 0 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .bv2-hs-esqueleto i {
    animation: none;
  }
}
