/* ==========================================================================
   Dejavite Construtora — Blog
   Estende os tokens de css/style.css. Não redefine cores/fontes,
   só acrescenta os componentes específicos de listagem e artigo.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Blog hero (index)
   -------------------------------------------------------------------------- */
.blog-hero{
  background:var(--ink);
  padding:6.5rem 1.5rem 4.5rem;
  position:relative;
  background-image:
    linear-gradient(var(--line-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-light) 1px, transparent 1px);
  background-size:48px 48px;
  background-position:center top;
}
.blog-hero__inner{max-width:var(--container);margin:0 auto;}
.blog-hero h1{
  color:var(--white);
  font-size:clamp(2.1rem,4.2vw,3.2rem);
  line-height:1.12;
  max-width:16ch;
  margin-bottom:1.1rem;
}
.blog-hero p{
  color:rgba(255,255,255,.72);
  font-size:1.05rem;
  max-width:56ch;
}

/* --------------------------------------------------------------------------
   Filtro de categorias
   -------------------------------------------------------------------------- */
.cat-filter{
  display:flex;
  flex-wrap:wrap;
  gap:.65rem;
  margin:-2.25rem auto 3.5rem;
  max-width:var(--container);
  padding:0 1.5rem;
  position:relative;
  z-index:2;
}
.cat-pill{
  font-family:var(--font-mono);
  font-size:.74rem;
  letter-spacing:.09em;
  text-transform:uppercase;
  padding:.6rem 1rem;
  border:1px solid var(--line);
  background:var(--paper-card);
  color:var(--steel);
  cursor:pointer;
  transition:color .18s var(--ease), border-color .18s var(--ease), background-color .18s var(--ease);
}
.cat-pill:hover{border-color:var(--ink);color:var(--ink);}
.cat-pill.is-active{background:var(--ink);border-color:var(--ink);color:var(--white);}

/* --------------------------------------------------------------------------
   Post em destaque
   -------------------------------------------------------------------------- */
.post-featured{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  background:var(--paper-card);
  border:1px solid var(--line);
  margin-bottom:4.5rem;
}
.post-featured__media{position:relative;aspect-ratio:5/4;overflow:hidden;background:var(--ink);}
.post-featured__media img{width:100%;height:100%;object-fit:cover;}
.post-featured__badge{
  position:absolute;top:1rem;left:1rem;
  font-family:var(--font-mono);
  font-size:.68rem;letter-spacing:.1em;text-transform:uppercase;
  background:var(--accent);color:var(--white);
  padding:.4rem .65rem;
}
.post-featured__body{padding:2.75rem;display:flex;flex-direction:column;justify-content:center;}
.post-featured__cat{
  font-family:var(--font-mono);font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;
  color:var(--accent);margin-bottom:.9rem;
}
.post-featured__body h2{font-size:clamp(1.4rem,2.4vw,1.85rem);line-height:1.2;margin-bottom:.9rem;}
.post-featured__body p{color:var(--steel);font-size:.98rem;margin-bottom:1.4rem;max-width:48ch;}
.post-featured__link{font-weight:600;font-size:.92rem;color:var(--ink);border-bottom:1px solid var(--ink);padding-bottom:2px;width:fit-content;}
.post-featured__link:hover{color:var(--accent);border-color:var(--accent);}

/* --------------------------------------------------------------------------
   Grade de posts
   -------------------------------------------------------------------------- */
.post-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:2.5rem;
}
.post-card{background:var(--paper-card);border:1px solid var(--line);transition:opacity .2s var(--ease);}
.post-card__media{display:block;position:relative;aspect-ratio:4/3;overflow:hidden;}
.post-card__media img{width:100%;height:100%;object-fit:cover;transition:transform .5s var(--ease);}
.post-card:hover .post-card__media img{transform:scale(1.05);}
.post-card__body{padding:1.6rem;}
.post-card__cat{
  font-family:var(--font-mono);font-size:.7rem;letter-spacing:.09em;text-transform:uppercase;
  color:var(--accent);margin-bottom:.65rem;display:block;
}
.post-card__body h3{font-size:1.12rem;line-height:1.32;margin-bottom:.65rem;}
.post-card__body h3 a{color:var(--ink);}
.post-card:hover .post-card__body h3 a{color:var(--accent);}
.post-card__body p{color:var(--steel);font-size:.9rem;margin-bottom:1.1rem;}
.post-card__meta{
  display:flex;align-items:center;gap:.5rem;
  font-family:var(--font-mono);font-size:.72rem;color:var(--steel-light);
}
.post-card__meta span:nth-child(2){opacity:.6;}

/* --------------------------------------------------------------------------
   Banner CTA embutido na listagem
   -------------------------------------------------------------------------- */
.blog-cta{
  background:var(--ink);
  color:var(--white);
  padding:2.75rem;
  margin:4.5rem 0;
  border:1px solid var(--line-light);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
  flex-wrap:wrap;
}
.blog-cta__text h3{color:var(--white);font-size:1.3rem;margin-bottom:.5rem;}
.blog-cta__text p{color:rgba(255,255,255,.68);font-size:.94rem;max-width:46ch;}
.blog-cta .btn{flex:none;}

/* --------------------------------------------------------------------------
   Hero do artigo
   -------------------------------------------------------------------------- */
.post-hero{
  background:var(--ink);
  padding:5.5rem 1.5rem 3.5rem;
}
.post-hero__inner{max-width:var(--container);margin:0 auto;}
.post-hero__crumb{
  font-family:var(--font-mono);font-size:.76rem;letter-spacing:.05em;
  color:rgba(255,255,255,.5);margin-bottom:1.5rem;
}
.post-hero__crumb a{color:rgba(255,255,255,.75);}
.post-hero__crumb a:hover{color:var(--accent);}
.post-hero h1{
  color:var(--white);
  font-size:clamp(2rem,4vw,2.9rem);
  line-height:1.14;
  max-width:20ch;
  margin-bottom:1.1rem;
}
.post-hero__sub{color:rgba(255,255,255,.72);font-size:1.08rem;max-width:56ch;margin-bottom:2.25rem;}
.post-hero__meta{display:flex;align-items:center;gap:.9rem;flex-wrap:wrap;}
.post-avatar{
  width:38px;height:38px;flex:none;
  border:1px solid var(--accent);
  display:flex;align-items:center;justify-content:center;
  font-family:var(--font-display);font-weight:700;font-size:.8rem;
  color:var(--accent);
}
.post-hero__who{display:flex;flex-direction:column;line-height:1.3;}
.post-hero__name{color:var(--white);font-weight:600;font-size:.9rem;}
.post-hero__role{font-family:var(--font-mono);font-size:.7rem;letter-spacing:.05em;text-transform:uppercase;color:rgba(255,255,255,.45);}
.post-hero__dot{color:rgba(255,255,255,.35);font-family:var(--font-mono);}
.post-hero__when{font-family:var(--font-mono);font-size:.8rem;color:rgba(255,255,255,.6);}

.post-cover{width:100%;aspect-ratio:21/9;overflow:hidden;background:var(--ink);}
.post-cover img{width:100%;height:100%;object-fit:cover;}

/* --------------------------------------------------------------------------
   Layout do artigo (sumário + corpo)
   -------------------------------------------------------------------------- */
.post-layout{
  max-width:var(--container);
  margin:0 auto;
  padding:4.5rem 1.5rem 6rem;
  display:grid;
  grid-template-columns:250px 1fr;
  gap:4rem;
  align-items:start;
}

/* "Trilho de leitura" — eco do cine__rail da home, agora acompanhando o artigo */
.toc{
  position:sticky;
  top:96px;
  border:1px solid var(--line);
  background:var(--paper-card);
  padding:1.5rem 1.4rem;
}
.toc__label{
  display:block;
  font-family:var(--font-mono);font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;
  color:var(--steel-light);margin-bottom:1.1rem;
}
.toc__list{display:flex;flex-direction:column;}
.toc__item{
  display:block;
  padding:.55rem 0 .55rem .9rem;
  border-left:2px solid var(--line);
  font-size:.85rem;
  color:var(--steel);
  transition:color .25s var(--ease), border-color .25s var(--ease);
}
.toc__item:hover{color:var(--ink);}
.toc__item.is-active{color:var(--ink);border-left-color:var(--accent);font-weight:600;}
.toc__num{font-family:var(--font-mono);color:var(--accent);margin-right:.45rem;font-size:.72rem;}

/* Artigo */
.article{max-width:68ch;}
.article > *:first-child{margin-top:0;}
.article p{color:var(--ink-soft);font-size:1.03rem;line-height:1.72;margin-bottom:1.3rem;}
.article h2{
  font-size:clamp(1.35rem,2.4vw,1.65rem);
  line-height:1.24;
  margin:3.25rem 0 1.1rem;
  scroll-margin-top:100px;
}
.article h2::after{content:"";display:block;width:40px;height:3px;background:var(--accent);margin-top:.65rem;}
.article h3{font-family:var(--font-display);font-weight:700;font-size:1.18rem;margin:2.1rem 0 .85rem;color:var(--ink);}
.article ul,.article ol{margin:0 0 1.5rem;padding:0;}
.article li{position:relative;padding-left:1.5rem;margin-bottom:.7rem;color:var(--ink-soft);font-size:1rem;line-height:1.65;}
.article li::before{content:"";position:absolute;left:0;top:.6em;width:7px;height:7px;border:2px solid var(--accent);}
.article li strong{color:var(--ink);}
.article a:not(.btn){color:var(--accent);border-bottom:1px solid rgba(255,73,45,.35);font-weight:600;}
.article a:not(.btn):hover{border-color:var(--accent);}
.article .btn{color:#fff;border-bottom:none;}
.article strong{color:var(--ink);}

.pull-quote{
  background:var(--paper-card);
  border:1px solid var(--line);
  border-left:3px solid var(--accent);
  padding:1.6rem 1.85rem;
  margin:2.75rem 0;
  font-family:var(--font-display);
  font-weight:600;
  font-size:1.15rem;
  line-height:1.42;
  color:var(--ink);
}

.article-cta{
  position:relative;
  background:var(--ink);
  color:var(--white);
  padding:2.25rem;
  margin:3.25rem 0;
  border:1px solid var(--line-light);
}
.article-cta h4{color:var(--white);font-family:var(--font-display);font-size:1.2rem;margin-bottom:.6rem;}
.article-cta p{color:rgba(255,255,255,.72);font-size:.94rem;margin-bottom:1.4rem;max-width:50ch;}

.author-box{
  display:flex;gap:1.4rem;align-items:flex-start;
  border:1px solid var(--line);
  background:var(--paper-card);
  padding:1.85rem;
  margin:4rem 0 0;
}
.author-box .post-avatar{width:52px;height:52px;font-size:1rem;}
.author-box__name{font-family:var(--font-display);font-weight:700;font-size:1.02rem;display:block;margin-bottom:.15rem;}
.author-box__role{font-family:var(--font-mono);font-size:.72rem;letter-spacing:.05em;text-transform:uppercase;color:var(--steel-light);display:block;margin-bottom:.75rem;}
.author-box p{color:var(--steel);font-size:.92rem;margin:0;}
.author-box__social{display:inline-block;margin-top:.75rem;font-family:var(--font-mono);font-size:.76rem;letter-spacing:.03em;font-weight:500;color:var(--accent);}
.author-box__social:hover{text-decoration:underline;}

/* --------------------------------------------------------------------------
   Relacionados
   -------------------------------------------------------------------------- */
.related{max-width:var(--container);margin:0 auto;padding:0 1.5rem 6rem;}
.related__head{margin-bottom:2rem;}
.related__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2.25rem;}

/* --------------------------------------------------------------------------
   Sumário mobile (details nativo, sem JS extra)
   -------------------------------------------------------------------------- */
.toc--mobile{display:none;}

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */
@media (max-width:960px){
  .post-featured{grid-template-columns:1fr;}
  .post-featured__media{aspect-ratio:16/9;}
  .post-grid{grid-template-columns:1fr 1fr;}
  .related__grid{grid-template-columns:1fr 1fr;}
  .post-layout{grid-template-columns:1fr;}
  .toc{display:none;}
  .toc--mobile{
    display:block;
    margin-bottom:2.5rem;
    border:1px solid var(--line);
    background:var(--paper-card);
  }
  .toc--mobile summary{
    padding:1rem 1.25rem;
    font-family:var(--font-mono);
    font-size:.75rem;
    letter-spacing:.1em;
    text-transform:uppercase;
    color:var(--steel);
    cursor:pointer;
    list-style:none;
  }
  .toc--mobile summary::-webkit-details-marker{display:none;}
  .toc--mobile[open] summary{border-bottom:1px solid var(--line);}
  .toc--mobile .toc__list{padding:.5rem 1.25rem 1.1rem;}
}

@media (max-width:720px){
  .post-grid{grid-template-columns:1fr;}
  .related__grid{grid-template-columns:1fr;}
  .post-featured__body{padding:1.85rem;}
  .blog-cta{padding:2rem;flex-direction:column;align-items:flex-start;}
  .cat-filter{margin-top:-1.5rem;}
  .post-hero{padding:4rem 1.25rem 2.75rem;}
  .post-layout{padding:3.5rem 1.25rem 4.5rem;}
  .post-hero__dot{display:none;}
  .post-hero__when{width:100%;margin-top:.35rem;}
}
