/* =========================================================
   MINUNI – styles.css
   - Base tipográfica, layout fluido e componentes
   - Dark mode automático (prefers-color-scheme)
   - Compatível com páginas de texto (privacidade/termos)
   ========================================================= */

/* -------------------- Variáveis -------------------- */
:root {
  --brand:        #2F6E43;
  --brand-600:    #265a36;
  --ink:          #1f2937;   /* texto */
  --muted:        #6b7280;   /* texto secundário */
  --bg:           #f8fafc;   /* fundo */
  --panel:        #ffffff;   /* cartões/containers */
  --line:         #e5e7eb;   /* bordas */
  --ok:           #0ea5e9;
  --warn:         #f59e0b;
  --danger:       #ef4444;
  --radius:       14px;
  --shadow:       0 1px 1px rgba(0,0,0,.03), 0 8px 24px rgba(2,6,23,.04);
}

/* Dark mode automático */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:   #e5e7eb;
    --muted: #a1a1aa;
    --bg:    #0b1220;
    --panel: #0f172a;
    --line:  #17223a;
    --shadow: 0 0 0 rgba(0,0,0,0);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: clamp(15px, 1.05vw + 12px, 17px);
}

img, svg, video { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* Acessibilidade / foco */
a { color: var(--brand-600); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand), white 30%); outline-offset: 2px; }

/* -------------------- Containers utilitários -------------------- */
.container { max-width: 960px; margin: 0 auto; padding: 0 18px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 0 18px; }

.muted { color: var(--muted); }
.center { text-align: center; }

/* -------------------- Títulos e parágrafos -------------------- */
h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 12px 0 10px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: clamp(22px, 3.2vw, 30px); }
h3 { font-size: clamp(18px, 2.6vw, 22px); }

p { margin: 10px 0 12px; }

/* -------------------- Layout de navegação (compatível com a home) -------------------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(120%) blur(6px);
}
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-badge {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700;
}
.nav-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* -------------------- Botões -------------------- */
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--brand); color: #fff !important; text-decoration: none; font-weight: 700;
  box-shadow: var(--shadow); transition: transform .05s ease, background .2s ease;
}
.button:hover { background: var(--brand-600); transform: translateY(-1px); }
.button.secondary { background: #0f172a; }
.button.secondary:hover { background: #111827; }

/* -------------------- Cards e Grid -------------------- */
.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.card h3 { margin-top: 6px; }

/* -------------------- Tabelas (para páginas longas de texto) -------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
thead th {
  background: color-mix(in oklab, var(--brand), white 85%);
  color: color-mix(in oklab, var(--brand), black 20%);
  text-align: left; padding: 12px;
  border-bottom: 1px solid var(--line);
}
tbody td {
  padding: 12px; border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: 0; }

/* -------------------- Listas com marcadores melhores -------------------- */
ul, ol { padding-left: 22px; }
ul li::marker { color: var(--brand); }
ol li { padding-left: 4px; }

/* -------------------- Blocos de aviso (opcional) -------------------- */
.note, .warn, .danger {
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); margin: 12px 0;
  background: var(--panel);
}
.note   { border-color: color-mix(in oklab, var(--ok), var(--line)); }
.warn   { border-color: color-mix(in oklab, var(--warn), var(--line)); }
.danger { border-color: color-mix(in oklab, var(--danger), var(--line)); }

/* -------------------- Rodapé -------------------- */
footer { border-top: 1px solid var(--line); margin-top: 36px; background: var(--panel); }
.foot {
  max-width: 1100px; margin: auto;
  padding: 20px 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
}
.links { display: flex; gap: 14px; flex-wrap: wrap; }
.links a { color: var(--ink); text-decoration: none; }
.links a:hover { text-decoration: underline; }

/* -------------------- Páginas de Texto (privacidade/termos/exclusão) -------------------- */
.page {
  max-width: 900px; margin: 28px auto; padding: 0 18px;
}
.page .lead { color: var(--muted); margin-top: -6px; }

/* títulos com linhas sutis */
.page h2, .page h3 {
  position: relative; padding-top: 10px;
}
.page h2::after, .page h3::after {
  content: ""; display: block; height: 1px; background: var(--line); margin-top: 8px;
}

/* blocos de seção */
.section {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin: 16px 0;
}

/* -------------------- 404 -------------------- */
.error-404 {
  min-height: 55vh; display: grid; place-items: center; text-align: center;
}
.error-404 .box {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow);
}

/* -------------------- Utilitários rápidos -------------------- */
.mt-0{margin-top:0}.mt-1{margin-top:6px}.mt-2{margin-top:12px}.mt-3{margin-top:18px}.mt-4{margin-top:24px}
.mb-0{margin-bottom:0}.mb-1{margin-bottom:6px}.mb-2{margin-bottom:12px}.mb-3{margin-bottom:18px}.mb-4{margin-bottom:24px}
.p-0{padding:0}.p-1{padding:6px}.p-2{padding:12px}.p-3{padding:18px}.p-4{padding:24px}

/* -------------------- Print mínimo (para termos/privacidade) -------------------- */
@media print {
  .nav, footer { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .card, table { box-shadow: none; border-color: #ddd; }
}
