/* =========================================================
   Sólido Comunicação — Quiz de Diagnóstico
   Identidade visual + layout mobile-first
   ========================================================= */

:root {
  /* Paleta */
  --green-deep: #1D3E34;
  --green-dark: #29574A;
  --green: #356B5A;
  --gold: #C79B4F;
  --gold-light: #D9B776;
  --sand: #F5F1E8;

  /* Derivados */
  --ink: #1D3E34;
  --ink-soft: #4a6459;
  --line: rgba(29, 62, 52, 0.12);
  --card: #ffffff;
  --danger: #b4472e;
  --ok: #2e7d5b;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 18px 45px -22px rgba(29, 62, 52, 0.45);
  --shadow-soft: 0 6px 20px -12px rgba(29, 62, 52, 0.35);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  /* Fundo colorido atrás do card branco (dá o efeito de pop-up) */
  background: radial-gradient(1100px 720px at 50% -8%, var(--green) 0%, var(--green-dark) 40%, var(--green-deep) 100%);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation; /* bloqueia o zoom de duplo-toque no celular */
  /* Card centralizado no topo; a PÁGINA rola naturalmente (scroll nativo) */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 14px;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: max(14px, env(safe-area-inset-bottom));
}

em { font-style: normal; color: var(--gold); }

/* ---------- App shell = card branco flutuante ---------- */
.app {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: calc(100dvh - 28px);  /* preenche a tela e cresce com o conteúdo */
  background: #fff;
  border-radius: 26px;
  box-shadow:
    0 30px 70px -28px rgba(12, 30, 24, 0.72),
    0 0 0 1px rgba(255, 255, 255, 0.35);
  display: flex;
  flex-direction: column;
  padding: 0 22px calc(26px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

/* ---------- Barra de progresso ---------- */
.progress {
  padding: 18px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* Respeita o atributo hidden (senão o display:flex acima o ignora) */
.progress[hidden] { display: none; }
.progress__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(29, 62, 52, 0.12);
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  box-shadow: 0 0 12px rgba(199, 155, 79, 0.55);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Palco / telas ---------- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 0;
}
.screen { display: none; }
.screen.is-active { display: block; animation: rise 0.4s cubic-bezier(0.22, 1, 0.36, 1); }

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

/* =========================================================
   TELA 0 — INTRO
   ========================================================= */
.screen--intro { display: none; }
.screen--intro.is-active { display: flex; align-items: center; min-height: 100%; }

.intro { text-align: center; padding: 24px 0; width: 100%; }
/* Cabeçalho com a logo (espelha o rodapé) */
.site-header {
  flex: 0 0 auto;
  text-align: center;
  padding: 26px 0 14px;   /* topo com o mesmo respiro que sobra embaixo do card */
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.site-header__logo {
  display: block;
  width: auto;
  height: 50px;
  max-width: 80%;
  object-fit: contain;
  margin: 0 auto;
}
.intro__title {
  font-family: var(--font-display);
  font-size: clamp(31px, 8.6vw, 43px);
  font-weight: 300; /* Manrope Light */
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--green-deep);
  margin-bottom: 18px;
}
.intro__title strong { font-weight: 800; } /* "perdendo dinheiro" em destaque forte */
.intro__lead {
  font-size: clamp(19px, 5vw, 22px);
  font-weight: 600;
  color: var(--green-deep);
  letter-spacing: -0.01em;
  max-width: 26ch;
  margin: 0 auto 22px; /* respiro entre este e o texto de baixo */
}
.intro__sub {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 40ch;
  margin: 0 auto 30px;
}
.intro__sub strong { font-weight: 600; color: var(--green-dark); }
.intro__reassure {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;          /* tudo numa linha só */
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}
.intro__reassure li {
  font-size: clamp(10px, 3vw, 12.5px);
  font-weight: 600;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;        /* não quebra dentro do item */
}
.intro__reassure li::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  flex: 0 0 auto;
}

/* =========================================================
   PERGUNTAS
   ========================================================= */
.q { padding: 6px 0 8px; }
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.q__title {
  font-size: clamp(22px, 6vw, 27px);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.18;
  color: var(--green-deep);
  margin-bottom: 8px;
}
.q__help {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 22px;
}
.q__options { display: flex; flex-direction: column; gap: 11px; margin-top: 22px; }

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 17px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}
.option:active { transform: scale(0.985); }
.option:hover { border-color: rgba(199, 155, 79, 0.6); }
.option__mark {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  position: relative;
  transition: border-color 0.15s ease;
}
.option.is-selected {
  border-color: var(--gold);
  background: linear-gradient(0deg, rgba(199, 155, 79, 0.08), rgba(199, 155, 79, 0.08)), var(--card);
}
.option.is-selected .option__mark { border-color: var(--gold); }
.option.is-selected .option__mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--gold);
}
.option__text { flex: 1; }

/* =========================================================
   CAPTURA
   ========================================================= */
.capture { padding: 8px 0 12px; }
.capture__title {
  font-size: clamp(24px, 6.5vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green-deep);
  margin-bottom: 10px;
}
.capture__sub { font-size: 15px; color: var(--ink-soft); margin-bottom: 26px; max-width: 42ch; }

.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--green-dark);
  padding-left: 2px;
}
.field__control {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field__control:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(199, 155, 79, 0.18);
}
.field__icon { color: var(--green); display: flex; }
.field__icon svg { width: 20px; height: 20px; }
.field__control input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px; /* evita zoom no iOS */
  font-weight: 500;
  color: var(--ink);
  padding: 15px 12px;
  min-width: 0;
}
.field__control input::placeholder { color: #9fb0a7; font-weight: 400; }

/* Prefixo do telefone (bandeira + +55) */
.field__prefix {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid var(--line);
}
.field__prefix .flag { border-radius: 3px; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,0.06); }
.field__ddi { font-size: 16px; font-weight: 700; color: var(--green-dark); }
.field__control--phone input { padding-left: 10px; }

.form__error {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--danger);
  background: rgba(180, 71, 46, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
}
.form__note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}
.form__note svg { color: var(--green); }

/* =========================================================
   BOTÕES
   ========================================================= */
.btn {
  appearance: none;
  border: none;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 18px 28px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none; /* tira o sublinhado do link */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn--gold {
  color: #fff;
  text-shadow: 0 1px 2px rgba(29, 62, 52, 0.28);
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  box-shadow: 0 14px 30px -12px rgba(199, 155, 79, 0.75);
}
.btn--gold:hover { filter: brightness(1.03); }
.btn--gold:active { transform: translateY(1px) scale(0.99); }
.btn--full { width: 100%; margin-top: 6px; }
.btn:disabled { opacity: 0.6; cursor: default; filter: grayscale(0.2); }

/* Rodapé com botão voltar (canto inferior esquerdo do card) */
.navbar {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-start;
  margin-top: 22px; /* respiro logo abaixo das opções */
}
.navbar[hidden] { display: none; }

.navback {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sand);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 17px 10px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.navback svg { width: 18px; height: 18px; }
.navback:hover { background: #ece5d5; }
.navback:active { transform: scale(0.97); }

/* Voltar (legado, topo) */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 6px;
}
.back svg { width: 16px; height: 16px; }
.back:hover { color: var(--green-dark); }

/* =========================================================
   RESULTADO — RAIO-X
   ========================================================= */
.result { padding: 30px 0 8px; }

.result__confirm {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--green-deep);
  color: #eef6f1;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.result__confirm .check {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--green-deep);
  display: grid;
  place-items: center;
}
.result__confirm .check svg { width: 16px; height: 16px; }
.result__confirm strong { display: block; font-size: 15px; margin-bottom: 2px; }
.result__confirm span { font-size: 13.5px; color: rgba(238, 246, 241, 0.82); }

.result__want {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.6);
}
.result__want .label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gold); display: block; margin-bottom: 6px;
}
.result__want p { font-size: 17px; font-weight: 700; color: var(--green-deep); letter-spacing: -0.01em; }

.result__eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft);
  margin-top: 80px; margin-bottom: 10px;
  text-align: center;
}
.result__headline {
  font-size: clamp(24px, 6.5vw, 31px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--green-deep);
  margin-bottom: 8px;
  text-align: center;
}
.result__count { color: var(--danger); }
.result__count--zero { color: var(--ok); }
.result__lead { font-size: 15px; color: var(--ink-soft); margin: 0 auto 24px; max-width: 44ch; text-align: center; }

/* Cartões de furo */
.holes { display: flex; flex-direction: column; gap: 26px; margin-bottom: 28px; }
.hole-group { display: flex; flex-direction: column; }
.hole {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.hole__top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hole__icon {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: rgba(180, 71, 46, 0.10);
  color: var(--danger);
  display: grid; place-items: center;
}
.hole__icon svg { width: 22px; height: 22px; }
.hole__area { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--danger); }
.hole__title { font-size: 17px; font-weight: 800; color: var(--green-deep); letter-spacing: -0.01em; }
.hole__diag { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 0; }

/* Solução: solta abaixo do card, sem box */
.hole__fix {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 0 6px;
  margin-top: 14px;
}
.hole__fix .arrow { color: var(--green); flex: 0 0 auto; margin-top: 2px; }
.hole__fix .arrow svg { width: 18px; height: 18px; display: block; }
.hole__fix b { color: var(--green-dark); font-weight: 800; }
.hole__fix small { display: block; font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }

/* Estado zero furos */
.clean {
  background: linear-gradient(180deg, rgba(46, 125, 91, 0.10), rgba(255,255,255,0.6));
  border: 1.5px solid rgba(46, 125, 91, 0.3);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 24px;
  text-align: center;
}
.clean__badge {
  width: 62px; height: 62px; margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 26px -10px rgba(46, 125, 91, 0.7);
}
.clean__badge svg { width: 32px; height: 32px; }
.clean h3 { font-size: 20px; font-weight: 800; color: var(--green-deep); margin-bottom: 8px; letter-spacing: -0.01em; }
.clean p { font-size: 14.5px; color: var(--ink-soft); max-width: 40ch; margin: 0 auto; }

/* Fecho */
.result__close {
  background: var(--green-deep);
  color: #eef6f1;
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}
.result__close h3 {
  font-size: 20px; font-weight: 800; letter-spacing: -0.01em;
  color: #fff; margin-bottom: 10px;
}
.result__close p { font-size: 14.5px; color: rgba(238, 246, 241, 0.85); margin-bottom: 20px; max-width: 40ch; margin-left: auto; margin-right: auto; text-wrap: pretty; }
.result__close .btn { width: 100%; }
.result__signature {
  margin-top: 18px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(238, 246, 241, 0.5);
}

/* =========================================================
   RODAPÉ DO CARD (em todas as telas)
   ========================================================= */
/* Rodapé dentro do card */
.site-footer {
  flex: 0 0 auto;
  text-align: center;
  margin-top: 20px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
}
.site-footer__copy { font-size: 11px; color: var(--ink-soft); line-height: 1.4; }
.site-footer__link {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  margin-top: 4px;
  padding: 4px;
}
.site-footer__link:hover { color: var(--green-dark); }

/* =========================================================
   MODAL — POLÍTICA DE PRIVACIDADE
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 30, 24, 0.62);
  backdrop-filter: blur(3px);
  animation: fade 0.2s ease;
}
.modal__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 470px;
  max-height: 86dvh;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 40px 80px -30px rgba(12, 30, 24, 0.8);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: pop 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } }

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--sand);
  color: var(--green-deep);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
  transition: background 0.15s ease;
}
.modal__close:hover { background: #ece5d5; }
.modal__close svg { width: 18px; height: 18px; }

.modal__scroll {
  overflow-y: auto;
  padding: 30px 24px 24px;
  -webkit-overflow-scrolling: touch;
}
.modal__eyebrow {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.modal__scroll h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--green-deep);
  line-height: 1.2;
}
.modal__updated { font-size: 12.5px; color: var(--ink-soft); margin: 6px 0 18px; }
.modal__scroll h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--green-dark);
  margin: 22px 0 7px;
}
.modal__scroll p { font-size: 14px; color: var(--ink); line-height: 1.6; margin-bottom: 10px; }
.modal__scroll ul { margin: 0 0 10px; padding-left: 20px; }
.modal__scroll li { font-size: 14px; color: var(--ink); line-height: 1.55; margin-bottom: 6px; }
.modal__scroll strong { font-weight: 700; color: var(--green-deep); }
.modal__signature {
  margin-top: 22px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
}
.modal__accept { width: 100%; margin-top: 18px; }

/* Spinner */
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(29,62,52,0.25);
  border-top-color: var(--green-deep);
  border-radius: 50%;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 8px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Desktop: dá respiro lateral */
@media (min-width: 560px) {
  .app { padding-left: 32px; padding-right: 32px; }
}
