/* ==========================================================================
   Projeto Enxergar — Quiz multi-step
   ========================================================================== */

:root {
  --blue-900: #0a1f44;
  --blue-700: #123a8f;
  --blue-600: #1451d8;
  --blue-500: #2563eb;
  --blue-100: #dbe7ff;
  --blue-50:  #f0f5ff;

  --yellow-500: #ffc53d;
  --yellow-600: #f5a300;

  --green-500: #16a34a;
  --green-600: #128a40;

  --red-500: #dc2626;

  --ink: #16233b;
  --ink-soft: #5a6a85;
  --line: #e3e9f4;
  --bg: #f4f7fe;
  --card: #ffffff;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 40px rgba(10, 31, 68, 0.10);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(60rem 30rem at 85% -5%, var(--blue-100) 0%, transparent 60%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Barra de urgência
   -------------------------------------------------------------------------- */

.urgency-bar {
  background: var(--blue-900);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.urgency-bar strong { color: var(--yellow-500); }

.urgency-bar__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow-500);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

/* --------------------------------------------------------------------------
   Cabeçalho
   -------------------------------------------------------------------------- */

.header {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--blue-900);
}

.brand__icon { width: 30px; height: 30px; color: var(--blue-600); }

.brand__name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.brand__name strong { font-weight: 800; }

.header__badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
}

.stars { color: var(--yellow-600); letter-spacing: 0.08em; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2rem;
  padding-top: 1.25rem;
}

.hero__eyebrow {
  display: inline-block;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--blue-900);
  margin-bottom: 0.9rem;
}

.hero__highlight {
  color: var(--blue-600);
  position: relative;
  white-space: nowrap;
}

.hero__highlight::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.32em;
  background: var(--yellow-500);
  opacity: 0.45;
  z-index: -1;
  border-radius: 4px;
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.hero__stats {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero__stats li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.1rem;
  display: flex;
  flex-direction: column;
  min-width: 120px;
}

.hero__stats strong { font-size: 1.05rem; color: var(--blue-700); }
.hero__stats span   { font-size: 0.74rem; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Quiz — cartão
   -------------------------------------------------------------------------- */

.quiz { max-width: 560px; margin: 0 auto; }

.quiz__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 1.5rem 1.75rem;
  overflow: hidden;
}

.quiz__progress {
  height: 8px;
  background: var(--blue-50);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.quiz__progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-600));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.quiz__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}

.quiz__step-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.quiz__secure { font-size: 0.75rem; color: var(--ink-soft); }

/* Passos ------------------------------------------------------------------ */

.quiz__viewport { position: relative; }

.step {
  animation: step-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.step.step--out-left  { animation: step-out-left 0.22s ease forwards; }
.step.step--in-right  { animation: step-in 0.35s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes step-in {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes step-out-left {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-28px); }
}

.step__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--blue-900);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.step__hint {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

/* Campos de texto ---------------------------------------------------------- */

.field {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--blue-50);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.1rem;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.field::placeholder { color: #93a3bd; }

.field:focus {
  border-color: var(--blue-500);
  background: #fff;
}

.field--invalid { border-color: var(--red-500); background: #fff; }

/* Opções (múltipla escolha) ------------------------------------------------ */

.options { display: grid; gap: 0.6rem; }

.options--grid {
  grid-template-columns: repeat(2, 1fr);
}

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0.9rem 1rem;
  cursor: pointer;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.option:hover { border-color: var(--blue-500); }
.option:active { transform: scale(0.985); }

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option__radio {
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid #b9c6dd;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease;
}

.option__radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue-600);
  transform: scale(0);
  transition: transform 0.15s ease;
}

.option.is-selected {
  border-color: var(--blue-600);
  background: var(--blue-50);
}

.option.is-selected .option__radio { border-color: var(--blue-600); }
.option.is-selected .option__radio::after { transform: scale(1); }

/* Erros -------------------------------------------------------------------- */

.quiz__error {
  margin-top: 0.8rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--red-500);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}

/* Navegação ---------------------------------------------------------------- */

.quiz__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.btn {
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--blue-600);
  color: #fff;
  margin-left: auto;
  box-shadow: 0 6px 18px rgba(20, 81, 216, 0.35);
}

.btn--primary:hover { background: var(--blue-700); }

.btn--primary.btn--submit {
  background: var(--green-500);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35);
}

.btn--primary.btn--submit:hover { background: var(--green-600); }

.btn--ghost {
  background: transparent;
  color: var(--ink-soft);
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

.btn--ghost:hover { color: var(--blue-700); }

.btn--whatsapp {
  background: #25d366;
  color: #fff;
  margin-top: 1.25rem;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}

.btn--whatsapp:hover { background: #1fb757; }

.btn--whatsapp svg { width: 20px; height: 20px; }

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Tela de sucesso ----------------------------------------------------------- */

.quiz__success {
  text-align: center;
  padding: 1.25rem 0.5rem 0.5rem;
  animation: step-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.quiz__success-icon {
  color: var(--green-500);
  width: 72px;
  margin: 0 auto 1rem;
}

.quiz__success h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--blue-900);
  margin-bottom: 0.6rem;
}

.quiz__success p {
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto;
}

.quiz__privacy {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}

/* --------------------------------------------------------------------------
   Benefícios
   -------------------------------------------------------------------------- */

.benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 860px;
  margin: 3rem auto 0;
}

.benefit {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem;
  text-align: center;
}

.benefit__icon { font-size: 1.7rem; display: block; margin-bottom: 0.6rem; }

.benefit h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--blue-900);
  margin-bottom: 0.35rem;
}

.benefit p { font-size: 0.87rem; color: var(--ink-soft); line-height: 1.5; }

/* --------------------------------------------------------------------------
   Rodapé
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 1.75rem 1.25rem 2.25rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.footer p:first-child { color: var(--blue-900); margin-bottom: 0.3rem; }

.footer__small { font-size: 0.75rem; }

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */

@media (max-width: 720px) {
  .benefits { grid-template-columns: 1fr; max-width: 480px; }
  .header__badge { display: none; }
}

@media (max-width: 480px) {
  .main { padding: 0.5rem 1rem 2.5rem; }
  .quiz__card { padding: 1.25rem 1.1rem 1.5rem; }
  .options--grid { grid-template-columns: 1fr; }
  .hero__stats li { min-width: 100px; padding: 0.6rem 0.8rem; }
  .btn--primary { flex: 1; }
}

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