/* ==========================================================================
   VALENTE ADVOCACIA — site.css
   Sistema de design único, compartilhado por todas as páginas.
   Bordô e ouro extraídos por amostragem da logo real (não do site anterior).
   Direção: Steep (styles.refero.design) — superfícies quase idênticas,
   um único acento de cor por página, serifada nunca em bold.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

:root {
  /* Superfícies — nunca #ffffff puro */
  --papel:        #FCFAF6;
  --papel-nevoa:  #F7F2E9;

  /* Tinta */
  --bordo:        #2A0A0C;
  --bordo-medio:  #4A1614;
  --texto:        #453832;
  --texto-suave:  #7B6A60;

  /* Ouro real da logo — para fios finos, ícones e hover sobre qualquer fundo */
  --ouro:         #C08B3C;
  --ouro-claro:   #F0C879;
  /* Mesmo matiz, mais escuro: para TEXTO sobre papel/névoa. --ouro puro falha
     contraste AA em texto (2.88:1); este tom dá 5:1+ mantendo a identidade. */
  --ouro-texto:   #8C652C;

  /* Acento único da página (seção CTA final) */
  --acento-fundo: #F2E2C4;
  --acento-tinta: #4A1614;

  /* Canal */
  --whatsapp:       #25D366;
  --whatsapp-hover: #1DA851;

  /* Sombras quentes — nunca cinza nem preta */
  --sombra:       0 4px 20px rgba(42, 10, 12, .08);
  --sombra-alta:  0 10px 34px rgba(42, 10, 12, .16);

  /* Brilho de hover da home — mesmo tom usado antes do redesign */
  --ouro-brilho:  #D4AF72;

  --raio: 14px;
}

/* ---- BASE ---- */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--texto);
  font-family: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.62;
  position: relative;
}

/* Textura de papel sutil sobre o site inteiro — degrada bem se o arquivo
   ainda não existir (o navegador simplesmente não pinta a camada). */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background-image: url('assets/img/textura-papel.webp');
  background-size: 700px auto; background-repeat: repeat;
  opacity: .04; mix-blend-mode: multiply;
}

h1, h2, h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  color: var(--bordo);
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.4rem, 5.2vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; margin-bottom: 10px; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.25; }

p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--ouro-claro); color: var(--bordo); }

:focus-visible { outline: 2px solid var(--ouro); outline-offset: 3px; }

/* ---- LAYOUT ---- */
.section-inner { max-width: 720px; margin: 0 auto; padding: 0 24px; }
section { position: relative; padding: 88px 0; }

/* Rótulo pequeno em caixa alta: é o "fio fino" de texto que a spec permite
   em ouro (seção 4.2) — não é uma superfície preenchida, então não conta
   como o acento único da página. O acento fica reservado ao .cta-final. */
.eyebrow {
  display: block;
  font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ouro-texto);
  margin-bottom: 14px;
}

.section-lead {
  font-size: 1.02rem; color: var(--texto-suave); max-width: 54ch;
  margin: 0 auto 12px;
}

/* ---- REVEAL AO ROLAR ---- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.22, 1, .36, 1);
}
.reveal.visivel { opacity: 1; transform: none; }

/* ---- BARRA DE PROGRESSO ---- */
.progresso { display: none; }
@supports (animation-timeline: scroll(root)) {
  .progresso {
    display: block;
    position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60;
    transform-origin: 0 50%; background: var(--ouro);
    animation: progresso-crescer linear;
    animation-timeline: scroll(root);
  }
}
@keyframes progresso-crescer { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---- TOPO ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bordo);
  transition: box-shadow .25s ease;
}
.topbar--rolado { box-shadow: var(--sombra-alta); }
.topbar-inner {
  position: relative;
  max-width: 1120px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.marca { display: block; line-height: 0; }
.marca img { height: 52px; width: auto; }

.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  background: transparent; border: 1px solid rgba(240, 200, 121, .35); border-radius: var(--raio);
  cursor: pointer;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block; width: 20px; height: 2px; background: var(--ouro-claro);
}
.menu-btn span { position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ''; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }

.nav { display: none; }
.nav--aberta {
  display: flex; flex-direction: column; gap: 2px;
  position: absolute; top: 100%; left: 0; right: 0; min-height: 100vh;
  background: var(--bordo);
  padding: 8px 24px 18px;
  box-shadow: var(--sombra-alta);
}
.nav--aberta a {
  color: rgba(240, 200, 121, .85); text-decoration: none; font-size: .92rem;
  padding: 12px 0; border-bottom: 1px solid rgba(240, 200, 121, .15);
}
.nav--aberta a:last-child { border-bottom: 0; }

@media (min-width: 1100px) {
  .menu-btn { display: none; }
  .nav {
    display: flex; gap: 22px; position: static; background: none; padding: 0; box-shadow: none;
  }
  .nav a {
    color: rgba(240, 200, 121, .85); text-decoration: none; font-size: .8rem;
    padding-bottom: 2px; border-bottom: 1px solid transparent;
    transition: color .2s ease, border-color .2s ease;
  }
  .nav a:hover { color: var(--ouro-claro); border-color: var(--ouro-claro); }
}

/* ---- HERO ---- */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 84px;
}
.hero .section-inner { max-width: 640px; text-align: center; position: relative; z-index: 2; }

.hero__atmosfera {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(ellipse 60% 55% at 80% 10%, rgba(192, 139, 60, .22), transparent 70%),
    url('assets/img/atmosfera-hero.webp');
  background-size: cover; background-position: center;
  /* A imagem é majoritariamente bordô escuro (só o canto superior direito
     tem luz). Sobre o papel claro, opacity sozinho lava a seção inteira em
     cinza-arroxeado. screen "apaga" o escuro e só acende o brilho quente. */
  mix-blend-mode: screen;
  will-change: transform;
}
@media (max-width: 899px) { .hero__atmosfera { display: none; } }

.hero__brilho {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(192, 139, 60, .16), transparent 70%);
  transition: opacity .3s ease;
}
.hero:hover .hero__brilho { opacity: 1; }
@media (max-width: 899px) { .hero__brilho { display: none; } }

.hero h1 .palavra { display: inline-block; overflow: hidden; vertical-align: bottom; }
.hero h1 .palavra i {
  display: inline-block; font-style: normal;
  transform: translateY(105%);
  transition: transform .8s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--d);
}
.hero h1.revelado .palavra i { transform: none; }

.hero .dor {
  font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400;
  font-size: 1.28rem; color: var(--bordo-medio);
  max-width: 46ch; margin: 18px auto 32px;
}

.selo {
  display: block; margin-top: 26px;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ouro-texto);
}

/* ---- BOTÃO WHATSAPP ---- */
.btn-wpp {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--whatsapp); color: #fff; border: none; border-radius: var(--raio);
  padding: 17px 32px;
  font-family: 'Karla', sans-serif; font-size: 1rem; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(37, 211, 102, .28);
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.btn-wpp:hover { background: var(--whatsapp-hover); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(37, 211, 102, .36); }
.btn-wpp:focus-visible { outline: 2px solid var(--bordo); outline-offset: 3px; }

/* ---- DORES (grade de cards) ---- */
#dores { background: var(--papel-nevoa); }
#dores .section-inner { max-width: 640px; text-align: center; margin-bottom: 48px; }

.dor-list {
  display: grid; grid-template-columns: 1fr; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
}
@media (min-width: 768px)  { .dor-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .dor-list { grid-template-columns: repeat(3, 1fr); } }

.dor-row {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  background: var(--papel); border-radius: var(--raio); padding: 26px 24px;
  text-decoration: none; color: var(--texto); overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.dor-row::after {
  content: ''; position: absolute; left: 24px; right: 24px; bottom: 0; height: 2px;
  background: var(--ouro); transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.dor-row:hover { transform: translateY(-4px); box-shadow: var(--sombra-alta); }
.dor-row:hover::after { transform: scaleX(1); }
.dor-row .titulo { font-family: 'Instrument Serif', serif; font-size: 1.2rem; color: var(--bordo); line-height: 1.32; }
.dor-row .call {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ouro-texto);
}

/* ---- CAPÍTULO (como funciona — o momento imersivo) ---- */
.capitulo { background: var(--papel); }
.capitulo__intro { text-align: center; max-width: 640px; margin: 0 auto 56px; padding: 0 24px; }
.capitulo__grid { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

@media (min-width: 900px) {
  .capitulo__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
  .capitulo__visual {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  }
  .capitulo__numero {
    font-family: 'Instrument Serif', serif; font-weight: 400;
    font-size: clamp(6rem, 12vw, 11rem); line-height: 1; color: var(--ouro-texto);
    font-variant-numeric: tabular-nums;
  }
  .capitulo__linha { width: 120px; height: 2px; background: rgba(192, 139, 60, .22); border-radius: 2px; overflow: hidden; }
  .capitulo__linha span { display: block; height: 100%; width: 0; background: var(--ouro); transition: width .4s ease; }
  .capitulo__passo { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; }
}
@media (max-width: 899px) {
  .capitulo__visual { display: none; }
  .capitulo__passo { padding: 26px 0; border-top: 1px solid rgba(192, 139, 60, .2); }
  .capitulo__passo:first-child { border-top: 0; }
}
.capitulo__passo h3 { margin-bottom: 10px; }
.capitulo__passo p { color: var(--texto-suave); max-width: 42ch; }

/* ---- FAQ ---- */
#faq { background: var(--papel-nevoa); }
#faq .section-inner { max-width: 640px; text-align: center; margin-bottom: 12px; }
.faq-list { max-width: 720px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; }
details.faq-item { border-bottom: 1px solid rgba(192, 139, 60, .25); padding: 4px 0; }
details.faq-item:first-child { border-top: 1px solid rgba(192, 139, 60, .25); }
details.faq-item summary {
  cursor: pointer; padding: 18px 28px 18px 4px; position: relative;
  font-family: 'Instrument Serif', serif; font-size: 1.15rem; color: var(--bordo);
  list-style: none;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after {
  content: ''; position: absolute; right: 4px; top: 24px;
  width: 9px; height: 9px;
  border-right: 2px solid var(--ouro); border-bottom: 2px solid var(--ouro);
  transform: rotate(45deg); transition: transform .2s ease;
}
details.faq-item[open] summary::after { transform: rotate(-135deg); top: 28px; }
details.faq-item .resposta { padding: 0 28px 20px 4px; color: var(--texto-suave); max-width: 62ch; }

/* ---- CTA FINAL — o acento único da página ---- */
.cta-final { background: var(--acento-fundo); text-align: center; }
.cta-final .section-inner { max-width: 560px; }
.cta-final h2 { color: var(--acento-tinta); }
.cta-final .section-lead { color: var(--acento-tinta); opacity: .82; margin-bottom: 30px; }

/* ---- SOBRE ---- */
.sobre { background: var(--papel); }
.sobre-inner {
  max-width: 680px; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 36px; align-items: flex-start; text-align: left;
}
.sobre-foto { flex-shrink: 0; overflow: hidden; border-radius: var(--raio); }
.sobre-foto img {
  width: 160px; height: 206px; object-fit: cover; object-position: 50% 22%;
  transition: transform .4s ease;
}
.sobre-foto:hover img { transform: scale(1.04); }
.sobre-nome { font-size: 1.6rem; margin-bottom: 4px; }
.sobre-oab { display: block; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ouro-texto); margin: 4px 0 14px; }
.sobre-bio { font-size: .98rem; color: var(--texto); max-width: 46ch; }

@media (max-width: 640px) {
  .sobre-inner { flex-direction: column; align-items: center; text-align: center; }
  .sobre-bio { max-width: none; }
}

/* ---- LOCALIZAÇÃO ---- */
#localizacao { background: var(--papel-nevoa); text-align: center; }
.mapa-embed {
  position: relative; max-width: 680px; margin: 8px auto 0;
  border-radius: var(--raio); overflow: hidden; border: 1px solid rgba(192, 139, 60, .25);
}
.mapa-embed iframe { display: block; width: 100%; height: 320px; border: 0; }
.mapa-overlay { position: absolute; inset: 0; }
.endereco-texto { margin-top: 16px; font-size: .94rem; }
.endereco-texto a {
  color: var(--texto); text-decoration: none;
  border-bottom: 1px solid rgba(192, 139, 60, .4);
  transition: color .2s ease, border-color .2s ease;
}
.endereco-texto a:hover { color: var(--bordo); border-color: var(--bordo); }

/* ---- RODAPÉ ---- */
.rodape-fechamento { background: var(--bordo); padding: 32px 24px; text-align: center; }
.rodape-fechamento .cidade { font-size: .84rem; color: rgba(240, 200, 121, .7); margin: 0 0 14px; }
.rodape-fechamento .links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; font-size: .8rem; }
.rodape-fechamento .links a {
  position: relative; display: inline-block; text-decoration: none; color: var(--ouro-claro);
  padding: 12px 6px;
}
.rodape-fechamento .links a::after {
  content: ''; position: absolute; left: 6px; right: 6px; bottom: 9px; height: 1px; background: var(--ouro-claro);
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.rodape-fechamento .links a:hover::after { transform: scaleX(1); }

/* ==========================================================================
   HOME — capa escura, não miolo de LP. A logo foi desenhada pra fundo
   escuro, e é a porta de entrada orgânica do site (spec 4.5). Compartilha
   tokens, tipografia, raio e sombras quentes com o resto do site — não
   precisa ser igual visualmente pra ser o mesmo sistema.
   ========================================================================== */
body.pagina-home {
  background: var(--bordo);
  min-height: 100vh;
  overflow-x: hidden;
}
body.pagina-home::before { display: none; } /* textura de papel é só das LPs claras */

.bg-logo {
  position: fixed; inset: 0; z-index: 0;
  background: url('logo-watermark.webp') center center / contain no-repeat;
  opacity: .1;
}
.bg-overlay {
  position: fixed; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at center, rgba(42,10,12,.35) 0%, rgba(15,4,5,.7) 100%);
}

.particles { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.particle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, var(--ouro-brilho) 0%, transparent 70%);
  animation: flutuar linear infinite; opacity: 0;
}
@keyframes flutuar {
  0%   { transform: translateY(110vh) scale(0); opacity: 0; }
  10%  { opacity: .5; }
  90%  { opacity: .3; }
  100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

.main-wrapper {
  position: relative; z-index: 10; min-height: 100vh; width: 100%;
  max-width: 520px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 24px; padding: 20px;
}

@keyframes entra {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

.logo-wrap { text-align: center; animation: entra .6s ease both; }
.logo-img {
  width: 240px; max-width: 76vw;
  filter: drop-shadow(0 10px 28px rgba(42, 10, 12, .45));
}

.welcome-text { text-align: center; animation: entra .7s ease both; animation-delay: .1s; }
.tagline {
  font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400;
  font-size: 1.2rem; color: var(--ouro-claro); letter-spacing: .02em;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.card {
  background: rgba(74, 22, 20, .55);
  border: 1px solid rgba(192, 139, 60, .3);
  border-radius: var(--raio);
  padding: 32px 28px; width: 100%;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--sombra-alta), inset 0 1px 0 rgba(240,200,121,.12);
  animation: entra .7s ease both; animation-delay: .18s;
}
.card[data-painel] { animation-delay: 0s; animation-duration: .35s; }

.card-label {
  font-family: 'Instrument Serif', serif; font-size: 1.4rem; font-weight: 400;
  color: var(--ouro-claro); text-align: center; margin-bottom: 6px;
}
.card-sub { font-size: .86rem; color: rgba(240,200,121,.72); text-align: center; margin-top: 4px; }

.btn-group { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

.btn-choice {
  background: var(--ouro-claro); color: var(--bordo); border: none; border-radius: var(--raio);
  padding: 16px 24px; font-family: 'Karla', sans-serif; font-size: 1rem; font-weight: 700;
  cursor: pointer; flex: 1; min-width: 140px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 4px 18px rgba(42, 10, 12, .32);
  line-height: 1.3; text-align: center; text-decoration: none;
}
.btn-choice:hover { background: var(--ouro-brilho); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(42, 10, 12, .42); }
.btn-choice:active { transform: none; }
.btn-choice small { font-size: .73rem; font-weight: 400; color: var(--bordo-medio); display: block; }

.situacoes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; }

.situacao {
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  padding: 18px 12px; background: var(--ouro-claro); color: var(--bordo); border-radius: var(--raio);
  text-decoration: none; font-family: 'Karla', sans-serif; font-size: .85rem; font-weight: 700;
  line-height: 1.3; box-shadow: 0 4px 18px rgba(42, 10, 12, .32);
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
}
.situacao span { overflow-wrap: break-word; min-width: 0; }
.situacao svg { flex-shrink: 0; color: var(--bordo-medio); }
.situacao:hover { background: var(--ouro-brilho); transform: translateY(-3px); box-shadow: 0 8px 28px rgba(42, 10, 12, .42); }
.situacao:active { transform: none; }
.situacao:focus-visible { outline: 2px solid var(--ouro-brilho); outline-offset: 3px; }

.situacao--duvida {
  grid-column: 1 / -1; flex-direction: row; justify-content: center; gap: 12px;
  padding: 15px 16px; background: var(--ouro); color: var(--bordo);
  font-family: 'Instrument Serif', serif; font-style: italic; font-weight: 400; font-size: 1.1rem;
}
.situacao--duvida:hover { background: var(--ouro-brilho); }

.btn-voltar {
  display: block; margin: 20px auto 0; background: none; border: 0; cursor: pointer;
  padding: 6px 4px; font-family: 'Karla', sans-serif; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: rgba(192, 139, 60, .85);
  transition: color .2s ease;
}
.btn-voltar:hover { color: var(--ouro-brilho); }

.footer-text {
  font-size: .75rem; color: rgba(192,139,60,.6); letter-spacing: .12em; text-transform: uppercase;
  text-align: center; animation: entra .8s ease both; animation-delay: .3s;
}

@media (max-width: 480px) {
  .card { padding: 24px 18px; }
  .logo-img { width: 190px; }
  .btn-choice { padding: 14px 16px; font-size: .93rem; }
  .tagline { font-size: 1.05rem; }
  .btn-group { gap: 10px; }
  .situacoes { gap: 10px; }
  .situacao { padding: 15px 10px; font-size: .8rem; }
  .situacao--duvida { font-size: 1rem; }
}

/* ---- TRANSIÇÃO ENTRE PÁGINAS ---- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* ---- RESPONSIVO GERAL ---- */
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .hero { padding: 52px 0 60px; }
}

/* ---- MOVIMENTO REDUZIDO ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__brilho { display: none; }
  .progresso { display: none; }
}
@media (min-width: 900px) and (prefers-reduced-motion: reduce) {
  .capitulo__visual { position: static; height: auto; margin-bottom: 40px; }
}
