/* =========================================================
   SISTEMA TIPOGRÁFICO RESPONSIVO GLOBAL — 2026-10-04
   Escala fluida para celular, tablet e desktop.
   Carregado após o CSS específico de cada página.
   ========================================================= */

:root {
  --type-xs: clamp(0.74rem, 0.71rem + 0.10vw, 0.82rem);
  --type-caption: clamp(0.82rem, 0.79rem + 0.12vw, 0.90rem);
  --type-small: clamp(0.88rem, 0.84rem + 0.16vw, 0.96rem);
  --type-body: clamp(1rem, 0.97rem + 0.12vw, 1.05rem);
  --type-lead: clamp(1.03rem, 0.98rem + 0.24vw, 1.15rem);
  --type-h4: clamp(1.06rem, 1rem + 0.28vw, 1.24rem);
  --type-h3: clamp(1.14rem, 1.05rem + 0.40vw, 1.42rem);
  --type-h2: clamp(1.48rem, 1.27rem + 0.92vw, 2.25rem);
  --type-h1: clamp(1.9rem, 1.5rem + 1.75vw, 3.6rem);
  --type-button: clamp(0.87rem, 0.84rem + 0.10vw, 0.94rem);
}

/* O tamanho-base anterior chegava a ~14.5px no celular, reduzindo
   excessivamente todo texto definido em rem. Mantemos 16px como piso. */
html {
  font-size: clamp(16px, calc(15.55px + 0.06vw), 16.5px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-size: var(--type-body);
}

/* ---------- Hierarquia tipográfica semântica ---------- */
main p,
main li,
main dd,
main dt,
main blockquote {
  font-size: var(--type-body) !important;
}

main h1 {
  font-size: var(--type-h1) !important;
  line-height: 1.04;
}

main h2 {
  font-size: var(--type-h2) !important;
  line-height: 1.12;
}

main h3 {
  font-size: var(--type-h3) !important;
  line-height: 1.24;
}

main h4,
main h5,
main h6 {
  font-size: var(--type-h4) !important;
  line-height: 1.3;
}

/* Textos auxiliares, legendas, metadados e etiquetas continuam menores,
   mas nunca tão pequenos quanto na versão anterior. */
.section-label,
.page-hero-label,
.ph-kicker,
.pub-source,
.pub-date,
.pub-tag,
.blog-card-meta,
.blog-sidebar-title,
.blog-mobile-filter label,
.article-meta-row,
.article-tags-icon,
.form-label,
.legal-sidebar-card span,
.ph-path-tag,
.ph-insight-meta,
.ph-insight-meta small {
  font-size: var(--type-xs) !important;
}

.section-subtitle,
.page-hero-subtitle,
.ph-hero-copy > p,
.ph-heading > p,
.ph-mediation-copy > p,
.ph-speaker-copy > p,
.ph-final-cta > div > p,
.page-cms-lead,
.article-main-subtitle {
  font-size: var(--type-lead) !important;
}

.card-text,
.commitment-text,
.pub-summary,
.blog-card-summary,
.blog-featured-summary,
.blog-section-heading p,
.blog-sidebar-note p,
.ph-focus-card p,
.ph-authority-items small,
.ph-role-card small,
.footer-desc,
.footer-contact-item,
.footer-legal,
.footer-copy,
.footer-link {
  font-size: var(--type-small) !important;
}

/* Conteúdo editorial precisa ser confortável para leitura longa. */
.article-content,
.page-cms-content,
.legal-content,
.privacy-content {
  font-size: var(--type-body) !important;
  line-height: 1.82;
}

.article-content h2,
.page-cms-content h2,
.legal-content h2,
.privacy-content h2 {
  font-size: clamp(1.45rem, 1.27rem + 0.82vw, 2.05rem) !important;
  line-height: 1.2;
}

.article-content h3,
.page-cms-content h3,
.legal-content h3,
.privacy-content h3 {
  font-size: clamp(1.18rem, 1.08rem + 0.42vw, 1.48rem) !important;
  line-height: 1.3;
}

.article-content table,
.article-faq-answer,
.blog-sidebar-nav a,
.blog-pagination a,
.blog-pagination span {
  font-size: var(--type-small) !important;
}

/* Formulários: piso de 16px evita zoom automático em iOS e melhora leitura. */
main input,
main textarea,
main select {
  font-size: max(1rem, var(--type-body)) !important;
}

main label,
.form-note,
.form-hint {
  font-size: var(--type-small) !important;
}

/* Botões e CTAs proporcionais em todas as larguras. */
.btn,
.btn-primary,
.btn-secondary,
.btn-gold,
.btn-outline-light,
.btn-gold-sm,
.btn-outline-nav,
.btn-primary-nav,
.ph-btn,
.hero-link {
  font-size: var(--type-button) !important;
}

/* ---------- Header / menu mobile ---------- */
.logo-name {
  font-size: clamp(1.02rem, 0.97rem + 0.18vw, 1.16rem) !important;
}

.logo-tagline {
  font-size: clamp(0.58rem, 0.55rem + 0.08vw, 0.66rem) !important;
  line-height: 1.25;
}

.nav-link {
  font-size: clamp(0.72rem, 0.66rem + 0.08vw, 0.82rem) !important;
  padding-inline: clamp(0.34rem, 0.16rem + 0.24vw, 0.62rem);
}

/* O header tem muitos itens em uma unica linha. Ele usa uma escala propria
   para que links e CTAs encolham de forma progressiva antes do breakpoint
   do menu compacto, sem herdar o tamanho maior dos botoes do conteudo. */
.header-inner {
  gap: clamp(0.7rem, 0.25rem + 0.85vw, 1.8rem);
}

.header-ctas {
  gap: clamp(0.35rem, 0.15rem + 0.38vw, 0.72rem);
  min-width: 0;
}

.btn-outline-nav,
.btn-primary-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  min-height: clamp(36px, 2.25rem + 0.35vw, 42px);
  padding-block: clamp(0.42rem, 0.36rem + 0.10vw, 0.52rem);
  padding-inline: clamp(0.62rem, 0.28rem + 0.48vw, 1rem);
  font-size: clamp(0.66rem, 0.58rem + 0.10vw, 0.76rem) !important;
  line-height: 1.1;
  letter-spacing: clamp(0.035em, 0.02em + 0.025vw, 0.065em);
}

.hamburger {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 0;
  color: #fff;
  background: var(--vinho);
  border: 1px solid var(--vinho);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(102, 0, 55, 0.18);
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.hamburger:hover,
.hamburger:focus-visible,
.hamburger.open {
  color: #fff;
  background: var(--vinho-dark);
  border-color: var(--vinho-dark);
  box-shadow: 0 10px 24px rgba(102, 0, 55, 0.24);
}

.hamburger:active {
  transform: scale(0.96);
}

.hamburger-icon {
  width: 24px;
  height: 24px;
  overflow: visible;
}

.hamburger-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.nav-mobile {
  background: rgba(255, 253, 249, 0.99);
  border-top-color: rgba(102, 0, 55, 0.12);
}

.nav-mobile-link {
  font-size: clamp(0.98rem, 0.94rem + 0.14vw, 1.05rem) !important;
  color: #4d0029;
  font-weight: 650;
  border-bottom-color: rgba(102, 0, 55, 0.10);
  border-radius: 10px;
  padding-inline: 0.75rem;
}

.nav-mobile-link:hover,
.nav-mobile-link:focus-visible {
  color: var(--vinho);
  background: rgba(102, 0, 55, 0.06);
}

.nav-mobile-link.active,
.nav-mobile-link[aria-current="page"] {
  color: #fff;
  background: var(--vinho);
  border-bottom-color: transparent;
}

/* ---------- Home atual ---------- */
.preview-home .ph-hero h1 {
  font-size: clamp(2.05rem, 1.60rem + 2vw, 3.9rem) !important;
  line-height: 1.035;
  letter-spacing: -0.032em;
}

.preview-home .ph-hero-copy > p {
  font-size: var(--type-lead) !important;
  line-height: 1.7;
}

.preview-home .ph-btn {
  font-size: var(--type-button) !important;
}

.preview-home .ph-authority-line {
  font-size: var(--type-caption) !important;
  line-height: 1.5;
}

.preview-home .ph-path-card strong,
.preview-home .ph-insight-card h3 {
  font-size: clamp(1.18rem, 1.06rem + 0.48vw, 1.48rem) !important;
}

.preview-home .ph-focus-card h3 {
  font-size: clamp(1.18rem, 1.05rem + 0.55vw, 1.55rem) !important;
}

.preview-home .ph-focus-card.is-featured h3 {
  font-size: clamp(1.6rem, 1.34rem + 1.12vw, 2.5rem) !important;
}

.preview-home .ph-role-card strong,
.preview-home .ph-authority-items strong {
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.14rem) !important;
}

.preview-home .ph-role-card small,
.preview-home .ph-authority-items small {
  line-height: 1.45;
}

/* ---------- Desktop intermediario ----------
   Em notebooks/zoom do navegador, reduzimos ainda mais a densidade antes
   de trocar para o menu compacto. */
@media (max-width: 1460px) and (min-width: 1281px) {
  .header-inner {
    gap: 0.68rem;
  }

  .logo-name {
    font-size: 1.02rem !important;
  }

  .logo-tagline {
    font-size: 0.56rem !important;
    letter-spacing: 0.09em;
  }

  .nav-desktop {
    gap: 0;
  }

  .nav-link {
    font-size: 0.72rem !important;
    padding: 0.38rem 0.38rem;
  }

  .header-ctas {
    gap: 0.42rem;
  }

  .btn-outline-nav,
  .btn-primary-nav {
    font-size: 0.66rem !important;
    padding: 0.44rem 0.66rem;
    letter-spacing: 0.035em;
  }
}

/* ---------- Celular ---------- */
@media (max-width: 768px) {
  :root {
    --type-h1: clamp(2rem, 1.70rem + 1.35vw, 2.55rem);
    --type-h2: clamp(1.55rem, 1.35rem + 0.90vw, 2rem);
    --type-h3: clamp(1.15rem, 1.08rem + 0.34vw, 1.35rem);
  }

  .site-header,
  .page-home-preview .site-header {
    background: rgba(255, 253, 249, 0.98) !important;
    border-bottom-color: rgba(102, 0, 55, 0.13) !important;
  }

  .header-inner {
    min-height: 64px;
  }

  .hamburger {
    display: inline-flex;
  }

  .preview-home .ph-hero h1 {
    font-size: clamp(2rem, 1.68rem + 1.45vw, 2.55rem) !important;
    line-height: 1.04;
  }

  .preview-home .ph-hero-copy > p {
    font-size: clamp(1rem, 0.97rem + 0.12vw, 1.05rem) !important;
  }

  .preview-home .ph-kicker {
    font-size: clamp(0.72rem, 0.69rem + 0.1vw, 0.78rem) !important;
    letter-spacing: 0.12em;
  }

  .preview-home .ph-authority-line {
    font-size: clamp(0.82rem, 0.78rem + 0.14vw, 0.9rem) !important;
    gap: 0.65rem 1rem;
  }

  .preview-home .ph-heading h2,
  .preview-home .ph-mediation h2,
  .preview-home .ph-authority h2,
  .preview-home .ph-speaker h2,
  .preview-home .ph-final-cta h2 {
    font-size: var(--type-h2) !important;
  }

  .preview-home .ph-focus-card.is-featured h3 {
    font-size: clamp(1.5rem, 1.33rem + 0.78vw, 1.9rem) !important;
  }

  .page-hero-title,
  .article-main-title,
  .page-cms-title {
    font-size: var(--type-h1) !important;
  }
}

/* ---------- Celulares estreitos ---------- */
@media (max-width: 430px) {
  .container-site {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .logo-wrap {
    min-width: 0;
  }

  .logo-name {
    font-size: 1rem !important;
  }

  .logo-tagline {
    font-size: 0.58rem !important;
    letter-spacing: 0.08em;
  }

  .hamburger {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 11px;
  }

  .preview-home .ph-hero h1 {
    font-size: clamp(1.95rem, 1.68rem + 1.2vw, 2.25rem) !important;
  }

  .preview-home .ph-btn,
  .hero-ctas .btn,
  .cta-buttons .btn {
    min-height: 46px;
  }
}

/* ---------- Tablet / navegação compacta ---------- */
@media (min-width: 769px) and (max-width: 1280px) {
  .nav-desktop,
  .header-ctas {
    display: none !important;
  }

  .hamburger {
    display: inline-flex !important;
  }

  .nav-mobile {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    padding: 1rem 1.5rem 1.5rem;
    box-shadow: 0 22px 60px rgba(52, 22, 55, 0.14);
  }

  .site-header.scrolled .nav-mobile {
    top: 64px;
    max-height: calc(100dvh - 64px);
  }

  .nav-mobile-link {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .nav-mobile-ctas {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .nav-mobile-ctas .btn-outline-nav,
  .nav-mobile-ctas .btn-primary-nav,
  .nav-mobile-ctas .btn-primary {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-mobile-ctas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .nav-mobile-ctas .btn-outline-nav,
  .nav-mobile-ctas .btn-primary-nav,
  .nav-mobile-ctas .btn-primary {
    width: 100%;
    min-height: 46px;
  }
}

/* ---------- Blog: títulos de cards e destaque ----------
   A regra global de h2 usa !important; portanto estes seletores também
   precisam de prioridade explícita para preservar a escala editorial. */
.blog-featured-title {
  font-size: clamp(1.25rem, 1.08rem + 0.62vw, 1.72rem) !important;
  line-height: 1.16 !important;
  letter-spacing: -0.012em;
}

.blog-card-title {
  font-size: clamp(1.08rem, 1rem + 0.30vw, 1.28rem) !important;
  line-height: 1.22 !important;
}

/* ---------- Artigos do blog: título editorial proporcional ----------
   Títulos de artigos tendem a ser mais longos que títulos institucionais.
   Por isso usam uma escala própria no mobile/tablet, evitando blocos de
   5–7 linhas com fonte excessiva em telas estreitas. */
.article-main-title {
  font-size: clamp(2rem, 1.72rem + 1.2vw, 2.85rem) !important;
  line-height: 1.10 !important;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

@media (max-width: 768px) {
  .article-main-title {
    font-size: clamp(1.55rem, 1.45rem + 0.48vw, 1.78rem) !important;
    line-height: 1.13 !important;
    letter-spacing: -0.012em;
    margin-top: 1rem;
    margin-bottom: 0.85rem;
  }

  .article-main-subtitle {
    line-height: 1.65;
  }
}

@media (max-width: 430px) {
  .article-main-title {
    font-size: clamp(1.5rem, 1.43rem + 0.32vw, 1.62rem) !important;
    line-height: 1.14 !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .article-main-title {
    font-size: clamp(1.9rem, 1.72rem + 0.82vw, 2.35rem) !important;
    line-height: 1.11 !important;
  }
}
