/* ============================================================
   Dr. Carlos Prates — Ortopedia e Cirurgia do Quadril
   Navy profundo + dourado sobre osso. Newsreader + Plus Jakarta Sans.
   ============================================================ */
:root {
  --navy: #0d2137;
  --navy-deep: #081827;
  --bone: #f6f4ef;
  --white: #ffffff;
  --gold: #c8a15a;
  --gold-2: #8a6a2f;
  --ink: #16202b;
  --slate: #5c6b7a;
  --wa: #25d366;
  --line: rgba(13, 33, 55, 0.14);
  --line-light: rgba(246, 244, 239, 0.16);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Plus Jakarta Sans", -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm: 0 2px 12px rgba(13, 33, 55, 0.07);
  --shadow-md: 0 16px 44px rgba(13, 33, 55, 0.12);
  --radius: 16px;
}

/* Fontes self-hospedadas (fonts/) — eram Google Fonts (fonts.googleapis.com +
   fonts.gstatic.com), duas origens cross-origin bloqueando o primeiro paint.
   Arquivos = os 3 realmente baixados pelo site (rastreados por requisição de
   rede, subset "latin", que já cobre os acentos do português: U+0000-00FF).
   Ambas fontes são variáveis (wght num intervalo), por isso 1 arquivo cobre
   vários pesos — igual o próprio Google faz para o Newsreader. Licença OFL
   em fonts/OFL-Newsreader.txt e fonts/OFL-PlusJakartaSans.txt. */
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/newsreader-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/newsreader-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/plusjakartasans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; color: var(--navy); }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--gold-2); }
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy h1 em, .section--navy h2 em { color: var(--gold); }
/* --gold mede 2,41:1 sobre branco/bone (falha WCAG 2.4.11, exige 3:1); --gold-2 já é usado
   no site como dourado mais escuro e mede >=3,24:1 tanto sobre bone/branco quanto sobre
   navy/navy-deep — um único token cobre os dois contextos sem novo valor. */
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

/* ---------- Skip link ---------- */
/* Primeiro elemento focável do body. Fora da tela até receber foco (não usa
   display:none/visibility:hidden — isso tiraria o link da ordem de tabulação). */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--navy-deep); color: var(--bone);
  padding: 0.85rem 1.4rem; border-radius: 0 0 10px 10px;
  font-weight: 700; font-size: 0.95rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- Aviso <noscript> ---------- */
/* Só existe no DOM quando JS está desligado (é assim que <noscript> funciona) —
   pode ficar no CSS global sem risco de aparecer com JS ativo. */
.noscript-notice {
  background: var(--navy-deep); color: var(--bone); text-align: center;
  padding: 0.9rem 1.2rem; font-weight: 700; font-size: 0.92rem;
}
.noscript-notice a { color: var(--gold); text-decoration: underline; }

.container { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 7rem); }
.section--navy { background: var(--navy); color: rgba(246, 244, 239, 0.85); }

.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold-2);
  display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 2.2rem; height: 1px; background: var(--gold); }
.section--navy .eyebrow { color: var(--gold); }
.section-head { max-width: 660px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.9rem; border-radius: 999px;
  font-weight: 700; font-size: 0.98rem; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--gold { background: var(--gold); color: var(--navy-deep); }
.btn--wa { background: var(--wa); color: var(--navy-deep); }
.btn--ghost { border-color: var(--line); color: var(--navy); background: transparent; }
.section--navy .btn--ghost { border-color: var(--line-light); color: var(--bone); }

.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
  padding: 0.4rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line-light); color: var(--bone);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 24, 39, 0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-light);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 0.85rem;
  position: relative; /* âncora do menu mobile: acompanha a ilha */
  border-radius: 0; border: 1px solid transparent;
  transition: width 0.4s var(--ease), padding 0.4s var(--ease), margin 0.4s var(--ease),
              border-radius 0.4s var(--ease), background 0.4s var(--ease),
              border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* Ao rolar, a barra cheia se recolhe numa ilha flutuante (estilo Dynamic Island).
   A barra externa fica transparente e quem vira cápsula é o .container.
   A ilha é deliberadamente MAIS BAIXA que a barra cheia (logo 44->34px, padding
   0.85->0.45rem, subtítulo oculto): se ficasse mais alta, cobriria os títulos dos
   <details> de tratamentos.html, que dependem do scroll-margin-top: 90px. */
.site-header.is-island {
  background: transparent; backdrop-filter: none; border-bottom-color: transparent;
}
.site-header.is-island .container {
  width: min(940px, 100% - 3rem); /* no mobile a ilha recua mais que a barra (que usa 2.5rem) */
  margin-top: 0.6rem;
  padding: 0.45rem 0.6rem 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(8, 24, 39, 0.86); backdrop-filter: blur(16px) saturate(140%);
  border-color: var(--line-light);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.34);
}
.site-header.is-island .brand svg,
.site-header.is-island .brand-logo { width: 34px; height: 34px; }
.site-header.is-island .brand-spec { display: none; }
.site-header.is-island .site-nav { gap: 1.25rem; }
.site-header.is-island .site-nav .btn { padding: 0.6rem 1.25rem; }
.nav-sentinela { height: 1px; }

.brand { display: flex; align-items: center; gap: 0.8rem; color: var(--bone); }
.brand svg, .brand-logo { width: 44px; height: 44px; transition: width 0.4s var(--ease), height 0.4s var(--ease); }
/* o disco do medalhão é do mesmo navy do header e sumiria; o anel devolve a borda
   que o monograma placeholder tinha e faz a marca ler como medalha */
.brand-logo { border-radius: 50%; box-shadow: 0 0 0 1px var(--gold-2); }
.brand-name { font-family: var(--serif); font-size: 1.12rem; line-height: 1.2; }
.brand-spec { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { color: rgba(246, 244, 239, 0.8); font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }
.nav-toggle { display: none; background: none; border: 0; color: var(--bone); cursor: pointer; padding: 0.4rem; }
/* hambúrguer vira X. transform-box: view-box para a origem 12,12 valer em
   coordenadas do viewBox — uma <line> tem bounding box de altura zero e
   fill-box daria um centro de rotação errado. */
.nav-risco {
  transform-box: view-box; transform-origin: 12px 12px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-open .nav-risco--1 { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-risco--3 { transform: translateY(-6px) rotate(-45deg); }
.nav-open .nav-risco--2 { opacity: 0; transform: scaleX(0); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(246, 244, 239, 0.72); font-size: 0.95rem; }
.site-footer .footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem;
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
/* era h4 (sem regra global concorrente); virou h3 para não pular nível (WCAG heading-order,
   o h2 do CTA final vem antes no fluxo) — repõe peso/altura de linha que o h1,h2,h3 global
   mudaria (font-weight 500, line-height 1.12) para o visual continuar igual. */
.site-footer h3 { font-family: var(--sans); font-weight: 700; line-height: 1.4; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.site-footer li { margin-bottom: 0.55rem; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--line-light);
  padding-block: 1.4rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.85rem;
}
/* link "Denken Hub" tem cor quase igual ao texto ao redor (1,18:1) — sem sublinhado ele
   dependeria só da cor pra ser reconhecido como link (axe: link-in-text-block). */
.footer-bottom a { text-decoration: underline; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--wa); display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: var(--navy-deep); }

/* ---------- Tipografia adicional (Task 2) ---------- */
h3 { font-size: 1.22rem; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(4rem, 9vw, 7rem); }
.hero-grid, .about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin-top: 1rem; }
.hero-sub { max-width: 34rem; color: rgba(246, 244, 239, 0.8); margin-top: 1.3rem; font-size: 1.05rem; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2.1rem; }
.hero-chips { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 2rem; }

.hero-photo, .ph-photo {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5;
  border: 1px solid var(--line-light);
}
.hero-photo { border-radius: 999px 999px var(--radius) var(--radius); }
.ph-photo { border-radius: var(--radius); border-color: var(--line); }
/* filho direto: senão esta regra (0,1,1) vence qualquer <img> aninhada dentro da
   moldura — foi o que esticou o logo do badge para 100% da caixa */
.hero-photo > img, .ph-photo > img { width: 100%; height: 100%; object-fit: cover; }
.hero-mono, .ph-mono { display: none; position: absolute; inset: 0; place-items: center; }
.hero-mono { background: var(--navy-deep); }
.ph-mono { background: var(--navy); }
.hero-mono svg, .ph-mono svg { width: 35%; max-width: 140px; height: auto; }
.hero-photo.no-photo > img, .ph-photo.no-photo > img { display: none; }
.hero-photo.no-photo .hero-mono, .ph-photo.no-photo .ph-mono { display: grid; }

/* ---------- Badge sobre a foto ---------- */
/* A moldura tem overflow: hidden, então o badge fica dentro dela, recuado das
   bordas. O véu escuro sob o vidro garante contraste do texto independentemente
   do que estiver na foto atrás. */
.foto-badge {
  position: absolute; left: 0.9rem; right: 0.9rem; bottom: 0.9rem; z-index: 2;
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.72rem 0.95rem;
  border-radius: 14px;
  /* 0.86 e não menos: no pior caso (foto branca atrás do badge) o fundo efetivo
     fica em rgb(43,56,69) e a credencial dourada mede 4,96:1. Com 0.82 dava
     4,28:1, abaixo dos 4,5:1 exigidos para texto pequeno. */
  background: rgba(8, 24, 39, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(200, 161, 90, 0.4);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.34);
}
.foto-badge-marca {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%; box-shadow: 0 0 0 1px rgba(200, 161, 90, 0.55);
}
.foto-badge-texto { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.foto-badge-nome {
  font-family: var(--serif); font-size: 1.12rem; line-height: 1.15; color: var(--white);
}
.foto-badge-cred {
  font-size: 0.68rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------- Faixa de instituições (marquee) ---------- */
.strip { background: var(--navy-deep); padding-block: 1.1rem; overflow: hidden; }
.strip-track { display: flex; width: max-content; animation: strip 30s linear infinite; }
.strip-track span {
  white-space: nowrap; margin-right: 3rem;
  color: rgba(246, 244, 239, 0.55); font-size: 0.85rem; letter-spacing: 0.08em;
}
@keyframes strip { to { transform: translateX(-50%); } }

/* ---------- Cards (sintomas e tratamentos) ---------- */
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.card {
  display: flex; flex-direction: column;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 1.8rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card h3 { margin-bottom: 0.6rem; }
.card > a, .card p a { color: var(--gold-2); font-weight: 700; }
.card > a { margin-top: auto; }
.card > a:hover, .card p a:hover { text-decoration: underline; }
.card svg { width: 34px; height: 34px; margin-bottom: 1rem; }
.section--navy .card { background: rgba(246, 244, 239, 0.05); border: 1px solid var(--line-light); box-shadow: none; }
.section--navy .card:hover { background: rgba(246, 244, 239, 0.09); border-color: var(--gold); box-shadow: none; }
.section-cta { text-align: center; margin-top: clamp(2rem, 4vw, 3rem); }

/* ---------- Sobre curto ---------- */
.section--white { background: var(--white); }
.about-grid h2 + p { margin-top: 1.2rem; }
.about-grid p + p { margin-top: 1.1rem; }
.about-grid .btn { margin-top: 1.8rem; }

/* ---------- Jornada do paciente ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.step-num {
  display: block; font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 3rem);
  color: var(--gold-2); margin-bottom: 0.6rem;
}
.steps h3 { margin-bottom: 0.5rem; }

/* ---------- FAQ ---------- */
.faq-item { max-width: 44rem; border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding-block: 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 1.08rem; }
.faq-item summary::after {
  content: "▾"; color: var(--gold-2); flex-shrink: 0; transition: transform 0.2s var(--ease);
}
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-item p { padding-bottom: 1.2rem; }

/* ---------- CTA final ---------- */
.cta-final { max-width: 640px; margin-inline: auto; text-align: center; }
.cta-final p { margin-block: 1rem 2rem; }

/* ---------- Page-hero (páginas internas) ---------- */
.page-hero { padding-block: clamp(3rem, 6vw, 4.5rem); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-top: 1rem; }
.page-hero p { max-width: 40rem; color: rgba(246, 244, 239, 0.8); margin-top: 1.1rem; font-size: 1.05rem; }

/* ---------- Accordion de tratamentos ---------- */
.tx {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 1rem; scroll-margin-top: 90px;
}
.tx summary {
  list-style: none; cursor: pointer; padding: 1.3rem 1.6rem;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.1rem;
}
.tx summary::-webkit-details-marker { display: none; }
.tx-idx { font-family: var(--serif); font-size: 1.3rem; line-height: 1; color: var(--gold-2); }
.tx summary h2 { font-size: 1.35rem; margin: 0; transition: color 0.2s var(--ease); }
.tx summary:hover h2 { color: var(--gold-2); }
.tx-toggle { position: relative; width: 18px; height: 18px; }
.tx-toggle::before, .tx-toggle::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 2px; border-radius: 2px; background: var(--gold-2);
  transform: translateY(-50%);
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.tx-toggle::after { transform: translateY(-50%) rotate(90deg); }
.tx[open] .tx-toggle::after { opacity: 0; transform: translateY(-50%) rotate(0deg); }
.tx-body {
  padding: 0 1.6rem 1.8rem;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.6rem); align-items: start;
}
.tx-body p { color: var(--slate); }
.tx-body p + p { margin-top: 1rem; }
.tx-text .btn { margin-top: 1.6rem; }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }

  /* O menu fica sempre em display:flex e é escondido por opacidade/transform, não
     por display:none — display não é interpolável, então a versão anterior abria
     e fechava sem transição alguma. visibility entra no fim do fechamento para o
     painel não capturar toque enquanto está invisível. */
  .site-nav {
    position: absolute; inset: 100% 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--navy-deep); padding: 0.8rem 1rem 1.1rem; gap: 0.2rem;
    border-bottom: 1px solid var(--line-light);
    display: flex;
    opacity: 0; visibility: hidden; transform: translateY(-10px) scale(0.98);
    transform-origin: top center;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease),
                visibility 0s linear 0.28s;
  }
  .site-header.nav-open .site-nav {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.32s var(--ease), transform 0.32s var(--ease),
                visibility 0s linear 0s;
  }

  /* alvo de toque cheio e escalonamento na entrada.
     :not(.btn) porque .site-nav a (0,1,1) venceria .btn (0,1,0) e o CTA dourado
     perderia o próprio padding de botão. */
  .site-nav a {
    opacity: 0; transform: translateY(-6px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.2s;
  }
  .site-nav a:not(.btn) {
    padding: 0.85rem 0.9rem; border-radius: 12px; font-size: 1rem;
  }
  .site-nav a:not(.btn):active { background: rgba(246, 244, 239, 0.07); }
  .site-nav a[aria-current="page"] { background: rgba(200, 161, 90, 0.12); }
  .site-header.nav-open .site-nav a { opacity: 1; transform: none; }
  .site-header.nav-open .site-nav a:nth-child(1) { transition-delay: 0.04s; }
  .site-header.nav-open .site-nav a:nth-child(2) { transition-delay: 0.08s; }
  .site-header.nav-open .site-nav a:nth-child(3) { transition-delay: 0.12s; }
  .site-header.nav-open .site-nav a:nth-child(4) { transition-delay: 0.16s; }
  .site-header.nav-open .site-nav a:nth-child(5) { transition-delay: 0.2s; }
  .site-nav .btn { margin-top: 0.5rem; justify-content: center; }

  /* na ilha o menu desce colado nela, com os mesmos cantos */
  .site-header.is-island .site-nav {
    margin-top: 0.5rem; border-radius: 18px; border: 1px solid var(--line-light);
  }
  .site-header.is-island .container { padding-inline: 0.9rem; }
  .site-footer .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .cards-4, .cards-3, .steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  /* a ilha ainda se forma e o menu ainda abre, mas trocam de estado sem animar.
     !important porque .site-header.nav-open .site-nav (0,3,0) vence estes
     seletores e media query não acrescenta especificidade. */
  .site-header, .site-header .container, .brand svg,
  .site-nav, .site-nav a, .nav-risco { transition: none !important; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ============================================================
   TRATAMENTOS.HTML — arte do hero, índice de âncoras, cenas SVG
   ============================================================ */

/* ---------- Arte decorativa do page-hero ---------- */
.page-hero { position: relative; overflow: hidden; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero-art {
  position: absolute; right: -3%; top: 50%; transform: translateY(-50%);
  width: min(44%, 430px); height: auto; opacity: 0.28; pointer-events: none;
}

/* ---------- Índice de âncoras ---------- */
.tx-index { background: var(--white); border-bottom: 1px solid var(--line); padding-block: 1.3rem; }
.tx-index ul { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip-link {
  display: inline-flex; align-items: center;
  font-size: 0.82rem; font-weight: 700;
  padding: 0.42rem 1rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--navy);
  transition: background 0.22s var(--ease), color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.chip-link:hover, .chip-link:focus-visible {
  background: var(--navy); color: var(--bone); border-color: var(--navy);
}

/* ---------- Cenas anatômicas ---------- */
.scene {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.scene svg { width: 100%; height: auto; display: block; }
.scene text { font-family: var(--sans); font-size: 11px; letter-spacing: 0.03em; fill: rgba(246, 244, 239, 0.72); }
.scene .lead { stroke: rgba(246, 244, 239, 0.4); stroke-width: 1; }
.scene-cap {
  padding: 0.8rem 1.1rem 0.95rem; font-size: 0.82rem; line-height: 1.5;
  color: rgba(246, 244, 239, 0.72); border-top: 1px solid var(--line-light);
}
.scene-cap strong { color: var(--gold); font-weight: 700; }
/* cena em banda, largura cheia da seção (a cirúrgica em sobre.html) */
.scene--larga { max-width: 900px; margin-inline: auto; box-shadow: var(--shadow-md); }

/* traço que se desenha: --len = comprimento real do path, --d = atraso */
.scene-draw { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); }
.scene-fade { opacity: 0; }
.scene-slide { opacity: 0; }
/* pulso: só escala. Opacidade fica cheia o ciclo inteiro (contraste estável),
   e o elemento nasce invisível — só surge no --d, junto com o <g class="scene-fade"> que o embrulha. */
.scene-pulse { opacity: 0; transform-box: fill-box; transform-origin: center; }

details[open] .scene-draw  { animation: sceneDraw 1.4s var(--ease) var(--d, 0s) forwards; }
details[open] .scene-fade  { animation: sceneFade 0.7s var(--ease) var(--d, 0s) forwards; }
details[open] .scene-slide { animation: sceneSlide 0.9s var(--ease) var(--d, 0s) forwards; }
details[open] .scene-dim   { animation: sceneDim 0.8s var(--ease) var(--d, 0s) forwards; }
details[open] .scene-swing { animation: sceneSwing 1s var(--ease) var(--d, 0s) forwards; }
details[open] .scene-pulse { animation: scenePulse 2.6s var(--ease) var(--d, 0s) infinite; }

/* Cena fora de um <details> (a cirúrgica em sobre.html): dispara quando o
   IntersectionObserver põe .in no .reveal que a embrulha — sem JS novo. */
.reveal.in .scene-draw  { animation: sceneDraw 1.6s var(--ease) var(--d, 0s) forwards; }
.reveal.in .scene-fade  { animation: sceneFade 0.8s var(--ease) var(--d, 0s) forwards; }
.reveal.in .scene-slide { animation: sceneSlide 0.9s var(--ease) var(--d, 0s) forwards; }
.reveal.in .scene-pulse { animation: scenePulse 3.4s var(--ease) var(--d, 0s) infinite; }

.hero-art {
  stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400);
  animation: sceneDraw 1.8s var(--ease) var(--d, 0s) forwards;
}

@keyframes sceneDraw  { to { stroke-dashoffset: 0; } }
@keyframes sceneFade  { to { opacity: 1; } }
@keyframes sceneSlide {
  from { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, 0px)); }
  to   { opacity: 1; transform: translate(0px, 0px); }
}
@keyframes sceneDim   { to { opacity: 0.14; } }
@keyframes sceneSwing { to { transform: rotate(var(--rot, -18deg)); } }
@keyframes scenePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 1; transform: scale(1.12); } }

@media (max-width: 860px) {
  .page-hero-art { display: none; }
  .tx-body { grid-template-columns: 1fr; padding: 0 1.2rem 1.5rem; }
  .tx summary { padding: 1.1rem 1.2rem; gap: 0.85rem; }
  .tx summary h2 { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .scene-draw, .hero-art { stroke-dashoffset: 0; }
  .scene-fade, .scene-slide, .scene-pulse { opacity: 1; }
  .scene-dim { opacity: 0.14; }
  .scene-swing { transform: rotate(var(--rot, -18deg)); }
  .hero-art { animation: none; }
  details[open] .scene-draw,
  details[open] .scene-fade,
  details[open] .scene-slide,
  details[open] .scene-dim,
  details[open] .scene-swing,
  details[open] .scene-pulse { animation: none; }
}

/* ============================================================
   SOBRE.HTML — timeline de formação
   ============================================================ */
.tl { list-style: none; border-left: 1px solid var(--line); }
.tl-item { position: relative; padding-left: 1.8rem; padding-bottom: 2.2rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -5px; top: 0.35rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 3px var(--white);
}
.tl-item h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.tl-item p { color: var(--slate); }
/* revelação em sequência: cada item soma um pequeno atraso ao transition padrão do .reveal */
.tl-item:nth-child(1) { transition-delay: 0s; }
.tl-item:nth-child(2) { transition-delay: 0.08s; }
.tl-item:nth-child(3) { transition-delay: 0.16s; }
.tl-item:nth-child(4) { transition-delay: 0.24s; }
.tl-item:nth-child(5) { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .tl-item { transition-delay: 0s !important; }
}

/* ============================================================
   CONTATO.HTML — cards de canal, formulário, mapa
   ============================================================ */

/* ---------- Cards de canal (dentro de .cards-4) ---------- */
.card-cta { margin-top: auto; }
.card-cta .btn { padding: 0.7rem 1.4rem; font-size: 0.9rem; }

/* ---------- Formulário + lateral ---------- */
.contact-grid {
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: clamp(2.5rem, 5vw, 4rem); align-items: start;
}
.contact-form-wrap h2 { margin-top: 0.5rem; }
.contact-aside { display: flex; flex-direction: column; gap: 1.4rem; }

#form-contato { display: flex; flex-direction: column; gap: 1.3rem; margin-top: 1.8rem; }
#form-contato label {
  display: flex; flex-direction: column; gap: 0.5rem;
  font-weight: 600; font-size: 0.9rem; color: var(--navy);
}
#form-contato input,
#form-contato select,
#form-contato textarea {
  font-family: var(--sans); font-size: 1rem; font-weight: 400; color: var(--ink);
  /* --line mede 1,32:1 sobre --bone — falha WCAG 1.4.11 (3:1) para borda de controle de
     formulário. --slate (já usado no site) mede 4,98:1 sobre --bone; --line continua
     valendo como divisor decorativo em .tx/.chip-link/.faq-item/.tl/.tx-index. */
  border: 1px solid var(--slate); border-radius: 10px; padding: 0.85rem 1rem;
  background: var(--bone); transition: border-color 0.2s var(--ease);
}
#form-contato input:focus,
#form-contato select:focus,
#form-contato textarea:focus { border-color: var(--gold-2); }
#form-contato textarea { resize: vertical; min-height: 110px; }
#form-contato select { cursor: pointer; }
#form-contato button { align-self: flex-start; margin-top: 0.4rem; }
.form-note { font-size: 0.85rem; color: var(--slate); margin-top: 0.9rem; }

/* ---------- Mapa ---------- */
.map-frame {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-light); aspect-ratio: 16 / 7;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .map-frame { aspect-ratio: 4 / 3; }
}
