/* ================================
   VARIÁVEIS DE TEMA
   ================================ */
:root {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --text: #111827;
  --text-soft: #4b5563;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --border-subtle: rgba(15, 23, 42, 0.08);
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  --radius: 16px;
}

/* ================================
   DARK MODE AUTOMÁTICO (sistema)
   ================================ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #020617;
    --bg-elevated: #0a0f1e;
    --text: #e5e7eb;
    --text-soft: #9ca3af;
    --accent: #60a5fa;
    --accent-soft: rgba(96, 165, 250, 0.12);
    --border-subtle: rgba(148, 163, 184, 0.25);
  }

  :root:not([data-theme="light"]) a {
    color: #93c5fd;
  }

  :root:not([data-theme="light"]) a:hover {
    color: #bfdbfe;
  }

  :root:not([data-theme="light"]) .lang-toggle,
  :root:not([data-theme="light"]) .theme-toggle {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(148, 163, 184, 0.15);
  }

  :root:not([data-theme="light"]) .button-primary {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
  }
}

/* Modo escuro forçado pelo usuário */
:root[data-theme="dark"] {
  --bg: #020617;
  --bg-elevated: #0a0f1e;
  --text: #e5e7eb;
  --text-soft: #9ca3af;
  --accent: #60a5fa;
  --accent-soft: rgba(96, 165, 250, 0.12);
  --border-subtle: rgba(148, 163, 184, 0.25);
}

/* Ajustes adicionais para dark forçado */
:root[data-theme="dark"] a {
  color: #93c5fd;
}

:root[data-theme="dark"] a:hover {
  color: #bfdbfe;
}

:root[data-theme="dark"] .lang-toggle,
:root[data-theme="dark"] .theme-toggle {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(148, 163, 184, 0.15);
}

:root[data-theme="dark"] .button-primary {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Modo claro forçado */
:root[data-theme="light"] {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --text: #111827;
  --text-soft: #4b5563;
}

/* ================================
   RESET + BASE
   ================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  padding: 20px;
  max-width: 720px;
  margin: auto;
}

/* LINKS – padrão (modo claro) */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ================================
   HEADER
   ================================ */
.site-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-avatar {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  font-weight: 700;
}

.brand-name {
  font-size: 18px;
  font-weight: 600;
}

.brand-tagline {
  font-size: 12px;
  color: var(--text-soft);
}

/* NAV */
.site-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

.site-nav a {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  border-color: var(--text-soft);
}

.lang-toggle,
.theme-toggle {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text);
}

.theme-toggle {
  margin-left: auto;
}

/* ================================
   HERO
   ================================ */
.hero {
  background: var(--bg-elevated);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}

.hero-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-label-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
}

.hero-title {
  margin-top: 12px;
  font-size: 26px;
  font-weight: 650;
}

.hero-subtitle {
  color: var(--text-soft);
  margin-top: 12px;
  margin-bottom: 16px;
}

.hero-actions {
  display: flex;
  gap: 10px;
}

.button-primary {
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  background: var(--accent);
  color: #fff;
}

/* ================================
   SECTIONS
   ================================ */
.section-card {
  background: var(--bg-elevated);
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
}

.section-subtitle {
  color: var(--text-soft);
  margin-bottom: 16px;
}

.item-list {
  display: grid;
  gap: 20px;
  list-style-position: outside;
  padding-left: 20px;
  margin-left: 0;
}

.item-title {
  font-weight: 600;
  font-size: 16px;
}

.item-title:hover {
  text-decoration: underline;
}

.item-description {
  font-size: 14px;
  color: var(--text-soft);
}

/* ================================
   ARTICLE CONTENT
   ================================ */
.article-content {
  background: var(--bg-elevated);
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  max-width: 720px;
  margin: 0 auto;
}

.article-content h1 {
  font-size: 28px;
  font-weight: 650;
  margin-bottom: 8px;
}

.article-content h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
}

.article-content p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.article-meta {
  color: var(--text-soft);
  font-size: 14px;
  margin-bottom: 24px;
}

.article-note {
  color: var(--text-soft);
  font-size: 14px;
  margin-top: 32px;
}

.article-content sup {
  font-size: 0.75em;
  vertical-align: super;
}

/* ================================
   FOOTER
   ================================ */
footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-soft);
  font-size: 13px;
  text-align: center;
}
