/* =============================================================
   Bastion Systems — Estilo dos artigos
   Consistente com a identidade visual do site principal
   Otimizado para leitura longa e extração por LLMs
   ============================================================= */

:root {
  --c-navy: #0A1F3D;
  --c-blue: #3D6BA8;
  --c-blue-light: #A8B5CC;
  --c-bg: #FBFBFD;
  --c-bg-alt: #F4F5F8;
  --c-text: #0A1F3D;
  --c-text-soft: #333844;
  --c-text-mute: #6B7381;
  --c-line: #E2E5EC;
  --c-card: #FFFFFF;

  --f: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
  --f-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);

  --max-w: 1100px;
  --max-w-narrow: 720px;
  --max-w-prose: 680px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--f);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================================
   NAV — Barra de navegação superior
   ============================================================= */
.article-nav {
  border-bottom: 0.5px solid var(--c-line);
  padding: 20px 0;
  background: var(--c-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  background: rgba(251, 251, 253, 0.85);
}
.article-nav .wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--c-navy);
}
.nav-brand svg { width: 24px; height: 30px; }
.nav-brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--c-text-soft);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--c-blue); }
.nav-back {
  color: var(--c-blue);
  font-size: 14px;
}
@media (max-width: 640px) {
  .nav-links { gap: 16px; }
  .nav-links a:not(.nav-back) { display: none; }
}

/* =============================================================
   HEADER DO ARTIGO
   ============================================================= */
.article-header {
  padding: 80px 24px 60px;
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  text-align: left;
}
.article-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 13px;
  color: var(--c-text-mute);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.article-meta-tag {
  padding: 4px 10px;
  background: var(--c-bg-alt);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c-blue);
}
.article-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--c-navy);
  margin-bottom: 24px;
}
.article-lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--c-text-soft);
  font-weight: 400;
  max-width: var(--max-w-prose);
  letter-spacing: -0.01em;
}
@media (max-width: 640px) {
  .article-header { padding: 48px 20px 40px; }
  .article-lead { font-size: 18px; }
}

/* =============================================================
   TL;DR — resumo executivo no topo (otimizado para LLM extraction)
   ============================================================= */
.tldr {
  max-width: var(--max-w-narrow);
  margin: 0 auto 60px;
  padding: 28px 32px;
  background: var(--c-bg-alt);
  border-left: 3px solid var(--c-blue);
  border-radius: 8px;
}
.tldr-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.tldr p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  margin-bottom: 12px;
}
.tldr p:last-child { margin-bottom: 0; }
.tldr strong { color: var(--c-navy); font-weight: 600; }
@media (max-width: 640px) {
  .tldr { padding: 24px 22px; margin-bottom: 40px; }
}

/* =============================================================
   PROSA — corpo do artigo
   ============================================================= */
.article-body {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  padding: 0 24px 100px;
}
.article-body h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--c-navy);
  margin: 64px 0 20px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--c-navy);
  margin: 48px 0 16px;
}
.article-body h4 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--c-blue);
  margin: 32px 0 12px;
  text-transform: none;
}
.article-body p {
  margin-bottom: 20px;
  color: var(--c-text-soft);
  font-size: 17px;
  line-height: 1.75;
}
.article-body p strong { color: var(--c-navy); font-weight: 600; }
.article-body a {
  color: var(--c-blue);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
.article-body a:hover { color: var(--c-navy); }
.article-body ul,
.article-body ol {
  margin: 0 0 20px 24px;
  color: var(--c-text-soft);
  font-size: 17px;
  line-height: 1.75;
}
.article-body li { margin-bottom: 8px; }
.article-body li strong { color: var(--c-navy); font-weight: 600; }

/* Citação em destaque */
.article-body blockquote {
  margin: 32px 0;
  padding: 20px 28px;
  border-left: 3px solid var(--c-blue);
  background: var(--c-bg-alt);
  border-radius: 4px;
}
.article-body blockquote p {
  font-size: 18px;
  font-style: italic;
  color: var(--c-navy);
  margin: 0;
  line-height: 1.6;
}

/* Código inline */
.article-body code {
  font-family: var(--f-mono);
  font-size: 0.9em;
  background: var(--c-bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--c-navy);
  border: 0.5px solid var(--c-line);
}

/* Bloco de código */
.article-body pre {
  background: var(--c-navy);
  color: #E2E5EC;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.6;
  border: 0.5px solid var(--c-navy);
}
.article-body pre code {
  background: transparent;
  border: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* Tabela */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
  background: var(--c-card);
  border-radius: 8px;
  overflow: hidden;
  border: 0.5px solid var(--c-line);
}
.article-body th {
  background: var(--c-navy);
  color: #FBFBFD;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.article-body td {
  padding: 12px 16px;
  border-top: 0.5px solid var(--c-line);
  color: var(--c-text-soft);
  vertical-align: top;
}
.article-body td strong { color: var(--c-navy); font-weight: 600; }

/* Callout - box de destaque com título */
.callout {
  margin: 32px 0;
  padding: 24px 28px;
  background: var(--c-bg-alt);
  border-left: 3px solid var(--c-blue);
  border-radius: 4px;
}
.callout-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.callout p {
  font-size: 16px;
  color: var(--c-navy);
  margin: 0;
  line-height: 1.65;
}
.callout p + p { margin-top: 10px; }

/* HR - separador entre seções */
.article-body hr {
  border: none;
  height: 1px;
  background: var(--c-line);
  margin: 48px 0;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

/* =============================================================
   RODAPÉ DO ARTIGO
   ============================================================= */
.article-footer {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 40px 24px 80px;
  border-top: 0.5px solid var(--c-line);
}
.article-footer-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.article-signature {
  font-size: 15px;
  color: var(--c-text-mute);
  line-height: 1.6;
}
.article-signature strong { color: var(--c-navy); font-weight: 600; }

.article-cta {
  margin-top: 48px;
  padding: 32px;
  background: var(--c-navy);
  color: #FBFBFD;
  border-radius: 12px;
  text-align: center;
}
.article-cta h3 {
  color: #FBFBFD;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.article-cta p {
  color: var(--c-blue-light);
  font-size: 15px;
  margin-bottom: 20px;
}
.article-cta a {
  display: inline-block;
  padding: 12px 28px;
  background: var(--c-blue);
  color: #FBFBFD;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.2s var(--ease);
}
.article-cta a:hover { background: #4A79B8; }

/* =============================================================
   ARTIGOS RELACIONADOS (pé de página com link para outros)
   ============================================================= */
.related-articles {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 24px 80px;
}
.related-articles h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.related-list {
  display: grid;
  gap: 16px;
}
.related-item {
  padding: 20px 24px;
  background: var(--c-card);
  border: 0.5px solid var(--c-line);
  border-radius: 8px;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.related-item:hover {
  border-color: var(--c-blue);
  transform: translateY(-1px);
}
.related-item h4 {
  color: var(--c-navy);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.related-item p {
  color: var(--c-text-mute);
  font-size: 14px;
  line-height: 1.5;
}

/* =============================================================
   FOOTER GERAL
   ============================================================= */
.site-footer {
  border-top: 0.5px solid var(--c-line);
  padding: 40px 24px;
  text-align: center;
  color: var(--c-text-mute);
  font-size: 13px;
  background: var(--c-bg-alt);
}
.site-footer a {
  color: var(--c-blue);
  text-decoration: none;
}

/* =============================================================
   INDEX DE ARTIGOS
   ============================================================= */
.index-header {
  padding: 80px 24px 60px;
  max-width: var(--max-w-narrow);
  margin: 0 auto;
}
.index-header .eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-blue);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.index-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--c-navy);
  margin-bottom: 20px;
}
.index-header p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--c-text-soft);
  max-width: var(--max-w-prose);
}

.article-list {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 24px 100px;
  display: grid;
  gap: 24px;
}
.article-card {
  padding: 32px;
  background: var(--c-card);
  border: 0.5px solid var(--c-line);
  border-radius: 12px;
  text-decoration: none;
  display: block;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.article-card:hover {
  border-color: var(--c-blue);
  transform: translateY(-2px);
}
.article-card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--c-text-mute);
  letter-spacing: 0.02em;
}
.article-card h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--c-navy);
  margin-bottom: 12px;
}
.article-card p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text-soft);
  margin-bottom: 16px;
}
.article-card-read {
  font-size: 14px;
  color: var(--c-blue);
  font-weight: 500;
}
@media (max-width: 640px) {
  .article-card { padding: 24px; }
  .article-card h2 { font-size: 19px; }
}
