/* ==========================================================================
   Dr. Roberto Kiehl — Urologia · Itaim Bibi
   Identidade derivada do próprio consultório: parede grafite (fundo do
   retrato oficial), papel quente, bordô (óculos), latão (placa gravada)
   e o piso xadrez preto-e-branco como assinatura.
   O hero é a parede do consultório: retrato emoldurado com passe-partout,
   placa de latão com o CRM e a linha do piso xadrez ao pé.
   ========================================================================== */

:root {
  --grafite: #232529;
  --grafite-2: #2b2e33;
  --papel: #f5f3ee;
  --papel-2: #edeae2;
  --branco: #ffffff;
  --tinta: #26272b;
  --tinta-suave: #5d5f66;
  --bordo: #7e2e2e;
  --bordo-escuro: #602424;
  --rosado: #cfa894;           /* itálico de ênfase sobre grafite */
  --latao-1: #c8a86f;
  --latao-2: #a5813f;
  --linha: #dcd8cc;
  --linha-escura: #383b41;
  --whatsapp: #1faa53;

  --fonte-display: "Besley", Georgia, "Times New Roman", serif;
  --fonte-texto: "Archivo", "Segoe UI", Arial, sans-serif;

  --largura-max: 1160px;
  --raio: 6px;
  --sombra-quadro: 0 30px 60px -18px rgba(0, 0, 0, 0.55), 0 12px 24px -12px rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--fonte-texto);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--bordo); color: var(--papel); }

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

a { color: var(--bordo); }

.container {
  max-width: var(--largura-max);
  margin-inline: auto;
  padding-inline: 28px;
}

/* ---------- Tipografia ---------- */

h1, h2, h3 {
  font-family: var(--fonte-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.3rem, 4.8vw, 3.7rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.22rem; }

h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--rosado);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bordo);
  margin-bottom: 20px;
}

.eyebrow-light { color: #c2ab93; }

/* Assinatura: o piso xadrez do consultório, em miniatura. */
.checker-tab {
  width: 28px;
  height: 14px;
  flex: none;
  background: repeating-conic-gradient(currentColor 0% 25%, transparent 0% 50%) 0 0 / 14px 14px;
  opacity: 0.85;
}

.checker-strip {
  height: 22px;
  background: repeating-conic-gradient(#1a1b1e 0% 25%, var(--papel) 0% 50%) 0 0 / 22px 22px;
}

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

.btn {
  display: inline-block;
  font-family: var(--fonte-texto);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 15px 28px;
  border-radius: var(--raio);
  border: 1px solid transparent;
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease,
              transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--bordo);
  color: var(--branco);
}
.btn-primary:hover {
  background: var(--bordo-escuro);
  box-shadow: 0 8px 20px -8px rgba(126, 46, 46, 0.6);
}

.btn-light {
  background: var(--papel);
  color: var(--grafite);
}
.btn-light:hover {
  background: var(--branco);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--papel);
  border-color: rgba(245, 243, 238, 0.32);
}
.btn-ghost:hover { border-color: rgba(245, 243, 238, 0.85); }

.btn-sm { padding: 10px 20px; font-size: 0.88rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--grafite);
  border-bottom: 1px solid var(--linha-escura);
  transition: box-shadow 0.25s ease;
}

.site-header.scrolled {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 15px;
}

.brand { text-decoration: none; }

.brand-name {
  display: block;
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 1.14rem;
  color: var(--papel);
  line-height: 1.2;
}

.brand-crm {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #96999f;
}

.site-nav { display: flex; gap: 30px; }

.site-nav a {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: #c6c8cd;
  text-decoration: none;
  padding-block: 4px;
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--rosado);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.28s ease;
}

.site-nav a:hover { color: var(--papel); }
.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--papel);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Hero: a parede do consultório ---------- */

.hero {
  background:
    radial-gradient(120% 90% at 78% 10%, rgba(255, 255, 255, 0.05), transparent 55%),
    var(--grafite);
  color: var(--papel);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  padding-block: clamp(64px, 8vw, 104px) clamp(56px, 7vw, 88px);
}

.hero h1 { color: var(--branco); }

.hero-sub {
  margin-top: 24px;
  max-width: 52ch;
  font-size: 1.1rem;
  color: #c1c3c8;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-facts {
  display: flex;
  gap: clamp(28px, 4vw, 48px);
  margin-top: 48px;
  padding-top: 30px;
  border-top: 1px solid var(--linha-escura);
}

.hero-facts dt {
  font-family: var(--fonte-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--branco);
  line-height: 1.1;
}

.hero-facts dd {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: #96999f;
  margin-top: 4px;
}

/* O retrato como quadro de galeria: passe-partout, moldura fina,
   sombra funda e placa de latão gravada com o registro. */

.hero-frame {
  justify-self: center;
  width: min(400px, 100%);
}

.hero-frame-mat {
  background: var(--papel);
  padding: clamp(14px, 1.8vw, 20px);
  border: 1px solid rgba(0, 0, 0, 0.55);
  outline: 1px solid rgba(245, 243, 238, 0.14);
  outline-offset: 3px;
  box-shadow: var(--sombra-quadro);
}

.hero-frame-mat img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 12%;
}

.hero-plate {
  width: fit-content;
  margin: 22px auto 0;
  text-align: center;
  padding: 9px 22px 10px;
  background: linear-gradient(160deg, var(--latao-1), var(--latao-2));
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 2px rgba(0, 0, 0, 0.25),
    0 6px 14px -6px rgba(0, 0, 0, 0.5);
}

.plate-name {
  display: block;
  font-family: var(--fonte-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  color: #2e2410;
}

.plate-sub {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(46, 36, 16, 0.75);
  margin-top: 2px;
}

/* Entrada orquestrada do hero */

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@keyframes frame-settle {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}

.hero-copy > * { animation: rise-in 0.7s ease both; }
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.14s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.24s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.34s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.46s; }

.hero-frame { animation: frame-settle 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both; }

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

.section { padding-block: clamp(72px, 9vw, 108px); }

.section-alt { background: var(--papel-2); }

.section-dark {
  background: var(--grafite);
  color: var(--papel);
  padding-block: 0;
}

.section-dark h2 { color: var(--branco); }
.section-dark .section-lead { color: #c1c3c8; }

.section-head { max-width: 740px; margin-bottom: clamp(22px, 2.5vw, 30px); }

.section-lead {
  margin-top: 16px;
  color: var(--tinta-suave);
  font-size: 1.06rem;
}

/* ---------- Sobre ---------- */

.sobre-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}

.sobre-texto p + p { margin-top: 20px; }

.sobre-texto strong { font-weight: 600; }

/* Capitular editorial no primeiro parágrafo */
.sobre-texto p:first-child::first-letter {
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 3.4em;
  line-height: 0.82;
  float: left;
  padding-right: 12px;
  padding-top: 6px;
  color: var(--bordo);
}

.sobre-cred {
  background: var(--branco);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  padding: 30px;
  box-shadow: 0 16px 40px -24px rgba(38, 39, 43, 0.25);
}

.sobre-cred::before {
  content: "";
  display: block;
  height: 14px;
  margin: -30px -30px 24px;
  border-radius: var(--raio) var(--raio) 0 0;
  background: repeating-conic-gradient(#1a1b1e 0% 25%, var(--papel) 0% 50%) 0 0 / 14px 14px;
}

.cred-title {
  font-family: var(--fonte-texto);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  margin-bottom: 14px;
}

.cred-list {
  list-style: none;
  margin-bottom: 28px;
}

.cred-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block: 9px;
  border-bottom: 1px solid var(--linha);
}

.cred-list span { font-size: 0.9rem; color: var(--tinta-suave); }

.cred-list strong {
  font-family: var(--fonte-display);
  font-size: 1.18rem;
}

.cred-timeline { list-style: none; }

.cred-timeline li {
  position: relative;
  padding-left: 22px;
  padding-block: 7px;
  font-size: 0.95rem;
}

.cred-timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 8px;
  height: 8px;
  background: var(--bordo);
}

/* ---------- Cards de atuação ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--branco);
  border: 1px solid var(--linha);
  border-radius: var(--raio);
  padding: 30px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #cdc7b8;
  box-shadow: 0 18px 40px -18px rgba(38, 39, 43, 0.22);
}

.card h3 {
  margin-bottom: 12px;
  transition: color 0.2s ease;
}

.card:hover h3 { color: var(--bordo); }

.card p { font-size: 0.97rem; color: var(--tinta-suave); }

/* ---------- Consultório ---------- */

.fotos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.fotos-grid figure {
  border-radius: var(--raio);
  overflow: hidden;
  border: 1px solid var(--linha);
  background: var(--branco);
}

.fotos-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  transition: transform 0.5s ease;
}

.fotos-grid figure:hover img { transform: scale(1.025); }

.fotos-grid figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  padding: 14px 18px;
}

.fotos-grid figcaption::before {
  content: "";
  width: 20px;
  height: 10px;
  background: repeating-conic-gradient(var(--tinta) 0% 25%, transparent 0% 50%) 0 0 / 10px 10px;
  opacity: 0.7;
}

/* ---------- Avaliações / CTA escuro ---------- */

.avaliacao-inner {
  max-width: 780px;
  padding-block: clamp(80px, 10vw, 112px);
}

.dark-pull {
  font-family: var(--fonte-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  line-height: 1.35;
  color: var(--rosado);
  margin-bottom: 22px;
}

/* ---------- Localização ---------- */

.local-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 4vw, 48px);
  align-items: start;
}

address { font-style: normal; margin-bottom: 28px; }

address p + p { margin-top: 6px; }

.contact-list { list-style: none; }

.contact-list li {
  padding-block: 13px;
  border-bottom: 1px solid var(--linha);
}

.contact-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tinta-suave);
  margin-bottom: 2px;
}

.contact-list a {
  font-weight: 600;
  text-decoration: none;
  color: var(--tinta);
  transition: color 0.2s ease;
}

.contact-list a:hover { color: var(--bordo); }

.local-mapa iframe {
  width: 100%;
  height: 440px;
  border: 0;
  border-radius: var(--raio);
  display: block;
  filter: grayscale(0.4);
  transition: filter 0.3s ease;
}

.local-mapa:hover iframe { filter: grayscale(0); }

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

.site-footer {
  background: var(--grafite);
  color: #96999f;
  font-size: 0.88rem;
  border-top: 1px solid var(--linha-escura);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 40px;
  padding-block: 52px;
}

.footer-brand {
  font-family: var(--fonte-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--papel);
  margin-bottom: 6px;
}

.footer-col p + p { margin-top: 8px; }

.footer-legal { font-size: 0.79rem; line-height: 1.65; }

/* ---------- WhatsApp flutuante ---------- */

.whats-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--whatsapp);
  color: var(--branco);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 13px 21px;
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.whats-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
}

/* ---------- Animações de entrada ao rolar ---------- */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-copy > *, .hero-frame { animation: none; }
  .btn, .whats-float, .fotos-grid img { transition: none; }
}

/* ---------- Foco visível ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--bordo);
  outline-offset: 3px;
}

.site-header a:focus-visible,
.hero a:focus-visible,
.section-dark a:focus-visible,
.site-footer a:focus-visible {
  outline-color: var(--papel);
}

/* ---------- Responsivo ---------- */

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-frame {
    order: -1;
    width: min(320px, 78%);
  }

  .sobre-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .local-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 760px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--grafite);
    border-bottom: 1px solid var(--linha-escura);
    padding: 8px 28px 16px;
    display: none;
  }

  .site-nav.open { display: flex; }

  .site-nav a { padding-block: 12px; }

  .site-nav a::after { content: none; }

  .nav-toggle { display: flex; }

  .header-inner { position: relative; }
}

@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
  .fotos-grid { grid-template-columns: 1fr; }
  .hero-facts { gap: 24px; flex-wrap: wrap; }
  .whats-float span { display: none; }
  .whats-float { padding: 15px; }
}
