/* ====================================================================
   conteudo.css — Página /conteudo (índice + artigos individuais).
   Tokens em colors_and_type.css; primitives em site.css.
   ==================================================================== */

/* ===== Display headings (Inter Display) ===== */
.conteudo-hero h1,
.conteudo-section h2,
.article-page h1,
.article-page h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.08;
  color: var(--fg-strong);
  text-wrap: balance;
  margin: 0;
}

.conteudo-hero h1 .accent { color: var(--brand-500); font-weight: 700; }

/* ====================================================================
   ÍNDICE — HERO
   ==================================================================== */
.conteudo-hero {
  padding: 88px 0 56px;
  background: var(--bg-canvas);
}
.conteudo-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-600);
  margin-bottom: 20px;
}
.conteudo-hero .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-500);
}
.conteudo-hero h1 {
  font-size: var(--t-display-xl);
  max-width: 18ch;
}
.conteudo-hero .lede {
  margin-top: 22px;
  max-width: 620px;
  font-size: var(--t-lede);
  line-height: 1.55;
  color: var(--fg-muted);
}

/* ====================================================================
   ÍNDICE — FILTRO POR PILAR
   ==================================================================== */
.conteudo-filter {
  padding: 16px 0 24px;
  background: var(--bg-canvas);
  position: sticky;
  top: 80px;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background: rgba(250, 251, 252, 0.86);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.conteudo-filter.is-stuck { border-bottom-color: var(--border-subtle); }
.conteudo-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-default);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 150ms, background 150ms, border-color 150ms, transform 150ms;
}
.pill:hover {
  background: var(--bg-hover);
  color: var(--fg-strong);
  border-color: var(--border-default);
}
.pill[aria-pressed="true"] {
  background: var(--brand-500);
  border-color: var(--brand-500);
  color: var(--white);
}
.pill .pill-count {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-subtle);
}
.pill[aria-pressed="true"] .pill-count { color: rgba(255, 255, 255, 0.78); }

/* ====================================================================
   ÍNDICE — GRID DE ARTIGOS
   ==================================================================== */
.conteudo-grid-section {
  padding: 24px 0 96px;
  background: var(--bg-canvas);
}
.conteudo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 1080px) { .conteudo-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .conteudo-grid { grid-template-columns: 1fr; gap: 20px; } }

/* Featured (first card spans 2 cols on wide) */
.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms;
}
.article-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-default);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02), 0 18px 36px -22px rgba(16, 24, 40, 0.18);
}
.article-card.is-featured {
  grid-column: span 2;
  flex-direction: row;
  min-height: 280px;
}
@media (max-width: 1080px) {
  .article-card.is-featured { grid-column: span 2; flex-direction: column; min-height: 0; }
}
@media (max-width: 720px) {
  .article-card.is-featured { grid-column: span 1; }
}

.article-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--neutral-100);
  overflow: hidden;
}
.article-card.is-featured .article-card-cover {
  flex: 1.1;
  aspect-ratio: auto;
  min-height: 100%;
}
.article-card-cover .cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease-out);
}
.article-card:hover .cover-img {
  transform: scale(1.04);
}
.article-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 24, 31, 0) 40%, rgba(20, 24, 31, 0.18) 100%);
  pointer-events: none;
}
.article-card-cover .cover-pillar-tag {
  position: absolute;
  left: 18px;
  top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-pill);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(20, 24, 31, 0.12);
}

.article-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.article-card.is-featured .article-card-body {
  flex: 1;
  padding: 32px 36px;
  justify-content: center;
}
.article-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--fg-subtle);
}
.article-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-subtle); }
.article-card h3 {
  font-family: var(--font-display);
  font-size: var(--t-display-xs);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.25;
  color: var(--fg-strong);
  margin: 0;
  text-wrap: balance;
}
.article-card.is-featured h3 {
  font-size: var(--t-display-sm);
  line-height: 1.18;
}
.article-card-excerpt {
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0;
}
.article-card.is-featured .article-card-excerpt { font-size: var(--t-body-lg); }
.article-card-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-600);
  padding-top: 10px;
}
.article-card-link::after {
  content: "→";
  transition: transform 200ms var(--ease-out);
}
.article-card:hover .article-card-link::after { transform: translateX(3px); }

/* Empty state when filter has no matches */
.conteudo-empty {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  background: var(--white);
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-xl);
  color: var(--fg-muted);
}

/* ====================================================================
   ÍNDICE — NEWSLETTER
   ==================================================================== */
.conteudo-newsletter {
  padding: 80px 0 96px;
  background: var(--bg-canvas);
  border-top: 1px solid var(--border-subtle);
}
.newsletter-card {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F8FE 100%);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-2xl);
  box-shadow: 0 1px 0 rgba(58, 130, 246, 0.04), 0 18px 36px -22px rgba(58, 130, 246, 0.16);
}
.newsletter-card h3 {
  font-family: var(--font-display);
  font-size: var(--t-display-sm);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.2;
  color: var(--fg-strong);
  margin: 0 0 12px;
  text-wrap: balance;
}
.newsletter-card p {
  font-size: var(--t-body-lg);
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0 auto 24px;
  max-width: 48ch;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 460px;
  margin: 0 auto;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  font: inherit;
  font-size: 14.5px;
  color: var(--fg-default);
  background: var(--white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.newsletter-form input[type="email"]:focus {
  border-color: var(--brand-500);
  box-shadow: var(--shadow-ring-brand);
}
.newsletter-form .btn { white-space: nowrap; }
.newsletter-disclaimer {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--fg-subtle);
}
@media (max-width: 540px) {
  .newsletter-form { flex-direction: column; }
}

/* ====================================================================
   ARTIGO INDIVIDUAL
   ==================================================================== */
.article-page {
  background: var(--bg-canvas);
}
.article-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border-subtle);
}
.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-subtle);
  margin-bottom: 24px;
}
.article-breadcrumb a {
  color: var(--fg-muted);
  transition: color 150ms;
}
.article-breadcrumb a:hover { color: var(--brand-600); }
.article-breadcrumb .sep { color: var(--fg-disabled); }

.article-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.article-header h1 {
  font-size: var(--t-display-lg);
  max-width: 22ch;
  margin: 0 0 20px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--fg-muted);
}
.article-meta .author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--fg-default);
}
.article-meta .author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-400) 0%, var(--brand-700) 100%);
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--fg-subtle); }

/* ===== Article body layout (sidebar TOC + content) ===== */
.article-body-section {
  padding: 56px 0 96px;
}
.article-body-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
@media (max-width: 920px) {
  .article-body-grid { grid-template-columns: 1fr; gap: 32px; }
}

.article-toc {
  position: sticky;
  top: 112px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 8px;
}
@media (max-width: 920px) { .article-toc { position: static; max-height: none; } }
.article-toc-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-bottom: 12px;
}
.article-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid var(--border-subtle);
}
.article-toc a {
  display: block;
  padding: 6px 12px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--fg-muted);
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 150ms, border-color 150ms;
}
.article-toc a:hover { color: var(--fg-strong); }
.article-toc a.active {
  color: var(--brand-600);
  border-left-color: var(--brand-500);
  font-weight: 500;
}

/* ===== Article content typography ===== */
.article-content {
  max-width: 70ch;
  font-size: var(--t-body-lg);
  line-height: 1.7;
  color: var(--fg-default);
}
.article-content > * + * { margin-top: 1.1em; }
.article-content .lede {
  font-family: var(--font-display);
  font-size: var(--t-display-xs);
  font-weight: 500;
  line-height: 1.5;
  color: var(--fg-strong);
  text-wrap: balance;
}
.article-content h2 {
  font-family: var(--font-display);
  font-size: var(--t-display-sm);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.2;
  color: var(--fg-strong);
  margin-top: 2.2em;
  margin-bottom: 0.6em;
  scroll-margin-top: 120px;
  text-wrap: balance;
}
.article-content h3 {
  font-family: var(--font-display);
  font-size: var(--t-display-xs);
  font-weight: 600;
  letter-spacing: -0.008em;
  line-height: 1.3;
  color: var(--fg-strong);
  margin-top: 1.8em;
  margin-bottom: 0.4em;
  scroll-margin-top: 120px;
}
.article-content p { margin: 0; }
.article-content strong { color: var(--fg-strong); font-weight: 600; }
.article-content em { font-style: italic; }
.article-content a {
  color: var(--brand-600);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(58, 130, 246, 0.32);
  text-underline-offset: 3px;
  transition: text-decoration-color 150ms;
}
.article-content a:hover { text-decoration-color: var(--brand-600); }
.article-content ul,
.article-content ol {
  padding-left: 1.4em;
  margin: 1em 0;
}
.article-content ul li,
.article-content ol li { margin: 0.4em 0; }
.article-content ul li::marker { color: var(--brand-500); }

.article-content blockquote {
  border-left: 3px solid var(--brand-500);
  background: linear-gradient(180deg, var(--brand-50) 0%, transparent 100%);
  padding: 18px 22px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.5;
  color: var(--fg-strong);
  margin: 1.6em 0;
}

.article-content .callout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 22px;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin: 1.6em 0;
}
.article-content .callout::before {
  content: "→";
  font-weight: 700;
  color: var(--brand-500);
  font-size: 18px;
  line-height: 1.4;
}
.article-content .callout p { font-size: 15.5px; color: var(--fg-default); }

.article-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 1.6em 0;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.article-content th,
.article-content td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.article-content th {
  background: var(--bg-surface-2);
  font-weight: 600;
  color: var(--fg-strong);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.article-content tr:last-child td { border-bottom: 0; }

.article-content figure { margin: 1.8em 0; }
.article-content figure img,
.article-content figure picture {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}
.article-content figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--fg-subtle);
  text-align: center;
}

/* ===== Mid-article CTA + post-article CTA ===== */
.article-cta-block {
  margin: 2.4em 0;
  padding: 28px 30px;
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-800) 100%);
  border-radius: var(--radius-xl);
  color: var(--white);
}
.article-cta-block h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--white);
}
.article-cta-block p {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  margin: 0 0 18px;
}
.article-cta-block .btn {
  background: var(--white);
  color: var(--brand-700);
  border: none;
}
.article-cta-block .btn:hover { background: rgba(255, 255, 255, 0.92); }

/* ===== Author bio ===== */
.article-author-bio {
  margin-top: 64px;
  padding: 28px 30px;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
}
.article-author-bio .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-400) 0%, var(--brand-700) 100%);
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 18px;
  font-weight: 700;
}
.article-author-bio .name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--fg-strong);
  margin: 0 0 4px;
}
.article-author-bio .role { font-size: 13px; color: var(--fg-subtle); margin: 0 0 10px; }
.article-author-bio .bio { font-size: 14.5px; color: var(--fg-muted); margin: 0; line-height: 1.55; }

/* ===== Related articles ===== */
.article-related {
  padding: 64px 0 96px;
  background: var(--bg-canvas);
  border-top: 1px solid var(--border-subtle);
}
.article-related h2 {
  font-family: var(--font-display);
  font-size: var(--t-display-sm);
  font-weight: 700;
  letter-spacing: -0.012em;
  margin: 0 0 28px;
  color: var(--fg-strong);
}
.article-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 1080px) { .article-related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px)  { .article-related-grid { grid-template-columns: 1fr; } }

/* ====================================================================
   Reveal-on-scroll baseline
   ==================================================================== */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ====================================================================
   MOBILE — Conteúdo (índice + artigo)
   ==================================================================== */
@media (max-width: 860px) {
  .conteudo-hero { padding: 56px 0 32px; }
  .conteudo-hero h1 { font-size: clamp(32px, 8vw, 48px); }
  .conteudo-hero .lede { font-size: 16px; margin-top: 16px; }

  .conteudo-filter { padding: 12px 0 16px; top: 64px; }
  .conteudo-filter-row { gap: 6px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .conteudo-filter-row::-webkit-scrollbar { display: none; }
  .conteudo-filter-row .pill { flex-shrink: 0; }

  .conteudo-grid-section { padding: 16px 0 64px; }
  .conteudo-grid { gap: 18px; }
  .article-card-body { padding: 18px 20px 20px; }
  .article-card.is-featured .article-card-body { padding: 22px 22px; }
  .article-card.is-featured h3 { font-size: clamp(20px, 5vw, 26px); }

  .conteudo-newsletter { padding: 56px 0 64px; }
  .newsletter-card { padding: 32px 22px; }
  .newsletter-card h3 { font-size: clamp(22px, 5.4vw, 28px); }

  .article-header { padding: 40px 0 28px; }
  .article-header h1 { font-size: clamp(28px, 7vw, 40px); margin: 0 0 16px; }
  .article-eyebrow { margin-bottom: 14px; }
  .article-meta { gap: 10px; font-size: 13px; }

  .article-body-section { padding: 36px 0 64px; }
  .article-toc { display: none; }
  .article-content { font-size: 16px; line-height: 1.65; }
  .article-content .lede { font-size: 18px; }
  .article-content h2 { font-size: clamp(22px, 5.4vw, 28px); margin-top: 1.6em; }
  .article-content h3 { font-size: 19px; margin-top: 1.4em; }
  .article-content blockquote { padding: 14px 18px; font-size: 17px; }
  .article-cta-block { padding: 22px 22px; }
  .article-cta-block h4 { font-size: 19px; }
  .article-author-bio { padding: 22px; gap: 14px; }
  .article-author-bio .avatar { width: 48px; height: 48px; font-size: 16px; }

  .article-related { padding: 48px 0 64px; }
}

@media (max-width: 480px) {
  .article-card-body { padding: 16px 18px 18px; }
  .article-card.is-featured .article-card-body { padding: 18px 18px; }
  .newsletter-card { padding: 28px 18px; border-radius: 18px; }
  .article-cta-block { padding: 20px 18px; border-radius: 14px; }
  .article-author-bio { grid-template-columns: 1fr; }
}
