/* Funil de qualificação (/aplicar) */

body.funnel {
  display: flex;
  flex-direction: column;
}

/* ---------- Barra do topo ---------- */
.funnel-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 0 var(--gutter);
  background: linear-gradient(var(--ink) 55%, transparent);
}

.progress {
  height: 4px;
  margin-inline: calc(var(--gutter) * -1);
  background: var(--line);
}

.progress::after {
  content: "";
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--signal);
  transition: width 0.5s var(--ease-out);
}

.funnel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 600px);
  min-height: 52px;
  margin-inline: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  transition: color 0.25s var(--ease-out);
}

.back:hover {
  color: var(--paper);
}

.back .icon {
  width: 16px;
  height: 16px;
}

/* ---------- Palco ---------- */
.stage {
  flex: 1;
  width: min(100% - var(--gutter) * 2, 600px);
  margin-inline: auto;
  padding: 5vh 0 64px;
}

.screen {
  display: grid;
  align-content: start;
  gap: 18px;
  animation: rise 0.6s var(--ease-out) both;
}

.lead {
  margin: 0;
  max-width: 40ch;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--paper-dim);
}

/* ---------- Abertura ---------- */
.intro {
  gap: 18px;
}

.intro-photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-md);
  background: var(--ink-2);
}

.intro-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}

.intro-photo figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.intro-title {
  margin: 0;
  font-size: clamp(2.2rem, 10vw, 3.4rem);
  font-weight: 800;
  font-variation-settings: "wdth" 75, "opsz" 96;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  outline: none;
}

.intro-title em {
  font-style: normal;
  color: var(--signal);
}

.intro .btn {
  justify-self: start;
}

.intro-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-dim);
}

.intro-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.intro-meta .icon {
  width: 16px;
  height: 16px;
}

/* ---------- Pergunta ---------- */
.step-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal);
}

.step-number .icon {
  width: 14px;
  height: 14px;
}

.step-title {
  margin: 0;
  font-size: clamp(1.5rem, 5.4vw, 2.1rem);
  font-weight: 700;
  font-variation-settings: "wdth" 88, "opsz" 36;
  line-height: 1.15;
  text-wrap: balance;
  outline: none;
}

.step-helper {
  margin: -6px 0 0;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--paper-dim);
}

/* ---------- Campos de texto ---------- */
.field {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 2px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: inherit;
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  caret-color: var(--signal);
  transition: border-color 0.3s var(--ease-out);
}

.field::placeholder {
  color: rgb(243 238 228 / 0.28);
}

.field:focus,
.field:focus-visible {
  outline: none;
  border-bottom-color: var(--signal);
}

textarea.field {
  overflow: hidden;
  line-height: 1.35;
  resize: none;
}

.phone-field {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid var(--line-strong);
  transition: border-color 0.3s var(--ease-out);
}

.phone-field:focus-within {
  border-bottom-color: var(--signal);
}

.phone-field .field {
  border-bottom: 0;
}

.phone-prefix {
  font-family: var(--font-mono);
  font-size: 1rem;
  white-space: nowrap;
  color: var(--paper-dim);
}

/* ---------- Opções ---------- */
.options {
  display: grid;
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgb(26 24 21 / 0.55);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  transition:
    border-color 0.25s var(--ease-out),
    background-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out);
}

.option:hover {
  border-color: var(--paper);
}

.option-key {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-dim);
  transition:
    background-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out);
}

.option-text small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-dim);
}

.option-check {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
}

.option:has(input:checked) {
  border-color: var(--signal);
  background: var(--signal);
  color: var(--ink);
}

.option:has(input:checked) .option-key {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--signal);
}

.option:has(input:checked) small {
  color: rgb(14 13 11 / 0.7);
}

.option:has(input:checked) .option-check {
  opacity: 1;
}

.option:has(input:focus-visible) {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

/* Piscada rápida ao escolher, antes de avançar */
.option.is-picked {
  animation: blink 0.3s steps(2, jump-none) 1;
}

@keyframes blink {
  50% {
    background: transparent;
    color: var(--paper);
  }
}

/* ---------- Erro e ações ---------- */
.field-error {
  justify-self: start;
  margin: 0;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.key-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-dim);
}

@media (hover: none) {
  .key-hint {
    display: none;
  }
}

/* ---------- Resultado ---------- */
.result-title {
  margin: 0;
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 800;
  font-variation-settings: "wdth" 75, "opsz" 96;
  line-height: 1;
  text-transform: uppercase;
  text-wrap: balance;
  outline: none;
}

.kicker-ok {
  color: var(--acid);
}

.scheduler {
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgb(26 24 21 / 0.6);
}

.scheduler-placeholder {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 12px;
  min-height: 420px;
  margin: 12px;
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}

.scheduler-placeholder p {
  margin: 0;
}

.muted {
  color: var(--paper-dim);
}

.check-badge {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--acid);
  color: var(--ink);
  animation: pop 0.6s var(--ease-spring) both;
}

.check-badge .icon {
  width: 36px;
  height: 36px;
  stroke-width: 2.6;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}

.handoff {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 8px;
}

.countdown {
  min-height: 1em;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-dim);
}
