/* =====================================================================
   SMAV · REIDI — page.css
   Estilos das PÁGINAS AUTÔNOMAS leves (spokes): setores/<id>.html,
   geracao-distribuida.html e blog/*. Carregado APÓS styles.css, do qual
   herda tokens, .glass, .section, .kicker, .section__title/.grad, .btn e
   todos os blocos .sm-* / .mgd / .sim. Aqui só o que styles.css não cobre.
   Sem WebGL: as spokes não carregam Three.js/scene.js.
   ===================================================================== */

/* ---- nav sólida (spokes não têm JS para alternar .is-scrolled) ---- */
.site-nav--solid {
  background: rgba(8,7,11,.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.spoke-nav {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 2vw, 1.6rem);
}
.spoke-nav__back {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .3s var(--ease);
}
.spoke-nav__back:hover { color: var(--gold-soft); }
@media (max-width: 560px) {
  .spoke-nav__back { display: none; }
}

/* ---- breadcrumb ---- */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1.1rem;
}
.crumb a { color: var(--muted); transition: color .3s var(--ease); }
.crumb a:hover { color: var(--gold-soft); }
.crumb__sep { opacity: .5; }
.crumb__current { color: var(--gold); }

/* ---- hero leve da página (sem WebGL) ---- */
.page-hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--nav-h) + clamp(2.4rem, 7vh, 4.6rem)) var(--gutter) clamp(1.8rem, 4vh, 2.8rem);
  background:
    radial-gradient(120% 150% at 100% 0%, rgba(192,137,15,.10), transparent 55%);
}
.page-hero::after {
  content: "";
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .4;
}
.page-hero .section__title { margin-top: .5rem; }
.page-hero .section__intro { margin-top: 1rem; }

/* ---- corpo do setor (montado por sector-render.js → #sector-content) ---- */
.sector-page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 3.5rem) var(--gutter) var(--rhythm);
}
.sector-page__lead { margin-bottom: clamp(2rem, 5vh, 3rem); }
.sector-page__lead .sm-org {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--gold);
  letter-spacing: .01em;
}
.sector-page__summary {
  font-size: clamp(1.05rem, 1rem + .55vw, 1.32rem);
  line-height: 1.6;
  color: var(--ink);
  max-width: 70ch;
  margin-top: .6rem;
}

/* ---- entrada CSS-only segura: sempre termina visível, sem depender de JS ---- */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.page-anim { animation: pageIn .7s var(--ease) both; }
@media (prefers-reduced-motion: reduce) {
  .page-anim { animation: none; }
}

/* ---- página de Geração Distribuída ---- */
.gd-classifier {
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  margin-top: 1.5rem;
}
.gd-classifier__intro {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: 64ch;
}
.gd-note {
  margin-top: 1.25rem;
  font-size: .82rem;
  color: var(--dim);
  line-height: 1.55;
}

/* ---- BLOG ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 3rem) var(--gutter) var(--rhythm);
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  height: 100%;
  text-decoration: none;
  transition: transform .4s var(--ease), border-color .3s var(--ease);
}
.post-card:hover { transform: translateY(-4px); border-color: var(--gold-bright); }
.post-card:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.post-card__kicker {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
}
.post-card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  line-height: 1.22;
  color: var(--ink);
}
.post-card__excerpt { color: var(--muted); font-size: .94rem; line-height: 1.55; flex: 1; }
.post-card__date {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--dim);
}

/* ---- ARTIGO ---- */
.article { max-width: 760px; margin: 0 auto; padding: clamp(1.5rem, 4vh, 3rem) var(--gutter) var(--rhythm); }
.article__meta {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 1.2rem;
}
.article__body > * + * { margin-top: 1.15rem; }
.article__body p { color: var(--muted); font-size: 1.06rem; line-height: 1.72; }
.article__body h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.2;
  color: var(--ink);
  margin-top: 2.3rem;
}
.article__body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
  margin-top: 1.7rem;
}
.article__body strong { color: var(--ink); }
.article__body ul { padding-left: 1.25rem; color: var(--muted); }
.article__body li { margin-top: .5rem; line-height: 1.6; }
.article__body a { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 3px; }
.article__legal {
  margin-top: 2.5rem;
  padding: clamp(1.1rem, 3vw, 1.6rem);
}
.article__legal h3 {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .6rem;
}
.article__legal p { font-size: .86rem; color: var(--muted); line-height: 1.55; }
.article__disclaimer { margin-top: 1.75rem; font-size: .8rem; color: var(--dim); line-height: 1.5; }

/* ---- CTA de rodapé das spokes ---- */
.spoke-cta {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--rhythm);
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  align-items: center;
}
