/* =========================================================
   Site Dr. Lucas Montenegro — estilos
   As cores e fontes ficam todas aqui no topo (:root).
   ========================================================= */

:root {
  /* Cores tiradas do logotipo */
  --fundo: #F6F6F3;
  --superficie: #FFFFFF;
  --tinta: #101820;       /* grafite do logo */
  --suave: #5B6168;
  --linha: #DAD9D0;
  --tom: #ECEBE4;
  --destaque: #6E6434;    /* dourado-oliva do logo */
  --destaque-escuro: #5C5329;

  --titulo: "Jost", "Futura", "Century Gothic", "Segoe UI", sans-serif;
  --texto: "Atkinson Hyperlegible", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --largura: 1120px;
}

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

html { scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fundo);
  color: var(--tinta);
  font-family: var(--texto);
  font-size: 1.125rem;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--destaque); text-underline-offset: 3px; }
a:hover { color: var(--destaque-escuro); }

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

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

.pular {
  position: absolute; left: -999px; top: 1rem;
  background: var(--superficie); padding: .6rem 1rem; z-index: 100;
}
.pular:focus { left: 1rem; }

h1, h2, h3 {
  font-family: var(--titulo);
  line-height: 1.15;
  letter-spacing: 0;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.1rem); font-weight: 400; }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.4rem); font-weight: 400; }
h3 { font-size: 1.375rem; font-weight: 500; }
p { margin: 0 0 1em; max-width: 64ch; }

/* ---------- Cabeçalho ---------- */

.cabecalho {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 246, 243, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linha);
}
.cabecalho-interno {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.5rem;
}
.marca { display: block; line-height: 0; }
.marca img { height: 44px; width: auto; }

.menu { display: flex; align-items: center; gap: 1.6rem; }
.menu a:not(.botao) { color: var(--tinta); text-decoration: none; font-size: 1rem; white-space: nowrap; }
.menu a:not(.botao):hover { color: var(--destaque); }
.menu a[aria-current="page"] {
  color: var(--destaque);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px;
}

.menu-botao {
  display: none;
  font: inherit; font-size: 1rem; font-weight: 700;
  color: var(--tinta); background: transparent;
  border: 2px solid var(--tinta); border-radius: 999px;
  padding: .45rem 1.1rem; cursor: pointer;
}

/* ---------- Botões ---------- */

.botao {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: .8rem 1.5rem;
  border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 1.05rem; line-height: 1.2;
  text-decoration: none; text-align: center;
  transition: background-color .15s, color .15s;
}
.botao-principal { background: var(--destaque); color: #fff; }
.botao-principal:hover { background: var(--destaque-escuro); color: #fff; }
.botao-secundario { border-color: var(--tinta); color: var(--tinta); }
.botao-secundario:hover { background: var(--tinta); color: #fff; }
.botao-claro { background: #fff; color: var(--tinta); }
.botao-claro:hover { background: var(--tom); color: var(--tinta); }
.botao-contorno-claro { border-color: #fff; color: #fff; }
.botao-contorno-claro:hover { background: #fff; color: var(--tinta); }
.botao-pequeno { min-height: 2.6rem; padding: .5rem 1.15rem; font-size: .95rem; }

.acoes { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

/* ---------- Topo da página inicial ---------- */

.topo { padding: 4rem 0 5rem; overflow: hidden; }
.topo-grade {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr);
  gap: 4rem; align-items: center;
}
.topo-nome { font-weight: 700; font-size: 1.1rem; margin: 0 0 .1rem; }
.topo-area { color: var(--suave); margin: 0 0 1.75rem; }
.topo h1 { max-width: 21ch; }
.chamada { font-size: 1.2rem; color: var(--suave); max-width: 50ch; }
.registros {
  list-style: none; margin: 1.75rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .2rem 1.5rem;
  font-size: .95rem; color: var(--suave);
}

.topo-figura { position: relative; width: 100%; max-width: 400px; justify-self: end; aspect-ratio: 4 / 5; }

.retrato {
  position: absolute; inset: 0;
  border-radius: 999px 999px 18px 18px;
  overflow: hidden; background: var(--tom);
}
.retrato img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.retrato .retrato-monograma {
  position: absolute; inset: auto; left: 50%; top: 50%; width: 34%; height: auto; object-fit: contain;
  transform: translate(-50%, -42%); opacity: .35;
}

/* A linha do cateter: desenhada uma única vez ao abrir a página */
.cateter { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 2; pointer-events: none; }
.cateter path {
  fill: none; stroke: var(--destaque); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: desenhar 1.8s cubic-bezier(.45, 0, .2, 1) .3s forwards;
}
.cateter circle { fill: var(--destaque); opacity: 0; animation: surgir .4s ease 2s forwards; }
.cateter circle.halo { fill: none; stroke: var(--destaque); stroke-width: 1.5; }

@keyframes desenhar { to { stroke-dashoffset: 0; } }
@keyframes surgir { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .cateter path { animation: none; stroke-dashoffset: 0; }
  .cateter circle { animation: none; opacity: 1; }
}

/* ---------- Seções ---------- */

.secao { padding: 4.5rem 0; }
.secao-clara { background: var(--superficie); border-block: 1px solid var(--linha); }
.secao-cabeca { max-width: 42rem; margin-bottom: 2.25rem; }
.secao-cabeca p { color: var(--suave); }

.duas-colunas { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 3rem; align-items: start; }

/* Áreas e procedimentos: blocos com fio superior, sem cartões */
.blocos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3.5rem; }
.blocos-tres { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 2.5rem; }
.bloco { padding: 1.6rem 0 1.4rem; border-top: 2px solid var(--tinta); }
.bloco h3 a { color: var(--tinta); text-decoration: none; }
.bloco h3 a:hover { color: var(--destaque); text-decoration: underline; }
.bloco p { color: var(--suave); margin: 0; }
.bloco .saiba { margin-top: .6rem; }

/* Avaliações */
.avaliacoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3.5rem; }
.avaliacao { margin: 0; padding: 1.6rem 0 1.8rem; border-top: 2px solid var(--tinta); }
.estrelas { color: var(--destaque); letter-spacing: .15em; font-size: 1rem; margin: 0 0 .6rem; }
.avaliacao blockquote { margin: 0 0 .9rem; }
.avaliacao blockquote p { font-family: var(--titulo); font-size: 1.3rem; line-height: 1.45; margin: 0; }
.avaliacao figcaption { color: var(--suave); font-weight: 700; font-size: 1rem; }

/* Sintomas */
.sintomas {
  list-style: none; margin: 0 0 2rem; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 3rem;
}
.sintomas li { position: relative; padding-left: 1.5rem; font-size: 1.2rem; }
.sintomas li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: .55rem; height: .55rem; border-radius: 50%; background: var(--destaque);
}

/* Onde atendo */
.locais { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem; }
.local h3 { margin-bottom: .4em; }
.local p { margin-bottom: .5em; }
.observacao { color: var(--suave); }
.contatos a { font-weight: 700; }
.mapa {
  display: block; width: 100%; aspect-ratio: 4 / 3; border: 0;
  border-radius: 14px; margin-top: 1.25rem; background: var(--tom);
}
.hospitais { list-style: none; margin: 1rem 0 0; padding: 0; columns: 2; column-gap: 2rem; }
.hospitais li { padding: .6rem 0; border-bottom: 1px solid var(--linha); break-inside: avoid; }

/* Faixa para médicos */
.faixa { background: var(--tinta); color: #E9EFF2; }
.faixa h2 { color: #fff; }
.faixa p { color: #C4CAD0; font-size: 1.2rem; }

/* ---------- Páginas internas ---------- */

.abertura { padding: 3.5rem 0 3rem; border-bottom: 1px solid var(--linha); }
.abertura-grade { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 4rem; align-items: center; }
.abertura .retrato-pequeno { position: relative; aspect-ratio: 4 / 5; max-width: 280px; justify-self: end; width: 100%; }
.abertura p { font-size: 1.2rem; }

/* Linha do tempo da formação */
.linha-tempo { list-style: none; margin: 0; padding: 0 0 0 .4rem; }
.linha-tempo li { position: relative; padding: 0 0 1.9rem 2rem; border-left: 2px solid var(--linha); }
.linha-tempo li:last-child { border-left-color: transparent; padding-bottom: 0; }
.linha-tempo li::before {
  content: ""; position: absolute; left: -.55rem; top: .3rem;
  width: .9rem; height: .9rem; border-radius: 50%;
  background: var(--fundo); border: 2px solid var(--destaque);
}
.linha-tempo li:last-child::before { background: var(--destaque); }
.ano { display: block; font-weight: 700; color: var(--destaque); font-size: 1rem; }
.etapa { display: block; font-family: var(--titulo); font-size: 1.3rem; font-weight: 500; line-height: 1.25; }
.instituicao { display: block; color: var(--suave); }

.lista-simples { margin: 0; padding-left: 1.2rem; }
.lista-simples li { margin-bottom: .6rem; }

.grupo + .grupo { margin-top: 4rem; }

/* ---------- Página Para médicos ---------- */

.passos { list-style: none; margin: 0; padding: 0; counter-reset: passo; }
.passos li { counter-increment: passo; position: relative; padding: 0 0 1.6rem 3.25rem; }
.passos li:last-child { padding-bottom: 0; }
.passos li::before {
  content: counter(passo); position: absolute; left: 0; top: .1rem;
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid var(--destaque); color: var(--destaque);
  font-family: var(--titulo); font-weight: 500; font-size: 1.05rem;
}

.grupo-titulo.subgrupo { margin-top: 3rem; }
.grupo-titulo { font-size: 1.5rem; font-weight: 400; color: var(--destaque); margin: 0 0 .4rem; }

.criterio {
  display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: .75rem 3rem;
  padding: 1.6rem 0 1.5rem; border-top: 2px solid var(--tinta);
}
.criterio h4 { font-family: var(--titulo); font-size: 1.3rem; font-weight: 500; line-height: 1.25; margin: 0 0 .35rem; }
.criterio p { margin: 0 0 .6em; }
.criterio ul { margin: 0 0 .8rem; padding-left: 1.2rem; }
.criterio li { margin-bottom: .4rem; }
.criterio li::marker { color: var(--destaque); }
.fonte { font-size: .95rem; color: var(--suave); }
.nota { font-size: 1rem; color: var(--suave); }

.titulo-pequeno { font-size: 1.375rem; font-weight: 500; }
.referencias { margin: 0; padding-left: 1.4rem; font-size: .95rem; color: var(--suave); max-width: 80ch; }
.referencias li { margin-bottom: .5rem; }

@media (max-width: 900px) {
  .criterio { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
}

/* ---------- Páginas de doenças ---------- */

.trilha { font-size: 1rem; margin: 0 0 .75rem; }
.trilha a { text-decoration: none; }
.trilha a:hover { text-decoration: underline; }

.valvulas { margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 150px)); gap: 1.25rem 2rem; }
.valvula { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; font-size: .95rem; color: var(--suave); }
.valvula svg { width: 100%; max-width: 140px; height: auto; }
.valvulas-largas { grid-template-columns: repeat(2, minmax(0, 190px)); }
.valvulas-largas .valvula svg { max-width: 190px; }
.valvulas figcaption { grid-column: 1 / -1; font-size: .95rem; color: var(--suave); }
.anel { fill: #E7DFC6; stroke: var(--destaque); stroke-width: 3; }
.comissura { stroke: var(--destaque); stroke-width: 1.5; opacity: .6; fill: none; }
.abertura-valvar { fill: var(--superficie); stroke: var(--tinta); stroke-width: 1.5; }
.calcio { fill: #B9AD8A; }
.folheto { fill: none; stroke: var(--tinta); stroke-width: 2; stroke-linecap: round; }

.esquema-fop { margin: 1.5rem 0 0; max-width: 360px; }
.esquema-fop svg { width: 100%; height: auto; display: block; }
.esquema-fop figcaption { font-size: .95rem; color: var(--suave); margin-top: .5rem; }
.atrio { fill: #E7DFC6; }
.septo { stroke: var(--destaque); stroke-width: 5; stroke-linecap: round; fill: none; }
.passagem { stroke: var(--destaque); stroke-width: 2; stroke-dasharray: 3 4; fill: none; }
.coagulo { fill: var(--tinta); }
.seta { stroke: var(--tinta); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.contorno-apendice { fill: none; stroke: var(--destaque); stroke-width: 1.5; opacity: .7; }
.dispositivo { stroke: var(--tinta); stroke-width: 6; stroke-linecap: round; }
.rotulo { font-family: var(--texto); font-size: 13px; fill: var(--suave); }

.nota-larga { margin-top: 2rem; color: var(--suave); }

.perguntas { max-width: 48rem; border-top: 2px solid var(--tinta); }
.perguntas details { border-bottom: 1px solid var(--linha); }
.perguntas summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 1.15rem 2.5rem 1.15rem 0;
  font-family: var(--titulo); font-size: 1.25rem; font-weight: 500; line-height: 1.3;
}
.perguntas summary::-webkit-details-marker { display: none; }
.perguntas summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.6rem; color: var(--destaque); line-height: 1;
}
.perguntas details[open] summary::after { content: "−"; }
.perguntas details p { margin: 0 0 1.25rem; }

/* ---------- Rodapé ---------- */

.rodape { padding: 2.5rem 0 3rem; font-size: .95rem; color: var(--suave); }
.rodape-grade { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.rodape strong { color: var(--tinta); }
.rodape p { margin: 0 0 .3rem; }

/* ---------- Telas menores ---------- */

@media (max-width: 1080px) {
  .menu-botao { display: inline-flex; }
  .menu {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--superficie); border-bottom: 1px solid var(--linha);
    padding: .5rem 1.5rem 1.5rem;
  }
  .menu.aberto { display: flex; }
  .menu a:not(.botao) { padding: .85rem 0; border-bottom: 1px solid var(--linha); font-size: 1.1rem; }
  .menu .botao { margin-top: 1rem; }
}

@media (max-width: 900px) {
  .topo { padding: 2.5rem 0 3.5rem; }
  .topo-grade, .abertura-grade, .duas-colunas, .locais { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .topo-figura { max-width: 280px; justify-self: center; }
  .abertura .retrato-pequeno { justify-self: start; max-width: 220px; }
  .blocos, .blocos-tres, .sintomas, .avaliacoes { grid-template-columns: minmax(0, 1fr); }
  .secao { padding: 3.5rem 0; }
}

@media (max-width: 520px) {
  .marca img { height: 30px; }
  .acoes .botao { width: 100%; }
  .hospitais { columns: 1; }
}
