/* Instituto de Urologia de Joinville
   Cores da marca: verde #00817A e branco. Tipografia: Baskervville (títulos,
   mesma família do logotipo) e Hanken Grotesk (textos). */

@font-face { font-family: "Baskervville"; src: url("../fonts/baskervville-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Baskervville"; src: url("../fonts/baskervville-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Baskervville"; src: url("../fonts/baskervville-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --noite: #00807A;        /* verde da marca (CMYK 91 29 55 8): hero, painel, contato e rodapé */
  --verde: #00807A;        /* cor da marca */
  --verde-escuro: #006660;
  --agua: #D6F4EF;         /* destaque sobre o verde */
  --menta: #EAF4F2;        /* superfícies claras */
  --linha: #D7E6E3;
  --papel: #FFFFFF;
  --texto: #10302C;
  --suave: #4F6B67;

  --serifa: "Baskervville", "Baskerville Old Face", Baskerville, Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --raio-g: 40px;
  --raio-m: 22px;
  --raio-p: 12px;
  --largura: 1160px;
  --margem: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--noite);
  color: var(--texto);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--papel); outline-offset: 3px; border-radius: 6px; }
.folha :focus-visible, .formulario :focus-visible, .topo :focus-visible { outline-color: var(--verde-escuro); }

.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pular { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--papel); color: var(--texto); padding: 10px 16px; border-radius: var(--raio-p); }
.pular:focus { top: 16px; }

.largura { width: 100%; max-width: calc(var(--largura) + 2 * var(--margem)); margin-inline: auto; padding-inline: var(--margem); }

/* ---------- Tipos ---------- */
.titulo {
  font-family: var(--serifa);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.selo {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--papel);
}
.hero .selo { background: rgba(0, 104, 99, 0.55); }

/* ---------- Botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border: 1px solid transparent; border-radius: 999px;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s;
}
.botao-p { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }
.botao-cheio { width: 100%; }
.botao-claro { background: var(--papel); color: var(--verde-escuro); }
.botao-claro:hover { background: var(--agua); }
.botao-contorno { border-color: rgba(255, 255, 255, 0.7); color: var(--papel); }
.botao-contorno:hover { background: rgba(255, 255, 255, 0.32); border-color: var(--papel); }
.botao-verde { background: var(--verde); color: var(--papel); }
.botao-verde:hover { background: var(--verde-escuro); }
.link { color: var(--verde-escuro); font-weight: 600; text-underline-offset: 4px; }
.link:hover { color: var(--verde); }

/* ---------- Navegação ---------- */
.topo { position: fixed; inset: 16px 0 auto 0; z-index: 50; padding-inline: var(--margem); pointer-events: none; }
.nav {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: var(--largura); margin-inline: auto; padding: 10px 10px 10px 22px;
  border: 1px solid rgba(0, 128, 122, 0.12); border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: box-shadow .25s;
}
.rolado .nav, .aberto .nav { background: var(--papel); box-shadow: 0 8px 28px rgba(0, 80, 76, 0.16); }
.nav-logo img { width: 148px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.botao) {
  display: block; padding: 10px 13px; border-radius: 999px;
  color: var(--texto); font-size: 0.9375rem; font-weight: 500; text-decoration: none;
}
.nav-links a:not(.botao):hover { color: var(--verde-escuro); background: var(--menta); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center;
  min-height: min(100svh, 900px);
  padding: 150px 0 130px;
  background: var(--noite);
  color: var(--papel);
}
.hero-fotos {
  position: absolute; inset: 0 0 0 auto; z-index: -1; width: 64%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.22) 22%, #000 58%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.22) 22%, #000 58%);
}
.hero-fotos::after {  /* tom verde da marca sobre a foto, mais fechado embaixo */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(0, 128, 122, 0.9) 0%, rgba(0, 128, 122, 0) 40%),
    linear-gradient(to right, rgba(0, 128, 122, 0.72) 0%, rgba(0, 128, 122, 0.3) 55%, rgba(0, 128, 122, 0.16) 100%);
}
.hero-foto { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.hero-foto.ativa { opacity: 1; }
.hero-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

.hero-conteudo { position: relative; }
.hero h1 {
  max-width: 11em; margin-top: 22px;
  font-family: var(--serifa); font-weight: 400;
  font-size: clamp(2.5rem, 1.3rem + 4.4vw, 4.6rem);
  line-height: 1.04; letter-spacing: -0.018em;
  text-wrap: balance;
}
.hero-texto { max-width: 29em; margin-top: 24px; font-size: 1.1875rem; color: rgba(255, 255, 255, 0.96); }
.hero-acoes { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-pontos { display: flex; gap: 8px; margin-top: 56px; }
.hero-pontos button {
  width: 36px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; position: relative;
}
.hero-pontos button::before {
  content: ""; position: absolute; inset: 10px 0; border-radius: 4px;
  background: rgba(255, 255, 255, 0.4); transition: background-color .3s;
}
.hero-pontos button.ativa::before { background: var(--papel); }

/* ---------- Folha branca ---------- */
.folha {
  position: relative; z-index: 1;
  margin-top: calc(-1 * var(--raio-g));
  border-radius: var(--raio-g);
  background: var(--papel);
  padding-bottom: 24px;
}
.secao { padding-block: clamp(64px, 9vw, 112px); }
.cabecalho { max-width: 40em; margin-bottom: 44px; }
.cabecalho p { margin-top: 14px; color: var(--suave); font-size: 1.125rem; }

/* Acesso rápido */
.rapido { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 44px; }
.rapido-item { padding: 8px 32px 8px 0; }
.rapido-item + .rapido-item { padding-left: 32px; border-left: 1px solid var(--linha); }
.rapido h2 { font: 400 1.5rem/1.2 var(--serifa); color: var(--verde-escuro); }
.rapido p { margin-top: 8px; color: var(--suave); font-size: 1rem; }

/* O Instituto */
.sobre { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.sobre-texto p { margin-top: 18px; max-width: 34em; color: var(--suave); }
.sobre-texto .lead { margin-top: 22px; color: var(--texto); font-size: 1.1875rem; }
.sobre-foto { aspect-ratio: 4 / 5; border-radius: var(--raio-g); overflow: hidden; background: var(--menta); }
.sobre-foto img { width: 100%; height: 100%; object-fit: cover; }
.valores { margin-top: 30px; border-top: 1px solid var(--linha); }
.valores li { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--linha); color: var(--suave); font-size: 1rem; }
.valores strong { font: 400 1.1875rem/1.35 var(--serifa); color: var(--verde-escuro); }

/* Tratamentos */
.cartoes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cartao { padding: 26px 24px 28px; border: 1px solid var(--linha); border-radius: var(--raio-m); background: var(--papel); transition: border-color .2s, background-color .2s; }
.cartao:hover { border-color: var(--verde); background: #F7FBFA; }
.icone { display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--raio-p); background: var(--menta); color: var(--verde); }
.icone svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cartao h3 { margin-top: 22px; font: 600 1.125rem/1.3 var(--sans); }
.cartao p { margin-top: 8px; color: var(--suave); font-size: 0.9688rem; line-height: 1.55; }

/* Painel escuro: como funciona */
.painel {
  margin: 8px clamp(8px, 1.6vw, 24px);
  padding-block: clamp(64px, 8vw, 104px);
  border-radius: var(--raio-g);
  background: var(--noite);
  color: var(--papel);
}
.painel .titulo { margin-top: 18px; max-width: 16em; }
.passos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 56px; }
.passos li { position: relative; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.35); }
.passos li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--agua); }
.passo-num { font: 400 2.25rem/1 var(--serifa); color: var(--agua); }
.passos h3 { margin-top: 18px; font: 600 1.125rem/1.3 var(--sans); }
.passos p { margin-top: 8px; color: rgba(255, 255, 255, 0.94); font-size: 0.9688rem; line-height: 1.55; }

/* Corpo clínico */
.medicos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.medico { padding: 22px; border: 1px solid var(--linha); border-radius: var(--raio-m); background: var(--papel); }
.medico-topo { display: flex; gap: 16px; align-items: center; }
.medico-foto { flex: none; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 18px; overflow: hidden; background: var(--menta); }
.medico-foto img { width: 52%; opacity: 0.4; }
.medico-foto img.retrato { width: 100%; height: 100%; object-fit: cover; opacity: 1; }  /* use class="retrato" na foto real */
.medico h3 { font: 400 1.3125rem/1.2 var(--serifa); text-wrap: balance; }
.medico-registro { margin-top: 6px; color: var(--verde-escuro); font-size: 0.9375rem; font-weight: 600; line-height: 1.4; }
.medico-crm { margin-top: 2px; color: var(--suave); font-size: 0.875rem; }
.medico-bio { margin-top: 18px; color: var(--suave); font-size: 0.9688rem; line-height: 1.55; }
.medico-formacao { margin-top: 14px; border-top: 1px solid var(--linha); border-bottom: 1px solid var(--linha); }
.medico-formacao summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; font-size: 0.9375rem; font-weight: 600; cursor: pointer; list-style: none; }
.medico-formacao summary::-webkit-details-marker { display: none; }
.medico-formacao summary::after { content: "+"; font: 400 1.375rem/1 var(--serifa); color: var(--verde); transition: transform .2s; }
.medico-formacao[open] summary::after { transform: rotate(45deg); }
.medico-formacao ul { padding: 0 0 14px 18px; list-style: disc; color: var(--suave); font-size: 0.9063rem; line-height: 1.5; }
.medico-formacao li + li { margin-top: 6px; }
.medico-formacao li::marker { color: var(--verde); }
.medico .link { display: inline-block; margin-top: 16px; font-size: 0.9375rem; }

/* Convênios */
.convenios { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; border-top: 1px solid var(--linha); }
.convenios-texto p { margin: 18px 0 28px; max-width: 30em; color: var(--suave); }
.convenios-lista { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.convenios-lista li { padding: 16px 20px; border-radius: var(--raio-p); background: var(--menta); font-weight: 500; }

/* Dúvidas */
.duvidas { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 88px); border-top: 1px solid var(--linha); }
.duvidas .cabecalho { margin-bottom: 0; }
.duvidas .cabecalho .link { display: inline-block; margin-top: 6px; }
.faq details { border-bottom: 1px solid var(--linha); }
.faq details:first-child { border-top: 1px solid var(--linha); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 1.75rem/1 var(--serifa); color: var(--verde); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 40px 22px 0; color: var(--suave); max-width: 38em; }

/* Instagram */
.insta { display: flex; align-items: center; gap: 24px; margin-block: 0 clamp(40px, 6vw, 72px); padding: clamp(24px, 3.4vw, 40px); border-radius: var(--raio-m); background: var(--menta); }
.insta-icone { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--papel); color: var(--verde); }
.insta-icone svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.insta-texto { flex: 1; }
.insta h2 { font: 400 1.75rem/1.2 var(--serifa); }
.insta p { margin-top: 6px; max-width: 34em; color: var(--suave); }

/* ---------- Contato ---------- */
.contato { padding-block: clamp(72px, 9vw, 120px); color: var(--papel); }
.contato-grade { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.contato .titulo { margin-top: 18px; }
.contato-texto > p:not(.selo) { margin: 18px 0 28px; max-width: 28em; color: rgba(255, 255, 255, 0.95); }
.contato-dados { margin-top: 44px; border-top: 1px solid rgba(255, 255, 255, 0.32); }
.contato-dados div { display: grid; grid-template-columns: 7em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.32); }
.contato-dados dt { color: var(--agua); font-size: 0.9375rem; }
.contato-dados a { text-underline-offset: 4px; }

.formulario { padding: clamp(24px, 3.4vw, 40px); border-radius: var(--raio-m); background: var(--papel); color: var(--texto); }
.campo + .campo { margin-top: 18px; }
.campo label { display: block; margin-bottom: 6px; font-size: 0.9375rem; font-weight: 600; }
.campo input, .campo textarea {
  width: 100%; padding: 13px 15px;
  border: 1px solid #B9CFCB; border-radius: var(--raio-p);
  background: var(--papel); color: var(--texto); font: inherit;
}
.campo textarea { resize: vertical; min-height: 110px; }
.campo input::placeholder, .campo textarea::placeholder { color: #86A09C; }
.campo input:focus-visible, .campo textarea:focus-visible { outline: 3px solid rgba(0, 129, 122, 0.3); outline-offset: 0; border-color: var(--verde); }
.campo [aria-invalid="true"] { border-color: #B3261E; }
.form-erro { margin-top: 14px; color: #B3261E; font-size: 0.9375rem; font-weight: 500; }
.formulario .botao { margin-top: 22px; }
.form-nota { margin-top: 14px; color: var(--suave); font-size: 0.8438rem; line-height: 1.5; }

/* ---------- Rodapé ---------- */
.rodape { padding-bottom: 28px; color: rgba(255, 255, 255, 0.94); font-size: 0.9375rem; }
.rodape-grade { display: grid; grid-template-columns: 1.2fr 0.6fr 1fr; gap: 40px; padding-block: 48px; border-top: 1px solid rgba(255, 255, 255, 0.32); }
.rodape-logo { width: 190px; }
.rodape-rt { margin-top: 20px; }
.rodape-links li + li { margin-top: 8px; }
.rodape-links a { text-decoration: none; }
.rodape-links a:hover { color: var(--papel); text-decoration: underline; text-underline-offset: 4px; }
.rodape-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.32); font-size: 0.875rem; }

/* WhatsApp flutuante */
.whats-flutuante {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 22px 0 16px; border-radius: 999px;
  border: 2px solid var(--papel);
  background: var(--verde); color: var(--papel); font-weight: 600; font-size: 0.9688rem; text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 70, 66, 0.28);
}
.whats-flutuante:hover { background: var(--verde-escuro); }
.whats-flutuante svg { width: 28px; height: 28px; fill: currentColor; }

/* ---------- Telas médias ---------- */
@media (max-width: 1080px) {
  .cartoes { grid-template-columns: repeat(2, 1fr); }
  .passos { grid-template-columns: repeat(2, 1fr); gap: 40px 32px; }
  .medicos { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50%; background: var(--menta); cursor: pointer;
  }
  .nav-toggle-barras, .nav-toggle-barras::before, .nav-toggle-barras::after {
    display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--verde-escuro); transition: transform .2s;
  }
  .nav-toggle-barras { position: relative; }
  .nav-toggle-barras::before, .nav-toggle-barras::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-barras::before { top: -6px; }
  .nav-toggle-barras::after { top: 6px; }
  .aberto .nav-toggle-barras { background: transparent; }
  .aberto .nav-toggle-barras::before { transform: translateY(6px) rotate(45deg); }
  .aberto .nav-toggle-barras::after { transform: translateY(-6px) rotate(-45deg); }

  .nav { position: relative; padding: 8px 8px 8px 20px; }
  .nav-links {
    display: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px;
    border: 1px solid var(--linha); border-radius: var(--raio-m);
    background: var(--papel); box-shadow: 0 12px 32px rgba(0, 80, 76, 0.18);
  }
  .aberto .nav-links { display: flex; }
  .nav-links a:not(.botao) { padding: 14px 16px; font-size: 1.0625rem; }
  .nav-cta { margin: 8px 0 0; }
  .nav-cta .botao { width: 100%; min-height: 50px; }
}

/* ---------- Celular ---------- */
@media (max-width: 760px) {
  :root { --raio-g: 28px; }
  body { font-size: 1rem; }

  .hero { align-items: flex-end; min-height: 100svh; padding: 0 0 84px; }
  .hero-fotos {
    inset: 0 0 auto 0; width: 100%; height: 62%;
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
  }
  .hero-fotos::after { background: linear-gradient(rgba(0, 128, 122, 0.3) 0%, rgba(0, 128, 122, 0.16) 45%, rgba(0, 128, 122, 0.55) 100%); }
  .hero-foto img { object-position: 68% 30%; }
  .hero-conteudo { padding-top: 46svh; }
  .hero-texto { font-size: 1.0625rem; }
  .hero-acoes .botao { flex: 1 1 100%; }
  .hero-pontos { margin-top: 32px; }

  .rapido { grid-template-columns: 1fr; padding-top: 28px; }
  .rapido-item, .rapido-item + .rapido-item { padding: 18px 0; border-left: 0; }
  .rapido-item + .rapido-item { border-top: 1px solid var(--linha); }

  .sobre, .convenios, .duvidas, .contato-grade { grid-template-columns: 1fr; }
  .convenios-lista { grid-template-columns: repeat(2, 1fr); }
  .sobre-foto { aspect-ratio: 4 / 3; order: -1; }
  .valores li { grid-template-columns: 1fr; gap: 2px; }
  .cartoes, .passos, .medicos { grid-template-columns: 1fr; }
  .cartoes { gap: 10px; }
  .cartao { display: grid; grid-template-columns: 46px 1fr; column-gap: 16px; padding: 20px; }
  .cartao .icone { grid-row: span 2; }
  .cartao h3 { margin-top: 0; }
  .duvidas .cabecalho { margin-bottom: 8px; }
  .faq details p { padding-right: 0; }
  .rodape-grade { grid-template-columns: 1fr; gap: 28px; }
  .whats-flutuante { right: 14px; bottom: 14px; width: 56px; padding: 0; justify-content: center; }
  .whats-flutuante span { display: none; }
  .insta { flex-direction: column; align-items: flex-start; }
  .insta .botao { width: 100%; }
}

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