/* ============================================================
   blog.css — camada do blog da Evolv Digital.
   Carregado DEPOIS de evolv.css. Usa só os tokens do design
   system: nenhuma cor, fonte ou raio novo é introduzido aqui.

   O blog não carrega evolv-fx.css nem Anime.js. A única coisa
   que valia a pena de lá era a barra de progresso, portada no
   bloco 1 (6 regras) e movida por blog.js.

   Medidas em rem: acima de 1024px a raiz cai para 90% e valores
   em px não acompanham a escala.
   ============================================================ */

/* ---------- 1. Barra de progresso de leitura ---------- */
.progresso {
  position: fixed; top: 0; left: 0; right: 0; z-index: calc(var(--z-nav) + 1);
  height: 3px; transform: scaleX(0); transform-origin: 0 50%;
  background: var(--grad-azul);
  box-shadow: 0 0 12px -2px var(--azul-glow);
  will-change: transform; pointer-events: none;
}

/* ---------- 2. Cabeçalho das páginas de listagem ---------- */
/* Seção que continua a anterior: o respiro já veio do bloco de cima. */
.section--colada { padding-top: 0; }

.blog-hero { padding-bottom: clamp(2rem, 4vw, 3rem); }
.blog-hero h1 { max-width: 22ch; margin-bottom: 1.2rem; }
.blog-hero .lead { margin-bottom: 0; }
.blog-hero .eyebrow { margin-bottom: 1.4rem; }

/* Trilha de navegação, usada em post e categoria */
.breadcrumb {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted); margin-bottom: 1.6rem;
}
.breadcrumb a { color: var(--muted); transition: color .2s; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb svg { width: 13px; height: 13px; opacity: .5; flex: none; }
/* A página atual não é link: destacar em branco a diferencia dos anteriores. */
.breadcrumb [aria-current] { color: #fff; font-weight: 500; }

/* ---------- 3. Barra de filtros e busca ---------- */
.blog-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem 2rem; flex-wrap: wrap;
  padding-bottom: 1.5rem; margin-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--linha);
}
.blog-filtros { display: flex; gap: .45rem; flex-wrap: wrap; }
.chip {
  font-family: var(--font-body); font-size: .88rem; font-weight: 500;
  color: var(--muted); background: none;
  border: 1px solid transparent; border-radius: var(--r-full);
  padding: .5rem 1.05rem; white-space: nowrap;
  transition: color .25s, background .25s, border-color .25s;
}
.chip:hover { color: #fff; }
.chip[aria-pressed="true"], .chip.is-ativo {
  color: #fff; font-weight: 600;
  background: rgba(26,101,255,.12); border-color: rgba(26,101,255,.4);
}

.blog-busca { position: relative; flex: 0 1 17rem; min-width: 12rem; }
.blog-busca svg {
  position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--muted); pointer-events: none;
}
.blog-busca input {
  width: 100%;
  background: var(--preto-2); border: 1px solid var(--linha-forte); border-radius: var(--r-full);
  padding: .65rem 1rem .65rem 2.6rem;
  color: var(--texto); font-family: inherit; font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
}
.blog-busca input::placeholder { color: var(--muted); }
.blog-busca input:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 3px rgba(26,101,255,.18); }
.blog-busca input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

.blog-contagem { font-size: .82rem; color: var(--muted); margin-bottom: 1.5rem; }

/* No celular a busca sobe para a linha de cima, e os chips passam a rolar
   na horizontal em vez de quebrar em duas linhas. Mesma solução que o
   design system já usa em .tabs__nav. */
@media (max-width: 700px) {
  .blog-toolbar { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 1rem; }
  .blog-busca { order: -1; flex: none; width: 100%; min-width: 0; }
  .blog-filtros {
    flex-wrap: nowrap; overflow-x: auto; max-width: 100%;
    scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch;
  }
  .blog-filtros::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}

/* ---------- 4. Post em destaque ---------- */
.post-destaque {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--linha); border-radius: var(--r-xl);
  overflow: hidden; margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  transition: border-color .25s, box-shadow .25s;
}
.post-destaque:hover { border-color: rgba(79,139,255,.35); box-shadow: var(--sombra); }
.post-destaque__midia { position: relative; overflow: hidden; background: var(--surface-2); }
.post-destaque__midia img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/11; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.post-destaque:hover .post-destaque__midia img { transform: scale(1.03); }
.post-destaque__selo {
  position: absolute; top: 1.1rem; left: 1.1rem; z-index: 1;
  font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: var(--grad-azul);
  padding: .35rem .8rem; border-radius: var(--r-full);
  box-shadow: 0 8px 22px -8px var(--azul-glow);
}
.post-destaque__corpo {
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  display: flex; flex-direction: column; justify-content: center; gap: 1rem;
}
.post-destaque__corpo h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.2; }
.post-destaque__corpo p { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.post-destaque .btn { align-self: flex-start; margin-top: .5rem; }
@media (max-width: 900px) {
  .post-destaque { grid-template-columns: 1fr; }
  .post-destaque__midia img { aspect-ratio: 16/9; }
}

/* ---------- 5. Cards do grid (extensões do .post) ---------- */
.post__midia { position: relative; overflow: hidden; }
.post__midia img { aspect-ratio: 16/10; object-fit: cover; width: 100%; background: var(--surface-2); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.post:hover .post__midia img { transform: scale(1.04); }
.post__meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .72rem; color: var(--muted); }
.post__meta .post__cat { font-size: .72rem; }
.post__meta .sep { opacity: .5; }
.post__body h3 { line-height: 1.3; letter-spacing: -.01em; }
.post__titulo {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  line-clamp: 3; overflow: hidden;
}
.post__resumo {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  line-clamp: 3; overflow: hidden;
}
/* Em coluna única o card ocupa a largura toda, então o corte do resumo
   deixa de ser necessário para alinhar as alturas. */
@media (max-width: 600px) {
  .post__titulo, .post__resumo { -webkit-line-clamp: none; line-clamp: none; display: block; }
}
.post__more { display: inline-flex; align-items: center; gap: .4rem; padding-top: .4rem; }
.post__more svg { width: 14px; height: 14px; transition: transform .25s; }
.post:hover .post__more svg { transform: translateX(3px); }
.post[hidden] { display: none; }

/* Estado sem resultado de busca */
.blog-vazio {
  border: 1px dashed var(--linha-forte); border-radius: var(--r-lg);
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem; text-align: center;
  background: rgba(255,255,255,.02);
}
.blog-vazio h3 { font-size: 1.15rem; margin-bottom: .6rem; }
.blog-vazio p { color: var(--muted); font-size: .95rem; max-width: 42ch; margin-inline: auto; }
.blog-vazio .btn { margin-top: 1.5rem; }

/* ---------- 6. Cabeçalho do artigo ---------- */
.artigo-hero { padding-bottom: clamp(2rem, 4vw, 3rem); }
.artigo-hero .hero__inner { max-width: 800px; }
.artigo-hero h1 { max-width: none; font-size: clamp(1.9rem, 3.8vw, 3rem); line-height: 1.14; }
.artigo__meta {
  display: flex; align-items: center; justify-content: center;
  gap: .6rem; flex-wrap: wrap;
  margin-top: 1.5rem; font-size: .86rem; color: var(--muted);
}
.artigo__meta a { color: var(--azul-claro); font-weight: 600; transition: color .2s; }
.artigo__meta a:hover { color: #fff; }
.artigo__meta .sep { opacity: .45; }
.artigo__meta time { color: var(--muted); }

/* 64rem = as duas colunas do layout de leitura mais o vão entre elas,
   então a capa termina exatamente onde termina o texto. */
.artigo__capa {
  border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--linha); box-shadow: var(--sombra);
  max-width: 64rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}
.artigo__capa img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

/* ---------- 7. Layout de leitura: índice + corpo ---------- */
.artigo__layout {
  display: grid; grid-template-columns: 15rem minmax(0, 45rem);
  gap: clamp(2rem, 5vw, 4.5rem); justify-content: center; align-items: start;
}
@media (max-width: 1100px) {
  .artigo__layout { grid-template-columns: minmax(0, 45rem); justify-content: center; }
}

/* Índice do artigo */
.indice {
  position: sticky; top: calc(var(--nav-h) + 2rem);
  background: var(--surface); border: 1px solid var(--linha); border-radius: var(--r-lg);
  padding: 1.4rem 1.5rem;
}
.indice summary { display: none; }
.indice__titulo {
  font-family: var(--font-body); font-size: .7rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 1rem;
}
.indice ol { list-style: none; counter-reset: indice; display: grid; gap: .1rem; margin: 0; padding: 0; }
.indice li { counter-increment: indice; }
.indice__link {
  display: flex; gap: .55rem;
  padding: .45rem .6rem; border-radius: 8px; margin-left: -.6rem;
  color: var(--muted); font-size: .88rem; line-height: 1.45;
  border-left: 2px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
}
.indice__link::before {
  content: counter(indice); color: var(--muted); font-variant-numeric: tabular-nums;
  font-size: .78rem; flex: none; padding-top: .1rem; transition: color .2s;
}
.indice__link:hover { color: #fff; background: rgba(255,255,255,.03); }
.indice__link.is-ativo {
  color: #fff; font-weight: 600;
  background: rgba(26,101,255,.1); border-left-color: var(--azul);
}
.indice__link.is-ativo::before { color: var(--azul-claro); }

/* Abaixo de 1100px o índice vira um bloco recolhível acima do texto */
@media (max-width: 1100px) {
  .indice { position: static; order: -1; margin-bottom: 2.5rem; padding: 0; }
  .indice > ol { padding: 0 1.5rem 1.4rem; }
  .indice__titulo { display: none; }
  .indice summary {
    display: flex; list-style: none; cursor: pointer;
    align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.1rem 1.5rem;
    font-family: var(--font-display); font-weight: 600; font-size: .98rem; color: #fff;
  }
  .indice summary::-webkit-details-marker { display: none; }
  .indice summary svg { width: 20px; height: 20px; color: var(--azul-claro); transition: transform .3s; flex: none; }
  .indice[open] summary svg { transform: rotate(45deg); }
}

/* ---------- 8. Corpo do artigo (prose) ----------
   Base herdada de legal.css, com corpo mais claro e maior:
   documento jurídico se consulta, artigo se lê inteiro. */
.prose { max-width: 45rem; }
.prose h2 {
  font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  line-height: 1.25; color: #fff; letter-spacing: -.02em;
  margin-top: 3.25rem; margin-bottom: 1.1rem;
  scroll-margin-top: calc(var(--nav-h) + 1.75rem);
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: 1.12rem; color: #fff; letter-spacing: -.01em;
  margin-top: 2.25rem; margin-bottom: .7rem;
  scroll-margin-top: calc(var(--nav-h) + 1.75rem);
}
.prose p, .prose li { color: var(--texto); font-size: 1.05rem; line-height: 1.8; }
.prose p { margin-bottom: 1.3rem; }
.prose > p:first-of-type { font-size: 1.15rem; color: #fff; line-height: 1.7; }
.prose strong { color: #fff; font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.6rem 1.25rem; display: grid; gap: .7rem; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--azul-claro); }
.prose li > ul, .prose li > ol { margin-top: .7rem; margin-bottom: 0; }
/* :not(.btn) porque os botões dentro do artigo (CTA) têm cor e fundo
   próprios: sem isso o estilo de link venceria por especificidade. */
.prose a:not(.btn) { color: var(--azul-claro); text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
.prose a:not(.btn):hover { color: #fff; }
.prose img { border-radius: var(--r-lg); border: 1px solid var(--linha); margin: 2rem 0; }
.prose figure { margin: 2rem 0; }
.prose figure img { margin: 0; }
.prose figcaption { color: var(--muted); font-size: .84rem; margin-top: .8rem; text-align: center; }
.prose hr { height: 1px; background: var(--linha); border: 0; margin: 3rem 0; }

.prose blockquote {
  border-left: 3px solid var(--azul);
  background: rgba(26,101,255,.05);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 1.3rem 1.6rem; margin: 2rem 0;
}
.prose blockquote p { margin-bottom: 0; color: #fff; font-size: 1.08rem; line-height: 1.7; }
.prose blockquote cite { display: block; margin-top: .8rem; color: var(--muted); font-size: .88rem; font-style: normal; }

/* Quadro de destaque dentro do texto */
.prose__destaque {
  background: var(--surface); border: 1px solid var(--linha); border-left: 3px solid var(--azul);
  border-radius: var(--r-md); padding: 1.4rem 1.6rem; margin: 2rem 0;
}
.prose__destaque__titulo {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--font-body); font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--azul-claro);
  margin-bottom: .8rem;
}
.prose__destaque__titulo svg { width: 15px; height: 15px; flex: none; }
.prose__destaque p:last-child, .prose__destaque ul:last-child, .prose__destaque ol:last-child { margin-bottom: 0; }

/* Tabela */
.prose table { width: 100%; border-collapse: collapse; margin: 1.8rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--linha); vertical-align: top; }
.prose th { color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.prose td { color: var(--texto); line-height: 1.6; }
.prose td:first-child { color: #fff; }
.prose__tabela { overflow-x: auto; margin: 1.8rem 0; }
.prose__tabela table { margin: 0; }

@media (max-width: 600px) {
  .prose p, .prose li { font-size: 1rem; }
  .prose > p:first-of-type { font-size: 1.08rem; }
  .prose th, .prose td { padding: .7rem .6rem; }
}

/* ---------- 9. CTA de assessoria dentro do artigo ---------- */
.artigo__cta {
  display: grid; grid-template-columns: 1fr 12rem; gap: 0;
  border: 1px solid rgba(26,101,255,.25); border-radius: var(--r-xl);
  background: var(--grad-surface), var(--surface);
  overflow: hidden; margin: clamp(2.5rem, 5vw, 3.5rem) 0;
}
.artigo__cta__corpo { padding: clamp(1.6rem, 3vw, 2.2rem); display: flex; flex-direction: column; gap: .85rem; }
.artigo__cta__corpo h3 { font-size: 1.25rem; line-height: 1.25; }
.artigo__cta__corpo p { color: var(--muted); font-size: .95rem; line-height: 1.65; }
.artigo__cta .btn { align-self: flex-start; margin-top: .3rem; }
.artigo__cta__foto { position: relative; background: var(--surface-2); }
.artigo__cta__foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.artigo__cta__foto::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--surface) 0%, rgba(14,20,32,.35) 45%, transparent 100%);
}
@media (max-width: 700px) {
  .artigo__cta { grid-template-columns: 1fr; }
  .artigo__cta__foto { display: none; }
}

/* ---------- 10. Compartilhar e assinatura ---------- */
.artigo__rodape {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  padding-top: 2rem; margin-top: 2.5rem; border-top: 1px solid var(--linha);
}
.artigo__share { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.artigo__share__label { font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: .3rem; }
.share-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 1px solid var(--linha-forte); border-radius: var(--r-full);
  padding: .5rem 1rem; color: var(--muted); font-size: .85rem; font-weight: 500;
  background: rgba(255,255,255,.02);
  transition: color .2s, border-color .2s, background .2s;
}
.share-btn:hover { color: #fff; border-color: var(--azul); background: rgba(26,101,255,.08); }
.share-btn svg { width: 15px; height: 15px; flex: none; }
.share-btn.is-copiado { color: var(--verde); border-color: rgba(37,211,102,.45); }

.autor { display: flex; align-items: center; gap: .85rem; }
.autor__marca {
  width: 44px; height: 44px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(26,101,255,.12); border: 1px solid rgba(26,101,255,.25);
}
.autor__marca img { height: 20px; width: auto; }
.autor__nome { color: #fff; font-weight: 600; font-size: .92rem; }
.autor__desc { color: var(--muted); font-size: .82rem; }

/* ---------- 11. Posts relacionados ---------- */
.relacionados { border-top: 1px solid var(--linha); }
.relacionados__titulo {
  font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.75rem;
}

/* ---------- 12. Newsletter ---------- */
.newsletter {
  border: 1px solid rgba(26,101,255,.25); border-radius: var(--r-xl);
  padding: clamp(2rem, 5vw, 3.25rem); position: relative; overflow: hidden;
  background: var(--grad-surface), var(--surface);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.75rem, 4vw, 3rem); align-items: center;
}
.newsletter::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 88% 20%, var(--azul-glow), transparent 55%);
}
.newsletter > * { position: relative; }
.newsletter h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.22; margin-bottom: .8rem; }
.newsletter p { color: var(--muted); font-size: .98rem; line-height: 1.7; max-width: 42ch; }
.newsletter__form { display: grid; gap: .8rem; }
.newsletter__form .field input { border-radius: var(--r-full); padding-inline: 1.2rem; }
.newsletter__form .btn { margin-top: .3rem; }
.newsletter__form .form__consent { margin-top: .2rem; }
.newsletter__form .form__status { margin-top: .2rem; }
@media (max-width: 860px) { .newsletter { grid-template-columns: 1fr; } }

/* ---------- 13. Footer do blog (4 colunas) ---------- */
.footer__top--blog { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
@media (max-width: 980px) { .footer__top--blog { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (max-width: 780px) { .footer__top--blog { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__top--blog { grid-template-columns: 1fr; } }
.footer__social { display: flex; gap: .6rem; }
.footer__social a {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  border: 1px solid var(--linha-forte); color: var(--muted);
  transition: color .2s, border-color .2s, background .2s;
}
.footer__social a:hover { color: #fff; border-color: var(--azul); background: rgba(26,101,255,.1); }
.footer__social svg { width: 18px; height: 18px; }

/* ---------- 14. Página 404 ---------- */
.pagina-404 { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.pagina-404__codigo {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 12vw, 7rem);
  line-height: 1; letter-spacing: -.04em;
  background: var(--grad-texto); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 1rem;
}
.pagina-404 h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 1rem; }
.pagina-404 p { color: var(--muted); max-width: 46ch; margin-inline: auto; }
.pagina-404__acoes { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- 15. Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  .progresso { display: none; }
  .post__midia img, .post-destaque__midia img { transition: none; }
  .post:hover .post__midia img, .post-destaque:hover .post-destaque__midia img { transform: none; }
}

/* ---------- 16. Acessibilidade ----------
   O design system usa --muted-2 (#626b80) em rótulos e no rodapé. Sobre o
   fundo do blog isso dá 3.7:1, abaixo do mínimo AA de 4.5:1 para texto
   pequeno. Num site de leitura vale subir para --muted (7.8:1). O token
   original fica intacto: a troca vale só dentro do blog. */
.footer h4,
.footer__bottom,
.footer__legal a { color: var(--muted); }
