/* =====================================================
   DIAGNÓSTICO WIZARD — diagnostico.css
   Loaded only on /diagnostico page
   ===================================================== */

/* ── Wrapper ── */
.wizard-wrap {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

/* ── Progress dots ── */
.wizard-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 2.5rem;
}

.wizard-progress-dot {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--border);
  transition: background 0.4s;
}

.wizard-progress-dot.active {
  background: var(--accent);
}

/* ── Screens ── */
.wizard-screen {
  display: none;
  animation: wFadeUp 0.4s ease both;
}

.wizard-screen.active {
  display: block;
}

@keyframes wFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Typewriter cursor ── */
.tw-cursor {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: twBlink 0.75s step-end infinite;
}

@keyframes twBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── INTRO screen ── */
.wizard-intro {
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.wizard-intro-heading {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  min-height: 1.3em;
}

.wizard-intro-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-inline: auto;
  min-height: 1.4em;
}

/* ── Step heading ── */
.wizard-question {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.35rem;
  min-height: 2.5em;
}

.wizard-sub {
  color: var(--text-muted);
  font-size: 0.93rem;
  margin-bottom: 1.75rem;
}

.wizard-hint {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.01em;
}

/* ── Option cards ── */
.wizard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.wizard-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
  cursor: pointer;
  background: var(--surface);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.3s, transform 0.3s, border-color 0.18s, background 0.18s, box-shadow 0.18s;
  outline: none;
  user-select: none;
}

.wizard-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.wizard-card:hover,
.wizard-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.wizard-card.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
}

.wizard-card-icon {
  font-size: 1.55rem;
  display: block;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.wizard-card-title {
  font-weight: 600;
  font-size: 0.93rem;
  margin-bottom: 0.2rem;
  color: var(--text);
}

.wizard-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Nav row ── */
.wizard-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.wizard-btn-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem 0;
  font-family: var(--font-body);
  transition: color 0.15s;
}

.wizard-btn-back:hover {
  color: var(--text);
}

/* ── RESULT screen ── */
.wizard-result-heading {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.wizard-result-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.wizard-lead-gate {
  max-width: 680px;
  margin-bottom: 1.5rem;
}

.wizard-gate-eyebrow {
  display: inline-flex;
  margin-bottom: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.wizard-result-topline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 2rem;
}

.wizard-result-topline .wizard-success-icon {
  margin: 0.1rem 0 0;
  font-size: 2rem;
}

/* Score cards grid */
.wizard-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.wizard-score-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.4rem;
}

.wizard-score-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.wizard-score-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.wizard-score-bar-fill {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 1.1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.wizard-score-value {
  font-size: 0.85rem;
  font-weight: 700;
}

/* Recommendations */
.wizard-recs {
  margin-bottom: 2.5rem;
}

.wizard-recs-heading {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 1rem;
}

.wizard-rec-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 0 1.2rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
  overflow: hidden;
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.4s, transform 0.4s;
}

.wizard-rec-card.revealed {
  opacity: 1;
  transform: translateX(0);
}

.wizard-rec-rank {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 1.1rem 1.5rem 0.25rem;
}

.wizard-rec-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.wizard-rec-front {
  margin: 0 1.5rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wizard-rec-title {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 1.5rem 0.3rem;
}

.wizard-rec-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.wizard-rec-title a:hover {
  color: var(--accent);
}

.wizard-rec-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 1.5rem;
}

.wizard-result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.wizard-summary-card {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1.35rem;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent-soft));
}

.wizard-summary-card span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.wizard-summary-card strong {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.35;
}

.wizard-summary-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* Email capture shell */
.wizard-email-shell {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 2rem 2.25rem;
}

.wizard-email-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.wizard-email-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 520px;
}

.wizard-email-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.wizard-turnstile {
  margin: 0 0 1rem;
  min-height: 65px;
}

.wizard-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.wizard-field input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.18s, box-shadow 0.18s;
  box-sizing: border-box;
}

.wizard-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.wizard-email-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.wizard-send-error {
  font-size: 0.85rem;
  color: #e05252;
  margin-top: 0.5rem;
}

/* ── SUCCESS screen ── */
.wizard-success {
  text-align: center;
  padding: 4.5rem 0;
}

.wizard-success-icon {
  font-size: 3rem;
  margin-bottom: 1.25rem;
  display: block;
  color: var(--accent);
}

.wizard-success-heading {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.wizard-success-text {
  color: var(--text-muted);
  max-width: 440px;
  margin: 0 auto 2rem;
  font-size: 0.97rem;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .wizard-cards {
    grid-template-columns: 1fr 1fr;
  }

  .wizard-email-fields {
    grid-template-columns: 1fr;
  }

  .wizard-result-summary,
  .wizard-result-topline {
    grid-template-columns: 1fr;
  }

  .wizard-email-shell {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 400px) {
  .wizard-cards {
    grid-template-columns: 1fr;
  }
}
