/* Paleta editável */
:root {
  --cor-primaria: #312e81;
  --cor-secundaria: #E017D6;
  --cor-acento: #f59e0b;
  --texto: #0b1020;
  --texto-invert: #ffffff;
  --muted: #8a8fa3;

  --bg-gradiente-inicio: #1e1b4b;
  --bg-gradiente-fim: #030081;

  --radius: 16px;
  --shadow-1: 0 4px 14px rgba(3, 7, 18, 0.15);
  --shadow-2: 0 10px 30px rgba(3, 7, 18, 0.25);

  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--texto);
  background: #0b0f1c;
  line-height: 1.5;
}
.container { width: min(1100px, 92vw); margin: 0 auto; }
img { max-width: 100%; display: block; }

/* HERO */
.hero {
  position: relative;
  color: var(--texto-invert);
  background: linear-gradient(135deg, var(--bg-gradiente-inicio), var(--bg-gradiente-fim));
  overflow: clip;
}
.hero-media { position: absolute; inset: 0; pointer-events: none; }
.hero-bg {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 100%;
  height: auto;
  opacity: .9; object-fit: cover; object-position: center right; mix-blend-mode: screen;
}
.hero-figure {
  position: absolute; right: 4%; bottom: 5%;
  width: min(40%, 520px); opacity: .9;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,.35));
  border-radius: 12px;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
  padding: clamp(var(--space-7), 8vw, var(--space-8)) 0;
  min-height: min(100vh, 900px);
  /*align-items: center;*/
}
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1fr 1fr; } }
.hero-form { order: 1; }
.hero-copy  { order: 2; margin-top: 24px; } /* sobe um pouco o título à direita */

.card {
  background: rgba(255,255,255, .1);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(40px);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: var(--shadow-2);
}
.card-header { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.selo { width: 150px; height: auto; }
.logo-form { display: flex; justify-content: space-between; margin-bottom: 1.2rem; }

.h1 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem); margin: 0; }
.h2 { font-size: clamp(1.4rem, 1.4rem + 0.8vw, 1.7rem); margin: 0 0 var(--space-3); }
.sub { color: #e5e7eb; margin: 0; }

.field { margin-bottom: var(--space-4); }
.field label { display: inline-block; margin-bottom: var(--space-2); font-weight: 600; }

/* Inputs brancos */
input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(9,14,27,.2);
  background: #ffffff;
  color: #0b1020;
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease, transform .02s ease;
}
input::placeholder { color: #6b7280; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, rgba(3,7,18,.6) 50%), linear-gradient(135deg, rgba(3,7,18,.6) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus { border-color: var(--cor-acento); box-shadow: 0 0 0 4px rgba(245, 158, 11, .25); }

/* Checkbox layout robusto */
.field.checkbox {
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-areas:
    "box label"
    "box help"
    "box error";
  align-items: start;
  gap: var(--space-3);
}
.field.checkbox input { grid-area: box; margin-top: .35rem; }
.field.checkbox label { grid-area: label; }
#consent-help { grid-area: help; color: #d1d5db; display: block; margin-top: .25rem; }
#consent-help a { color: var(--texto-invert); }
#err-consent { grid-area: error; }

.error { color: #ffd1d1; min-height: 1.2em; display: inline-block; }

/* Buttons */
.btn-form {
    display: flex; align-items: center; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .9rem 1.2rem; border-radius: 999px; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: transform .06s ease, box-shadow .2s ease, .2s ease; border: 0;
}
.btn-primary { background: linear-gradient(135deg, var(--cor-secundaria), #9333ea); color:#fff; box-shadow: 0 8px 20px rgba(124,58,237,.35); }
.btn-primary:hover { box-shadow: 0 10px 26px rgba(124,58,237,.5); transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.35); color:#fff; }
.btn-secondary:hover { background: rgba(255,255,255,.25); }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; }

/* Centraliza botão de envio */
#submit-btn { display: block; margin: var(--space-4) auto 0 auto; }

.spinner { width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; display:none; animation: spin 1s linear infinite; }
.loading .spinner { display:inline-block; }
.loading .btn-label { opacity: .75; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-copy { color: #eef2ff; }
.bullets { list-style: none; padding: 0; margin: 0 0 var(--space-5); display: grid; gap: .75rem; }
.icon { width: 22px; height: 22px; margin-right: .35rem; }
.bullets li { display: flex; align-items: center; gap: .5rem; }

.grid-2 { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 680px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Modal */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(3, 7, 18, .7); z-index: 100; padding: var(--space-6); }
.modal[aria-hidden="false"] { display: flex; }
.modal-dialog { width: min(520px, 96vw); background: #0b1020; color: #fff; border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: var(--space-6); box-shadow: var(--shadow-2); text-align: center; }
.modal-selo { width: 72px; margin: 0 auto var(--space-3); }
.modal-close { position: absolute; right: clamp(12px, 3vw, 24px); top: clamp(12px, 3vw, 24px); background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); width: 40px; height: 40px; border-radius: 999px; cursor: pointer; }
.modal-close:hover { background: rgba(255,255,255,.1); }

/* Footer enxuto (sem cabeçalho de apoio e sem faixa) */
.site-footer { background: #090e1b; color: #cbd5e1; padding: var(--space-7) 0; border-top: 1px solid rgba(255,255,255,.08); }
.footer-link { color: #cbd5e1; text-decoration: underline; margin-right: var(--space-4); }
.footer-link:hover { color: #fff; }
.copyright { margin-top: var(--space-5); color: #9aa3b2; font-size: .95rem; }

:focus-visible { outline: 3px solid var(--cor-acento); outline-offset: 2px; }

@font-face {
  font-family: "PublicoBanner";
  src: url("/assets/PublicoBanner-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* === Título estilizado 'Cartilha Valquírias Digitais' (adicionado) === */
.card-header .h1, .h1#form-title, #form-title.h1 {
  font-family: "PublicoBanner"; ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  text-transform: uppercase;
  letter-spacing: .6px;
  line-height: 1.2;
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  background: linear-gradient(135deg, #ffffff, #ede9fe 40%, #c4b5fd 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(3,7,18,.15);
}

/* Ajuste de espaçamento do subtítulo */
.card-header .sub { margin-top: .25rem; }

/* === Fix: garantir que o background do #conteudo-principal pinte até o footer === */
#conteudo-principal { display: flow-root; }
/* Evita "faixa" sem pintura ao final por colapso de margens */
#conteudo-principal::after { content: ""; display: block; height: 1px; }

/* ====== TIPOGRAFIA GLOBAL (NOVO PADRÃO) ====== */

/* 2.1 — Base do site: Roboto 400 */
body,
input, select, textarea, button,
label, .field, .sub,
.hero-copy, .bullets, .trust-text,
.footer-link, .copyright,
.policy-content, .btn, .error, small {
  font-family: "Roboto", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial !important;
  font-weight: 400 !important;
  letter-spacing: 0; /* mantém leitura limpa */
}

/* 2.2 — Títulos principais: PublicoBanner (usando o arquivo .otf que você já colocou em /assets/) */
@font-face {
  font-family: "PublicoBanner";
  src: url("/assets/PublicoBanner-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Aplica PublicoBanner nos H1 do card (Index e Política) */
.card-header .h1,
.h1#form-title,
#form-title.h1,
#policy-title.h1,
h1.h1 {
  font-family: "PublicoBanner", "Roboto", ui-sans-serif, system-ui, -apple-system, Segoe UI, Helvetica, Arial !important;
  font-weight: 700 !important;
  /* Mantém o estilo visual já usado (gradiente/uppercase/etc) — remova se não quiser */
  text-transform: uppercase;
  letter-spacing: .6px;
  line-height: 1.1;
}

/* Se existir alguma regra antiga de título (ex.: Conthrax), isso aqui garante a prioridade */
.card-header .h1 *,
.h1#form-title *,
#policy-title.h1 * { font-family: inherit !important; }

/* 2.3 — Subtítulos e headings secundários (opcional)
   Se quiser H2/H3 em PublicoBanner também, remova o comentário abaixo.
*/
/*
.h2, h2, .h3, h3 {
  font-family: "PublicoBanner", "Roboto", ui-sans-serif, system-ui, -apple-system, Segoe UI, Helvetica, Arial !important;
  font-weight: 700 !important;
}
*/

/* ===== Política de Privacidade: layout em 1 coluna e largura maior ===== */
.hero[aria-label="Política de Privacidade"] .container {
  width: min(1200px, 96vw);          /* aumenta a largura útil */
}

.hero[aria-label="Política de Privacidade"] .hero-grid {
  grid-template-columns: 1fr;        /* derruba a 2ª coluna */
  gap: var(--space-6);
}

.hero[aria-label="Política de Privacidade"] .hero-copy {
  display: none !important;          /* some com a coluna vazia */
}

.hero[aria-label="Política de Privacidade"] .hero-form .card {
  max-width: 1050px;                  /* card mais largo e centralizado */
  margin-inline: auto;
}

/* Largura ótima do texto para leitura (ajuste a gosto) */
.hero[aria-label="Política de Privacidade"] .policy-content {
  max-width: 80ch;                   /* ~80 caracteres por linha */
  margin-inline: auto;
}

/* ===== Ajustes exclusivos da página Política de Privacidade ===== */
.hero[aria-label="Política de Privacidade"] .card-header {
  text-align: center;
  align-items: center;
}

/* Título centralizado (mantém PublicoBanner e estilos existentes da .h1) */
.hero[aria-label="Política de Privacidade"] .card-header .h1 {
  margin-inline: auto;
}

/* Ícones maiores (selo + logo) */
.hero[aria-label="Política de Privacidade"] .card-header .logo-form .selo {
  width: 250px;
  height: auto;
}

/* Em telas menores, reduz um pouco para caber lado a lado */
@media (max-width: 700px) {
  .hero[aria-label="Política de Privacidade"] .card-header .logo-form {
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .hero[aria-label="Política de Privacidade"] .card-header .logo-form .selo {
    width: min(46vw, 200px);
  }
}

/* Garante que a imagem de fundo continue visível atrás dos efeitos */
.hero[aria-label="Política de Privacidade"] .hero-media { z-index: -1; }

/* --- FIX: camadas da hero só na página Política de Privacidade --- */
.hero[aria-label="Política de Privacidade"] { position: relative; }

.hero[aria-label="Política de Privacidade"] .hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;            /* imagem fica ACIMA do background da .hero */
  pointer-events: none;
}

/* garante que a imagem cubra a altura toda */
.hero[aria-label="Política de Privacidade"] .hero-bg {
  height: 100%;          /* em vez de 'auto' */
  width: 100%;
  object-fit: cover;
  object-position: center right;
}

/* overlays: fade (1) e blur (2) */
.hero[aria-label="Política de Privacidade"]::before { z-index: 1; }
.hero[aria-label="Política de Privacidade"]::after  { z-index: 2; }

/* conteúdo do card sempre por cima */
.hero[aria-label="Política de Privacidade"] .hero-grid {
  position: relative;
  z-index: 3;
}

/* --- FIX: pequeno erro de sintaxe no font-family do título --- */
/* onde está assim no seu arquivo:
   .card-header .h1, .h1#form-title, #form-title.h1 {
     font-family: "PublicoBanner"; ui-sans-serif, system-ui, ...
   }
   troque o ponto-e-vírgula por vírgula:
*/
.card-header .h1, .h1#form-title, #form-title.h1 {
  font-family: "PublicoBanner", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* Política de Privacidade: mostrar mais a parte direita da imagem */
.hero[aria-label="Política de Privacidade"] .hero-bg {
  /* empurra o foco para a direita */
  object-position: 85% center; /* tente 80–92% */
  transform: scale(.2);      /* leve zoom para evitar cortes perceptíveis */
}

/* Em telas muito largas, traz ainda mais para a direita */
@media (min-width: 1400px) {
  .hero[aria-label="Política de Privacidade"] .hero-bg {
    object-position: 92% center;
    transform: scale(1.08);
  }
}

/* Em tablet/mobile, volta um pouco para não cortar o rosto */
@media (max-width: 900px) {
  .hero[aria-label="Política de Privacidade"] .hero-bg {
    object-position: 70% top;  /* ou "center top" se preferir */
    transform: scale(1.03);
  }
}

/* ===== Footer: ícone da OAB acima do link ===== */
.footer-legal {
  display: grid;
  justify-items: start;
  gap: .75rem;
}

.footer-oab {
  width: 400px;              /* ajuste a gosto */
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
  opacity: .95;
  margin-bottom: 1rem;
}

/* Em telas menores, centraliza */
@media (max-width: 700px) {
  .footer-legal { justify-items: center; }
  .footer-oab { width: 140px; }
}

/* ===== Política de Privacidade: ajuste do BG entre 900–1400px ===== */
/* A imagem estava “miúda” nesse intervalo; aumentamos o zoom e puxamos mais à direita */
@media (min-width: 900px) and (max-width: 1400px) {
  .hero[aria-label="Política de Privacidade"] .hero-bg {
    object-position: 88% center;  /* mostra mais a valquíria (lado direito) */
    transform: scale(1.18);       /* zoom extra para preencher melhor */
  }
}

/* Como segurança, mantém um zoom um pouco menor em >1400px e em <900px */
@media (min-width: 1401px) {
  .hero[aria-label="Política de Privacidade"] .hero-bg {
    object-position: 92% center;
    transform: scale(1.10);
  }
}
@media (max-width: 899px) {
  .hero[aria-label="Política de Privacidade"] .hero-bg {
    object-position: 72% top;
    transform: scale(1.05);
  }
}

/* ===== MOBILE STACK (<= 980px) ===== */
@media (max-width: 980px) {
  /* a imagem de produto (cartilha) não fica mais por trás do card */
  .hero-figure { display: none; }

  /* mantém o BG no topo (já está), card no meio (já está)
     e "recria" a cartilha no final da seção */
  .hero { position: relative; }
  .hero::after {
    content: "";
    display: block;
    width: min(520px, 88vw);
    aspect-ratio: 3 / 4;               /* aproximação boa para a capa */
    margin: var(--space-6) auto 0;
    background-image: url("/assets/cartilha-justiça-conectada-digital.jpg"); /* mesmo arquivo da .hero-figure */
    background-repeat: no-repeat;
    background-size: contain;          /* mostra a arte toda, sem corte */
    background-position: center;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.35));
  }

  /* dá um respiro embaixo para não colar no footer */
  .hero-grid { padding-bottom: clamp(3rem, 8vw, 5rem); }

  /* se quiser, some com o lado direito (título/lista) no mobile */
  .hero-copy { display: none !important; }
  
  .card { margin-top: 26%; }
}

/* Estados do botão de download */
.btn .spinner {
  width: 1rem; height: 1rem;
  border: 2px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  margin-left: .5rem;
  display: none;
  animation: spin 1s linear infinite;
}
.btn.loading .spinner { display: inline-block; }
.btn.loading        { opacity: .9; cursor: wait; }
.btn.success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 8px 20px rgba(34,197,94,.35);
}
.btn.success .btn-label::before { content: "✔ "; }
@keyframes spin { to { transform: rotate(360deg); } }


