@charset "UTF-8";

/* ==========================================================
   CONTACTO — asistente por pasos + propuesta en vivo
   ==========================================================
   Solo se carga en el index. Reutiliza los campos flotantes
   (.form-field) de styles.css y añade el asistente (.wz-*) y la tarjeta
   de propuesta (.proposal).

   Reglas de la «Guía de Diseño Web»: una columna, etiquetas visibles,
   error pegado al campo y accionable, una sola acción primaria por
   pantalla (Siguiente o Enviar, nunca las dos), estados con color +
   icono + texto, movimiento corto con transform/opacity.

   Sin JavaScript no hay pasos: los cuatro bloques se ven seguidos y el
   formulario se envía igual a Formspree.
   ========================================================== */

.wz { display: grid; gap: 24px; align-content: start; }

/* ==========================
   CABECERA: pasos + barra
   ========================== */
.wz-head { display: grid; gap: 20px; }
.wz-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; counter-reset: none; }
.wz-steps li { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 0.78rem; color: var(--text-dim); transition: color 0.2s; }
.wz-dot {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-family: var(--font-title); font-weight: 700; font-size: 0.85rem;
  color: var(--text-dim); background: rgba(var(--azul-950-rgb), 0.7); border: 1px solid var(--border);
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.3s var(--ease);
}
/* Paso actual: relleno + anillo. Paso hecho: marca de verificación (no solo color) */
.wz-steps li.is-current { color: var(--white); font-weight: 600; }
.wz-steps li.is-current .wz-dot { background: var(--primary-color); border-color: var(--azul-300); color: #fff; box-shadow: 0 0 0 4px rgba(var(--azul-500-rgb), 0.25); transform: scale(1.08); }
.wz-steps li.is-done { color: var(--text-muted); }
.wz-steps li.is-done .wz-dot { background: rgba(var(--exito-rgb), 0.16); border-color: rgba(var(--exito-rgb), 0.55); color: transparent; position: relative; }
.wz-steps li.is-done .wz-dot::after { content: '\F26A'; font-family: 'bootstrap-icons'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 0.8rem; color: var(--exito); }

.wz-now { display: none; margin-top: -8px; font-size: 0.85rem; font-weight: 600; color: var(--azul-300); }
.wz:not(.is-wizard) .wz-now { display: none !important; }
.wz-bar { height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; }
.wz-bar i { display: block; height: 100%; background: var(--gradient); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 0.45s var(--ease); }

/* ==========================
   PASOS
   ========================== */
.wz-body { display: grid; }
.wz-step { display: grid; gap: 16px; align-content: start; min-width: 0; border: 0; padding: 0; margin: 0 0 24px; }
.wz-step:last-child { margin-bottom: 0; }
.wz-title { font-family: var(--font-title); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.02em; color: var(--white); padding: 0; float: left; width: 100%; }
.wz-title + * { clear: both; }
.wz-title:focus { outline: none; }
.wz-title:focus-visible { outline: 2px solid var(--azul-300); outline-offset: 4px; border-radius: 6px; }
.wz-help { margin-top: -6px; font-size: 0.9rem; line-height: 1.6; color: var(--text-dim); max-width: 52ch; }

/* Con JS solo se ve el paso actual */
.wz.is-wizard .wz-step[hidden] { display: none; }
.wz.is-wizard .wz-step:not([hidden]) { animation: wzIn 0.4s var(--ease); }
@keyframes wzIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.wz.is-wizard.is-back .wz-step:not([hidden]) { animation-name: wzInBack; }
@keyframes wzInBack { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }

/* ==========================
   1 · Opciones de servicio
   ========================== */
.wz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wz-option { position: relative; display: block; cursor: pointer; }
.wz-option:last-child:nth-child(odd) { grid-column: 1 / -1; }
.wz-option input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wz-card {
  position: relative; display: grid; grid-template-columns: 40px 1fr; grid-template-areas: 'i t' 'i s'; column-gap: 14px; align-items: center; height: 100%;
  min-height: 72px; padding: 14px 16px; background: rgba(var(--azul-950-rgb), 0.6); border: 1px solid var(--border); border-radius: 16px;
  transition: border-color 0.2s, background 0.2s, translate 0.25s var(--ease);
}
.wz-card i { grid-area: i; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; font-size: 1.2rem; color: var(--azul-300); background: rgba(var(--azul-500-rgb), 0.14); transition: background 0.2s, color 0.2s; }
.wz-card strong { grid-area: t; font-size: 0.95rem; line-height: 1.25; color: var(--white); }
.wz-card small { grid-area: s; font-size: 0.78rem; line-height: 1.35; color: var(--text-dim); }
.wz-option:hover .wz-card { border-color: var(--border-hover); translate: 0 -2px; }
.wz-option input:checked + .wz-card { background: rgba(var(--azul-500-rgb), 0.2); border-color: var(--azul-400); }
.wz-option input:checked + .wz-card i { background: var(--primary-color); color: #fff; }
/* La elegida lleva marca, no solo color */
.wz-option input:checked + .wz-card::after { content: '\F26A'; font-family: 'bootstrap-icons'; position: absolute; top: 10px; right: 12px; font-size: 0.85rem; color: var(--azul-300); }
.wz-option input:focus-visible + .wz-card { outline: 2px solid var(--azul-300); outline-offset: 3px; }

.wz-error { min-height: 0; margin: 0; padding-left: 4px; color: var(--error); font-size: 0.82rem; }
.wz-error:empty { display: none; }
.wz-error::before { content: '\F33A'; font-family: 'bootstrap-icons'; margin-right: 6px; }

/* ==========================
   2 · ¿Para cuándo?
   ========================== */
.wz-when { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wz-when-label { flex-basis: 100%; font-size: 0.85rem; color: var(--text-muted); }
.wz-when-label em { font-style: normal; color: var(--text-dim); }
.wz-chip { position: relative; cursor: pointer; }
.wz-chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.wz-chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: 0.88rem; color: var(--text-muted); background: rgba(var(--azul-950-rgb), 0.6); border: 1px solid var(--border); transition: border-color 0.2s, background 0.2s, color 0.2s; }
.wz-chip:hover span { border-color: var(--border-hover); color: var(--white); }
.wz-chip input:checked + span { color: var(--white); font-weight: 600; background: rgba(var(--azul-500-rgb), 0.22); border-color: var(--azul-400); }
.wz-chip input:checked + span::before { content: '\F26A'; font-family: 'bootstrap-icons'; margin-right: 8px; font-size: 0.8rem; color: var(--azul-300); }
.wz-chip input:focus-visible + span { outline: 2px solid var(--azul-300); outline-offset: 3px; }

/* ==========================
   4 · Revisión
   ========================== */
.wz-review { display: grid; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.wz-review > div { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 14px 18px; background: rgba(var(--azul-950-rgb), 0.5); }
.wz-review > div + div { border-top: 1px solid var(--border); }
.wz-review dt { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); padding-top: 2px; }
.wz-review dd { font-size: 0.92rem; line-height: 1.55; color: var(--white); overflow-wrap: anywhere; }
.wz-edit { min-height: 32px; padding: 0 12px; cursor: pointer; font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--azul-300); background: none; border: 1px solid transparent; border-radius: 8px; transition: background 0.15s, border-color 0.15s, color 0.15s; }
.wz-edit:hover { background: rgba(var(--azul-500-rgb), 0.16); border-color: rgba(var(--azul-400-rgb), 0.4); color: var(--white); }
.wz-edit:focus-visible { outline: 2px solid var(--azul-300); outline-offset: 2px; }

/* ==========================
   NAVEGACIÓN DEL ASISTENTE
   ========================== */
.wz-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wz-back, .wz-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; cursor: pointer; font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--text-muted); background: none; border: 0; border-radius: 10px; transition: color 0.15s, gap 0.2s var(--ease); }
.wz-back:hover, .wz-link:hover { color: var(--white); }
.wz-back:hover { gap: 12px; }
.wz-back:focus-visible, .wz-link:focus-visible { outline: 2px solid var(--azul-300); outline-offset: 2px; }
.wz-nav .btn { margin-left: auto; min-width: 190px; }
/* Con JS solo hay un botón primario a la vez */
.wz.is-wizard #submit-btn { display: none; }
.wz.is-wizard.on-last #wzNext { display: none; }
.wz.is-wizard.on-last #submit-btn { display: inline-flex; }
/* Sin JS: «Siguiente» no hace nada, así que se oculta */
.wz:not(.is-wizard) #wzNext, .wz:not(.is-wizard) .wz-back, .wz:not(.is-wizard) .wz-steps, .wz:not(.is-wizard) .wz-bar, .wz:not(.is-wizard) .wz-edit { display: none; }
.wz:not(.is-wizard) .wz-review { display: none; }

/* ==========================
   CONFIRMACIÓN
   ========================== */
.wz-done { display: grid; justify-items: center; gap: 12px; padding: 32px 8px; text-align: center; }
.wz-done:focus { outline: none; }
.wz-done[hidden] { display: none; }
.wz-done-icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; font-size: 2rem; color: var(--exito); background: rgba(var(--exito-rgb), 0.14); border: 1px solid rgba(var(--exito-rgb), 0.5); animation: wzPop 0.5s var(--ease); }
@keyframes wzPop { from { transform: scale(0.5); opacity: 0; } to { transform: none; opacity: 1; } }
.wz-done h4 { font-family: var(--font-title); font-size: 1.5rem; letter-spacing: -0.02em; }
.wz-done p { max-width: 40ch; color: var(--text-muted); }
.wz-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 8px; }
.wz-done-actions .wz-link { color: var(--azul-300); }
.wz.is-sent .wz-head, .wz.is-sent .wz-body, .wz.is-sent .wz-nav { display: none; }

/* ==========================
   PROPUESTA EN VIVO
   ========================== */
.proposal { padding: 24px; display: grid; gap: 18px; background: linear-gradient(160deg, rgba(var(--azul-600-rgb), 0.28), rgba(var(--azul-900-rgb), 0.95) 55%); border: 1px solid var(--border-hover); border-radius: 24px; box-shadow: var(--shadow-card); }
.proposal-top { display: flex; align-items: center; gap: 10px; }
.proposal-top strong { font-family: var(--font-title); font-size: 1.1rem; }
.proposal-state { margin-left: auto; padding: 2px 12px; border-radius: 999px; font-style: normal; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); background: rgba(var(--azul-950-rgb), 0.6); border: 1px solid var(--border); transition: color 0.2s, background 0.2s, border-color 0.2s; }
.proposal.is-ready .proposal-state { color: var(--exito); background: rgba(var(--exito-rgb), 0.14); border-color: rgba(var(--exito-rgb), 0.5); }
.proposal.is-ready .proposal-state::before { content: '\F26A'; font-family: 'bootstrap-icons'; margin-right: 6px; }

.proposal-rows { display: grid; border-top: 1px dashed var(--border-hover); }
.proposal-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.proposal-rows dt { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); white-space: nowrap; }
.proposal-rows dd { text-align: right; font-size: 0.93rem; font-weight: 500; color: var(--white); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; transition: opacity 0.2s, transform 0.25s var(--ease); }
.proposal-rows dd.is-empty { color: var(--text-dim); font-weight: 400; }
.proposal-rows dd.is-swap { opacity: 0; transform: translateY(6px); }
#pvPrecio:not(.is-empty) { font-family: var(--font-title); font-size: 1.15rem; font-weight: 700; }

.proposal-meter { height: 6px; border-radius: 6px; background: rgba(var(--azul-950-rgb), 0.7); overflow: hidden; }
.proposal-meter i { display: block; height: 100%; background: var(--gradient); transform-origin: left; transform: scaleX(var(--m, 0)); transition: transform 0.45s var(--ease); }
.proposal-meter-text { margin-top: -8px; font-size: 0.8rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.proposal .contact-next { padding: 18px 0 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; }

.info-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-pair .info-box { padding: 14px; gap: 12px; min-width: 0; }
.info-pair .info-value { font-size: 0.82rem; overflow-wrap: anywhere; }

/* ==========================
   RESPONSIVE
   ========================== */
@media (max-width: 1024px) {
  .info-pair { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .wz-options { grid-template-columns: 1fr; }
  .wz-steps li .wz-name { display: none; }
  .wz-steps { display: flex; justify-content: space-between; }
  .wz-now { display: block; }
  .wz-review > div { grid-template-columns: 1fr auto; row-gap: 4px; }
  .wz-review dt { grid-column: 1 / -1; }
  .wz-nav { flex-direction: column-reverse; align-items: stretch; }
  .wz-nav .btn { width: 100%; margin-left: 0; }
  .wz-back { justify-content: center; }
  .info-pair { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .wz.is-wizard .wz-step:not([hidden]), .wz-done-icon { animation: none; }
  .wz-option:hover .wz-card { translate: none; }
  .wz-dot { transition: none; }
}
