/* =========================================================
   Magis — páginas de documento (Política de Privacidade, Termos de Uso, 404)
   Mesma letra e mesmas cores da página inicial, num layout de leitura.
   ========================================================= */

@font-face {
  font-family: "Inter Magis";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  --g0: #FCFBF8;
  --g1: #F6F4EF;
  --linha: rgba(30, 35, 32, .09);
  --tinta: #1C211E;
  --texto: #4F5551;
  --texto-2: #676D69;
  --acento: #BD4B00;
  --acento-titulo: #C2570A;
  --laranja: #FF8800;
  --verde: #0A3D2A;
  --sombra: 0 0 0 1px rgba(30, 35, 32, .055), 0 1px 2px rgba(30, 35, 32, .04), 0 14px 34px -18px rgba(30, 35, 32, .16);
  --fonte: "Inter Magis", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --lado: max(16px, env(safe-area-inset-left, 0px));
  --lado-d: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--g0);
  color: var(--texto);
  font: 400 1rem/1.75 var(--fonte);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--acento); text-underline-offset: 3px; }
a:hover { color: #9A3D00; }
:focus-visible { outline: 2px solid var(--laranja); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(255, 136, 0, .2); }

.pular { position: absolute; left: 12px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: 999px; background: var(--tinta); color: #fff; text-decoration: none; }
.pular:focus { top: 12px; }

/* ---------- Topo ---------- */
.doc-topo { position: sticky; top: 0; z-index: 10; padding: 10px var(--lado-d) 10px var(--lado); }
.doc-topo__inner {
  display: flex; align-items: center; gap: 20px; max-width: 1120px; height: 56px; margin: 0 auto; padding: 0 10px 0 22px;
  border-radius: 999px; background: rgba(255, 255, 255, .82); box-shadow: var(--sombra);
  -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px);
}
.doc-topo__logo img { width: auto; height: 26px; }
.doc-topo__nav { display: flex; gap: 22px; margin-left: auto; }
.doc-topo__nav a { color: var(--texto); font-size: .875rem; font-weight: 500; text-decoration: none; }
.doc-topo__nav a:hover, .doc-topo__nav a[aria-current="page"] { color: var(--tinta); }
.doc-topo__nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--laranja); text-decoration-thickness: 1.5px; text-underline-offset: 8px; }
.doc-topo__voltar { padding: 8px 18px; border-radius: 999px; background: var(--acento); color: #fff; font-size: .875rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.doc-topo__voltar:hover { background: #A34100; color: #fff; }

/* ---------- Documento ---------- */
.doc { flex: 1 0 auto; width: 100%; max-width: 1120px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--lado-d) clamp(64px, 9vw, 120px) var(--lado); }
.doc__cabeca { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.doc__rotulo { margin: 0 0 16px; color: var(--acento); font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.doc h1 { margin: 0; color: var(--tinta); font-size: clamp(2.125rem, 4.4vw, 3.25rem); font-weight: 300; line-height: 1.08; letter-spacing: -.032em; text-wrap: balance; }
.doc h1 span { color: var(--acento-titulo); }
.doc__meta { margin: 18px 0 0; color: var(--texto-2); font-size: .9375rem; }

.doc__grade { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.doc__indice { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; padding: 20px 20px 22px; border-radius: 18px; background: rgba(255, 255, 255, .7); box-shadow: var(--sombra); }
.doc__indice p { margin: 0 0 10px; color: var(--tinta); font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.doc__indice ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.doc__indice a { display: block; padding: 5px 0; color: var(--texto); font-size: .875rem; line-height: 1.4; text-decoration: none; }
.doc__indice a:hover { color: var(--acento); }

.doc__texto { min-width: 0; max-width: 72ch; }
.doc__texto h2 { margin: 56px 0 16px; padding-top: 28px; border-top: 1px solid var(--linha); color: var(--tinta); font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 400; line-height: 1.25; letter-spacing: -.02em; }
.doc__texto h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.doc__texto h3 { margin: 32px 0 10px; color: var(--tinta); font-size: 1.0625rem; font-weight: 600; line-height: 1.45; letter-spacing: -.01em; }
.doc__texto p { margin: 0 0 16px; }
.doc__texto strong { color: var(--tinta); font-weight: 600; }
.doc__texto ul { margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 10px; }
.doc__texto li { position: relative; padding-left: 22px; }
.doc__texto li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--laranja); }
.doc__texto a { overflow-wrap: anywhere; }

/* ---------- 404 ---------- */
.doc--404 { max-width: 760px; min-height: 60vh; }
.doc__botao { display: inline-flex; align-items: center; margin-top: 28px; padding: 12px 24px; border-radius: 999px; background: var(--acento); color: #fff; font-weight: 500; text-decoration: none; }
.doc__botao:hover { background: #A34100; color: #fff; }

/* ---------- Rodapé ---------- */
.doc-rodape { border-top: 1px solid var(--linha); background: linear-gradient(180deg, var(--g0) 0%, var(--g1) 100%); }
.doc-rodape__inner { max-width: 1120px; margin: 0 auto; padding: 36px var(--lado-d) 44px var(--lado); color: var(--texto-2); font-size: .875rem; }
.doc-rodape p { margin: 0 0 6px; }
.doc-rodape strong { color: var(--tinta); font-weight: 600; }

@media (max-width: 900px) {
  .doc__grade { grid-template-columns: minmax(0, 1fr); }
  .doc__indice { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .doc-topo__nav { display: none; }
  .doc-topo__voltar { margin-left: auto; }
  .doc-topo__inner { padding: 0 6px 0 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
