/* =========================================================
   BLOG · João Encarnação
   Usa os tokens de styles.css (carregar depois dele).
   ========================================================= */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.post-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; min-width: 0; }
.post-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.post-card:hover .post-cover img, .post-card:hover .cover-ph::before { transform: scale(1.06); }
.cover-ph { position: absolute; inset: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 20px; background: var(--navy); color: var(--cream); }
.cover-ph::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 90% at 90% 10%, rgba(73,1,8,.8), transparent 65%), radial-gradient(50% 60% at 0% 100%, rgba(73,1,8,.25), transparent 70%); transition: transform .9s var(--ease); }
.cover-ph::after { content: ""; position: absolute; right: 18px; top: 18px; width: 50px; aspect-ratio: 900 / 572; background: var(--cream); opacity: .9; -webkit-mask: url("assets/je-glyph.png") center / contain no-repeat; mask: url("assets/je-glyph.png") center / contain no-repeat; }
.cover-ph span { position: relative; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.12; max-width: 85%; }
.cover-ph small { position: relative; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--cream-text); margin-bottom: 8px; }
.post-body { padding-top: 18px; display: grid; gap: 10px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--burgundy); font-weight: 500; }
.post-meta span + span::before { content: "·"; margin-right: 12px; }
.post-title { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2.2vw, 28px); line-height: 1.12; margin: 0; color: var(--navy); text-wrap: balance; }
.post-excerpt { margin: 0; color: var(--navy-text); font-size: 15px; }
.post-more { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--burgundy); margin-top: 4px; }
.post-more svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.post-card:hover .post-more svg { transform: translate(3px, -3px); }
.post-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.post-card.featured .post-cover { aspect-ratio: 16 / 9; }
.post-card.featured .post-title { font-size: clamp(32px, 3.6vw, 46px); }
.post-card.featured .post-excerpt { font-size: 16.5px; }
.blog-foot { margin-top: 48px; display: flex; justify-content: center; }
.posts-empty { grid-column: 1 / -1; border: 1px dashed var(--line-light); padding: 40px 24px; text-align: center; color: var(--navy-text); }

/* Página do blog */
.page-hero { padding-block: calc(var(--header-h) + 72px) 64px; position: relative; isolation: isolate; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(55% 80% at 85% 0%, rgba(73,1,8,.5), transparent 70%), var(--navy); }
.page-hero .title { font-size: clamp(48px, 7.4vw, 96px); }
.page-hero .lead { margin-top: 20px; }
.blog-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 44px; }
.search { position: relative; flex: 0 1 300px; }
.search input { width: 100%; font: inherit; font-size: 14px; font-weight: 400; color: var(--navy); background: transparent; border: 1px solid var(--line-light); border-radius: 2px; padding: 11px 14px 11px 40px; color-scheme: light; }
.search input:focus { outline: 2px solid var(--burgundy); outline-offset: 1px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--burgundy); }

/* Artigo */
.article-hero { padding-top: calc(var(--header-h) + 64px); position: relative; isolation: isolate; }
.article-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(var(--navy) 0 calc(100% - 140px), var(--cream) calc(100% - 140px)); }
.article-hero::after { content: ""; position: absolute; inset: 0 0 140px 0; z-index: -1; background: radial-gradient(55% 80% at 85% 0%, rgba(73,1,8,.5), transparent 70%); }
.crumbs { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--cream-faint); display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.crumbs a { text-decoration: none; color: var(--cream-text); }
.crumbs a:hover { color: var(--cream); }
.article-head { max-width: 900px; }
.article-head h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(42px, 6vw, 78px); line-height: 1.02; margin: 0 0 24px; text-wrap: balance; }
.article-head .standfirst { font-size: clamp(17px, 1.5vw, 19px); color: var(--cream-text); max-width: 62ch; margin: 0 0 30px; }
.byline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 40px; }
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 58% 40%; }
.byline b { display: block; font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.byline span { font-size: 12.5px; color: var(--cream-faint); letter-spacing: .04em; }
.article-cover { position: relative; aspect-ratio: 21 / 9; overflow: hidden; background: var(--navy); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-cover .cover-ph { padding: clamp(20px, 4vw, 40px); }
.article-cover .cover-ph span { font-size: clamp(28px, 4vw, 52px); max-width: 70%; }
.article-cover .cover-ph::after { width: 84px; right: 28px; top: 28px; }
.article-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); padding-block: clamp(48px, 7vw, 88px); }
.share { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: grid; gap: 10px; }
.share p { margin: 0 0 4px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--burgundy); font-weight: 600; }
.share .btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share a, .share button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line-light); background: transparent; color: var(--burgundy); cursor: pointer; transition: background .25s, color .25s; border-radius: 2px; }
.share a:hover, .share button:hover { background: var(--burgundy); color: var(--cream); }
.share svg { width: 17px; height: 17px; }
.prose { max-width: 68ch; font-size: 17.5px; line-height: 1.75; font-weight: 400; color: rgba(4, 4, 16, 0.86); min-width: 0; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin-bottom: 0; }
.prose h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 2.8vw, 38px); line-height: 1.1; color: var(--burgundy); margin: 1.7em 0 0; }
.prose h3 { font-weight: 700; font-size: 14.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); margin: 1.6em 0 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 0; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--burgundy); font-weight: 700; }
.prose strong { font-weight: 700; color: var(--navy); }
.prose a { color: var(--burgundy); text-underline-offset: 3px; }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 26px; border-left: 2px solid var(--burgundy); font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(25px, 2.4vw, 31px); line-height: 1.28; color: var(--burgundy); }
.prose blockquote p { margin: 0; }
.prose hr { border: 0; height: 1px; background: var(--line-light); margin: 2.2em 0; }
.author-box { margin-top: 56px; display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 20px; align-items: center; padding: 24px; background: var(--burgundy); color: var(--cream); max-width: 68ch; }
.author-box img { width: 88px; height: 88px; object-fit: cover; object-position: 58% 40%; }
.author-box b { font-family: var(--serif); font-weight: 500; font-size: 28px; display: block; line-height: 1.05; }
.author-box p { margin: 6px 0 14px; font-size: 14.5px; color: var(--cream-text); }
.not-found { padding-block: 40px; display: grid; gap: 16px; justify-items: start; }

@media (max-width: 1080px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .post-card.featured { grid-template-columns: 1fr; gap: 0; }
  .article-wrap { grid-template-columns: 1fr; }
  .share { position: static; order: 2; }
  .article-cover { aspect-ratio: 16 / 10; }
  .article-cover .cover-ph span { max-width: 85%; }
}
@media (max-width: 620px) {
  .posts { grid-template-columns: 1fr; }
  .search { flex: 1 1 100%; }
  .author-box { grid-template-columns: 64px minmax(0, 1fr); padding: 18px; }
  .author-box img { width: 64px; height: 64px; }
  .prose { font-size: 16.5px; }
}
