/* ============================================================
   PÁGINAS DOS NÚCLEOS — SISTEMA VISUAL COMPARTILHADO
   Dossiê jurídico contemporâneo, alinhado à página principal.
   ============================================================ */

:root {
  --nav-h: 80px;
  --pad-sec: clamp(4rem, 6vw, 6.5rem);
}

.container {
  max-width: 1200px;
  padding-left: max(clamp(24px, 4vw, 32px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(24px, 4vw, 32px), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 16px;
  z-index: 1000;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bone);
  font-size: 0.8125rem;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms var(--ease);
}
.skip-link:focus { transform: none; }

/* Cabeçalho: mesma altura, logo e linguagem de ação da home. */
.nav {
  background: rgba(245, 242, 236, 0.88);
  -webkit-backdrop-filter: saturate(145%) blur(18px);
  backdrop-filter: saturate(145%) blur(18px);
  border-bottom-color: rgba(26, 29, 36, 0.1);
}
.nav-inner {
  height: var(--nav-h);
  gap: 24px;
}
.nav-logo {
  min-height: 44px;
  padding: 2px 0;
  transition: opacity 180ms var(--ease);
}
.nav-logo:hover { opacity: 0.82; }
.nav-logo img {
  width: auto;
  height: 48px;
  transform: translateY(-2px);
}
.nav-actions { gap: clamp(16px, 2.4vw, 32px); }
.nav-back {
  min-height: 44px;
  padding: 4px 0;
  font-size: 0.875rem;
  letter-spacing: -0.005em;
  color: var(--text-soft);
}
.nav-back .bk {
  color: var(--gold-strong);
  font-size: 1rem;
}
.nav .btn-ink {
  min-height: 44px;
  padding: 4px 1px 6px;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--gold);
  border-radius: 0;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  box-shadow: none;
}
.nav .btn-ink:hover {
  background: transparent;
  color: var(--gold-strong);
  border-bottom-color: var(--gold-strong);
}

/* Hero: conteúdo principal + índice como margem do dossiê. */
.hero {
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3.5rem, 6vw, 5.5rem);
}
.hero::after { background: rgba(26, 29, 36, 0.13); }
.hero .ghost {
  right: max(-2vw, -2rem);
  color: rgba(26, 29, 36, 0.038);
}
.masthead {
  padding-bottom: 16px;
  border-bottom-width: 1px;
  border-bottom-color: rgba(26, 29, 36, 0.78);
}
.masthead-label { letter-spacing: 0.18em; }
.hero h1 {
  max-width: 14ch;
  font-size: clamp(2.75rem, 6.4vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.034em;
  font-variation-settings: "opsz" 120;
}
.hero .resumo {
  margin-top: 1.35rem;
  max-width: 36ch;
  font-size: clamp(1.25rem, 2.2vw, 1.625rem);
}
.hero .lead {
  margin-top: 1.5rem;
  max-width: 62ch;
  line-height: 1.68;
  text-wrap: pretty;
}
.hidx {
  position: relative;
  transition: color 180ms var(--ease), padding-left 220ms var(--ease);
}
.hidx::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--rule);
}

@media (min-width: 1024px) {
  :root { --nav-h: 92px; }
  .nav-logo img { height: 60px; }
  .hero .container {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.7fr);
    grid-template-rows: auto auto auto 1fr;
    column-gap: clamp(64px, 8vw, 116px);
    align-items: start;
  }
  .masthead { grid-column: 1 / -1; margin-bottom: clamp(2.75rem, 5vw, 4.5rem); }
  .hero h1 { grid-column: 1; grid-row: 2; }
  .hero .resumo { grid-column: 1; grid-row: 3; }
  .hero .lead { grid-column: 1; grid-row: 4; }
  .hero-index {
    grid-column: 2;
    grid-row: 2 / 5;
    display: grid;
    grid-template-columns: 1fr;
    align-self: end;
    margin: 0;
    padding: 12px 0 0 28px;
    border-top: 2px solid var(--ink);
    border-left: 1px solid var(--rule);
  }
  .hero-index .hidx {
    min-height: 52px;
    padding: 13px 0;
  }
  .hero-index .hidx + .hidx {
    border-left: 0;
    padding-left: 0;
  }
  .hero-index .hidx:hover { padding-left: 5px; }
}

/* Capítulos: precisão de alinhamento e ritmo. */
.secao { padding: var(--pad-sec) 0; }
.ch-head {
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
  gap: clamp(14px, 2vw, 22px);
}
.ch-num { color: var(--gold-strong); }
.ch-title { font-variation-settings: "opsz" 72; }
.ch-rule { background: rgba(26, 29, 36, 0.14); }
.frentes li {
  min-height: 62px;
  align-items: center;
  padding: 16px 0;
  line-height: 1.42;
}
.frentes li:last-child,
.frentes li:nth-last-child(2) { border-bottom: 1px solid var(--rule); }

.banda {
  background:
    radial-gradient(90% 100% at 5% 5%, rgba(240, 187, 74, 0.045), transparent 52%),
    var(--surface);
}
.principio { padding-left: clamp(22px, 3vw, 34px); }
.principio::before { width: 3px; }
.principio p { font-variation-settings: "opsz" 90; }
.prosa p { text-wrap: pretty; }

.step {
  min-width: 0;
  transition: border-color 200ms var(--ease);
}
.step h3 { text-wrap: balance; }
.step p { text-wrap: pretty; }
@media (hover: hover) and (pointer: fine) {
  .step:hover { border-color: var(--gold-strong); }
}

/* Relacionados: referências editoriais, não cartões genéricos. */
.rel-grid { gap: clamp(24px, 3vw, 40px); }
.rel {
  min-height: 154px;
  padding: 18px 0 16px;
  background: transparent;
  border: 0;
  border-top: 2px solid rgba(26, 29, 36, 0.82);
  border-bottom: 1px solid var(--rule);
  box-shadow: none;
}
.rel-nome { font-size: 1.3rem; }
@media (hover: hover) and (pointer: fine) {
  .rel:hover {
    transform: translateY(-2px);
    border-top-color: var(--gold-strong);
    border-bottom-color: rgba(168, 122, 31, 0.35);
    box-shadow: none;
  }
}

/* Encerramento: faixa de decisão curta + rodapé institucional. */
.fecho {
  isolation: isolate;
  background:
    radial-gradient(90% 110% at 88% 0%, rgba(240, 187, 74, 0.085), transparent 52%),
    linear-gradient(180deg, var(--ink), var(--ink-deep));
  border-top: 1px solid rgba(240, 187, 74, 0.5);
  color: var(--on-dark);
}
.fecho::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgba(245, 242, 236, 0.025) 1px, transparent 1px);
  background-size: 100% 64px;
  pointer-events: none;
}
.fecho-ghost {
  right: -0.02em;
  bottom: -0.35em;
  color: rgba(240, 187, 74, 0.055);
}
.fecho-inner {
  padding-block: clamp(3rem, 5vw, 4.5rem);
  gap: clamp(32px, 5vw, 72px);
}
.fecho-lead { max-width: 44rem; }
.fecho .eyebrow { color: var(--gold-soft); margin-bottom: 1rem; }
.fecho h2 {
  max-width: 25ch;
  color: var(--on-dark);
  font-size: clamp(1.8rem, 3.2vw, 2.75rem);
  line-height: 1.1;
  font-variation-settings: "opsz" 90;
}
.fecho h2 em { color: var(--gold-soft); }
.fecho .btn-gold {
  min-height: 54px;
  padding: 0 28px;
  border-radius: 2px;
  font-size: 0.9375rem;
}

.rodape {
  background: var(--ink-deep);
  padding: 0 0 max(24px, env(safe-area-inset-bottom, 0px));
  color: var(--on-dark-soft);
}
.rodape-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 242, 236, 0.11);
}
.rodape-marca {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  opacity: 0.82;
  transition: opacity 180ms var(--ease);
}
.rodape-marca:hover { opacity: 1; }
.rodape-marca img {
  width: auto;
  height: 50px;
  transform: translateY(-1px);
}
.rodape p {
  max-width: 76ch;
  padding: 0;
  border: 0;
  font-size: 0.6875rem;
  line-height: 1.65;
  color: var(--on-dark-faint);
  text-wrap: pretty;
}
.rodape a { color: var(--gold-soft); }
.rodape a:hover { color: var(--gold); }

/* Estados e acessibilidade. */
a:focus-visible {
  outline: 2px solid var(--gold-strong);
  outline-offset: 4px;
}
.fecho a:focus-visible,
.rodape a:focus-visible {
  outline-color: var(--gold-soft);
}

@media (max-width: 767px) {
  :root { --pad-sec: clamp(3.5rem, 14vw, 4.75rem); }
  .nav-logo img { height: 46px; }
  .nav .btn-ink { font-size: 0.8125rem; }
  .hero { padding-top: 3rem; }
  .hero .ghost { font-size: clamp(11rem, 54vw, 15rem); }
  .frentes li:last-child,
  .frentes li:nth-last-child(2) { border-bottom: 0; }
  .frentes li:last-child { border-bottom: 1px solid var(--rule); }
  .rodape-inner { align-items: flex-start; flex-direction: column; gap: 8px; }
  .rodape-marca img { height: 46px; }
}

@media (max-width: 420px) {
  .nav-inner { gap: 12px; }
  .nav-actions { gap: 10px; }
  .nav .btn-ink { font-size: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-logo,
  .nav-back,
  .nav .btn-ink,
  .hidx,
  .rel,
  .rodape-marca { transition: none; }
}
