/* Blog: listagem (/blog/) e modelo de artigo. Usa os tokens e componentes de
   site.css; aqui ficam só as peças próprias do blog. */

/* ---------- Topo navy com corte diagonal na base (espelha o "Quem somos") ---------- */
.blog-hero,
.post__header {
  --cut: clamp(32px, 5vw, 72px);
  position: relative;
  background: var(--navy);
  color: var(--on-ink);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
  padding: clamp(56px, 8vw, 104px) 0 calc(var(--cut) + clamp(48px, 6vw, 80px));
  isolation: isolate;
}

.blog-hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.blog-hero__bg::before {
  content: "";
  position: absolute;
  right: -6%;
  top: -18%;
  width: min(560px, 62vw);
  aspect-ratio: 600 / 528;
  background: url("./logo/icon-white.png") center / contain no-repeat;
  opacity: 0.05;
}

.blog-hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.blog-hero p {
  margin-top: 18px;
  max-width: 46ch;
  font-size: 1.1rem;
  color: var(--on-ink-soft);
}

@media (prefers-reduced-motion: no-preference) {
  .blog-hero h1,
  .blog-hero p,
  .post__header-inner > * {
    animation: rise-in 700ms var(--ease-out) both;
  }

  .blog-hero p,
  .post__header-inner > :nth-child(2) {
    animation-delay: 120ms;
  }

  .post__header-inner > :nth-child(3) {
    animation-delay: 200ms;
  }

  .post__header-inner > :nth-child(4) {
    animation-delay: 280ms;
  }
}

/* ---------- Listagem ---------- */
.blog-list {
  padding-top: clamp(40px, 5vw, 64px);
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 40px;
}

.blog-filters[hidden] {
  display: none;
}

.blog-filter {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color 180ms var(--ease-out), border-color 180ms var(--ease-out),
    background-color 180ms var(--ease-out);
}

.blog-filter:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

.blog-filter[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--on-ink);
}

/* Primeiro artigo em destaque (bloco lavanda largo); os demais em lista
   editorial com filete, não em cards iguais. */
.blog-posts {
  display: grid;
}

.post-card a {
  display: block;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.post-card__tema {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.post-card h3 {
  margin-top: 8px;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.2;
  font-weight: 700;
  max-width: 34ch;
  text-wrap: balance;
  transition: color 180ms var(--ease-out);
}

.post-card__resumo {
  margin-top: 10px;
  max-width: 62ch;
  color: var(--ink-soft);
}

.post-card__meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.post-card__meta i {
  margin-left: auto;
  font-size: 1.2rem;
  color: var(--accent-dark);
  transition: transform 240ms var(--ease-out);
}

.post-card a:hover h3 {
  color: var(--accent-dark);
}

.post-card a:hover .post-card__meta i {
  transform: translateX(4px);
}

.post-card--featured a {
  padding: clamp(28px, 4vw, 48px);
  background: var(--lavanda);
  border-bottom: none;
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: box-shadow 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.post-card--featured h3 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.post-card--featured a:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.blog-filter-empty {
  padding: 32px 0;
  color: var(--ink-soft);
}

.blog-filter-reset {
  font-weight: 600;
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Estado vazio (antes do primeiro artigo) ---------- */
.blog-empty {
  display: grid;
  gap: 40px;
  align-items: start;
}

.blog-empty[hidden] {
  display: none;
}

.blog-empty__text h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 1.12;
  font-weight: 700;
  max-width: 18ch;
  text-wrap: balance;
}

.blog-empty__text p {
  margin-top: 16px;
  max-width: 50ch;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.blog-empty__actions {
  margin-top: 28px;
}

.blog-empty__temas {
  border-top: 1px solid var(--line);
}

.blog-empty__temas li {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.blog-empty__temas i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 1.4rem;
  color: var(--accent-dark);
}

.blog-empty__temas strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .blog-empty__temas li {
    animation: rise-in 600ms var(--ease-out) both;
  }

  .blog-empty__temas li:nth-child(1) { animation-delay: 300ms; }
  .blog-empty__temas li:nth-child(2) { animation-delay: 400ms; }
  .blog-empty__temas li:nth-child(3) { animation-delay: 500ms; }
}

@media (min-width: 900px) {
  .blog-empty {
    grid-template-columns: 1fr 1fr;
    gap: 72px;
  }
}

/* ---------- Faixa de chamada ---------- */
.blog-cta {
  background: var(--lavanda);
  padding: clamp(48px, 6vw, 72px) 0;
}

.blog-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.blog-cta h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
}

/* ---------- Modelo de artigo ---------- */
/* O container segue a largura do site (alinhado ao texto do artigo); só as
   linhas do cabeçalho ficam mais estreitas. */
.post__header-inner > * {
  max-width: 860px;
}

.post__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--on-ink-soft);
  transition: color 160ms var(--ease-out);
}

.post__back:hover {
  color: var(--on-ink);
}

.post__back i {
  transition: transform 220ms var(--ease-out);
}

.post__back:hover i {
  transform: translateX(-3px);
}

.post__tema {
  margin-top: 36px;
  font-weight: 600;
  color: var(--accent-on-ink);
}

.post__header h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.post__meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-size: 0.92rem;
  color: var(--on-ink-soft);
}

.post__layout {
  display: grid;
  gap: 48px;
  padding-block: clamp(40px, 5vw, 64px) clamp(72px, 9vw, 112px);
}

.prose {
  max-width: 68ch;
  font-size: 1.07rem;
  line-height: 1.7;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose .prose__lead {
  font-size: 1.22rem;
  line-height: 1.55;
  color: var(--ink);
}

.prose h2 {
  margin-top: 2em;
  font-size: 1.6rem;
  line-height: 1.2;
}

.prose h3 {
  margin-top: 1.6em;
  font-size: 1.25rem;
  line-height: 1.25;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose strong {
  color: var(--ink);
}

.prose ul,
.prose ol {
  display: grid;
  gap: 10px;
}

.prose ol {
  counter-reset: item;
}

.prose ol > li {
  counter-increment: item;
}

.prose ol > li::before {
  content: counter(item) ".";
  top: 0;
  width: auto;
  height: auto;
  background: none;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-dark);
}

.prose li {
  position: relative;
  padding-left: 28px;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 14px;
  height: 1px;
  background: var(--accent-dark);
}

.prose a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose blockquote {
  margin-inline: 0;
  padding: 28px 32px;
  background: var(--lavanda);
  border-radius: var(--radius);
}

.prose blockquote p {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}

.prose__disclaimer {
  margin-top: 2.4em !important;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.post__aside {
  align-self: start;
  padding: 32px;
  background: var(--navy);
  color: var(--on-ink);
  border-radius: var(--radius);
}

.post__aside-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.post__aside p:not(.post__aside-title) {
  margin-top: 10px;
  color: var(--on-ink-soft);
  font-size: 0.97rem;
}

.post__aside .button {
  margin-top: 24px;
}

@media (min-width: 1024px) {
  .post__layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 72px;
  }

  .post__aside {
    position: sticky;
    top: 100px;
  }
}

/* Cartões dos artigos mais recentes na home (mesmo estilo da listagem) */
.blog-posts--home {
  margin-top: 4rem;
}
