/* Paleta del logo 20 años: rojo, amarillo, naranja. Interfaz clara y minimalista. */
:root {
  --rojo: #ff0b25;
  --rojo-btn: #e00019;
  --rojo-hover: #c20016;
  --rojo-suave: #fff1f2;
  --amarillo: #ffe600;
  --naranja: #ff9400;
  --tinta: #0f1115;
  --texto: #2b2f38;
  --muted: #6b7280;
  --linea: #e6e8ec;
  --fondo: #f7f7f9;
  --blanco: #ffffff;
  --verde: #16a34a;
  --radio: 14px;
}

[v-cloak] { display: none; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}
#app { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 0 16px; }
a { color: var(--rojo-btn); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }

.topline {
  position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 5;
  background: linear-gradient(90deg, var(--amarillo), var(--naranja), var(--rojo));
}

.brand { padding: 36px 0 8px; }
.logo { width: 170px; height: auto; display: block; }

.stage {
  width: 100%; max-width: 600px; flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px 0 40px;
}

.screen {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 24px;
  padding: 40px 36px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -12px rgba(16, 24, 40, .12);
}
.center { text-align: center; }

/* ---------- Progreso ---------- */
.progress { margin-bottom: 14px; }
.progress-info { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.progress-track { height: 6px; background: var(--linea); border-radius: 99px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--amarillo), var(--naranja), var(--rojo));
  transition: width .4s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Tipografía ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--rojo-btn); background: var(--rojo-suave);
  padding: 6px 12px; border-radius: 99px;
}
.h1 { font-size: clamp(1.6rem, 5vw, 2.1rem); line-height: 1.2; font-weight: 800; color: var(--tinta); letter-spacing: -.02em; margin: 18px 0 10px; }
.h2 { font-size: clamp(1.25rem, 4vw, 1.55rem); line-height: 1.3; font-weight: 700; color: var(--tinta); letter-spacing: -.01em; margin: 0 0 6px; }
.desc { font-size: 1.02rem; line-height: 1.6; color: var(--muted); margin: 0 0 28px; }
.hint { font-size: .9rem; color: var(--muted); margin: 0 0 20px; }
.optional {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  font-size: .7rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--linea); border-radius: 99px; padding: 2px 8px;
}
.h2 + .choices, .h2 + .select-wrap, .h2 + .field, .h2 + .scale-wrap, .h2 + div { margin-top: 20px; }

.notice {
  display: flex; gap: 10px; margin: 26px 0 0; padding-top: 20px;
  border-top: 1px solid var(--linea);
  font-size: .78rem; line-height: 1.55; color: var(--muted);
}
.notice i { color: var(--naranja); margin-top: 2px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 1rem;
  border: 0; border-radius: 12px; padding: 13px 22px; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 2px; }
.btn-primary { background: var(--rojo-btn); color: var(--blanco); box-shadow: 0 6px 16px -6px rgba(224, 0, 25, .55); }
.btn-primary:hover:not(:disabled) { background: var(--rojo-hover); }
.btn-ghost { background: transparent; color: var(--muted); padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { color: var(--tinta); }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }

.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; }

/* ---------- Opciones ---------- */
.choices { display: grid; gap: 10px; }
.choice {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--linea); border-radius: var(--radio);
  background: var(--blanco);
  cursor: pointer; user-select: none;
  font-weight: 500; font-size: 1rem; color: var(--tinta);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice:hover { border-color: #c9ccd3; background: #fbfbfc; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(255, 230, 0, .8); }
.choice:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.key {
  flex: 0 0 28px; height: 28px; display: grid; place-items: center;
  border: 1.5px solid var(--linea); border-radius: 8px;
  font-size: .78rem; font-weight: 700; color: var(--muted);
  transition: all .15s;
}
.choice.multi .key { border-radius: 8px; }
.choice:not(.multi) .key { border-radius: 50%; }
.label { flex: 1; line-height: 1.4; }
.tick { color: var(--rojo-btn); opacity: 0; transform: scale(.6); transition: all .15s; }
.choice.selected { border-color: var(--rojo-btn); background: var(--rojo-suave); }
.choice.selected .key { background: var(--rojo-btn); border-color: var(--rojo-btn); color: var(--blanco); }
.choice.selected .tick { opacity: 1; transform: none; }

/* ---------- Campos ---------- */
.field {
  width: 100%; font: inherit; font-size: 1rem; color: var(--tinta);
  background: var(--blanco);
  border: 1.5px solid var(--linea); border-radius: var(--radio);
  padding: 14px 16px; resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.field:focus { outline: none; border-color: var(--rojo-btn); box-shadow: 0 0 0 4px rgba(224, 0, 25, .1); }
.field-lg { font-size: 1.6rem; font-weight: 700; padding: 16px 18px; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 44px; cursor: pointer; }
.select-wrap i { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.counter { text-align: right; font-size: .75rem; color: var(--muted); margin-top: 6px; }

/* ---------- Escala ---------- */
.scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 8px; }
.scale-btn {
  aspect-ratio: 1; min-height: 44px;
  font: inherit; font-weight: 700; font-size: 1.05rem; color: var(--tinta);
  background: var(--blanco); border: 1.5px solid var(--linea); border-radius: 12px;
  cursor: pointer; transition: all .15s;
}
.scale-btn:hover { border-color: #c9ccd3; }
.scale-btn.selected { background: var(--rojo-btn); border-color: var(--rojo-btn); color: var(--blanco); transform: translateY(-2px); box-shadow: 0 6px 14px -6px rgba(224, 0, 25, .6); }
.scale-legend { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: 8px; }

.error {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 0 0; color: var(--rojo-btn); font-weight: 600; font-size: .9rem;
}

/* ---------- Final ---------- */
.result-icon {
  width: 72px; height: 72px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.9rem;
}
.result-icon.ok { background: #dcfce7; color: var(--verde); }
.result-icon.info { background: #fff7d6; color: #b45309; }
.result-icon.warn { background: var(--rojo-suave); color: var(--rojo-btn); }
.center .desc { margin-bottom: 26px; }
.redirect { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: .9rem; color: var(--muted); }
.redirect p { margin: 0; }
.ring {
  --p: 1;
  width: 40px; height: 40px; border-radius: 50%;
  background: conic-gradient(var(--rojo-btn) calc(var(--p) * 360deg), var(--linea) 0);
  display: grid; place-items: center;
  transition: background 1s linear;
}
.ring span {
  width: 32px; height: 32px; border-radius: 50%; background: var(--blanco);
  display: grid; place-items: center; font-weight: 800; color: var(--tinta);
}

.spinner {
  width: 36px; height: 36px; margin: 30px auto;
  border: 3px solid var(--linea); border-top-color: var(--rojo-btn); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.foot { font-size: .78rem; color: var(--muted); padding: 0 0 24px; text-align: center; }

/* ---------- Transiciones entre pasos ---------- */
.next-enter-active, .next-leave-active, .prev-enter-active, .prev-leave-active { transition: opacity .22s ease, transform .22s ease; }
.next-enter-from { opacity: 0; transform: translateX(24px); }
.next-leave-to { opacity: 0; transform: translateX(-24px); }
.prev-enter-from { opacity: 0; transform: translateX(-24px); }
.prev-leave-to { opacity: 0; transform: translateX(24px); }

@media (max-width: 560px) {
  .brand { padding-top: 26px; }
  .logo { width: 140px; }
  .stage { justify-content: flex-start; padding-top: 12px; }
  .screen { padding: 28px 20px; border-radius: 20px; }
  .redirect { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
