/* Thiago Morais Peixoto — landing page
   Revisão v2: papel frio, grafite, vinho contido. Source Serif 4 + Inter. */

@font-face {
  font-family: 'SS4';
  src: url('fonts/ss4-text.woff2') format('woff2-variations'),
       url('fonts/ss4-text.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter.woff2') format('woff2-variations'),
       url('fonts/inter.woff2') format('woff2');
  font-weight: 400 600; font-style: normal; font-display: swap;
}

:root {
  --papel:      #F1F0EB;
  --tinta:      #202628;
  --vinho:      #723F46;
  --secundario: #62666A;
  --branco:     #FFFFFF;
  --linha:      #D7D8D4;

  --serif: 'SS4', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --largura: 68rem;
  --medida:  36rem;
  --ar:      6rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.66;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.caixa { max-width: var(--largura); margin: 0 auto; padding: 0 2rem; }

p, li { max-width: var(--medida); }
p {
  margin: 0 0 1.15rem;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  /* nunca partir palavra com menos de 6 letras, nem deixar menos de 3 de cada lado */
  hyphenate-limit-chars: 6 3 3;
  -webkit-hyphenate-limit-before: 3;
  -webkit-hyphenate-limit-after: 3;
  hyphenate-limit-lines: 2;
  -webkit-hyphenate-limit-lines: 2;
}
/* Fora da justificação: rótulos, notas, credenciais, fac-símile e rodapé. */
.rotulo, .identificacao, .agendar .nota, .capa-seguir, .pagamento,
.cred-nome, .cred-crm, .doc-rubrica, .doc-titulo,
footer .assinatura, footer .disclaimer, footer .lema {
  text-align: left;
  hyphens: manual;
  -webkit-hyphens: manual;
}
a { color: var(--vinho); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--vinho); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-family: var(--serif); }

h1 {
  font-size: clamp(2.3rem, 4.8vw, 3.4rem);
  font-weight: 500; line-height: 1.1; letter-spacing: -0.015em;
  margin: 1.1rem 0 1.5rem; max-width: 17ch;
}
h2 {
  font-size: clamp(1.7rem, 2.9vw, 2.2rem);
  font-weight: 500; line-height: 1.18; letter-spacing: -0.01em;
  margin: 0 0 1.5rem; max-width: 22ch;
}
h3 {
  font-size: 1.2rem; font-weight: 600; line-height: 1.3;
  margin: 0 0 0.55rem; max-width: 30ch;
}

.rotulo {
  display: flex; align-items: center; gap: 0.8rem;
  margin: 0 0 1rem; max-width: none;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--vinho);
}
.rotulo::before { content: ""; width: 1.85rem; height: 1px; background: var(--vinho); flex: none; }


/* ---------- Cabeçalho ---------- */
.topo {
  position: sticky; top: 0; z-index: 20;
  background: rgba(241,240,235,0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--linha);
}
.topo .caixa { display: flex; align-items: center; gap: 2rem; min-height: 66px; }
.marca {
  font-family: var(--serif); font-size: 1.1rem; font-weight: 600;
  color: var(--tinta); text-decoration: none; white-space: nowrap;
}
.topo nav { display: flex; gap: 1.6rem; margin-left: auto; font-family: var(--sans); font-size: 0.875rem; }
.topo .botao { margin-left: 1.35rem; white-space: nowrap; }
.topo nav a {
  color: var(--tinta); text-decoration: none;
  padding: 0.6rem 0; border-bottom: 1px solid transparent;
}
.topo nav a:hover { border-bottom-color: var(--vinho); color: var(--vinho); }

/* ---------- Botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0.7rem 1.55rem;
  background: var(--vinho); color: var(--branco);
  font-family: var(--sans); font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; border: 1px solid var(--vinho);
  transition: background-color 150ms ease, color 150ms ease;
}
.botao:hover, .botao:focus-visible { background: transparent; color: var(--vinho); }

.secundario {
  display: inline-flex; align-items: center; min-height: 46px;
  font-family: var(--sans); font-size: 0.9375rem; color: var(--tinta);
  text-decoration: underline; text-decoration-color: var(--linha);
  text-decoration-thickness: 1px; text-underline-offset: 6px;
}
.secundario:hover, .secundario:focus-visible { color: var(--vinho); text-decoration-color: var(--vinho); }

/* ---------- Capa ---------- */
.capa { padding: 4rem 0 var(--ar); }
.capa .caixa {
  display: grid;
  grid-template-columns: minmax(0,1.3fr) minmax(0,0.7fr);
  grid-template-areas: "texto foto" "seguir foto";
  gap: 0 4.5rem; align-items: center;
}
.capa-texto { grid-area: texto; }
.capa-seguir { grid-area: seguir; margin: 1.35rem 0 0; }
.identificacao {
  margin: 0; font-family: var(--sans); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--secundario);
}
.capa .entrada { font-size: 1.125rem; }
.capa figure { grid-area: foto; margin: 0; justify-self: end; max-width: 340px; }
.capa img { display: block; width: 100%; height: auto; }

/* ---------- Seções ---------- */
.secao { padding: var(--ar) 0; scroll-margin-top: 5rem; }
.secao + .secao { border-top: 1px solid var(--linha); }

.duas {
  display: grid; grid-template-columns: minmax(0,18rem) minmax(0,1fr);
  gap: 3rem 4.5rem; align-items: start;
}
.duas > .cabeca { position: sticky; top: 94px; }
.duas > .cabeca h2 { font-size: clamp(1.6rem, 2.4vw, 1.95rem); max-width: 16ch; }

/* ---------- Como funciona: subseções ---------- */
.subsecoes { max-width: 40rem; }
.subsecoes > div { padding: 1.85rem 0; border-top: 1px solid var(--linha); }
.subsecoes > div:first-child { padding-top: 0; border-top: 0; }
.subsecoes p:last-child { margin-bottom: 0; }
.fechamento { margin-top: 2rem; padding-top: 1.85rem; border-top: 1px solid var(--linha); }

/* ---------- Listas ---------- */
.lista { list-style: none; margin: 0; padding: 0; max-width: 40rem; }
.lista li {
  max-width: none; padding: 0.8rem 0 0.8rem 1.85rem;
  border-bottom: 1px solid var(--linha); position: relative;
}
.lista li:first-child { border-top: 1px solid var(--linha); }
.lista li::before {
  content: ""; position: absolute; left: 0; top: 1.5rem;
  width: 0.85rem; height: 1px; background: var(--vinho);
}
.lista + p { margin-top: 1.5rem; }

/* ---------- Fac-símile do registro ---------- */
.prova { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,22rem); gap: 4rem; align-items: start; }
.documento {
  background: var(--branco);
  border: 1px solid var(--linha);
  box-shadow: 0 1px 2px rgba(32,38,40,.06);
  padding: 1.6rem 1.5rem 1.3rem;
  transform: none;
  font-size: 0.8125rem;
  max-width: 21rem;
}
.doc-topo {
  padding-bottom: 0.7rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--linha);
}
.doc-nome { display: block; font-family: var(--serif); font-size: 1rem; font-weight: 600; line-height: 1.3; }
.doc-crm {
  display: block; margin-top: 0.15rem;
  font-family: var(--sans); font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--secundario);
}
.doc-rubrica {
  margin: 0 0 0.5rem; font-family: var(--sans); font-size: 0.58rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--vinho);
}
.doc-linhas { margin: 0 0 1.05rem; }
.doc-linhas:last-of-type { margin-bottom: 0.25rem; }
.doc-linhas i { display: block; height: 1px; background: var(--linha); margin-bottom: 0.6rem; }
.doc-titulo {
  margin: 0 0 1.15rem;
  font-family: var(--serif); font-size: 0.95rem; font-weight: 600; color: var(--tinta);
}

/* ---------- Formação e experiência ---------- */
.credenciais {
  max-width: var(--medida);
  margin-top: 1.75rem; padding-top: 1.35rem;
  border-top: 1px solid var(--linha);
}
.cred-nome {
  margin: 0; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--tinta);
}
.cred-crm {
  margin: 0.2rem 0 0.85rem;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--secundario);
}
.cred-lista { list-style: none; margin: 0; padding: 0; }
.cred-lista li {
  max-width: none; margin: 0 0 0.3rem;
  font-family: var(--sans); font-size: 0.9375rem; line-height: 1.55; color: var(--tinta);
}
.cred-lista li:last-child { margin-bottom: 0; }

/* ---------- Onde atendo ---------- */
.modalidades { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 3rem 4rem; }
.modalidades p { font-size: 1.0625rem; }

/* ---------- FAQ ---------- */
.perguntas { max-width: 46rem; }
details { border-bottom: 1px solid var(--linha); }
details:first-of-type { border-top: 1px solid var(--linha); }
summary {
  position: relative; display: block; list-style: none; cursor: pointer;
  padding: 1.15rem 3rem 1.15rem 0;
  font-family: var(--serif); font-size: 1.15rem; font-weight: 600; line-height: 1.35;
}
summary::-webkit-details-marker { display: none; }
summary:hover, details[open] summary { color: var(--vinho); }
summary::after {
  content: ""; position: absolute; right: 0.5rem; top: 1.65rem;
  width: 0.46rem; height: 0.46rem;
  border-right: 1.5px solid var(--vinho); border-bottom: 1.5px solid var(--vinho);
  transform: rotate(45deg); transition: transform 180ms ease;
}
details[open] summary::after { transform: rotate(-135deg); }
details > *:not(summary) { margin-bottom: 1.15rem; max-width: 42rem; }

/* ---------- Como agendar ---------- */
.agendar p { font-size: 1.125rem; max-width: 34rem; }
.agendar .nota {
  margin: 1.35rem 0 0;
  font-family: var(--sans); font-size: 0.875rem; color: var(--secundario);
}
.agendar .botao { margin-top: 1.5rem; }

/* ---------- Rodapé ---------- */
footer { background: var(--tinta); color: var(--papel); padding: 4rem 0 3.25rem; }
footer .caixa { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 3rem; align-items: start; }
footer .lema {
  font-family: var(--serif); font-weight: 500; margin: 0; max-width: 16ch;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.2;
}
footer .assinatura {
  margin: 0; font-family: var(--sans); font-size: 0.9rem; line-height: 1.75; opacity: 0.9;
}
footer .assinatura strong { font-weight: 600; }
footer .disclaimer {
  grid-column: 1 / -1; margin: 2.5rem 0 0; padding-top: 1.6rem;
  border-top: 1px solid rgba(241,240,235,.22);
  font-family: var(--sans); font-size: 0.8125rem; line-height: 1.65; opacity: 0.72; max-width: 46rem;
}
footer a { color: var(--papel); }

/* ---------- Telas médias ---------- */
@media (max-width: 980px) {
  :root { --ar: 4.25rem; }
  .capa { padding-top: 2.75rem; }
  .capa .caixa {
    grid-template-columns: 1fr;
    grid-template-areas: "texto" "foto" "seguir";
    gap: 2.5rem 0;
  }
  .capa-seguir { margin-top: 0; }
  .capa figure { max-width: 320px; justify-self: start; }
  .duas { grid-template-columns: 1fr; gap: 1.75rem; }
  .duas > .cabeca { position: static; }
  .prova { grid-template-columns: 1fr; gap: 2.75rem; }
  .modalidades { grid-template-columns: 1fr; gap: 2.25rem; }
  .topo nav { display: none; }
  .topo .botao { margin-left: auto; }
  footer .caixa { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Telefone ---------- */
@media (max-width: 620px) {
  :root { --ar: 3.25rem; --medida: 100%; }
  body { font-size: 1.0625rem; }
  /* Abaixo de 620px a medida cai para ~40 caracteres e a justificação
     passa a esticar os espaços. Alinhamento à esquerda no celular. */
  p { text-align: left; }
  .caixa { padding: 0 1.25rem; }
  .topo .caixa { min-height: 58px; gap: 1rem; }
  .marca { font-size: 1rem; }
  .topo .botao { padding: 0.5rem 0.85rem; font-size: 0.85rem; min-height: 40px; }
  .capa { padding-top: 2.25rem; }
  .secundario { margin: 0; }
  .documento { max-width: 100%; }
  .agendar .botao { width: 100%; }
}

/* ---------- Telas muito estreitas ---------- */
@media (max-width: 400px) {
  .topo .caixa { gap: 0.75rem; }
  .marca { font-size: 0.95rem; }
  .topo .botao { padding: 0.45rem 0.75rem; font-size: 0.8rem; }
}

@media print {
  .topo { position: static; display: none; }
  body { background: #fff; padding: 0; }
  footer { background: #fff; color: #000; }
  .documento { box-shadow: none; }
  details > *:not(summary) { display: block; }
}
