:root {
  --bg: #0b0415;
  --accent: #8a2be2;
  --accent-soft: #a970ff;
  --text: #f4f0fb;
  --muted: #7a7189;
  --line: #2a2038;
  --error: #ff5c7a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat Alternates", sans-serif;
  overflow: hidden;
}

.progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--line);
  z-index: 10;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  width: 0%;
  transition: width 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.brand {
  position: fixed;
  top: 20px;
  right: 32px;
  z-index: 10;
  user-select: none;
}
.brand img {
  height: 50px;
  width: auto;
  display: block;
}

.stage {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 8vw;
}

.step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 8vw;
  opacity: 0;
  transform: translateY(24px);
  pointer-events: none;
  transition:
    opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.step.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.step.leaving {
  opacity: 0;
  transform: translateY(-24px);
}

.step-inner {
  max-width: 720px;
  width: 100%;
}

.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  margin-right: 10px;
}

.q-label {
  display: flex;
  align-items: center;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 500;
  color: #cfc7dd;
  margin-bottom: 36px;
  white-space: nowrap;
}

.q-label b {
  color: var(--text);
  font-weight: 800;
  margin-left: 6px;
}

.q-label .req {
  color: var(--accent-soft);
  margin-left: 4px;
}

.input-wrap {
  position: relative;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--line);
  color: var(--accent-soft);
  font-family: inherit;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  padding: 10px 2px 14px;
  outline: none;
  caret-color: var(--accent-soft);
  resize: none;
}

input::placeholder,
textarea::placeholder {
  color: #443a55;
}
input:focus,
textarea:focus {
  border-bottom-color: var(--accent);
}

.error-msg {
  display: block;
  min-height: 20px;
  color: var(--error);
  font-size: 13px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.error-msg.show {
  opacity: 1;
}

.btn {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.15s;
}

.btn:hover {
  background: #7423c9;
}
.btn:active {
  transform: scale(0.97);
}

/* Botão WhatsApp no final do formulário */
.whatsapp{
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 12px;
 width: 100%;
 max-width: 360px;
 margin: 35px auto 0;
 padding: 18px;
 border: none;
 border-radius: 16px;
 background: linear-gradient(135deg,#8c52ff,#6d38e0);
 color: #fff;
 font-size: 18px;
 font-weight: 700;
 text-decoration: none;
 transition: .35s;
 box-shadow: 0 0 30px rgba(140,82,255,.35);

}

.whatsapp:hover{
  transform: translateY(-5px);
  box-shadow: 0 0 50px rgba(140, 82, 255, .6);
}

.whatsapp::after{
    content:"➜";
    transition:.3s;
}

.whatsapp:hover::after{
 transform: translateX(6px);
}

.hint {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}
.hint kbd {
  background: var(--line);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: inherit;
  color: #cfc7dd;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: #cfc7dd;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.choice:hover {
  border-color: var(--accent-soft);
}
.choice.selected {
  border-color: var(--accent);
  background: rgba(138, 43, 226, 0.12);
  color: #fff;
}
.choice .k {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 2px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
}

.choice.selected .k {
  border-color: var(--accent);
  color: var(--accent-soft);
}

.nav-arrows {
  position: fixed;
  bottom: 28px;
  right: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
}

.nav-arrows button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: none;
  background: #161022;
  color: #8a7fa0;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.15s,
    color 0.15s;
}

.nav-arrows button:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
}
.nav-arrows button:disabled {
  opacity: 0.3;
  cursor: default;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 26px;
}

@media (max-width: 640px) {
  .brand img {
    height: 24px;
  }
  .brand {
    top: 16px;
    right: 16px;
  }
  .stage,
  .step {
    padding: 0 24px;
  }
  .nav-arrows {
    right: 16px;
    bottom: 16px;
  }
}

/* Formulário responsivo — prioridade para iPhone e teclado virtual. */
@media (max-width: 767px) {
  html,
  body {
    min-height: 100%;
    min-height: 100dvh;
    overflow: hidden;
  }

  .progress-track {
    height: 3px;
  }

  .brand {
    top: calc(16px + env(safe-area-inset-top));
    right: 20px;
  }

  .brand img {
    height: 30px;
  }

  .stage {
    height: 100dvh;
    min-height: 100dvh;
    padding: 0;
  }

  .step {
    display: block;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: calc(86px + env(safe-area-inset-top)) 20px
      calc(104px + env(safe-area-inset-bottom));
  }

  .step-inner {
    max-width: 540px;
    min-height: calc(100dvh - 190px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .q-label {
    display: block;
    white-space: normal;
    font-size: clamp(1.35rem, 6.2vw, 1.85rem);
    line-height: 1.25;
    margin-bottom: 26px;
    text-wrap: pretty;
  }

  .q-num {
    width: 25px;
    height: 25px;
    vertical-align: middle;
    margin-right: 8px;
  }

  .q-label b {
    margin-left: 5px;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea {
    min-height: 50px;
    padding: 10px 2px 13px;
    font-size: 16px;
    line-height: 1.4;
  }

  .btn {
    width: 100%;
    min-height: 52px;
    justify-content: center;
    margin-top: 24px;
    font-size: 0.95rem;
  }

  .choices {
    gap: 9px;
  }

  .choice {
    min-height: 52px;
    gap: 11px;
    padding: 12px 14px;
    font-size: 0.96rem;
  }

  .choice .k {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .hint {
    display: none;
  }

  .error-msg {
    font-size: 0.78rem;
  }

  .nav-arrows {
    right: 20px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    flex-direction: row;
    gap: 10px;
  }

  .nav-arrows button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
  }

  .success-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
  }
}

@media (max-width: 380px) {
  .step {
    padding-right: 16px;
    padding-left: 16px;
  }

  .q-label {
    font-size: 1.28rem;
    margin-bottom: 20px;
  }

  .choice {
    min-height: 48px;
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .nav-arrows {
    right: 16px;
  }

  .nav-arrows button {
    width: 44px;
    height: 44px;
  }
}
