@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Roboto:wght@400;500;700&display=swap');

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

:root{
  --bg:#0b0b0b;
  --surface:#1A1A1A;
  --surface-hover:#252525;
  --accent:#e63946;
  --accent-hover:#c62d39;
  --text:#F5F5F5;
  --text-muted:#b0b0b0;
  --green-wpp:#25d366;
  --green-wpp-hover:#1ebe57;
  --radius:12px;
  --radius-sm:8px;
  --transition:0.3s ease;
}

html{font-size:16px;-webkit-text-size-adjust:100%}
body{
  font-family:'Roboto',sans-serif;
  background:var(--bg);
  color:var(--text);
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:'Montserrat',sans-serif}

/* ── Header ── */
.header{
  text-align:center;
  padding:24px 20px 16px;
  border-bottom:1px solid #222;
}
.header__logo{
  width:180px;
  height:auto;
  display:block;
  margin:0 auto 8px;
}
.header__tagline{
  font-size:.875rem;
  color:var(--text-muted);
  margin-top:4px;
  line-height:1.4;
}

/* ── Badges ── */
.badges{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  padding:16px 20px 8px;
}
.badge{
  background:var(--surface);
  border:1px solid #2A2A2A;
  border-radius:100px;
  padding:6px 14px;
  font-size:.75rem;
  color:var(--text-muted);
  white-space:nowrap;
}

/* ── Progress ── */
.progress-wrap{
  padding:16px 20px 0;
  max-width:480px;
  margin:0 auto;
  width:100%;
}
.progress-bar{
  height:4px;
  background:#2A2A2A;
  border-radius:100px;
  overflow:hidden;
}
.progress-bar__fill{
  height:100%;
  background:var(--accent);
  border-radius:100px;
  width:0%;
  transition:width .4s ease;
}
.progress-label{
  font-size:.75rem;
  color:var(--text-muted);
  margin-top:6px;
  text-align:right;
}

/* ── Main container ── */
.container{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:24px 20px 40px;
  max-width:480px;
  margin:0 auto;
  width:100%;
}

/* ── Steps ── */
.step{
  display:none;
  width:100%;
  animation:fadeUp .35s ease both;
}
.step.active{display:block}

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

.step__question{
  font-size:1.25rem;
  font-weight:700;
  line-height:1.35;
  margin-bottom:20px;
}

/* ── Inputs ── */
.input-group{margin-bottom:16px}

.input-field{
  width:100%;
  padding:16px;
  background:var(--surface);
  border:1.5px solid #2A2A2A;
  border-radius:var(--radius);
  color:var(--text);
  font-size:1rem;
  outline:none;
  transition:border-color var(--transition);
}
.input-field::placeholder{color:#666}
.input-field:focus{border-color:var(--accent)}
.input-field.error{border-color:#E54D4D}

.error-msg{
  font-size:.8rem;
  color:#E54D4D;
  margin-top:6px;
  display:none;
}
.error-msg.visible{display:block}

/* ── Options (radio-like cards) ── */
.options{display:flex;flex-direction:column;gap:10px}

.option-card{
  display:flex;
  align-items:center;
  gap:12px;
  padding:16px;
  background:var(--surface);
  border:1.5px solid #2A2A2A;
  border-radius:var(--radius);
  cursor:pointer;
  transition:border-color var(--transition),background var(--transition);
  -webkit-tap-highlight-color:transparent;
}
.option-card:hover{background:var(--surface-hover)}
.option-card.selected{border-color:var(--accent);background:var(--surface-hover)}
.option-card input{display:none}

.option-radio{
  width:22px;height:22px;min-width:22px;
  border:2px solid #555;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  transition:border-color var(--transition);
}
.option-card.selected .option-radio{border-color:var(--accent)}
.option-radio::after{
  content:'';
  width:10px;height:10px;
  border-radius:50%;
  background:var(--accent);
  transform:scale(0);
  transition:transform .2s ease;
}
.option-card.selected .option-radio::after{transform:scale(1)}

.option-label{
  font-size:.95rem;
  line-height:1.3;
}

/* ── Checkbox LGPD ── */
.consent-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  margin-bottom:20px;
}
.consent-row input[type=checkbox]{
  width:22px;height:22px;min-width:22px;
  accent-color:var(--accent);
  margin-top:2px;
  cursor:pointer;
}
.consent-row label{
  font-size:.8rem;
  color:var(--text-muted);
  line-height:1.45;
  cursor:pointer;
}
.consent-row a{color:var(--accent);text-decoration:underline}

/* ── Docs info screen ── */
.docs-info{
  display:none;
  width:100%;
  animation:fadeUp .4s ease both;
}
.docs-info.active{display:block}

.docs-info__title{
  font-size:1.25rem;
  font-weight:700;
  line-height:1.35;
  margin-bottom:8px;
}
.docs-info__subtitle{
  font-size:.9rem;
  color:var(--text-muted);
  line-height:1.5;
  margin-bottom:20px;
}
.docs-list{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:24px;
}
.docs-list li{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  background:var(--surface);
  border:1.5px solid #2A2A2A;
  border-radius:var(--radius);
  font-size:.95rem;
  line-height:1.3;
}
.docs-list__icon{
  font-size:1.2rem;
  min-width:24px;
  text-align:center;
}
.docs-list__text{flex:1}
.docs-list__detail{
  display:block;
  font-size:.8rem;
  color:var(--text-muted);
  margin-top:2px;
}

/* ── Buttons ── */
.btn{
  width:100%;
  padding:16px;
  border:none;
  border-radius:var(--radius);
  font-size:1.05rem;
  font-weight:700;
  cursor:pointer;
  transition:background var(--transition),transform .15s ease;
  -webkit-tap-highlight-color:transparent;
}
.btn:active{transform:scale(.97)}

.btn--primary{
  background:var(--accent);
  color:#fff;
}
.btn--primary:hover{background:var(--accent-hover)}
.btn--primary:disabled{
  background:#555;
  color:#999;
  cursor:not-allowed;
  transform:none;
}

.btn--secondary{
  background:transparent;
  border:1.5px solid #444;
  color:var(--text-muted);
  margin-top:10px;
}
.btn--secondary:hover{border-color:#666;color:var(--text)}

.btn--link{
  background:none;
  border:none;
  color:var(--accent);
  font-weight:600;
  font-size:.95rem;
  text-decoration:underline;
  cursor:pointer;
  margin-top:16px;
  display:inline-block;
}

/* ── Skip link ── */
.skip-link{
  display:block;
  text-align:center;
  margin-top:12px;
  font-size:.85rem;
  color:var(--text-muted);
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.skip-link:hover{color:var(--text)}

/* ── Result screen ── */
.result{
  display:none;
  width:100%;
  text-align:center;
  animation:fadeUp .4s ease both;
}
.result.active{display:block}

.result__icon{
  font-size:3rem;
  margin-bottom:16px;
}
.result__title{
  font-size:1.4rem;
  font-weight:800;
  line-height:1.3;
  margin-bottom:16px;
}
.result__body{
  font-size:1rem;
  line-height:1.6;
  color:var(--text-muted);
  margin-bottom:24px;
}
.result__body strong{color:var(--text)}

.result__cta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:16px 28px;
  background:var(--green-wpp);
  color:#fff;
  border-radius:var(--radius);
  font-size:1.05rem;
  font-weight:700;
  text-decoration:none;
  transition:background var(--transition),transform .15s ease;
}
.result__cta:hover{background:var(--green-wpp-hover)}
.result__cta:active{transform:scale(.97)}

/* ── Loading overlay ── */
.loading-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(14,14,14,.85);
  z-index:100;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
}
.loading-overlay.active{display:flex}

.spinner{
  width:40px;height:40px;
  border:3px solid #333;
  border-top-color:var(--accent);
  border-radius:50%;
  animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

.loading-text{
  font-size:.95rem;
  color:var(--text-muted);
}

/* ── Error screen ── */
.error-screen{
  display:none;
  width:100%;
  text-align:center;
  animation:fadeUp .35s ease both;
}
.error-screen.active{display:block}
.error-screen__icon{font-size:2.5rem;margin-bottom:12px}
.error-screen__title{font-size:1.2rem;font-weight:700;margin-bottom:8px}
.error-screen__body{font-size:.9rem;color:var(--text-muted);line-height:1.5;margin-bottom:20px}

/* ── Footer ── */
.footer{
  text-align:center;
  padding:16px 20px;
  font-size:.7rem;
  color:#555;
  border-top:1px solid #1A1A1A;
}

/* ── Privacy modal ── */
.modal-backdrop{
  display:none;
  position:fixed;inset:0;
  background:rgba(0,0,0,.7);
  z-index:200;
  align-items:center;justify-content:center;
  padding:20px;
}
.modal-backdrop.active{display:flex}

.modal{
  background:var(--surface);
  border-radius:var(--radius);
  padding:24px;
  max-width:420px;
  width:100%;
  max-height:80dvh;
  overflow-y:auto;
}
.modal__title{font-size:1.1rem;font-weight:700;margin-bottom:12px}
.modal__body{font-size:.85rem;color:var(--text-muted);line-height:1.6}
.modal__body p{margin-bottom:10px}
.modal__close{
  margin-top:16px;
  padding:12px;
  width:100%;
  background:var(--accent);
  color:#fff;
  border:none;
  border-radius:var(--radius-sm);
  font-weight:700;
  font-size:.95rem;
  cursor:pointer;
}

/* ── Responsive tweaks ── */
@media (min-width:600px){
  .header{padding:32px 24px 20px}
  .header__logo{width:220px}
  .container{padding:32px 24px 48px}
  .step__question{font-size:1.4rem}
  .docs-info__title{font-size:1.4rem}
}
