/* ==========================================================================
   Golden AI — páginas institucionais (políticas, termos, central, WhatsApp)
   Mesmos tokens do styles.css, sem o peso da home (intro, vidro, simulador).
   Regra do site: conteúdo mora em material sólido; o dourado é acento.
   Guia: Obsidian Vault/golden-ai/site/DESIGN.md
   ========================================================================== */

:root {
  --obsidian: #0d110d;
  --surface-1: #141a14;
  --gold: #d9a23a;
  --gold-soft: #ecc884;
  --gold-pale: #f4e6c4;
  --on-gold: #1a1206;
  --text: #f4f1ea;
  --muted: #aaa697;
  --quiet: #8f897b;
  --line: rgba(244, 241, 234, .1);
  --line-2: rgba(244, 241, 234, .18);
  --line-gold: rgba(217, 162, 58, .42);
  --material: linear-gradient(160deg, rgba(30, 37, 30, .94) 0%, rgba(15, 19, 15, .98) 100%);
  --material-edge: inset 0 1px 0 rgba(244, 241, 234, .06);
  --material-shadow: 0 24px 48px -26px rgba(0, 0, 0, .7);
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-pill: 999px;
  --r-surface: 20px;
  --r-inner: 14px;
  --t-fast: 160ms;
  --wrap: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  background: var(--obsidian);
  color-scheme: dark;
  scrollbar-color: #3a4436 var(--obsidian);
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--obsidian);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.08;
  text-wrap: balance;
}

p { margin: 0; }

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

::selection { background: rgba(217, 162, 58, .32); color: var(--text); }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--gold);
  color: var(--on-gold);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: top .2s ease;
}

.skip-link:focus-visible { top: 16px; outline-color: var(--text); }

/* --------------------------------------------------------------------------
   Topo
   -------------------------------------------------------------------------- */
.page-top { border-bottom: 1px solid var(--line); }

.page-top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.page-top .brand { display: inline-flex; align-items: center; min-height: 44px; }

.page-top .brand img { width: 132px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: color var(--t-fast) ease;
}

.back-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.back-link:hover { color: var(--gold-soft); }

/* --------------------------------------------------------------------------
   Cabeçalho do documento
   -------------------------------------------------------------------------- */
.doc-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); }

.kicker {
  display: block;
  margin-bottom: 16px;
  color: var(--gold-soft);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.doc-head h1 { max-width: 18ch; font-size: clamp(36px, 5.6vw, 64px); }

.doc-head .lead {
  max-width: 62ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.66;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 22px;
  color: var(--quiet);
  font-size: 13.5px;
}

/* --------------------------------------------------------------------------
   Corpo: índice à esquerda no desktop, texto num cartão de material
   -------------------------------------------------------------------------- */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding-bottom: clamp(56px, 8vw, 96px);
}

@media (min-width: 1000px) {
  .doc-layout { grid-template-columns: 236px minmax(0, 1fr); gap: 48px; align-items: start; }
  .toc { position: sticky; top: 24px; }
}

.toc { font-size: 14px; }

.toc-title {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li { counter-increment: toc; }

.toc a {
  display: flex;
  gap: 10px;
  min-height: 40px;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--t-fast) ease;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  min-width: 22px;
  color: var(--quiet);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

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

/* Celular e tablet: o índice vira um controle recolhido, para o texto começar na primeira tela */
.toc-compact { display: none; }

@media (max-width: 999px) {
  .toc-wide { display: none; }

  .toc-compact {
    display: block;
    border: 1px solid var(--line);
    border-radius: var(--r-surface);
    background: var(--surface-1);
  }

  .toc-compact summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 52px;
    padding: 0 20px;
    color: var(--text);
    font-size: 14.5px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: color var(--t-fast) ease;
  }

  .toc-compact summary:hover { color: var(--gold-soft); }

  .toc-compact summary::-webkit-details-marker { display: none; }

  .toc-compact summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 1.75px solid var(--gold-soft);
    border-bottom: 1.75px solid var(--gold-soft);
    transform: translateY(-2px) rotate(45deg);
    transition: transform var(--t-fast) ease;
  }

  .toc-compact[open] summary::after { transform: translateY(2px) rotate(-135deg); }

  .toc-compact summary:focus-visible { outline-offset: -2px; border-radius: var(--r-surface); }

  .toc-count { color: var(--quiet); font-size: 13px; font-weight: 600; }

  .toc-compact nav { padding: 0 20px 14px; border-top: 1px solid var(--line); }

  .toc-compact ol { padding-top: 8px; }
}

.material {
  border: 1px solid var(--line);
  border-radius: var(--r-surface);
  background: var(--material);
  box-shadow: var(--material-edge), var(--material-shadow);
}

.doc-body { padding: clamp(24px, 4vw, 52px); }

.doc-body section + section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.doc-body h2 { font-size: clamp(23px, 2.4vw, 30px); }

.doc-body h3 { margin-top: 26px; font-size: 18px; letter-spacing: -.02em; }

.doc-body p,
.doc-body li { max-width: 72ch; color: var(--muted); }

.doc-body p { margin-top: 14px; }

.doc-body h2 + p { margin-top: 16px; }

.doc-body strong { color: var(--text); font-weight: 700; }

.doc-body ul,
.doc-body ol { margin: 14px 0 0; padding-left: 1.25em; }

.doc-body li + li { margin-top: 8px; }

.doc-body li::marker { color: var(--gold); }

.doc-body a,
.inline-link {
  color: var(--gold-soft);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-fast) ease;
}

.doc-body a:hover,
.inline-link:hover { color: var(--gold-pale); }

/* Resumo: bloco de leitura rápida no topo do cartão (linha dourada, não outro cartão) */
.summary {
  margin-bottom: 40px;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--line-gold);
}

.summary .summary-title {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.summary ul { margin-top: 10px; }

/* Tabelas: rolam dentro da própria caixa no celular, nunca a página */
.table-scroll {
  margin-top: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  -webkit-overflow-scrolling: touch;
}

.table-scroll:focus-visible { outline-offset: 2px; }

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.55;
}

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

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

th {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(244, 241, 234, .03);
}

td { color: var(--muted); }

td:first-child { color: var(--text); font-weight: 600; }

/* Celular: cada linha vira um bloco, com o nome da coluna acima do valor.
   O cabeçalho continua no HTML para leitor de tela (papéis de tabela mantidos). */
@media (max-width: 640px) {
  .table-scroll { overflow: visible; }

  table { min-width: 0; }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  table, tbody, tr, td { display: block; }

  tr { padding: 16px 18px; border-bottom: 1px solid var(--line); }

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

  td { padding: 0; border: 0; }

  td:first-child { margin-bottom: 6px; font-size: 15px; }

  td + td { margin-top: 10px; }

  td:not(:first-child)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--quiet);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }
}

/* Passos numerados (exclusão de dados, conexão do WhatsApp) */
.steps { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; counter-reset: step; }

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  max-width: none;
}

.steps li + li { margin-top: 0; }

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-gold);
  border-radius: 50%;
  color: var(--gold-soft);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.steps li > div { padding-top: 4px; }

.steps strong { display: block; }

.doc-body .steps p { margin-top: 4px; }

/* Grade de cartões (Central de Confiança): um nível só, sem cartão dentro de cartão */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 256px), 1fr));
  gap: 16px;
  padding-bottom: clamp(32px, 5vw, 56px);
}

.trust-card { display: flex; flex-direction: column; padding: 28px; }

.trust-card h2 { font-size: 21px; }

.trust-card p { margin-top: 12px; color: var(--muted); }

.trust-card .card-link {
  margin-top: auto;
  padding-top: 18px;
  color: var(--gold-soft);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
}

.trust-card .card-link span { display: inline-block; transition: transform var(--t-fast) ease; }

.trust-card .card-link:hover span { transform: translateX(3px); }

/* Botão (CTA da página do WhatsApp) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 24px;
  padding: 0 24px;
  border-radius: var(--r-pill);
  background: var(--gold);
  color: var(--on-gold);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: background-color var(--t-fast) ease, transform var(--t-fast) ease;
}

.btn:hover { background: var(--gold-soft); }

.btn:active { transform: scale(.97); }

.doc-body a.btn { color: var(--on-gold); text-decoration: none; }

/* --------------------------------------------------------------------------
   Rodapé — igual ao da home
   -------------------------------------------------------------------------- */
.site-footer { padding: clamp(48px, 6vw, 76px) 0 42px; border-top: 1px solid var(--line); }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 36px 44px;
  align-items: start;
}

.footer-logo { width: 150px; margin-bottom: 22px; }

.company-data { display: grid; gap: 5px; color: var(--muted); font-size: 14px; }

.company-data em { color: var(--quiet); font-style: normal; }

.company-data a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color var(--t-fast) ease, text-decoration-color var(--t-fast) ease; }

.company-data a:hover { color: var(--gold-soft); text-decoration-color: currentColor; }

.footer-note { max-width: 46ch; margin-top: 20px; color: var(--quiet); font-size: 13px; line-height: 1.6; }

.footer-links { display: grid; gap: 4px; align-content: start; color: var(--muted); font-size: 14px; }

.footer-links strong { margin-bottom: 6px; color: var(--text); font-size: 13.5px; font-weight: 700; }

.footer-links a { display: flex; align-items: center; min-height: 32px; text-decoration: none; transition: color var(--t-fast) ease; }

.footer-links a:hover,
.footer-links a[aria-current="page"] { color: var(--gold-soft); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 13px;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; }
  .trust-card { padding: 24px; }
}

/* Toque: alvos de 44px (HIG) no índice e no rodapé */
@media (pointer: coarse) {
  .toc a,
  .footer-links a { min-height: 44px; }
}

/* --------------------------------------------------------------------------
   Preferências de acessibilidade
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:active,
  .trust-card .card-link:hover span { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --muted: #d8d4c8; --quiet: #c2bdaf; --line: rgba(244, 241, 234, .32); }
}

@media (forced-colors: active) {
  .material, .toc, .table-scroll { border: 1px solid CanvasText; }
  .btn { border: 1px solid ButtonText; }
}

@media print {
  html, body { background: #fff; color: #000; }
  .page-top, .toc, .site-footer .footer-links, .skip-link { display: none; }
  .material { border: 0; box-shadow: none; background: none; }
  .doc-body p, .doc-body li, td { color: #000; }
}
