/*
 * FlowMen — static site
 * Estilo minimalista, mobile-first, zero dependência externa.
 * System font stack evita download de Google Fonts no site legal
 * (a própria política promete "sem trackers" — vamos honrar aqui).
 */

:root {
  --fg: #111827;
  --fg-muted: #4b5563;
  --fg-subtle: #9ca3af;
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --border: #e5e7eb;
  --accent: #1e40af;
  --accent-hover: #1e3a8a;
  --radius: 8px;
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg: #f3f4f6;
    --fg-muted: #9ca3af;
    --fg-subtle: #6b7280;
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --border: #334155;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
  }
}

* { box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* Topbar com seletor de idioma / voltar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.topbar a {
  color: var(--fg-muted);
  text-decoration: none;
}

.topbar a:hover {
  color: var(--accent);
}

/* Headings */
h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--fg);
}

h2 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 1rem;
  color: var(--fg);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--fg);
}

.tagline {
  font-size: 1.125rem;
  color: var(--fg-muted);
  margin: 0 0 2rem;
}

.meta {
  font-size: 0.875rem;
  color: var(--fg-subtle);
  margin: -0.5rem 0 2rem;
}

/* Texto */
p { margin: 0 0 1rem; }

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

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

li { margin-bottom: 0.35rem; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--accent-hover); }

/* Blockquote = resumo / aviso */
blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--fg);
}

blockquote p:last-child { margin-bottom: 0; }

/* Code */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--fg);
}

/* Tabelas */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead { background: var(--bg-soft); }

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

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

th { font-weight: 600; }

/* Cards de documento (usado no index) */
.docs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.doc-card {
  display: block;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.15s, transform 0.15s;
}

.doc-card:hover {
  border-color: var(--accent);
  color: var(--fg);
  transform: translateY(-1px);
}

.doc-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.doc-card span {
  display: block;
  font-size: 0.875rem;
  color: var(--fg-muted);
}

/* Contato */
.contact {
  background: var(--bg-soft);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.contact p:last-child { margin-bottom: 0; }

/* Footer */
footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--fg-subtle);
  text-align: center;
}

/* Hero do index */
.hero {
  padding: 1rem 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
}

.hero .tagline {
  font-size: 1.25rem;
}

/* Mobile */
@media (max-width: 480px) {
  .container { padding: 2rem 1rem 3rem; }
  h1 { font-size: 1.75rem; }
  .hero h1 { font-size: 2rem; }
  .hero .tagline { font-size: 1.125rem; }
  h2 { font-size: 1.25rem; }
  th, td { padding: 0.6rem 0.75rem; font-size: 0.875rem; }
}
