/* SORAIN – página de contacto
   Usa las variables de css/styles.css (--purple, --lav, --lilac, --ink, --muted, --mute, --line, --bg…).
   Secciones: hero · animación de la grulla + formulario · CTA · footer */

:root {
  --ct-ease: cubic-bezier(0.22, 0.7, 0.18, 1);
  --ct-field: #0b0a24;
  --ct-card: #121132;
}

/* ---------- hero (mismo que el index: grulla 3D a la derecha) ---------- */
.ct-hero h1 em {
  height: auto;
  padding-bottom: 0.08em;
}

/* ---------- sección principal: grulla + formulario ---------- */
.ct-main {
  background:
    radial-gradient(40% 32% at 50% 12%, rgba(106, 59, 214, 0.3), transparent 70%),
    radial-gradient(50% 40% at 85% 75%, rgba(59, 42, 143, 0.3), transparent 70%), var(--bg-2);
  padding-block: 40px 120px;
  overflow: hidden;
}

/* escenario de la animación: siempre centrado horizontalmente en la página, a cualquier ancho.
   Empieza grande y, al terminar, se encoge para dar paso al formulario.
   El encogido se hace SOLO con transform (scale + translate), nunca animando width/top: así no hay
   recálculo de layout ni redondeo de píxeles en cada frame y la grulla no tiembla.
   --ct-s (escala final = ancho final / ancho inicial) lo calcula contact.js. */
.ct-stage {
  --ct-h0: clamp(260px, 44vw, 600px);
  --ct-h1: clamp(200px, 24vw, 310px);
  position: relative;
  width: 100%;
  height: var(--ct-h0);
  transition: height 1.1s var(--ct-ease);
}
.ct-stage svg {
  position: absolute;
  left: 50%;
  top: 0;
  display: block;
  width: min(760px, 92vw);
  max-width: 100%;
  height: auto;
  overflow: visible;
  transform-origin: 50% 50%;
  transform: translate(-50%, calc(var(--ct-h0) / 2 - 50%)) scale(1);
  will-change: transform;
  backface-visibility: hidden;
  transition: transform 1.1s var(--ct-ease);
}
.ct-main.is-done .ct-stage {
  height: var(--ct-h1);
}
.ct-main.is-done .ct-stage svg {
  transform: translate(-50%, calc(var(--ct-h1) / 2 - 50%)) scale(var(--ct-s, 0.526));
}

.ct-intro {
  text-align: center;
  max-width: 760px;
  margin: 8px auto 0;
}
.ct-intro h2 em {
  display: block;
  font-style: normal;
  background: linear-gradient(90deg, #7c8cf5, #9fb0ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ct-intro .lead {
  margin: 20px auto 0;
}

/* aparición del contenido después de la animación */
.js .ct-reveal {
  opacity: 0;
  transform: translateY(28px);
  visibility: hidden;
  transition:
    opacity 0.8s ease,
    transform 0.9s var(--ct-ease),
    visibility 0s 0.9s;
}
.ct-main.is-done .ct-reveal {
  opacity: 1;
  transform: none;
  visibility: visible;
  transition:
    opacity 0.8s ease,
    transform 0.9s var(--ct-ease),
    visibility 0s;
  transition-delay: calc(var(--i, 0) * 85ms + 380ms);
}

/* ---------- grid: columnas alineadas arriba y abajo ---------- */
:root {
  --ct-gap: 24px;
  --ct-pad: 32px;
}
.ct-grid {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: var(--ct-gap);
  margin-top: 56px;
  align-items: stretch;
}
.ct-aside {
  display: flex;
  flex-direction: column;
  gap: var(--ct-gap);
  min-width: 0;
}
.ct-aside > .ct-faq {
  flex: 1 1 auto;
} /* la última tarjeta crece para que la columna termine a la altura del formulario */
.ct-card {
  background: var(--ct-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: var(--ct-pad);
}
.ct-card .kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 18px;
}
.ct-ic {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(123, 66, 210, 0.16);
  border: 1px solid rgba(185, 150, 245, 0.25);
}
.ct-ic .material-symbols-outlined {
  font-size: 24px;
  color: var(--lilac);
}

/* card destacada: agendar llamada */
.ct-book {
  position: relative;
  overflow: hidden;
  border-color: rgba(185, 150, 245, 0.45);
  background: linear-gradient(140deg, #3a1f8a 0%, #2a2a8a 55%, #22307a 100%);
  box-shadow: 0 24px 60px -28px rgba(123, 66, 210, 0.9);
}
.ct-book::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 55%, rgba(255, 255, 255, 0.1));
  pointer-events: none;
}
.ct-book .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ct-book .badge {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #e6deff;
  text-transform: uppercase;
}
.ct-book h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 20px 0 8px;
  letter-spacing: -0.01em;
}
.ct-book p {
  color: #dcd5ff;
  font-size: 14.5px;
  line-height: 1.55;
}
.ct-book .btn.white {
  position: relative;
  z-index: 1;
  width: 100%;
  justify-content: center;
  margin-top: 22px;
  border-radius: 8px;
}
.ct-book .ct-ic {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
}
.ct-book .ct-ic .material-symbols-outlined {
  color: #fff;
}

/* qué pasa después */
.ct-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
  position: relative;
}
.ct-steps::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  background: linear-gradient(var(--purple), var(--blue));
}
.ct-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  position: relative;
}
.ct-steps .n {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: #17123f;
  border: 1.5px solid #6f4de6;
  box-shadow: 0 0 14px rgba(120, 80, 255, 0.45);
}
.ct-steps b {
  display: block;
  font-weight: 500;
  font-size: 15px;
}
.ct-steps span {
  font-size: 13.5px;
  color: var(--muted);
}

/* canales directos */
.ct-channels {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.ct-channels a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
}
.ct-channels .i {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(123, 66, 210, 0.18);
}
.ct-channels .i .material-symbols-outlined {
  font-size: 19px;
  color: var(--lilac);
}
.ct-channels b {
  display: block;
  font-weight: 500;
  font-size: 14.5px;
}
.ct-channels small {
  font-size: 12.5px;
  color: var(--mute);
}
.ct-channels a:hover b {
  color: var(--lilac);
}

/* preguntas frecuentes (relleno de la columna izquierda) */
.ct-faq details {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.ct-faq details:first-of-type {
  border-top: 0;
}
.ct-faq {
  display: flex;
  flex-direction: column;
  overflow-anchor: none;
}
.ct-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
}
.ct-faq summary:focus-visible {
  outline: 2px solid var(--lav);
  outline-offset: 2px;
  border-radius: 6px;
}
.ct-faq summary::-webkit-details-marker {
  display: none;
}
.ct-faq summary .material-symbols-outlined {
  font-size: 20px;
  color: var(--lilac);
  transition: transform 0.3s var(--ct-ease);
}
.ct-faq details[open] summary .material-symbols-outlined {
  transform: rotate(180deg);
}
.ct-faq details p {
  font-size: 13.5px;
  color: var(--muted);
  padding: 0 0 16px;
  line-height: 1.55;
}
.ct-faq .note {
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  color: var(--mute);
}
.ct-faq .note a {
  color: var(--lav);
}

/* ---------- formulario ---------- */
.ct-form {
  min-width: 0;
  background: var(--ct-card);
  border: 1px solid rgba(185, 150, 245, 0.18);
  border-radius: 16px;
  padding: var(--ct-pad);
  position: relative;
  display: flex;
  flex-direction: column;
}
.ct-form form {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ct-form .head {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.ct-form .head h3 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ct-form .head p {
  font-size: 13.5px;
  color: var(--mute);
}
.ct-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
}
.ct-field {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
  min-width: 0;
}
.ct-field label,
.ct-group legend {
  font-size: 13.5px;
  font-weight: 500;
  color: #dcd8f5;
}
.ct-field label .req,
.ct-group .req,
.ct-check .req {
  color: var(--lilac);
}
.ct-input {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--ct-field);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}
.ct-input::placeholder {
  color: #66618a;
}
.ct-input:hover {
  border-color: rgba(185, 150, 245, 0.32);
}
.ct-input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(139, 61, 217, 0.22);
  background: #0e0c2c;
}
.ct-input[aria-invalid='true'] {
  border-color: #e0567a;
  box-shadow: 0 0 0 4px rgba(224, 86, 122, 0.15);
}
textarea.ct-input {
  min-height: 160px;
  resize: vertical;
  line-height: 1.55;
}
select.ct-input {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238582a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 44px;
}
select.ct-input option {
  background: #121132;
  color: var(--ink);
}
.ct-phone {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 8px;
}
.ct-err {
  font-size: 12.5px;
  color: #ff8fab;
  min-height: 0;
}
.ct-count {
  justify-self: end;
  font-size: 11.5px;
  color: var(--mute);
  margin-top: -2px;
}

/* chips (checkbox / radio) */
.ct-group {
  border: 0;
  padding: 0;
  margin: 0 0 22px;
  min-width: 0;
}
.ct-group legend {
  padding: 0;
  margin-bottom: 12px;
}
.ct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
/* el ícono ✓ vive dentro de la etiqueta: el estilo de "píldora" va solo en el span directo (> span) */
.ct-chip {
  position: relative;
  display: inline-flex;
}
.ct-chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}
.ct-chip > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: #c9c5dd;
  background: var(--ct-field);
  border: 1px solid var(--line);
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}
.ct-chip > span > .material-symbols-outlined {
  display: inline-grid;
  place-items: center;
  width: 0;
  height: 16px;
  margin-right: 0;
  font-size: 16px;
  line-height: 1;
  overflow: hidden;
  opacity: 0;
  transition:
    width 0.25s var(--ct-ease),
    margin-right 0.25s var(--ct-ease),
    opacity 0.2s;
}
.ct-chip input:hover + span {
  border-color: rgba(185, 150, 245, 0.4);
  color: #fff;
}
.ct-chip input:checked + span {
  background: #3a1f8a;
  border-color: var(--lilac);
  color: #fff;
  box-shadow: 0 0 18px -4px rgba(139, 61, 217, 0.8);
}
.ct-chip input:checked + span > .material-symbols-outlined {
  width: 16px;
  margin-right: 6px;
  opacity: 1;
}
.ct-chip input:focus-visible + span {
  outline: 2px solid var(--lav);
  outline-offset: 3px;
}

.ct-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--muted);
  margin: 4px 0 6px;
  cursor: pointer;
}
.ct-err-consent {
  display: block;
  min-height: 18px;
  margin: 0 0 18px 32px;
}
.ct-check input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border-radius: 5px;
  border: 1.5px solid rgba(185, 150, 245, 0.5);
  background: var(--ct-field);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.ct-check input {
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px 14px;
}
.ct-check input:checked {
  background-color: #3a1f8a;
  border-color: var(--lilac);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.ct-check input:focus-visible {
  outline: 2px solid var(--lav);
  outline-offset: 3px;
}
.ct-check a {
  color: var(--lav);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* envío real: Turnstile, campo trampa para bots y mensaje de error (ver js/contact.js) */
.ct-turnstile {
  min-height: 65px;
  margin: 0 0 6px;
}
.ct-err-ts {
  display: block;
  margin: 0 0 14px;
}
.ct-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.ct-status {
  margin: 16px 0 0;
  font-size: 14px;
  color: #ff8fab;
}
.ct-status a {
  color: inherit;
  text-decoration: underline;
}
.ct-submit {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
}
/* si la columna izquierda es más alta, el espacio extra lo toma el mensaje (sin huecos vacíos) */
.ct-field.ct-grow {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.ct-field.ct-grow textarea.ct-input {
  flex: 1 1 auto;
}
.ct-submit .btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.ct-submit .btn[disabled] {
  opacity: 0.7;
  cursor: progress;
}
.ct-alt {
  font-size: 13.5px;
  color: var(--mute);
}
.ct-alt a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--lav);
  font-weight: 500;
}
.ct-alt a .material-symbols-outlined {
  font-size: 17px;
}
.ct-privacy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--mute);
}
.ct-privacy .material-symbols-outlined {
  font-size: 16px;
}

/* estado enviado */
.ct-done {
  display: none;
  text-align: center;
  padding: 40px 10px 20px;
}
.ct-done .ct-ic {
  margin: 0 auto 28px;
  width: 104px;
  height: 104px;
  border-radius: 50%;
}
.ct-done .ct-ic .material-symbols-outlined {
  font-size: 52px;
}
.ct-done h3 {
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 600;
  margin-bottom: 16px;
}
.ct-done p {
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  max-width: 40ch;
  margin: 0 auto;
}
.ct-form.is-sent form {
  display: none;
}
/* el mensaje de "gracias" ocupa toda la caja y queda centrado (la caja mantiene la altura de la columna izquierda) */
.ct-form.is-sent .ct-done {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  animation: ctPop 0.7s var(--ct-ease) both;
}
@keyframes ctPop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- CTA de contacto (mismo que el index: la grulla aterriza y se convierte en el logo) ---------- */
.ct-cta .btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}
.ct-cta .btn.ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: none;
  border-radius: 10px;
}
.ct-cta .btn.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  filter: none;
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .ct-main {
    padding-top: 40px;
  } /* .sec reserva espacio arriba para la grulla 3D; esta sección no la usa */
  .ct-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ct-aside {
    order: 2;
  }
}
@media (max-width: 640px) {
  :root {
    --ct-pad: 22px;
    --ct-gap: 18px;
  }
  .ct-main {
    padding-bottom: 88px;
  }
  .ct-grid {
    margin-top: 40px;
  }
  .ct-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .ct-privacy {
    margin-left: 0;
  }
  .ct-submit .btn,
  .ct-cta .btns .btn {
    width: 100%;
    justify-content: center;
  }
}
/* Táctil / pantallas angostas: la etiqueta mide SIEMPRE lo mismo, marcada o no.
   Antes el ✓ le sumaba 22px al marcarla y las etiquetas saltaban de fila (y se volvían a bajar al
   desmarcarla). Ahora el espacio del ✓ (16px + 6px) se reparte como padding extra a ambos lados
   (11px + 11px) y, al marcarla, ese padding se convierte en el ícono con la misma duración y curva:
   el ancho total no cambia en ningún momento, así que nada se reacomoda. */
@media (max-width: 1000px), (hover: none) {
  .ct-chip > span {
    padding: 10px 29px;
    -webkit-tap-highlight-color: transparent;
    transition:
      padding 0.32s var(--ct-ease),
      background 0.25s ease,
      border-color 0.25s ease,
      color 0.25s ease,
      box-shadow 0.3s ease,
      transform 0.18s ease;
  }
  .ct-chip input:checked + span {
    padding-inline: 18px;
  }
  .ct-chip > span > .material-symbols-outlined {
    transform: scale(0.4);
    transition:
      width 0.32s var(--ct-ease),
      margin-right 0.32s var(--ct-ease),
      opacity 0.2s ease,
      transform 0.32s var(--ct-ease);
  }
  .ct-chip input:checked + span > .material-symbols-outlined {
    transform: none;
    transition:
      width 0.32s var(--ct-ease),
      margin-right 0.32s var(--ct-ease),
      opacity 0.25s ease 0.06s,
      transform 0.32s var(--ct-ease);
  }
  /* respuesta al toque (transform no mueve a las demás etiquetas) */
  .ct-chip input:active + span {
    transform: scale(0.96);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ct-stage,
  .ct-stage svg,
  .js .ct-reveal,
  .ct-main.is-done .ct-reveal,
  .ct-chip > span,
  .ct-chip > span > .material-symbols-outlined {
    transition: none !important;
  }
}
