/* ═══════════════════════════════════════════════════════════════════════════
   pensarbem.css — Design system da editora PensarBem
   Paleta derivada da logo (árvore-cérebro): esmeralda, ouro e creme.

   Carregado por base.html e pela home. Só tokens + componentes compartilhados;
   estilos de página continuam em cada template.
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Verdes — do mais escuro (base de mármore) ao mais claro (folha) */
  --pb-ink:        #0B1F18;   /* texto forte, quase preto esverdeado */
  --pb-deep:       #0F3328;   /* fundos escuros */
  --pb-forest:     #14513B;   /* superfícies escuras alternativas */
  --pb-emerald:    #1E7A57;   /* verde de ação */
  --pb-leaf:       #2E9B6F;   /* hover / destaque */
  --pb-mint:       #E7F1EC;   /* wash claro */

  /* Ouro — dos filetes da escultura */
  --pb-gold:       #C9A227;
  --pb-gold-dk:    #816415;   /* escurecido: 4.9:1 sobre creme-alt (WCAG AA) */
  --pb-gold-lt:    #EBD79A;
  --pb-gold-wash:  #FBF5E4;

  /* Neutros quentes */
  --pb-cream:      #FBFAF6;
  --pb-cream-alt:  #F3F1E9;
  --pb-paper:      #FFFFFF;
  --pb-text:       #17241F;
  --pb-muted:      #5C6B64;
  --pb-line:       #E2E0D6;

  /* Semânticos usados pelos componentes */
  --pb-bg:         var(--pb-cream);
  --pb-accent:     var(--pb-emerald);
  --pb-accent-dk:  #15603F;

  --pb-radius:     12px;
  --pb-radius-lg:  18px;
  --pb-shadow:     0 2px 8px rgba(11,31,24,.05), 0 12px 32px rgba(11,31,24,.07);
  --pb-shadow-lg:  0 8px 24px rgba(11,31,24,.10), 0 24px 60px rgba(11,31,24,.12);

  --pb-serif:      'Playfair Display', Georgia, 'Times New Roman', serif;
  --pb-sans:       'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pb-maxw:       1140px;
}

/* ── Utilitários de layout ────────────────────────────────────────────────── */

.pb-wrap { max-width: var(--pb-maxw); margin: 0 auto; padding: 0 1.5rem; }

.pb-kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--pb-sans);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--pb-gold-dk);
}
.pb-kicker::before {
  content: ""; width: 28px; height: 1px; background: var(--pb-gold);
}

.pb-section-title {
  font-family: var(--pb-serif);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--pb-ink);
  font-weight: 600;
  margin: .7rem 0 1rem;
}

.pb-lede {
  font-family: var(--pb-sans);
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--pb-muted);
  max-width: 62ch;
}

/* ── Botões ───────────────────────────────────────────────────────────────── */

.pb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--pb-sans);
  font-size: .95rem; font-weight: 600;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  line-height: 1;
}
.pb-btn:hover { text-decoration: none; transform: translateY(-1px); }

.pb-btn--primary {
  background: var(--pb-emerald);
  color: #fff;
  box-shadow: 0 6px 18px rgba(30,122,87,.28);
}
.pb-btn--primary:hover { background: var(--pb-accent-dk); color: #fff; }

.pb-btn--gold {
  background: var(--pb-gold);
  color: var(--pb-ink);
  box-shadow: 0 6px 18px rgba(201,162,39,.30);
}
.pb-btn--gold:hover { background: #B8912E; color: var(--pb-ink); }

.pb-btn--ghost {
  background: transparent;
  color: var(--pb-ink);
  border-color: var(--pb-line);
}
.pb-btn--ghost:hover { border-color: var(--pb-emerald); color: var(--pb-emerald); }

/* O ghost tem texto escuro — sobre superfície escura ele some (1.25:1).
   Dentro da faixa de compra inverte sozinho; em qualquer outra seção escura,
   marque o botão com a classe .pb-on-dark. */
.pb-buybar .pb-btn--ghost,
.pb-btn--ghost.pb-on-dark {
  color: var(--pb-cream);
  border-color: rgba(251,250,246,.45);
}
.pb-buybar .pb-btn--ghost:hover,
.pb-btn--ghost.pb-on-dark:hover {
  color: var(--pb-gold-lt);
  border-color: var(--pb-gold-lt);
}

.pb-btn--sm { padding: .6rem 1.1rem; font-size: .85rem; }

/* ── Marca ────────────────────────────────────────────────────────────────── */

.pb-brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.pb-brand:hover { text-decoration: none; }
.pb-brand-mark {
  width: 40px; height: 40px; object-fit: contain; flex: none;
  /* a logo vem com fundo branco: o blend some com ele sobre creme/escuro */
  mix-blend-mode: multiply;
}
.pb-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.pb-brand-name {
  font-family: var(--pb-serif); font-size: 1.15rem; font-weight: 600;
  color: var(--pb-ink); letter-spacing: .01em;
}
.pb-brand-sub {
  font-family: var(--pb-sans); font-size: .62rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--pb-gold-dk);
}

/* Sobre fundo escuro o multiply não serve — inverte para screen */
.pb-on-dark .pb-brand-mark { mix-blend-mode: screen; }
.pb-on-dark .pb-brand-name { color: var(--pb-cream); }
.pb-on-dark .pb-brand-sub  { color: var(--pb-gold-lt); }

/* ── Edições (grade de idiomas) ───────────────────────────────────────────── */

.pb-editions-tabs {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin: 1.6rem 0 2rem;
}
.pb-tab {
  font-family: var(--pb-sans); font-size: .85rem; font-weight: 600;
  padding: .5rem 1rem; border-radius: 999px;
  border: 1px solid var(--pb-line);
  background: var(--pb-paper); color: var(--pb-muted);
  cursor: pointer; transition: all .15s ease;
}
.pb-tab:hover { border-color: var(--pb-leaf); color: var(--pb-emerald); }
.pb-tab[aria-selected="true"] {
  background: var(--pb-emerald); border-color: var(--pb-emerald); color: #fff;
}

.pb-editions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.6rem;
}

.pb-edition {
  display: flex; flex-direction: column;
  text-decoration: none;
  border-radius: var(--pb-radius);
  transition: transform .18s ease;
}
.pb-edition:hover { text-decoration: none; transform: translateY(-4px); }

.pb-edition-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: var(--pb-cream-alt);
  box-shadow: var(--pb-shadow);
  display: flex; align-items: center; justify-content: center;
}
.pb-edition-cover img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.pb-edition:hover .pb-edition-cover { box-shadow: var(--pb-shadow-lg); }

/* Capa ausente (ex.: alemão) — placeholder honesto, não capa de outro idioma */
.pb-edition-cover--empty {
  flex-direction: column; gap: .4rem; padding: 1rem;
  border: 1px dashed var(--pb-line);
  text-align: center;
}
.pb-edition-cover--empty .pb-edition-ph-title {
  font-family: var(--pb-serif); font-size: 1.05rem; color: var(--pb-ink); line-height: 1.2;
}
.pb-edition-cover--empty .pb-edition-ph-sub {
  font-family: var(--pb-sans); font-size: .7rem; color: var(--pb-muted);
}

.pb-edition-meta { padding-top: .8rem; }
.pb-edition-lang {
  font-family: var(--pb-sans); font-size: .68rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--pb-gold-dk);
}
.pb-edition-title {
  font-family: var(--pb-serif); font-size: 1.02rem; color: var(--pb-ink);
  margin-top: .2rem; line-height: 1.25;
}
.pb-edition-store {
  font-family: var(--pb-sans); font-size: .78rem; color: var(--pb-muted);
  margin-top: .3rem; display: inline-flex; align-items: center; gap: .3rem;
}
.pb-edition:hover .pb-edition-store { color: var(--pb-emerald); }

/* ── Cards de post ────────────────────────────────────────────────────────── */

.pb-posts { display: grid; gap: 1px; background: var(--pb-line); border-block: 1px solid var(--pb-line); }

.pb-post-card {
  display: block; padding: 1.7rem 0; background: var(--pb-bg);
  text-decoration: none; transition: background .15s ease;
}
.pb-post-card:hover { text-decoration: none; background: var(--pb-paper); }

.pb-post-meta {
  font-family: var(--pb-sans); font-size: .74rem; color: var(--pb-muted);
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
}
.pb-post-tag {
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pb-gold-dk);
}
.pb-post-title {
  font-family: var(--pb-serif); font-size: 1.45rem; line-height: 1.25;
  color: var(--pb-ink); margin: .45rem 0 .5rem; font-weight: 600;
}
.pb-post-card:hover .pb-post-title { color: var(--pb-emerald); }
.pb-post-excerpt {
  font-family: var(--pb-sans); font-size: .95rem; line-height: 1.7;
  color: var(--pb-muted); max-width: 68ch;
}

.pb-empty {
  padding: 3.5rem 0; text-align: center;
  font-family: var(--pb-sans); color: var(--pb-muted);
}

/* ── Corpo de artigo ──────────────────────────────────────────────────────── */

.pb-article { max-width: 68ch; margin: 0 auto; }
.pb-article p {
  font-family: var(--pb-sans); font-size: 1.06rem; line-height: 1.85;
  color: var(--pb-text); margin-bottom: 1.4rem;
}
.pb-article h2 {
  font-family: var(--pb-serif); font-size: 1.6rem; color: var(--pb-ink);
  margin: 2.6rem 0 .9rem; font-weight: 600; line-height: 1.25;
}
.pb-article blockquote {
  margin: 2rem 0; padding: .3rem 0 .3rem 1.5rem;
  border-left: 3px solid var(--pb-gold);
}
.pb-article blockquote p {
  font-family: var(--pb-serif); font-size: 1.22rem; line-height: 1.6;
  color: var(--pb-ink); font-style: italic; margin: 0;
}
.pb-article strong { color: var(--pb-ink); font-weight: 600; }
.pb-article a:not(.pb-btn) { color: var(--pb-emerald); text-decoration: underline; text-underline-offset: 3px; }
/* :not(.pb-btn) é essencial: sem isso a regra repinta os botões da faixa de
   compra dentro do post, deixando texto esmeralda sobre fundo ouro (2.2:1). */

/* ── Faixa de compra ──────────────────────────────────────────────────────── */

.pb-buybar {
  background: var(--pb-deep);
  color: var(--pb-cream);
  border-radius: var(--pb-radius-lg);
  padding: 2.2rem;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 1.4rem; justify-content: space-between;
}
.pb-buybar h3 {
  font-family: var(--pb-serif); font-size: 1.5rem; font-weight: 600;
  color: var(--pb-cream); line-height: 1.25; margin: 0 0 .4rem;
}
.pb-buybar p {
  font-family: var(--pb-sans); font-size: .92rem; color: #B8C9C1; margin: 0; max-width: 52ch;
}
.pb-buybar-actions { display: flex; flex-wrap: wrap; gap: .7rem; }

/* ── Responsivo ───────────────────────────────────────────────────────────── */

@media (max-width: 720px) {
  .pb-editions { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1.1rem; }
  .pb-buybar { padding: 1.6rem; }
  .pb-post-title { font-size: 1.25rem; }
}
