/* Viseu Reanima — site público */
body.site { background: #fff; display: flex; flex-direction: column; min-height: 100vh; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* Cabeçalho */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(16, 42, 51, .06); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.site-logo img { height: 34px; width: auto; display: block; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 9px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 500; font-size: 14.5px; text-decoration: none; }
.site-nav a:hover { color: var(--ink); background: rgba(16, 42, 51, .05); }
.site-nav a.active { color: var(--brand-dark); font-weight: 600; }
.site-nav a.btn { color: #fff; padding: 0 18px; margin-left: 8px; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--ink); cursor: pointer; border-radius: 10px; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 18px; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(16, 42, 51, .08); display: none; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; font-size: 16px; }
  .site-nav a.btn { margin: 8px 0 0; min-height: 48px; }
  .site-header .wrap { padding: 0 16px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--grad); color: #fff; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 420px at 85% 0%, rgba(255, 255, 255, .18), transparent 60%), radial-gradient(700px 400px at 0% 100%, rgba(12, 44, 53, .25), transparent 60%); }
.hero-pattern { position: absolute; right: -60px; top: 50%; transform: translateY(-50%); width: 520px; opacity: .12; pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 76px; padding-bottom: 88px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); font-size: 13px; font-weight: 600; letter-spacing: .02em; margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); letter-spacing: -.03em; margin-bottom: 20px; }
.hero p.lead { font-size: 17px; line-height: 1.7; color: rgba(255, 255, 255, .92); max-width: 600px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.hero-actions .btn-outline:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.hero-logo { display: flex; justify-content: center; }
.hero-logo img { width: min(420px, 100%); filter: drop-shadow(0 20px 40px rgba(12, 44, 53, .25)); }
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 44px; padding-bottom: 60px; gap: 28px; }
  .hero-logo { order: -1; }
  .hero-logo img { width: min(260px, 70%); }
}
@media (max-width: 760px) { .wrap { padding: 0 16px; } .hero p.lead { font-size: 16px; } }

/* Números */
.stats-band { margin-top: -44px; position: relative; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.stat { padding: 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-family: var(--font-head); font-size: 34px; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .stats-grid { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .stat strong { font-size: 28px; } }

/* Secções */
.section { padding: 96px 0; }
.section-alt { background: var(--bg); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.kicker { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.section-head p { color: var(--muted); font-size: 16.5px; }
@media (max-width: 760px) { .section { padding: 64px 0; } }

.video-card { position: relative; border-radius: 22px; overflow: hidden; background: #000; box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; }
.video-card video { width: 100%; height: 100%; object-fit: cover; display: block; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-dark); margin-bottom: 18px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr; } }

.cta { background: var(--petrol); color: #fff; border-radius: 26px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 30px; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 50%; background: var(--grad); opacity: .35; filter: blur(10px); }
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 8px; }
.cta p { color: rgba(255, 255, 255, .75); margin: 0; }
@media (max-width: 760px) { .cta { flex-direction: column; align-items: flex-start; padding: 32px 24px; } }

/* Rodapé */
.site-footer { margin-top: auto; background: var(--petrol); color: rgba(255, 255, 255, .72); font-size: 14px; }
.site-footer .wrap { padding-top: 48px; padding-bottom: 32px; }
.footer-partners { display: flex; justify-content: center; padding-bottom: 34px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-partners img { width: min(760px, 100%); opacity: .9; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 24px; }
.footer-bottom a { color: rgba(255, 255, 255, .85); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Páginas de formulário (certificação / verificação) */
.page-band { background: var(--grad); color: #fff; padding: 56px 0 120px; position: relative; overflow: hidden; }
.page-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 300px at 90% 10%, rgba(255, 255, 255, .18), transparent 60%); }
.page-band .wrap { position: relative; }
.page-band h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 10px; }
.page-band p { color: rgba(255, 255, 255, .9); max-width: 620px; font-size: 16.5px; margin: 0; }
.page-body { margin-top: -84px; padding-bottom: 80px; position: relative; z-index: 2; }
.panel { background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); padding: 40px; max-width: 560px; }
.panel-wide { max-width: 760px; }
.panel h2 { font-size: 22px; margin-bottom: 6px; }
.panel .sub { color: var(--muted); margin-bottom: 26px; }
@media (max-width: 600px) { .panel { padding: 26px 20px; border-radius: 18px; } .page-band { padding: 36px 0 104px; } }

.steps { display: flex; gap: 8px; margin-bottom: 28px; }
.steps span { flex: 1; height: 5px; border-radius: 99px; background: var(--line); }
.steps span.on { background: var(--grad); }

.code-input { text-align: center; font: 600 24px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace !important; letter-spacing: .12em; text-transform: uppercase; min-height: 62px !important; }
.name-preview { margin: 6px 0 22px; padding: 22px; border-radius: 16px; background: var(--brand-tint); border: 1px dashed rgba(0, 153, 187, .45); text-align: center; font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: .01em; color: var(--ink); word-break: break-word; }
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14.5px; margin: 0 0 22px; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 600; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.result { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: 16px; margin-bottom: 18px; }
.result-ok { background: var(--success-tint); color: #0e5c3f; }
.result-bad { background: var(--danger-tint); color: #8f2626; }
.result .big-ico { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #fff; }
.result h3 { margin: 2px 0 4px; font-size: 18px; }
.result p { margin: 0; }
.success-ico { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; background: var(--success-tint); color: var(--success); }
.text-center { text-align: center; }
.small { font-size: 13px; color: var(--muted); }
.prose { max-width: 760px; font-size: 16px; line-height: 1.75; color: var(--ink-2); }
.prose strong { color: var(--ink); }

/* Página mínima (questionário no telemóvel) */
body.minimal { min-height: 100vh; background: var(--grad); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.minimal-card { background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); padding: 34px 26px; width: 100%; max-width: 440px; text-align: center; }
.minimal-card img.logo { height: 34px; margin-bottom: 22px; }
.minimal-card h1 { font-size: 22px; }
.minimal-card p { color: var(--muted); }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-dark); font-weight: 600; font-size: 14px; margin-bottom: 18px; }

/* Erro */
.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.error-page .code { font-family: var(--font-head); font-size: 88px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 10px; }

/* Questionário no telemóvel */
body.minimal:has(.q-wrap) { align-items: flex-start; padding: 0; }
.minimal-card.wide { max-width: 640px; text-align: left; }
.minimal-card.wide .logo, .minimal-card.wide .pill { display: block; margin-left: auto; margin-right: auto; width: fit-content; }
.state-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 16px; background: var(--brand-tint); color: var(--brand-dark); }
.state-ico.ok { background: var(--success-tint); color: var(--success); }
.consent-text { max-height: 52vh; overflow-y: auto; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fafcfc; font-size: 14px; line-height: 1.6; color: var(--ink-2); margin-bottom: 18px; }
.consent-text p { margin: 0 0 .8em; }
.consent-text ul { margin: 0 0 .8em; padding-left: 20px; }
.consent-actions { display: grid; gap: 8px; }
.consent-actions .btn-lg { white-space: normal; line-height: 1.3; padding-top: 10px; padding-bottom: 10px; height: auto; }

.q-wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 20px 14px 40px; }
.q-head { background: #fff; border-radius: 22px; padding: 24px 22px; text-align: center; box-shadow: var(--shadow-lg); margin-bottom: 14px; }
.q-head .logo { height: 30px; margin-bottom: 14px; }
.q-head h1 { font-size: 22px; margin: 4px 0 8px; }
.q-head p { color: var(--muted); margin: 0 0 6px; }
.q-section { background: #fff; border-radius: 20px; padding: 22px 18px; margin-bottom: 14px; box-shadow: 0 6px 20px rgba(12, 44, 53, .1); }
.q-section-title { font-size: 17px; color: var(--brand-dark); margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
.q-section-desc { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.q-item { border: 0; padding: 16px 0 18px; margin: 0; border-top: 1px solid var(--line); min-width: 0; }
.q-section-title + .q-item, .q-section-desc + .q-item, .q-section > .q-item:first-child { border-top: 0; padding-top: 6px; }
.q-label { font-weight: 600; font-size: 15.5px; line-height: 1.45; padding: 0; margin-bottom: 10px; color: var(--ink); }
.q-desc { color: var(--muted); font-size: 13.5px; margin: -4px 0 10px; }
.req { color: var(--danger); }
.q-error { color: var(--danger); font-size: 13.5px; font-weight: 600; margin: 0 0 8px; }
.has-error .q-option, .has-error .q-scale-opt span, .has-error .input { border-color: #eaa0a0; }
.q-options { display: grid; gap: 8px; }
.q-option { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1.5px solid var(--line-2); border-radius: 14px; cursor: pointer; font-size: 15px; line-height: 1.4; transition: border-color .15s, background .15s; }
.q-option input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--brand); }
.q-option:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.q-correct { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--success); background: var(--success-tint); padding: 2px 8px; border-radius: 99px; }
.q-scale-row + .q-scale-row { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.q-scale-item { font-size: 14.5px; margin-bottom: 8px; color: var(--ink-2); }
.q-scale { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 6px; }
.q-scale-opt { position: relative; cursor: pointer; }
.q-scale-opt input { position: absolute; opacity: 0; inset: 0; }
.q-scale-opt span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 56px; height: 100%; padding: 8px 4px; border: 1.5px solid var(--line-2); border-radius: 12px; font-size: 12.5px; line-height: 1.25; color: var(--ink-2); transition: all .15s; }
.q-scale-opt input:checked + span { border-color: var(--brand); background: var(--grad); color: #fff; font-weight: 600; }
.q-scale-opt input:focus-visible + span { outline: 3px solid rgba(0, 153, 187, .45); outline-offset: 2px; }
@media (max-width: 480px) { .q-scale[style*="--n:5"] { grid-template-columns: 1fr; } .q-scale[style*="--n:5"] .q-scale-opt span { min-height: 44px; justify-content: flex-start; padding: 10px 14px; font-size: 14px; } }
.q-number { max-width: 140px; }
.q-rec { border: 2px solid rgba(0, 153, 187, .35); }
.rec-grid { display: grid; gap: 12px; }
.rec-grid label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.rec-grid .input { max-width: 180px; font-size: 18px; text-align: center; }
.rec-grid input[name=rec_letra] { text-transform: uppercase; }
.rec-grid input[name=rec_letra]::placeholder { text-transform: none; }
.q-submit { text-align: center; padding: 6px 4px; }
.q-submit p { color: rgba(255, 255, 255, .85); margin-top: 10px; }
.q-wrap .alert { margin-bottom: 14px; }
