/*
Theme Name: Davi Falcão Advocacia Criminal
Theme URI: https://davifalcao.adv.br
Author: Desenvolvido sob medida
Description: Tema sob medida para advocacia criminal. Sem construtor de página, sem dependências externas de JavaScript. Construído para Core Web Vitals e conformidade com o Provimento 205/2021 da OAB.
Version: 1.2.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: davifalcao
Tags: one-column, custom-colors, custom-menu, translation-ready
*/

/* ==========================================================================
   TOKENS
   ========================================================================== */

:root {
  /* Azul institucional. A identidade pedida foi azul e branco; a paleta é
     inteiramente monocromática para sustentar a sobriedade que o art. 44 do
     Código de Ética exige. O único desvio é --instrumento, usado apenas na
     linha do tempo da audiência de custódia. */
  --tinta:        #0E1F33;
  --toga:         #1B3A5C;
  --toga-clara:   #2C5480;
  --aco:          #5A7590;
  --linha:        #D8DFE8;
  --papel:        #F6F8FA;
  --branco:       #FFFFFF;
  --instrumento:  #7FB2D9;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --medida: 64ch;
  --raio: 6px;
  --sombra: 0 1px 2px rgba(14,31,51,.06), 0 8px 24px rgba(14,31,51,.06);

  --gap-secao: 4.5rem;
  --container: 1320px;
  --borda-pagina: 1.25rem;
}

@media (min-width: 900px) {
  :root {
    --gap-secao: 7rem;
    --borda-pagina: 3rem;
  }
}
@media (min-width: 1440px) {
  :root { --borda-pagina: 4rem; }
}

/* ==========================================================================
   RESET
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
}

img, svg, picture { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.011em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 6.2vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 4.2vw, 2.35rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.3rem); }

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--toga); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--tinta); }

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

/* ==========================================================================
   ESTRUTURA
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--borda-pagina);
}

.medida { max-width: var(--medida); }

.secao { padding-block: var(--gap-secao); }
.secao--papel { background: var(--papel); }
.secao--tinta { background: var(--tinta); color: var(--branco); }
.secao--tinta h2 { color: var(--branco); }
.secao--tinta a { color: var(--instrumento); }

.rotulo {
  display: block;
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--aco);
  margin-bottom: 1rem;
}
.secao--tinta .rotulo { color: var(--instrumento); }

.pular-para-conteudo {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  background: var(--tinta);
  color: var(--branco);
  padding: .75rem 1.25rem;
  z-index: 200;
}
.pular-para-conteudo:focus {
  width: auto; height: auto;
  clip-path: none;
  left: 0; top: 0;
}

/* ==========================================================================
   BOTÕES
   ========================================================================== */

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 52px;
  padding: .8rem 1.6rem;
  border: 1px solid transparent;
  border-radius: var(--raio);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.botao--primario {
  background: var(--toga);
  color: var(--branco);
}
.botao--primario:hover { background: var(--tinta); color: var(--branco); }

.botao--secundario {
  background: transparent;
  border-color: var(--linha);
  color: var(--tinta);
}
.botao--secundario:hover { border-color: var(--toga); color: var(--toga); }

.secao--tinta .botao--primario { background: var(--branco); color: var(--tinta); }
.secao--tinta .botao--primario:hover { background: var(--instrumento); color: var(--tinta); }
.secao--tinta .botao--secundario { border-color: rgba(255,255,255,.28); color: var(--branco); }
.secao--tinta .botao--secundario:hover { border-color: var(--branco); color: var(--branco); }

.acoes {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1.75rem;
}
@media (min-width: 560px) {
  .acoes { flex-direction: row; flex-wrap: wrap; }
  .acoes .botao { flex: 0 1 auto; }
}

/* ==========================================================================
   CABEÇALHO
   ========================================================================== */

.cabecalho {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--linha);
}

.cabecalho__interno {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 64px;
}

.marca {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
}
.marca__nome {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--tinta);
  letter-spacing: -.01em;
}
.marca__oab-longo { display: none; }
@media (min-width: 560px) { .marca__oab-longo { display: inline; } }

.marca__oab {
  font-size: .7rem;
  white-space: nowrap;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--aco);
}

.navegacao { display: none; }
@media (min-width: 1060px) {
  .navegacao { display: flex; align-items: center; gap: 1.5rem; }
  .navegacao ul {
    display: flex;
    gap: 1.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  /* Escopo restrito à lista do menu. Sem o "ul", esta regra tem
     especificidade maior que .botao--primario e sequestra a cor do CTA. */
  .navegacao ul a {
    font-size: .95rem;
    font-weight: 500;
    color: var(--tinta);
    text-decoration: none;
    white-space: nowrap;
  }
  .navegacao ul a:hover { color: var(--toga); text-decoration: underline; }
  .cabecalho .botao { min-height: 44px; padding: .5rem 1.1rem; font-size: .9rem; white-space: nowrap; }
}

.cabecalho__tel {
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  color: var(--toga);
  white-space: nowrap;
}
@media (min-width: 1060px) { .cabecalho__tel { display: none; } }

/* ==========================================================================
   HERO
   A foto sangra até a borda direita da viewport no desktop. Sem cantos
   arredondados e sem cartão flutuante: assim o recorte lê como enquadramento
   deliberado, não como imagem cortada.
   ========================================================================== */

.hero { position: relative; padding-block: 0 var(--gap-secao); overflow: hidden; }

.hero__figura {
  margin: 0 0 2.25rem;
  background: var(--papel);
}
.hero__figura img {
  width: 100%;
  aspect-ratio: 16 / 11;
  max-height: 58vh;
  object-fit: cover;
  object-position: 60% 6%;
}

.hero h1 { margin-bottom: .5em; }

.hero__linha {
  font-size: clamp(1.05rem, 1.9vw, 1.2rem);
  color: var(--aco);
  max-width: 46ch;
}

.hero__assinatura {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--linha);
  font-size: .85rem;
  color: var(--aco);
  letter-spacing: .03em;
  max-width: 46ch;
}

@media (min-width: 1000px) {
  .hero { padding-block: 0; display: flex; align-items: center; min-height: min(84vh, 760px); }

  .hero__figura {
    position: absolute;
    inset: 0 0 0 auto;
    width: 46vw;
    margin: 0;
  }
  .hero__figura img {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-position: 58% 0%;
  }
  /* Transição suave entre a foto e o fundo branco do texto. */
  .hero__figura::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 96px;
    background: linear-gradient(90deg, var(--branco), rgba(255,255,255,0));
  }

  .hero__texto {
    position: relative;
    z-index: 1;
    width: min(54%, 640px);
    padding-right: 3rem;
  }
}

@media (min-width: 1440px) {
  .hero__figura { width: 44vw; }
  .hero__texto { width: min(52%, 700px); }
}

/* ==========================================================================
   ASSINATURA: LINHA DO TEMPO DA CUSTÓDIA
   ========================================================================== */

.prazo {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  position: relative;
}

.prazo::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, var(--instrumento), rgba(127,178,217,.15));
}

.prazo__item {
  position: relative;
  padding: 0 0 1.6rem 2.25rem;
}
.prazo__item:last-child { padding-bottom: 0; }

.prazo__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--instrumento);
  background: var(--tinta);
}
.prazo__item--fim::before { background: var(--instrumento); }

.prazo__hora {
  display: block;
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--instrumento);
  margin-bottom: .15rem;
}

.prazo__fato {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--branco);
  margin: 0 0 .2rem;
}

.prazo__nota {
  font-size: .95rem;
  color: rgba(255,255,255,.68);
  margin: 0;
}

@media (min-width: 860px) {
  .prazo {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
  }
  .prazo::before {
    left: 8px;
    right: 8px;
    top: 7px;
    bottom: auto;
    width: auto;
    height: 2px;
    background: linear-gradient(90deg, var(--instrumento), rgba(127,178,217,.15));
  }
  .prazo__item { padding: 2.25rem 1.5rem 0 0; }
  .prazo__item::before { top: 0; }
}

.urgencia__declaracao {
  margin-top: 2.75rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--instrumento);
  background: rgba(255,255,255,.05);
  border-radius: 0 var(--raio) var(--raio) 0;
  font-size: 1.0625rem;
  font-weight: 500;
}

/* ==========================================================================
   MOMENTO (seletor de fase processual)
   ========================================================================== */

.momento__grid { display: grid; gap: .75rem; }
@media (min-width: 820px) {
  .momento__grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

.momento__item {
  border: 1px solid var(--linha);
  border-left: 3px solid var(--linha);
  border-radius: var(--raio);
  background: var(--branco);
  overflow: hidden;
  transition: border-color .18s ease;
}
.momento__item:hover { border-color: var(--aco); }
.momento__item[open] { border-color: var(--linha); border-left-color: var(--toga); }

.momento__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--tinta);
  cursor: pointer;
  list-style: none;
}
.momento__item summary::-webkit-details-marker { display: none; }

.momento__sinal {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  position: relative;
}
.momento__sinal::before,
.momento__sinal::after {
  content: "";
  position: absolute;
  background: var(--toga);
  transition: transform .2s ease, opacity .2s ease;
}
.momento__sinal::before { left: 0; top: 10px; width: 22px; height: 2px; }
.momento__sinal::after  { left: 10px; top: 0; width: 2px; height: 22px; }
.momento__item[open] .momento__sinal::after { transform: rotate(90deg); opacity: 0; }

.momento__painel { padding: 0 1.25rem 1.35rem; }
.momento__painel p { font-size: .98rem; color: var(--aco); margin-bottom: .85rem; }
.momento__painel a { font-weight: 600; text-decoration: none; }
.momento__painel a:hover { text-decoration: underline; }

/* ==========================================================================
   ÁREAS
   ========================================================================== */

.areas { display: grid; gap: 1px; align-items: stretch; background: var(--linha); border: 1px solid var(--linha); border-radius: var(--raio); overflow: hidden; }
@media (min-width: 700px)  { .areas { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .areas { grid-template-columns: repeat(3, 1fr); } }

.area {
  background: var(--branco);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: background-color .18s ease;
}
.area:hover { background: var(--papel); }
.area h3 { margin-bottom: .5rem; font-size: 1.15rem; }
.area p { font-size: .96rem; color: var(--aco); flex: 1; }
.area__link {
  margin-top: 1rem;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  align-self: flex-start;
}
.area__link:hover { text-decoration: underline; }

.areas__nota {
  margin-top: 1.75rem;
  font-size: .96rem;
  color: var(--aco);
  max-width: var(--medida);
}

/* ==========================================================================
   ATENDIMENTO (sequência real, por isso numerada)
   ========================================================================== */

.passos { display: grid; gap: 2rem; counter-reset: passo; list-style: none; margin: 0; padding: 0; }
@media (min-width: 800px) { .passos { grid-template-columns: repeat(4, 1fr); gap: 2.25rem; } }

.passo { counter-increment: passo; padding-top: 1.25rem; border-top: 2px solid var(--linha); }
.passo::before {
  content: counter(passo, decimal-leading-zero);
  display: block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--toga);
  margin-bottom: .6rem;
}
.passo h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.passo p { font-size: .95rem; color: var(--aco); }

.sigilo {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--linha);
  font-size: .95rem;
  color: var(--aco);
  max-width: var(--medida);
}

/* ==========================================================================
   SOBRE
   ========================================================================== */

@media (min-width: 900px) {
  .sobre__grid {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: start;
  }
}

.sobre__figura { margin: 0 0 2rem; border-radius: var(--raio); overflow: hidden; background: var(--papel); }
.sobre__figura img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 900px) { .sobre__figura { margin-bottom: 0; } }

.sobre__cargo {
  font-size: .95rem;
  color: var(--aco);
  letter-spacing: .02em;
  margin-bottom: 1.5rem;
}
.sobre__texto { max-width: var(--medida); }
.sobre__texto p { margin-bottom: 1.15em; }

/* ==========================================================================
   COMARCAS
   ========================================================================== */

.comarcas { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1.75rem; padding: 0; list-style: none; }
.comarcas li {
  padding: .45rem 1rem;
  border: 1px solid var(--linha);
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 500;
  background: var(--branco);
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq { max-width: 760px; }
.faq__item { border-bottom: 1px solid var(--linha); }
.faq__item:first-child { border-top: 1px solid var(--linha); }

.faq__item summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--tinta);
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--sans);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  color: var(--toga);
  transition: transform .2s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__resposta { padding: 0 0 1.5rem; max-width: 64ch; }
.faq__resposta p { font-size: 1rem; color: var(--aco); }

/* ==========================================================================
   CONTATO
   ========================================================================== */

.contato__aviso {
  margin-top: 2rem;
  font-size: .92rem;
  color: rgba(255,255,255,.68);
}

/* ==========================================================================
   RODAPÉ
   ========================================================================== */

.rodape { background: var(--papel); border-top: 1px solid var(--linha); padding-block: 3rem 2rem; font-size: .95rem; }

.rodape__grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .rodape__grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 3rem; } }

.rodape__nome { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; margin-bottom: .25rem; }
.rodape__oab { font-size: .82rem; letter-spacing: .07em; text-transform: uppercase; color: var(--aco); margin-bottom: 1rem; }
.rodape h2 { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--aco); margin-bottom: .85rem; }
.rodape ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.rodape a { text-decoration: none; }
.rodape a:hover { text-decoration: underline; }

.rodape__legal {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--linha);
  font-size: .82rem;
  line-height: 1.6;
  color: var(--aco);
  max-width: 70ch;
}

/* ==========================================================================
   BARRA FIXA (mobile)
   ========================================================================== */

.barra-fixa {
  position: fixed;
  left: var(--borda-pagina);
  right: var(--borda-pagina);
  bottom: 1rem;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: .9rem 1.5rem;
  border-radius: var(--raio);
  background: var(--toga);
  color: var(--branco);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(14,31,51,.22);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.barra-fixa:hover { color: var(--branco); background: var(--tinta); }
.barra-fixa--visivel { opacity: 1; transform: none; pointer-events: auto; }

/* Sem JavaScript a barra permanece utilizável. */
.no-js .barra-fixa { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 1059px) {
  .barra-fixa { display: flex; }
  body { padding-bottom: 5.5rem; }
}

/* ==========================================================================
   PÁGINAS INTERNAS E ARTIGOS
   ========================================================================== */

.pagina { padding-block: 3rem var(--gap-secao); }
.pagina__cabecalho { max-width: var(--medida); margin-bottom: 2.5rem; }
.pagina__meta { font-size: .85rem; color: var(--aco); letter-spacing: .04em; }

.conteudo { max-width: var(--medida); }
.conteudo h2 { margin-top: 2.5em; }
.conteudo h3 { margin-top: 2em; }
.conteudo > *:first-child { margin-top: 0; }
.conteudo ul, .conteudo ol { padding-left: 1.35rem; margin-bottom: 1.2em; }
.conteudo li { margin-bottom: .45em; }
.conteudo blockquote {
  margin: 1.75em 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--linha);
  color: var(--aco);
  font-style: normal;
}
.conteudo img { border-radius: var(--raio); margin-block: 1.75em; }

.migalhas { font-size: .85rem; color: var(--aco); margin-bottom: 1.5rem; }
.migalhas a { text-decoration: none; }
.migalhas a:hover { text-decoration: underline; }

.chamada-final {
  margin-top: 3.5rem;
  padding: 2rem;
  background: var(--papel);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  max-width: var(--medida);
}
.chamada-final h2 { font-size: 1.35rem; margin-bottom: .5rem; }
.chamada-final p { color: var(--aco); font-size: .98rem; }

.lista-artigos { display: grid; gap: 1px; background: var(--linha); border-block: 1px solid var(--linha); }
.artigo-resumo { background: var(--branco); padding: 1.75rem 0; }
.artigo-resumo h2 { font-size: 1.3rem; margin-bottom: .4rem; }
.artigo-resumo h2 a { text-decoration: none; }
.artigo-resumo h2 a:hover { text-decoration: underline; }
.artigo-resumo p { color: var(--aco); font-size: .98rem; max-width: var(--medida); }

/* ==========================================================================
   UTILITÁRIOS WORDPRESS
   ========================================================================== */

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden; position: absolute !important;
  word-wrap: normal !important;
}
.alignleft  { float: left;  margin: .5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .5rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.wp-caption-text { font-size: .85rem; color: var(--aco); text-align: center; }
