/* Pantalla «Solicitar propuesta»: preguntas en tarjetas apiladas, con el estilo de la portada (v3.css) */

.wiz-page { min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(55% 60% at 80% 40%, rgba(69, 255, 209, 0.16), transparent 70%), var(--night); }
.mono { font-family: var(--mono); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------------------
   Barra superior
   -------------------------------------------------------------------------- */
.wiz-bar { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px var(--gx); }
.wiz-progress { display: flex; align-items: center; gap: 14px; flex: 0 1 340px; }
.wiz-progress .mono { font-size: 12px; color: var(--muted-d); white-space: nowrap; }
.wiz-progress__track { flex: 1; height: 3px; border-radius: 3px; background: var(--line-d); overflow: hidden; }
.wiz-progress__track i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0.1667); transition: transform 450ms var(--ease-in-out); }
.wiz-close { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-d); font-size: 14px; color: #c1c4c7; transition: background-color 200ms ease, color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .wiz-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--cream); } }

/* --------------------------------------------------------------------------
   Columna de texto
   -------------------------------------------------------------------------- */
.wiz {
  position: relative;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 110px);
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding: 24px var(--gx) 64px;
}
.wiz__grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--line-d) 1px, transparent 1px), linear-gradient(90deg, var(--line-d) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(60% 70% at 75% 45%, #000000, transparent 75%);
  mask-image: radial-gradient(60% 70% at 75% 45%, #000000, transparent 75%);
  pointer-events: none;
}
.wiz-title { margin: 20px 0 18px; font-size: clamp(40px, 4.8vw, 72px); font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.wiz-side .lead { max-width: 440px; color: var(--muted-d); font-size: 17px; }
.wiz-perks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.wiz-perks li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px 7px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line-d); font-size: 13px; color: #d8d8cf; }
.wiz-perks li::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); rotate: 45deg; }

.recap { max-width: 440px; margin-top: 36px; }
.recap > .mono { margin-bottom: 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-d); }
.recap li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-d); font-size: 14px; animation: recap-in 400ms var(--ease-out) both; }
.recap li span { padding-top: 2px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-d); }
.recap li b { overflow: hidden; font-weight: 500; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
@keyframes recap-in { from { opacity: 0; transform: translateY(6px); } }

/* --------------------------------------------------------------------------
   Mazo de preguntas: crema delante; naranja y terracota asoman detrás
   -------------------------------------------------------------------------- */
.qdeck { display: grid; padding-top: 34px; }
.qcard {
  --pad: clamp(24px, 3vw, 40px);
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 540px;
  padding: 0 var(--pad) var(--pad);
  border-radius: 28px;
  background-color: var(--cream);
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.75);
  transform-origin: 50% 0;
  transition: transform 560ms var(--ease-in-out), opacity 420ms var(--ease-out), background-color 560ms var(--ease-in-out);
}
.qcard > * { transition: opacity 260ms var(--ease-out); }
.qcard em { color: var(--terra); }

.qcard[data-pos="0"] { z-index: 4; }
.qcard[data-pos="1"] { z-index: 3; transform: translateY(-17px) scale(0.955); background-color: #6bffda; }
.qcard[data-pos="2"] { z-index: 2; transform: translateY(-33px) scale(0.91); background-color: #1eb992; }
.qcard[data-pos="hidden"] { z-index: 1; transform: translateY(-33px) scale(0.91); background-color: #1eb992; opacity: 0; }
.qcard[data-pos="1"] > *, .qcard[data-pos="2"] > *, .qcard[data-pos="hidden"] > * { opacity: 0; }
/* La respondida sale hacia la izquierda girando, como la baraja de la portada */
.qcard[data-pos="gone"] { z-index: 5; transform: translate3d(-24%, 40px, 0) rotate(-7deg) scale(0.96); opacity: 0; pointer-events: none; }
.qcard:not([data-pos="0"]) { pointer-events: none; }

.qcard__n { display: flex; align-items: center; gap: 10px; margin: 0 calc(var(--pad) * -1) 14px; padding: 18px var(--pad); border-bottom: 1px solid var(--line-l); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.qcard__n::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--accent-deep); rotate: 45deg; }
.qcard__q { font-size: clamp(30px, 3.1vw, 44px); font-weight: 500; letter-spacing: -0.045em; line-height: 1.05; }
.qcard__hint { margin-bottom: 8px; color: var(--muted); font-size: 15px; }
.qcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 18px; }
.qcard__kbd { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.qcard__error { font-size: 14px; color: var(--terra); }
.qcard__error:empty { display: none; }
.qcard__error:not(:empty) { padding: 12px 14px; border-radius: 12px; background: rgba(30, 185, 146, 0.08); box-shadow: inset 0 0 0 1px rgba(30, 185, 146, 0.25); }

.wiz-back { padding: 10px 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .wiz-back:hover { color: var(--ink); } }
button.btn { border: 0; font-family: inherit; cursor: pointer; }
.qcard__q:focus { outline: none; }
.btn.is-sending svg { display: none; }
.btn:disabled { opacity: 0.7; cursor: progress; }

/* Campos */
.field { display: grid; gap: 8px; min-width: 0; }
.field label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(25, 28, 32, 0.14);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  transition: box-shadow 200ms ease, background-color 200ms ease;
}
.field textarea { min-height: 170px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #90959b; }
.field input:focus, .field textarea:focus { outline: none; background: #ffffff; box-shadow: inset 0 0 0 2px var(--accent-deep), 0 0 0 4px rgba(69, 255, 209, 0.15); }
.field [aria-invalid="true"] { box-shadow: inset 0 0 0 1.5px var(--terra); }
.qcard .field-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }

/* Opciones */
.choices { display: grid; gap: 10px; }
.choices--multi { grid-template-columns: 1fr 1fr; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; }
.choice span {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 18px 18px 16px;
  border-radius: 16px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px rgba(25, 28, 32, 0.12);
  cursor: pointer;
  user-select: none;
  transition: background-color 200ms ease, box-shadow 200ms ease, transform 160ms var(--ease-out);
}
.choices--multi .choice span { padding-right: 46px; }
.choices--multi .choice span::after { content: ""; position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px rgba(25, 28, 32, 0.25); background: center / 14px no-repeat; transition: background-color 200ms ease, box-shadow 200ms ease; }
.choices--list .choice span { flex-direction: row; align-items: center; justify-content: space-between; padding: 15px 18px; }
.choices--list .choice span::after { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(25, 28, 32, 0.25); transition: box-shadow 200ms ease; }
.choice b { font-size: 16px; font-weight: 500; }
.choice small { color: var(--muted); font-size: 13px; }
.choice span:active { transform: scale(0.98); }
.choice input:checked + span { background: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-deep), 0 14px 26px -16px rgba(31, 242, 189, 0.6); }
.choice input:checked + span small { color: rgba(25, 28, 32, 0.7); }
.choices--multi .choice input:checked + span::after { background-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23ff9f6b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); box-shadow: none; }
.choices--list .choice input:checked + span::after { box-shadow: inset 0 0 0 6px var(--ink); }
.choice input:focus-visible + span { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .choice span:hover { background: #ffffff; box-shadow: inset 0 0 0 1px rgba(25, 28, 32, 0.25); }
  .choice input:checked + span:hover { background: #87ffe1; }
}

/* Revisión y final */
.review { display: grid; margin-top: 4px; }
.review div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line-l); font-size: 15px; }
.review dt { padding-top: 3px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.review dd { overflow-wrap: anywhere; }
.qcard--done { align-items: flex-start; justify-content: center; padding-top: var(--pad); }
.qcard--done .check { --s: 64px; margin-bottom: 10px; rotate: -6deg; }
.qcard--done .check svg { width: 50%; height: 50%; }
.qcard--done .btn { margin-top: 12px; }

/* --------------------------------------------------------------------------
   Responsive y movimiento reducido
   -------------------------------------------------------------------------- */
@media (max-width: 899px) {
  .wiz { grid-template-columns: 1fr; align-items: start; gap: 18px; padding-top: 4px; }
  .wiz-title { margin: 12px 0 0; font-size: 36px; }
  .wiz-side .lead, .wiz-perks, .recap { display: none; }
  .wiz-progress { flex-basis: 150px; }
  .wiz-close { width: 40px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .wiz-close span { font-size: 15px; }
  .qdeck { padding-top: 26px; }
  .qcard { min-height: 520px; border-radius: 24px; }
  .qcard[data-pos="1"] { transform: translateY(-13px) scale(0.955); }
  .qcard[data-pos="2"], .qcard[data-pos="hidden"] { transform: translateY(-25px) scale(0.91); }
}
@media (max-width: 600px) {
  .qcard .field-row { grid-template-columns: 1fr; }
  .choices--multi { grid-template-columns: 1fr; }
  .review div { grid-template-columns: 1fr; gap: 2px; }
  .qcard__q { font-size: 30px; }
  .qcard__foot .btn--lg { height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .qcard { transition: opacity 200ms ease, background-color 200ms ease; }
  .qcard[data-pos="gone"] { transform: none; }
  .wiz-progress__track i { transition: none; }
  .recap li { animation: none; }
}
