/* Blog Ilha — lista (blog/index.html) e artigos (blog/<slug>/index.html).
   Páginas geradas por ferramentas/blog/gerar.py. Reaproveita os cartões
   .article, .chip e .content-* da seção Conteúdo da Home (../style.css). */

/* ---------- Topo da lista ---------- */
.blog-hero {
  position: relative;
  overflow: hidden;
  padding: 190px 0 84px;
  background:
    radial-gradient(ellipse 50% 70% at 85% 10%, rgba(250, 70, 22, 0.22), transparent 70%),
    var(--black);
}
.blog-hero .eyebrow { margin-bottom: 24px; }
.blog-hero h1 {
  max-width: 20ch;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.blog-hero .lead { max-width: 52ch; margin-top: 24px; color: var(--fg-dim); }

/* ---------- Seção clara com a lista (mesma pele de #conteudo da Home) ---------- */
.blog-list {
  padding: 72px 0 112px;
  background: #faf8f4;
  color: #111111;
}
.blog-list h2 { color: #111111; }
.blog-list .content-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  letter-spacing: -0.025em;
  line-height: 1.04;
}

/* Destaque (artigo mais recente). */
.blog-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  overflow: hidden;
  margin-bottom: 48px;
  background: #ffffff;
  border: 1px solid #ebe9e3;
  border-radius: 22px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 2px 8px -4px rgba(17, 17, 17, 0.05);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease;
}
.blog-featured:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(17, 17, 17, 0.04), 0 22px 44px -16px rgba(17, 17, 17, 0.18); }
.blog-featured-media { aspect-ratio: 16 / 10; overflow: hidden; background: #0b0a09; }
.blog-featured-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.blog-featured:hover .blog-featured-media img { transform: scale(1.03); }
.blog-featured-body { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 4vw, 56px); }
.blog-featured h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.blog-featured-body > p:not(.article-meta) { margin-top: 16px; font-size: 1rem; line-height: 1.6; color: #6b6964; }
.blog-featured .article-more { margin-top: 26px; align-self: flex-start; border-top: 0; padding-top: 0; border-bottom: 1px solid #111111; padding-bottom: 2px; }
.blog-featured:hover .article-more span { transform: translateX(3px); }

/* Filtros + busca. */
.blog-tools {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.blog-tools .content-filters { margin-bottom: 24px; }
.blog-search input {
  width: 260px;
  padding: 10px 16px;
  border: 1px solid #e3e0d9;
  border-radius: 999px;
  background: #ffffff;
  font: inherit;
  font-size: 14px;
  color: #111111;
}
.blog-search input::placeholder { color: #8a877f; }
.blog-search input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---------- Artigo ---------- */
.post-hero {
  padding: 180px 0 0;
  background:
    radial-gradient(ellipse 50% 60% at 85% 0%, rgba(250, 70, 22, 0.2), transparent 70%),
    var(--black);
}
.post-hero-inner { max-width: 920px; }
.post-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim2);
}
.post-crumbs a { color: var(--fg-dim); }
.post-crumbs a:hover { color: var(--orange); }
.post-hero .eyebrow { margin-bottom: 18px; }
.post-hero h1 {
  font-size: clamp(2.2rem, 4.8vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.post-lead { max-width: 60ch; margin-top: 24px; font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--fg-dim); }
.post-meta { display: flex; align-items: center; gap: 14px; margin-top: 32px; }
.post-meta img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; box-shadow: 0 0 0 2px var(--orange); }
.post-meta a { display: block; font-weight: 600; color: var(--fg); }
.post-meta a:hover { color: var(--orange-light); }
.post-meta span { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); }
.post-cover { max-width: 1060px; margin-top: 56px; margin-bottom: -120px; position: relative; z-index: 1; }
.post-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
}

.post-wrap { background: #faf8f4; color: #1d1a16; padding: 184px 0 104px; }
.post-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 720px);
  justify-content: center;
  gap: clamp(36px, 6vw, 88px);
}
.post-aside { position: sticky; top: 140px; align-self: start; display: flex; flex-direction: column; gap: 32px; }
.post-toc-title,
.post-share span,
.post-author-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
}
.post-toc ol { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: toc; border-left: 1px solid #e3e0d9; }
.post-toc li { counter-increment: toc; }
.post-toc a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-size: 13.5px;
  line-height: 1.4;
  color: #6b6964;
}
.post-toc a:hover,
.post-toc a.is-current { color: #111111; border-left-color: var(--orange); }
.post-share { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.post-share a,
.post-copy {
  padding: 0;
  font: inherit;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #111111;
  background: none;
  border: 0;
  border-bottom: 1px solid #d9d6ce;
  cursor: pointer;
}
.post-share a:hover,
.post-copy:hover { border-bottom-color: var(--orange); }

/* Tipografia de leitura. */
.post-body { font-size: 1.12rem; line-height: 1.75; color: #2a2621; }
.post-body p,
.post-body li { color: #2a2621; }
.post-body > p,
.post-body > ul,
.post-body > ol,
.post-body > blockquote { margin: 0 0 1.25em; }
.post-body h2 {
  margin: 2.2em 0 0.7em;
  color: #111111;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  scroll-margin-top: 130px;
}
.post-body h2:first-child { margin-top: 0; }
.post-body h3 {
  margin: 1.8em 0 0.5em;
  color: #111111;
  font-size: clamp(1.2rem, 1.7vw, 1.4rem);
  line-height: 1.25;
}
.post-body strong { color: #111111; font-weight: 650; }
.post-body a { color: #111111; text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-body a:hover { color: var(--orange); }
.post-body ul,
.post-body ol { padding-left: 1.3em; }
.post-body ul { list-style: none; padding-left: 0; }
.post-body ul li { position: relative; padding-left: 1.4em; }
.post-body ul li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 7px; height: 7px; border-radius: 2px; background: var(--orange); }
.post-body ol li::marker { font-family: var(--font-mono); font-weight: 600; color: var(--orange); }
.post-body li + li { margin-top: 0.45em; }
.post-body blockquote {
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--orange);
  font-size: 1.25rem;
  font-weight: 600;
  color: #111111;
}
.post-table { margin: 0 0 1.5em; overflow-x: auto; }
.post-table table { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 0.98rem; line-height: 1.5; }
.post-table th,
.post-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid #ebe9e3; }
.post-table th { color: #111111; font-weight: 650; border-bottom: 2px solid var(--orange); }

.post-author {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  margin-top: 64px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #ebe9e3;
  border-radius: 18px;
}
.post-author img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; }
.post-author-name { margin-top: 6px; font-size: 1.2rem; font-weight: 700; }
.post-author-name a { color: #111111; text-decoration: none; }
.post-author-name a:hover { color: var(--orange); }
.post-author-role { margin-bottom: 10px; font-size: 0.92rem; color: var(--orange); }
.post-author p:last-child { font-size: 0.95rem; line-height: 1.6; color: #6b6964; }
.post-author .post-author-label { color: var(--orange); }

.blog-related { padding-top: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 1020px) {
  .post-grid { grid-template-columns: minmax(0, 720px); }
  .post-aside { position: static; order: 2; flex-direction: row; flex-wrap: wrap; justify-content: space-between; padding-top: 32px; border-top: 1px solid #e3e0d9; }
  .post-toc { display: none; }
}
@media (max-width: 920px) {
  .blog-featured { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .blog-hero { padding: 150px 0 56px; }
  .blog-list { padding: 48px 0 72px; }
  .blog-featured { margin-bottom: 32px; }
  .blog-tools { flex-direction: column; align-items: stretch; }
  .blog-tools .content-filters { margin-bottom: 0; }
  .blog-search input { width: 100%; }
  .post-hero { padding-top: 150px; }
  .post-cover { margin-top: 36px; margin-bottom: -64px; }
  .post-cover img { border-radius: 16px; }
  .post-wrap { padding: 104px 0 72px; }
  .post-body { font-size: 1.04rem; }
  .post-author { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 20px; }
  .post-author img { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .blog-featured, .blog-featured-media img, .article-more span { transition: none; }
  .blog-featured:hover { transform: none; }
}
