/* Inquérito Fonsat 2026 — estilos */
@font-face { font-family: "Benzin"; src: url("fonts/benzin-bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Zaptron"; src: url("fonts/zaptron.otf") format("opentype"); font-weight: 400; font-display: swap; }
/* Montserrat: usa a instalada no aparelho, se existir. Para a incluir no site, junta fonts/montserrat.woff2 e acrescenta: url("fonts/montserrat.woff2") format("woff2") */
@font-face { font-family: "Montserrat"; src: local("Montserrat"); font-weight: 400 700; font-display: swap; }

:root {
  --verde: #00A19B;        /* destaques */
  --verde-esc: #0B5F5A;    /* ações e texto de destaque */
  --verde-prof: #003C3A;
  --menta: #5FD3C2;
  --creme: #F4EDE0;
  --grafite: #1F2626;
  --grafite-2: #18181B;
  --cinza: #535959;
  --cinza-cl: #A0A8A8;
  --linha: #DDE5E4;
  --fundo: #FFFFFF;
  --fundo-2: #F3F7F6;
  --t-titulo: "Benzin", "Arial Black", system-ui, sans-serif;
  --t-num: "Zaptron", "Benzin", system-ui, sans-serif;
  --t-texto: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --raio: 14px;
  --toque: 60px;
  --lado: 20px;
  --seguro-baixo: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fundo-2); color: var(--grafite);
  font-family: var(--t-texto); font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#app { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: var(--fundo); position: relative; overflow-x: clip; }
@media (min-width: 560px) { #app { box-shadow: 0 0 0 1px var(--linha), 0 20px 60px rgba(11,95,90,.10); } body { padding: 0; } }

.ecra { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; position: relative; }
.entra { animation: entra .32s cubic-bezier(.2,.7,.2,1) both; }
.entra-tras { animation: entraTras .32s cubic-bezier(.2,.7,.2,1) both; }
@keyframes entra { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes entraTras { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Tipografia ---------- */
.kicker { font-family: var(--t-texto); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--verde); margin: 0 0 12px; }
.titulo-grande { font-family: var(--t-titulo); font-weight: 700; font-size: clamp(28px, 8.4vw, 38px); line-height: 1.08; margin: 0; letter-spacing: -.005em; }
.titulo-grande span { color: var(--verde); }
.titulo-q { font-family: var(--t-titulo); font-weight: 700; font-size: clamp(22px, 6.6vw, 28px); line-height: 1.18; margin: 0 0 8px; color: var(--grafite); }
.dica { color: var(--cinza); margin: 0 0 22px; font-size: 16px; }
.num { font-family: var(--t-num); font-weight: 400; letter-spacing: .02em; }

/* ---------- Botões ---------- */
.btn {
  appearance: none; border: 0; min-height: var(--toque); padding: 0 22px; border-radius: var(--raio);
  font-weight: 700; font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .12s ease, background-color .2s ease, box-shadow .2s ease, opacity .2s; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn-primario { background: var(--verde-esc); color: #fff; }
.btn-primario:hover { background: #094e4a; }
.btn-primario[disabled] { background: #C9D3D2; color: #fff; cursor: default; }
.btn-secundario { background: #fff; color: var(--verde-esc); box-shadow: inset 0 0 0 2px var(--verde-esc); }
.btn-claro { background: #fff; color: var(--verde-esc); }
.btn-bloco { width: 100%; }
.btn:focus-visible, .opcao:focus-visible, .nota:focus-visible, .lingua:focus-visible, .seg button:focus-visible, .link:focus-visible { outline: 3px solid var(--verde); outline-offset: 3px; }
.link { background: none; border: 0; padding: 10px 0; color: var(--verde-esc); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 16px; min-height: 44px; }

/* ---------- Mosaico (elementos) ---------- */
.mosaico-canto { position: absolute; pointer-events: none; }
.canto-idioma { top: 0; right: 0; width: 78%; max-width: 400px; height: auto; }
.canto-idioma .p, .fim-mosaico .p { opacity: 0; transform-box: fill-box; transform-origin: center; animation: peca .5s cubic-bezier(.3,1.5,.5,1) forwards; }
.ecra-idioma .idioma-topo { margin-top: calc(min(78vw, 400px) * .75 + 8px); }
.peca { display: block; }

/* ---------- Ecrã 0: idioma ---------- */
.ecra-idioma { background: linear-gradient(165deg, #000 0%, var(--verde-prof) 70%); color: #fff; padding: 28px var(--lado) calc(28px + var(--seguro-baixo)); }
.idioma-topo { position: relative; z-index: 2; }
.logo-escuro { width: 180px; height: auto; }
.idioma-centro { position: relative; z-index: 2; margin-top: auto; padding-top: 40px; }
.ecra-idioma .titulo-grande { color: #fff; font-size: clamp(26px, 7.6vw, 34px); }
.ecra-idioma .titulo-grande span { color: var(--menta); }
.linguas { display: grid; gap: 14px; margin-top: 28px; }
.lingua {
  display: flex; align-items: center; gap: 18px; width: 100%; min-height: 88px; padding: 14px 18px; border-radius: 18px;
  background: rgba(255,255,255,.06); border: 2px solid rgba(255,255,255,.16); color: #fff; cursor: pointer; text-align: left;
  transition: background-color .2s, border-color .2s, transform .12s;
}
.lingua:hover { background: rgba(255,255,255,.10); border-color: var(--verde); }
.lingua:active { transform: scale(.985); }
.lingua .bandeira { width: 64px; height: 44px; border-radius: 6px; flex: 0 0 auto; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.lingua strong { font-family: var(--t-titulo); font-size: 20px; display: block; }
.lingua small { color: var(--cinza-cl); font-size: 15px; }
.lingua .seta { margin-left: auto; opacity: .7; }

/* ---------- Ecrã 1: boas-vindas ---------- */
.ecra-bv { background: var(--fundo); }
.bv-imagem { position: relative; height: 52vh; height: 52dvh; min-height: 300px; max-height: 520px; background: var(--verde-esc); overflow: hidden; }
.bv-imagem > img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 72%; opacity: 0; transition: opacity .6s ease; }
.bv-imagem img.carregada { opacity: 1; }
.bv-imagem::after { z-index: 2; content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,20,19,.72) 100%); }
.bv-imagem .reserva { position: absolute; inset: 0; }
.bv-topo { position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 16px var(--lado); }
.bv-topo img { width: 132px; height: auto; filter: drop-shadow(0 1px 6px rgba(0,0,0,.35)); }
.bv-titulo { position: absolute; z-index: 3; left: var(--lado); right: var(--lado); top: 76px; color: #fff; }
.bv-imagem > img { object-position: 50% 100% !important; }
.ecra-bv .bv-imagem { height: 55vh; height: 55dvh; max-height: 600px; min-height: 380px; }
.ecra-bv .bv-titulo { top: 68px; }
.ecra-bv .bv-corpo { padding-top: 18px; }
.ecra-bv .bv-corpo p { margin-bottom: 14px; font-size: 16px; }
.ecra-bv .factos { gap: 8px; margin-bottom: 12px; }
.ecra-bv .anonimato { margin-bottom: 14px; }
.bv-titulo .titulo-grande { font-size: clamp(23px, 6.8vw, 32px); }
.bv-titulo .kicker { font-size: 12px; }
.bv-imagem::after { inset: 0 0 auto 0 !important; height: 62% !important; background: linear-gradient(180deg, rgba(0,30,28,.55) 0%, rgba(0,30,28,0) 100%) !important; }
.bv-titulo .titulo-grande { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.bv-titulo .titulo-grande span { color: var(--menta); }
.faixa { height: 18px; display: flex; }
.faixa i { flex: 1; display: block; }
.bv-corpo { padding: 22px var(--lado) calc(22px + var(--seguro-baixo)); display: flex; flex-direction: column; flex: 1; }
.bv-corpo p { margin: 0 0 18px; color: #2E3636; }
.factos { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; }
.factos li { display: flex; align-items: center; gap: 14px; font-weight: 600; }
.factos .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--grafite); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.anonimato { background: var(--fundo-2); border-radius: var(--raio); padding: 4px 16px; margin: 0 0 20px; }
.anonimato summary { min-height: 48px; display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--verde-esc); cursor: pointer; list-style: none; }
.anonimato summary::-webkit-details-marker { display: none; }
.anonimato summary::after { content: "+"; margin-left: auto; font-size: 22px; font-weight: 400; }
.anonimato[open] summary::after { content: "–"; }
.anonimato ul { margin: 0 0 14px; padding-left: 20px; color: #2E3636; font-size: 15.5px; }
.anonimato li { margin-bottom: 6px; }
.bv-acoes { margin-top: auto; }

/* ---------- Seletor PT/ES ---------- */
.seg { display: inline-flex; background: rgba(255,255,255,.92); border-radius: 999px; padding: 3px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.seg button { border: 0; background: transparent; min-width: 44px; min-height: 36px; padding: 0 10px; border-radius: 999px; font-weight: 800; font-size: 13px; letter-spacing: .06em; color: var(--cinza); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--grafite); color: #fff; }
.seg.claro { background: var(--fundo-2); box-shadow: none; }

/* ---------- Ecrã de pergunta ---------- */
.ecra-q { background: var(--fundo); }
.q-topo { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(6px); padding: 12px var(--lado) 10px; }
.q-topo-linha { display: flex; align-items: center; gap: 12px; }
.q-topo-linha .simb { width: 34px; height: auto; }
.q-contador { margin-left: auto; font-size: 18px; color: var(--grafite); }
.q-contador small { color: var(--cinza-cl); font-size: 14px; }
.progresso { display: flex; gap: 3px; margin-top: 12px; height: 22px; }
.progresso .t { flex: 1; position: relative; border-radius: 3px; overflow: hidden; background: #EDF2F1; }
.progresso .t svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: scale(.4); transition: opacity .35s ease, transform .45s cubic-bezier(.3,1.5,.5,1); }
.progresso .t.feita svg { opacity: 1; transform: none; }
.progresso .t.atual { box-shadow: inset 0 0 0 2px var(--verde); background: #fff; }

.q-corpo { padding: 18px var(--lado) 24px; flex: 1; }
.q-bloco { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-weight: 800; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--verde-esc); }
.q-bloco svg { width: 26px; height: 26px; border-radius: 4px; }

.q-rodape { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; padding: 12px var(--lado) calc(14px + var(--seguro-baixo)); background: linear-gradient(180deg, rgba(255,255,255,0) 0, #fff 18px); }

/* Opções (Sim/Não, escolhas) */
.opcoes { display: grid; gap: 12px; }
.opcoes.duas { grid-template-columns: 1fr 1fr; }
.opcoes.grelha { gap: 10px; }
.opcoes.grelha .opcao { min-height: 56px; }
.opcao { min-width: 0; overflow-wrap: break-word; }
.opcao {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 12px 16px; text-align: left;
  border-radius: var(--raio); border: 2px solid var(--linha); background: #fff; font-weight: 700; font-size: 18px; color: var(--grafite);
  cursor: pointer; transition: border-color .18s, background-color .18s, color .18s, transform .12s;
}
.opcoes.duas .opcao { justify-content: center; min-height: 88px; font-family: var(--t-titulo); font-size: 20px; }
.opcao:hover { border-color: var(--cinza-cl); }
.opcao:active { transform: scale(.98); }
.opcao[aria-checked="true"], .opcao[aria-pressed="true"] { background: var(--grafite); border-color: var(--verde); color: #fff; }
.opcao .marca { width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--cinza-cl); flex: 0 0 auto; display: grid; place-items: center; transition: background-color .18s, border-color .18s; }
.opcao[aria-checked="true"] .marca { background: var(--verde); border-color: var(--verde); }
.opcao .marca svg { opacity: 0; }
.opcao[aria-checked="true"] .marca svg { opacity: 1; }
.opcao .bandeira { width: 44px; height: 30px; border-radius: 4px; overflow: hidden; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.opcoes.paises .opcao { min-height: 80px; font-family: var(--t-titulo); font-size: 20px; }

.outro-campo { margin-top: 14px; }
.campo, .area {
  width: 100%; border: 2px solid var(--linha); border-radius: var(--raio); padding: 14px 16px; font: inherit; font-size: 17px; color: var(--grafite); background: #fff;
}
.campo:focus, .area:focus { outline: none; border-color: var(--verde); box-shadow: 0 0 0 3px rgba(0,161,155,.18); }
.area { min-height: 150px; resize: vertical; }
.contagem { text-align: right; font-size: 13px; color: var(--cinza); margin-top: 6px; }
label.rotulo { display: block; font-weight: 600; margin-bottom: 8px; color: var(--cinza); font-size: 15px; }

/* Notas 1–5 */
.notas5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.nota { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: var(--toque); }
.nota .cara { width: 100%; max-width: 64px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; transition: transform .2s cubic-bezier(.3,1.6,.5,1), box-shadow .2s, filter .2s; }
.nota .cara svg { width: 72%; height: 72%; }
.nota .n { font-family: var(--t-num); font-size: 20px; color: var(--cinza); }
.notas5.tem-escolha .nota:not([aria-checked="true"]) .cara { filter: grayscale(.7) opacity(.45); }
.nota[aria-checked="true"] .cara { transform: scale(1.14); box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--verde); }
.nota[aria-checked="true"] .n { color: var(--verde-esc); }
.legenda { display: flex; justify-content: space-between; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--cinza); }

/* 0–10 */
.notas10 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.notas10 .nota { min-height: 58px; border-radius: 12px; border: 2px solid var(--linha); background: #fff; justify-content: center; font-family: var(--t-num); font-size: 22px; color: var(--grafite); transition: background-color .18s, border-color .18s, color .18s, transform .12s; }
.notas10 .nota:active { transform: scale(.96); }
.notas10 .nota[aria-checked="true"] { background: var(--verde-esc); border-color: var(--verde-esc); color: #fff; }
.notas10 .nota.zona-d { border-bottom-color: #C8CFCE; }
.notas10 .nota.zona-p { border-bottom-color: var(--verde); }
.escala-legenda { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--cinza); }
.escala-legenda span:last-child { text-align: right; }

/* ---------- Final ---------- */
.ecra-fim { background: linear-gradient(170deg, #000 0%, var(--verde-prof) 75%); color: #fff; padding: 24px var(--lado) calc(24px + var(--seguro-baixo)); }
.fim-mosaico { width: 100%; max-width: 340px; margin: 10px auto 8px; aspect-ratio: 1; }
.fim-mosaico .p { opacity: 0; transform-box: fill-box; transform-origin: center; animation: peca .5s cubic-bezier(.3,1.5,.5,1) forwards; }
@keyframes peca { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
.ecra-fim .titulo-grande { color: #fff; }
.ecra-fim .titulo-grande span { color: var(--menta); }
.ecra-fim p { color: #D6E2E0; margin: 14px 0 0; }
.estado-envio { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border-radius: var(--raio); background: rgba(255,255,255,.07); font-size: 15.5px; color: #E6EFEE; }
.estado-envio .pt { width: 12px; height: 12px; border-radius: 50%; background: var(--menta); margin-top: 5px; flex: 0 0 auto; }
.estado-envio.pendente .pt { background: #F2C14E; animation: pisca 1.4s ease-in-out infinite; }
@keyframes pisca { 50% { opacity: .35; } }
.serio { margin-top: 18px; padding: 16px; border-radius: var(--raio); border: 1px solid rgba(255,255,255,.18); font-size: 15.5px; color: #E6EFEE; }
.serio strong { color: var(--menta); }
.slogan { margin-top: auto; padding-top: 26px; text-align: center; font-weight: 800; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.fim-topo { display: flex; justify-content: space-between; align-items: center; }
.fim-topo img { width: 130px; height: auto; }

/* Ecrã final (v2): logótipo em destaque, degradê da marca, mosaico transparente */
.ecra-fim { background: linear-gradient(180deg, #000 0%, #003C3A 100%); overflow: hidden; text-align: center; }
.fundo-mosaico { position: absolute; width: 82%; max-width: 420px; height: auto; opacity: .22; pointer-events: none; }
.fm-cima { top: 0; right: 0; }
.fm-baixo { bottom: 0; left: 0; }
.fundo-mosaico .p { opacity: 0; transform-box: fill-box; transform-origin: center; animation: peca .6s cubic-bezier(.3,1.5,.5,1) forwards; }
.ecra-fim .fim-topo { position: relative; z-index: 2; justify-content: flex-end; }
.fim-centro { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 0; }
.fim-logo { width: 72%; max-width: 280px; height: auto; animation: entraLogo .9s cubic-bezier(.2,.7,.2,1) both .2s; }
@keyframes entraLogo { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.fim-titulo { font-family: var(--t-titulo); font-size: clamp(22px, 6.4vw, 28px); line-height: 1.2; margin: 36px 0 0; color: #fff; }
.fim-titulo span { color: var(--menta); }
.fim-texto { color: #D6E2E0; margin: 14px auto 0; max-width: 32ch; }
.fim-outra { margin-top: 18px; width: 100%; } .fim-outra p { color: #fff; margin: 0 0 12px; }
.ecra-fim .link { color: var(--menta); margin-top: 10px; }
.fim-slogan { position: relative; z-index: 2; font-family: var(--t-titulo); font-size: clamp(18px, 5.4vw, 24px); color: var(--verde); margin: 0 0 18px; letter-spacing: .01em; }
.ecra-fim .estado-envio { position: relative; z-index: 2; margin-top: 0; text-align: left; font-size: 14px; background: rgba(255,255,255,.06); }
.assinatura { margin: 0 0 12px; font-weight: 700; font-size: 15px; color: var(--menta); letter-spacing: .02em; }

/* ---------- Já respondeu ---------- */
.ecra-ja { background: linear-gradient(170deg, #000 0%, var(--verde-prof) 75%); color: #fff; padding: 28px var(--lado) calc(28px + var(--seguro-baixo)); }
.ecra-ja .link { color: var(--menta); }

/* ---------- Avisos ---------- */
.banner-teste { position: sticky; top: 0; z-index: 50; background: #F2C14E; color: #1F2626; text-align: center; font-weight: 800; font-size: 13px; letter-spacing: .08em; padding: 8px 12px; }
body.teste .q-topo { top: 33px; }
.rede { position: fixed; z-index: 40; left: 50%; bottom: calc(96px + var(--seguro-baixo)); transform: translateX(-50%); width: calc(100% - 32px); max-width: 480px; background: var(--grafite); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 15px; box-shadow: 0 8px 30px rgba(0,0,0,.25); display: flex; gap: 10px; align-items: center; }
.rede::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #F2C14E; flex: 0 0 auto; }
.rede.ok::before { background: var(--menta); }
.noscript { padding: 20px; text-align: center; }
.armadilha { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
