/* ================================================================
   Legal pages — Política de Privacidade & Termos de Uso
   Compartilha tokens com main.css. Tipografia otimizada para leitura longa.
   ================================================================ */

@font-face{font-family:'Space Grotesk';src:url('../assets/fonts/SpaceGrotesk-700.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'Space Grotesk';src:url('../assets/fonts/SpaceGrotesk-500.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:'DM Sans';src:url('../assets/fonts/DMSans-400.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'DM Sans';src:url('../assets/fonts/DMSans-500.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:'DM Sans';src:url('../assets/fonts/DMSans-700.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}

:root{
  --background:#09090f;--foreground:#f2f2f2;
  --primary:#2563eb;--primary-dark:#1a4bbd;--primary-foreground:#fff;
  --accent:#39b385;
  --card:#131318;--secondary:#1c1c20;--muted:#272729;--border:#222225;
  --muted-foreground:#9a9aa2;--ring:#2563eb;
  --font-heading:'Space Grotesk',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --font-body:'DM Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --space-1:.25rem;--space-2:.5rem;--space-3:.75rem;--space-4:1rem;--space-5:1.25rem;
  --space-6:1.5rem;--space-8:2rem;--space-10:2.5rem;--space-12:3rem;--space-16:4rem;--space-24:6rem;
  --radius:.625rem;--radius-xl:.875rem;--radius-full:9999px;
  --dur-fast:160ms;--ease-out:cubic-bezier(.16,1,.3,1);
}

*,*::before,*::after{box-sizing:border-box}
*{margin:0}
html{font-family:var(--font-body);font-size:100%;line-height:1.65;-webkit-text-size-adjust:100%;scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}
body{background:var(--background);color:var(--foreground);min-height:100vh;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;display:flex;flex-direction:column}
a{color:var(--primary);text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;transition:color var(--dur-fast) var(--ease-out)}
a:hover{color:#60a5fa}
:focus-visible{outline:2px solid var(--ring);outline-offset:3px;border-radius:4px}

.skip-link{position:absolute;left:-9999px;top:0;background:var(--primary);color:var(--primary-foreground);padding:.5rem 1rem;z-index:100;border-radius:var(--radius);text-decoration:none}
.skip-link:focus{left:1rem;top:1rem}

/* ───────── Header institucional simples ───────── */
.legal-header{
  padding-block:var(--space-6);
  border-bottom:1px solid var(--border);
}
.legal-header__inner{
  width:100%;max-width:56rem;margin-inline:auto;padding-inline:1.5rem;
  display:flex;justify-content:space-between;align-items:center;gap:var(--space-4);
}
.legal-header__brand{
  display:inline-flex;align-items:center;text-decoration:none;
}
.legal-header__brand img{display:block;height:28px;width:auto;max-width:100%}
@media (min-width:768px){.legal-header__brand img{height:32px}}
.legal-header__back{
  font-size:.875rem;color:var(--muted-foreground);text-decoration:none;
  display:inline-flex;align-items:center;gap:.375rem;
}
.legal-header__back:hover{color:var(--foreground)}
.legal-header__back svg{width:14px;height:14px;stroke:currentColor;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}

/* ───────── Conteúdo ───────── */
.legal-main{flex:1;padding-block:var(--space-12) var(--space-16)}
.legal{
  width:100%;max-width:56rem;margin-inline:auto;padding-inline:1.5rem;
}
.legal__title{
  font-family:var(--font-heading);font-weight:700;letter-spacing:-.02em;line-height:1.1;
  font-size:clamp(1.875rem,4.5vw,2.75rem);
  margin-bottom:var(--space-3);
}
.legal__updated{
  color:var(--muted-foreground);font-size:.875rem;margin-bottom:var(--space-8);
}
.legal__intro{
  color:var(--foreground);font-size:1.0625rem;line-height:1.7;margin-bottom:var(--space-10);
  max-width:65ch;
}

/* Sumário (TOC) */
.legal__toc{
  background:var(--card);border:1px solid var(--border);border-radius:var(--radius-xl);
  padding:var(--space-6);margin-bottom:var(--space-12);
}
.legal__toc-title{
  font-family:var(--font-heading);font-weight:700;font-size:.8125rem;
  letter-spacing:.08em;text-transform:uppercase;color:var(--muted-foreground);
  margin-bottom:var(--space-3);
}
.legal__toc ol{
  list-style:none;padding:0;margin:0;
  display:grid;gap:.5rem;
  counter-reset:toc;
}
.legal__toc li{counter-increment:toc}
.legal__toc a{
  color:var(--foreground);text-decoration:none;font-size:.9375rem;
  display:flex;gap:.75rem;padding:.25rem 0;
}
.legal__toc a::before{
  content:counter(toc,decimal-leading-zero);
  color:var(--muted-foreground);font-family:var(--font-heading);
  font-variant-numeric:tabular-nums;min-width:2ch;
}
.legal__toc a:hover{color:var(--primary)}

/* Seções */
.legal-section{
  padding-top:var(--space-10);scroll-margin-top:var(--space-8);
  max-width:72ch;
}
.legal-section + .legal-section{border-top:1px solid var(--border);margin-top:var(--space-10)}
.legal-section h2{
  font-family:var(--font-heading);font-weight:700;letter-spacing:-.015em;line-height:1.2;
  font-size:clamp(1.375rem,2.5vw,1.75rem);
  margin-bottom:var(--space-5);
}
.legal-section h3{
  font-family:var(--font-heading);font-weight:700;letter-spacing:-.01em;line-height:1.3;
  font-size:1.125rem;
  margin-top:var(--space-8);margin-bottom:var(--space-3);
}
.legal-section p{
  font-size:1rem;line-height:1.7;color:var(--foreground);
  margin-bottom:var(--space-4);
}
.legal-section p:last-child{margin-bottom:0}
.legal-section ul,.legal-section ol{
  padding-left:1.5rem;margin-bottom:var(--space-4);
  display:grid;gap:.5rem;
}
.legal-section li{line-height:1.7}
.legal-section li::marker{color:var(--muted-foreground)}
.legal-section strong{color:var(--foreground);font-weight:600}
.legal-section em{color:var(--muted-foreground);font-style:normal;font-size:.9375rem}

/* Bloco de destaque (dados do controlador, DPO) */
.legal-card{
  background:var(--card);border:1px solid var(--border);border-radius:var(--radius-xl);
  padding:var(--space-5) var(--space-6);margin-block:var(--space-4) var(--space-6);
  font-size:.9375rem;
}
.legal-card dl{display:grid;gap:.5rem;margin:0}
.legal-card dt{
  font-family:var(--font-heading);font-weight:700;font-size:.75rem;
  letter-spacing:.06em;text-transform:uppercase;color:var(--muted-foreground);
}
.legal-card dd{margin:0 0 .5rem;line-height:1.5}
.legal-card dd:last-child{margin-bottom:0}

/* Placeholder visual (dado jurídico pendente) */
.placeholder{
  display:inline-block;padding:.125rem .5rem;border-radius:var(--radius-full);
  background:color-mix(in srgb,var(--primary) 14%,transparent);
  color:#93c5fd;border:1px dashed color-mix(in srgb,var(--primary) 40%,transparent);
  font-family:var(--font-heading);font-size:.8125rem;font-weight:500;letter-spacing:.02em;
}

/* Tabela de cookies */
.legal-table{
  width:100%;border-collapse:collapse;margin-block:var(--space-4) var(--space-6);
  font-size:.9375rem;
  border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;
}
.legal-table th,.legal-table td{
  padding:.75rem 1rem;text-align:left;vertical-align:top;
  border-bottom:1px solid var(--border);
}
.legal-table thead th{
  background:var(--card);font-family:var(--font-heading);font-weight:700;
  font-size:.8125rem;letter-spacing:.04em;text-transform:uppercase;color:var(--muted-foreground);
}
.legal-table tbody tr:last-child td{border-bottom:0}
.legal-table code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.875rem;background:var(--secondary);padding:.125rem .375rem;border-radius:4px;
}

@media (max-width:640px){
  .legal-table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .legal-table thead th,.legal-table td{white-space:nowrap}
}

/* Voltar ao topo */
.legal-totop{
  position:fixed;right:1rem;bottom:1rem;z-index:50;
  width:44px;height:44px;border-radius:var(--radius-full);
  background:var(--primary);color:var(--primary-foreground);
  border:none;cursor:pointer;
  display:grid;place-items:center;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
  opacity:0;pointer-events:none;transform:translateY(8px);
  transition:opacity var(--dur-fast) var(--ease-out),transform var(--dur-fast) var(--ease-out),background var(--dur-fast) var(--ease-out);
}
.legal-totop.is-visible{opacity:1;pointer-events:auto;transform:translateY(0)}
.legal-totop:hover{background:var(--primary-dark)}
.legal-totop svg{width:18px;height:18px;stroke:currentColor;stroke-width:2.2;fill:none;stroke-linecap:round;stroke-linejoin:round}

/* ───────── Footer ───────── */
.legal-footer{
  padding-block:var(--space-10);border-top:1px solid var(--border);
  color:var(--muted-foreground);font-size:.8125rem;line-height:1.6;
}
.legal-footer__inner{
  width:100%;max-width:56rem;margin-inline:auto;padding-inline:1.5rem;
  display:flex;flex-direction:column;gap:var(--space-4);align-items:center;text-align:center;
}
.legal-footer__brand{display:inline-flex;align-items:center;text-decoration:none;opacity:.9;transition:opacity var(--dur-fast) var(--ease-out)}
.legal-footer__brand:hover{opacity:1}
.legal-footer__brand img{display:block;height:32px;width:auto}
.legal-footer__links{display:flex;gap:var(--space-6);flex-wrap:wrap;justify-content:center}
.legal-footer__links a{color:var(--muted-foreground);text-decoration:none}
.legal-footer__links a:hover{color:var(--foreground)}
.legal-footer__entity{max-width:52ch}
.legal-footer__entity strong{color:var(--foreground);font-weight:600}
