/* ─── MallinSocial · Páginas legais ───────────────────────────────────────
 *
 * Folha compartilhada por /termos.html, /privacidade.html e
 * /exclusao-de-dados.html. Reproduz o design system v3 ("Precisão
 * Monocromática") em CSS puro, sem build: mesmos tokens, mesmas fontes e o
 * mesmo vocabulário visual do app — near-black, hairlines, um único acento
 * teal e profundidade vinda de luz, nunca de glow colorido.
 * --------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --ink: #0A0B0F;
  --surface: #111318;
  --surface-2: #161A21;
  --surface-3: #1C2029;

  --border: #22262F;
  --border-strong: #2E3340;

  --brand: #81d8d0;
  --brand-dark: #5db8b0;
  --gold: #D3AF37;

  --text-primary: #F5F6F8;
  --text-secondary: #A1A6B2;
  --text-muted: #6B7280;

  --font-sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Instrument Sans', sans-serif;

  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Luz sutil no topo — a profundidade da marca vem de luz, não de sombra. */
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 420px;
  background: radial-gradient(60% 100% at 50% 0%, rgba(129, 216, 208, 0.07), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Barra superior ──────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 15, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.topbar__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-logo { display: inline-flex; align-items: center; }
.brand-logo img { height: 30px; width: auto; display: block; }

.topnav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.topnav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background-color 180ms cubic-bezier(0.2, 0.8, 0.2, 1), color 180ms;
}

.topnav a:hover { background: var(--surface-2); color: var(--text-primary); }

.topnav a[aria-current='page'] {
  background: var(--surface-2);
  color: var(--text-primary);
}

/* ─── Estrutura ───────────────────────────────────────────────────────── */

.wrap {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 44px 20px 96px;
}

.overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 10px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 14px;
}

.lead { font-size: 16.5px; color: var(--text-secondary); margin: 0; max-width: 62ch; }

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 22px 0 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
}

.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.chip--gold { color: var(--gold); border-color: rgba(211, 175, 55, 0.28); }

.hairline {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, var(--border-strong), transparent);
  margin: 34px 0;
}

/* ─── Sumário ─────────────────────────────────────────────────────────── */

.toc {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 0 0 40px;
}

.toc__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2px 20px;
  counter-reset: toc;
}

.toc li { counter-increment: toc; margin: 0; }

.toc a {
  display: flex;
  gap: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 0;
  border-radius: 6px;
  transition: color 180ms;
}

.toc a::before {
  content: counter(toc);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 16px;
}

.toc a:hover { color: var(--brand); }

/* ─── Conteúdo ────────────────────────────────────────────────────────── */

section { margin: 0 0 34px; scroll-margin-top: 96px; }

h2 {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

h2 .num {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

h3 {
  font-family: var(--font-display);
  font-size: 15.5px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 22px 0 8px;
}

p { margin: 0 0 14px; }

strong { color: var(--text-primary); font-weight: 600; }

a { color: var(--brand); text-decoration: none; border-bottom: 1px solid rgba(129, 216, 208, 0.28); }
a:hover { border-bottom-color: var(--brand); }

ul, ol { margin: 0 0 14px; padding-left: 20px; }
li { margin: 7px 0; }
li::marker { color: var(--text-muted); }

/* Nome técnico (escopo de API, campo) no meio do texto. */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  color: var(--text-primary);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin: 18px 0;
}

.card > :last-child { margin-bottom: 0; }
.card--accent { border-left: 2px solid var(--brand); }
.card--gold { border-left: 2px solid var(--gold); }

/* Passos numerados */
.steps { list-style: none; margin: 22px 0; padding: 0; counter-reset: step; }

.steps li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0 0 14px;
}

.steps li::before {
  content: counter(step);
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  margin-top: 2px;
}

.steps p { margin: 0; }

/* Tabela de dados */
.table-wrap { overflow-x: auto; margin: 16px 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 480px;
}

th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

tbody tr:last-child td { border-bottom: 0; }

/* ─── Rodapé ──────────────────────────────────────────────────────────── */

footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding-top: 28px;
  font-size: 13px;
  color: var(--text-muted);
}

footer .footer__links { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
footer a { color: var(--text-secondary); border-bottom-color: transparent; }
footer a:hover { color: var(--brand); }
footer .legal-entity { line-height: 1.7; }

/* ─── Acessibilidade e impressão ─────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media (max-width: 640px) {
  .wrap { padding: 32px 18px 72px; }
  .topbar__inner { padding: 12px 18px; }
  .brand-logo img { height: 26px; }
  body { font-size: 15px; }
}

@media print {
  body { background: #fff; color: #111; }
  body::before, .topbar, .toc { display: none; }
  a { color: #111; border-bottom: 0; }
  h1, h2, h3, strong { color: #000; }
  .card { border: 1px solid #ccc; background: #fafafa; }
}
