/* ============================================================
   Quiz FAMPE 30 Anos — Sebrae-MA
   Estilos mobile-first. Tokens extraídos do protótipo Figma.
   ============================================================ */
:root{
  --blue:#005eb8;
  --blue-dark:#0a4da0;
  --blue-deep:#07427a;
  --ink:#1a1a1a;
  --muted:#717171;
  --line:#e2e4e6;
  --band:#e9eaeb;
  --sel-bg:#eaf2fb;
  --letter-bg:#ededed;
  --letter-ink:#8a8a8a;
  --red:#d93025;
  --err-bg:#fdecea;
  --green:#00893f;
  --white:#fff;
  --radius:12px;
  --pad:24px;
  --maxw:440px;
  --font:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent;}
html,body{margin:0;padding:0;}
body{
  font-family:var(--font);
  color:var(--ink);
  background:#0a3d73;
  line-height:1.4;
  -webkit-font-smoothing:antialiased;
}
img{display:block;max-width:100%;}
button{font-family:inherit;cursor:pointer;}
a{color:var(--blue);}

/* Container do "aparelho": centraliza em desktop, ocupa tudo no mobile */
.phone{
  position:relative;
  width:100%;
  max-width:var(--maxw);
  min-height:100vh;
  min-height:100dvh;
  margin:0 auto;
  background:var(--white);
  overflow:hidden;
}

/* ---------- Telas ---------- */
.screen{
  display:none;
  flex-direction:column;
  min-height:100vh;
  min-height:100dvh;
  padding-bottom:calc(32px + env(safe-area-inset-bottom));
  animation:fade .28s ease both;
}
.screen.is-active{display:flex;}
@keyframes fade{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}

/* ---------- Botões ---------- */
.btn{
  display:flex;align-items:center;justify-content:center;
  width:min(300px,calc(100% - 2*var(--pad)));
  margin:0 auto;
  height:50px;
  border-radius:var(--radius);
  font-weight:700;font-size:15px;letter-spacing:.02em;
  border:2px solid transparent;
  transition:transform .08s ease,opacity .2s ease,background .2s ease;
}
.btn:active{transform:scale(.98);}
.btn--solid{background:var(--blue);color:#fff;border-color:var(--blue);}
.btn--solid:disabled{background:#d7dade;border-color:#d7dade;color:#9aa0a6;cursor:not-allowed;}
.btn--outline{background:#fff;color:var(--blue);border-color:var(--blue);}
.btn--solid-white{background:#fff;color:var(--blue);font-weight:700;height:54px;border-radius:14px;}
.btn--green{background:var(--green);color:#fff;border-color:var(--green);}

/* ---------- Bandas de topo ---------- */
.titleband{background:var(--blue);padding:48px var(--pad) 22px;}
.titleband__quiz{margin:0;text-align:center;font-weight:900;font-size:32px;color:rgba(255,255,255,.65);letter-spacing:.02em;}

.topbar{
  background:var(--blue);
  padding:calc(52px + env(safe-area-inset-top)) var(--pad) 28px;
  display:flex;align-items:center;justify-content:center;
}
.topbar__lockup{height:34px;width:auto;}

.subband{background:var(--band);padding:14px var(--pad);}
.subband h1{margin:0;text-align:center;color:var(--blue);font-size:24px;font-weight:700;}

/* ============================================================
   01 · SPLASH
   ============================================================ */
.splash{position:relative;justify-content:flex-start;padding:0;color:#fff;}
.splash__bg{
  position:absolute;inset:0;z-index:0;
  /* Usa assets/splash-bg.png quando existir; senão cai no gradiente (fallback). */
  background-image:
    url("assets/splash-bg.png"),
    radial-gradient(120% 90% at 50% 18%, #1f7fd6 0%, #0a5cb6 42%, #06438a 100%);
  background-size:cover, cover;
  background-position:center, center;
  background-repeat:no-repeat, no-repeat;
}
/* O fundo geométrico vem do próprio splash-bg.png (assets). */
.splash__content{position:relative;z-index:1;padding:96px 24px 0;text-align:center;display:flex;flex-direction:column;align-items:center;gap:16px;}
.splash__fampe{height:26px;width:auto;margin-bottom:4px;}
.splash__urso{width:min(260px,66%);height:auto;filter:drop-shadow(0 18px 26px rgba(0,0,0,.30));}
.splash__title{margin:6px 0 0;font-weight:900;font-size:32px;color:rgba(255,255,255,.66);}
.splash__tagline{margin:0;font-weight:700;font-size:22px;line-height:1.25;max-width:320px;}
.splash .btn{position:relative;z-index:1;margin-top:28px;}
.splash__sebrae{position:relative;z-index:1;height:68px;min-height:48px;width:auto;margin:28px auto 0;padding-bottom:calc(24px + env(safe-area-inset-bottom));}

/* ============================================================
   02 · INSTRUÇÕES
   ============================================================ */
.instr{align-items:center;gap:26px;}
.instr .titleband{width:100%;}
.instr__hero{width:255px;max-width:70%;margin-top:2px;}
.instr__hero img{width:100%;height:auto;border-radius:10px;}
.instr__text{padding:0 var(--pad);text-align:center;}
.instr__text h1{margin:0 0 14px;font-size:26px;font-weight:700;color:var(--ink);}
.instr__text p{margin:0;color:var(--muted);font-size:16px;}
.instr__lockup{height:40px;width:auto;}
.steps{list-style:none;margin:4px 0 8px;padding:0 var(--pad);width:100%;max-width:390px;display:flex;flex-direction:column;gap:22px;}
.steps li{display:flex;align-items:center;gap:12px;font-size:15px;color:var(--ink);}
.steps__num{
  flex:0 0 32px;height:32px;border-radius:50%;
  background:var(--blue);color:#fff;font-weight:700;font-size:14px;
  display:flex;align-items:center;justify-content:center;
}
.instr .btn{margin-top:auto;}

/* ============================================================
   03 · CADASTRO
   ============================================================ */
.form__body{padding:22px var(--pad) 0;display:flex;flex-direction:column;gap:18px;}
.field{display:flex;flex-direction:column;gap:8px;}
.field label{font-size:14px;font-weight:700;color:var(--ink);}
.field input{
  height:49px;padding:0 14px;border:1px solid var(--line);border-radius:10px;
  background:#f5f6f7;font-size:16px;color:var(--ink);transition:border .15s ease,background .15s ease;
}
.field input::placeholder{color:#a9adb2;}
.field input:focus{outline:none;border-color:var(--blue);background:#fff;}
.field__err{display:none;color:#c0392b;font-size:12.5px;}
.field.is-invalid input{border-color:#c0392b;background:#fdf3f2;}
.field.is-invalid .field__err{display:block;}

.privacy{display:grid;grid-template-columns:25px 1fr;gap:10px;align-items:start;margin-top:4px;}
.privacy input{position:absolute;opacity:0;width:25px;height:25px;margin:0;}
.privacy__box{
  width:25px;height:25px;border:2px solid #c4c8cc;border-radius:6px;background:#fff;
  display:flex;align-items:center;justify-content:center;transition:.15s;
}
.privacy input:checked + .privacy__box{background:var(--blue);border-color:var(--blue);}
.privacy input:checked + .privacy__box::after{content:"";width:6px;height:11px;border:solid #fff;border-width:0 2.5px 2.5px 0;transform:rotate(45deg) translateY(-1px);}
.privacy input:focus-visible + .privacy__box{box-shadow:0 0 0 3px rgba(0,94,184,.25);}
.privacy__text{font-size:13px;color:var(--muted);line-height:1.45;}
.privacy__text a{display:inline-block;margin-top:4px;color:var(--blue);font-weight:600;text-decoration:none;}
.form .btn{margin-top:14px;}

/* ============================================================
   04 · QUIZ
   ============================================================ */
.dots{display:flex;justify-content:center;gap:12px;padding:18px 0 8px;}
.dot{width:12px;height:12px;border-radius:50%;background:#d5d8db;transition:.2s;}
.dot.is-active{background:var(--blue);}
.dot.is-done{background:var(--blue);opacity:.5;}

.quiz__question{padding:6px var(--pad) 0;font-size:20px;font-weight:700;color:var(--ink);line-height:1.3;}
.answers{padding:18px var(--pad) 0;display:flex;flex-direction:column;gap:12px;}
.answer{
  display:flex;align-items:center;gap:14px;
  padding:16px;border:1px solid var(--line);border-radius:14px;background:#fff;
  text-align:left;width:100%;transition:border .18s,background .18s,box-shadow .18s;
}
.answer__letter{
  flex:0 0 38px;height:38px;border-radius:50%;background:var(--letter-bg);
  color:var(--letter-ink);font-weight:700;font-size:16px;
  display:flex;align-items:center;justify-content:center;transition:.18s;
}
.answer__text{font-size:15px;color:var(--ink);}
.answer.is-selected{background:var(--sel-bg);border-color:var(--blue);border-width:2px;padding:15px;}
.answer.is-selected .answer__letter{background:var(--blue);color:#fff;}
.answer.is-selected .answer__letter svg{width:20px;height:20px;}
/* Estado "errou": X vermelho na alternativa escolhida, fundo vermelho claro */
.answer.is-wrong{background:var(--err-bg);border-color:var(--red);border-width:2px;padding:15px;}
.answer.is-wrong .answer__letter{background:var(--red);color:#fff;}
.answer.is-wrong .answer__letter svg{width:20px;height:20px;}
.answer.is-locked{pointer-events:none;}
#quizNext{margin-top:22px;}

/* ============================================================
   05 · CHECK
   ============================================================ */
.check{align-items:center;}
.check .titleband{width:100%;}
.check__body{padding:26px var(--pad) 0;display:flex;flex-direction:column;align-items:center;text-align:center;gap:14px;width:100%;}
.check__badge{
  width:88px;height:88px;border-radius:50%;
  background:linear-gradient(135deg,#00a651,#00893f);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 12px 24px rgba(0,137,63,.30);animation:pop .4s ease both;
}
@keyframes pop{from{transform:scale(.6);opacity:0;}to{transform:scale(1);opacity:1;}}
.check__body h1{margin:2px 0 0;font-size:26px;color:var(--ink);}
.check__lead{margin:0;color:var(--muted);font-size:15px;max-width:300px;}
.check__card{
  width:100%;max-width:340px;margin-top:6px;padding:18px;border-radius:16px;
  background:#f5f7f9;border:1px solid var(--line);text-align:left;
  display:flex;flex-direction:column;gap:10px;
}
.check__label{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#9aa0a6;font-weight:700;}
.check__name{font-size:18px;color:var(--ink);}
.check__row{display:flex;gap:14px;}
.check__row > div{flex:1;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px;}
.check__row strong{font-size:18px;color:var(--blue);}
.check__time{font-size:12px;color:#9aa0a6;}
.check__prize{display:flex;align-items:center;gap:10px;margin-top:8px;color:var(--ink);font-weight:700;}
.check__prize img{width:44px;height:44px;object-fit:contain;}
.check__lockup{height:34px;width:auto;margin:26px auto 0;}

/* ============================================================
   06 · VERIFICAR RESPOSTAS
   ============================================================ */
.review__list{padding:20px var(--pad);display:flex;flex-direction:column;gap:14px;}
.review-item{
  border:1px solid var(--line);border-radius:14px;padding:14px 16px;background:#fff;
  display:flex;flex-direction:column;gap:10px;
}
.review-item--err{background:var(--err-bg);border-color:#f3b8b1;}
.review-item__q{margin:0;font-size:15px;font-weight:700;color:var(--ink);line-height:1.35;}
.review-item__a{display:flex;align-items:center;gap:10px;font-size:14.5px;color:var(--ink);}
.review-item__icon{
  flex:0 0 26px;height:26px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
}
.review-item__icon svg{width:16px;height:16px;}
.review-item--ok .review-item__icon{background:var(--green);}
.review-item--err .review-item__icon{background:var(--red);}
.review-item__correct{margin:0;padding-left:36px;font-style:italic;font-size:13.5px;color:var(--muted);}
.review .btn{margin-top:auto;}

/* ---------- Loading no botão ---------- */
.btn.is-loading{color:transparent;position:relative;pointer-events:none;}
.btn.is-loading::after{content:"";position:absolute;width:20px;height:20px;border:2.5px solid rgba(255,255,255,.5);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;}
.btn--outline.is-loading::after,.btn--solid-white.is-loading::after{border-color:rgba(0,94,184,.35);border-top-color:var(--blue);}
@keyframes spin{to{transform:rotate(360deg);}}

/* Toast de erro de rede */
.toast{
  position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);
  background:#22262a;color:#fff;padding:12px 18px;border-radius:10px;font-size:14px;
  opacity:0;transition:.25s;z-index:50;max-width:90%;text-align:center;
}
.toast.is-show{opacity:1;transform:translateX(-50%) translateY(0);}

/* Desktop: moldura sutil */
@media (min-width:520px){
  body{padding:24px 0;}
  .phone{min-height:calc(100vh - 48px);border-radius:28px;box-shadow:0 24px 60px rgba(0,0,0,.35);}
  .screen{min-height:calc(100vh - 48px);}
}

/* ============================================================
   Honeypot anti-bot (v1.1)
   Precisa ficar oculto para humanos e AINDA ASSIM presente no DOM
   para o bot encontrar. Por isso não se usa display:none nem
   [hidden]: muitos bots ignoram campos assim.
   ============================================================ */
.hp {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
