/* ========== Variáveis ========== */
:root {
  --cream: #faf6f0;
  --sand: #f1e9dd;
  --sage: #8a9a7b;
  --sage-dark: #5f6f52;
  --terracotta: #c08a6d;
  --terracotta-text: #8f5639; /* versão mais escura para textos pequenos (contraste AA) */
  --text: #3d3a35;
  --text-soft: #6b665e;
  --white: #ffffff;
  --border: #e4dbcd;

  --font-title: "Cormorant Garamond", Georgia, serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(61, 58, 53, 0.08);
  --header-h: 76px;
}

/* ========== Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
picture { display: contents; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

/* Foco visível para navegação por teclado */
:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 300;
  padding: .75rem 1.25rem; border-radius: 999px;
  background: var(--sage-dark); color: var(--white); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: .5rem; }
em { font-style: italic; color: var(--sage-dark); }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.container--narrow { width: min(760px, 100% - 2.5rem); }

.eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--terracotta-text);
  margin-bottom: .75rem;
}

/* ========== Botões ========== */
.btn {
  display: inline-block;
  padding: .9rem 1.8rem;
  border-radius: 999px;
  background: var(--sage-dark);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--sage-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: background .25s, color .25s, transform .25s;
}

.btn--ghost { background: transparent; color: var(--sage-dark); }
.btn--ghost:hover { background: var(--sage-dark); color: var(--white); border-color: var(--sage-dark); }
.btn--small { padding: .55rem 1.3rem; font-size: .95rem; }
.btn--full { width: 100%; }

/* ========== Header ========== */
.header {
  position: fixed;
  inset: 0 0 auto;
  height: var(--header-h);
  z-index: 100;
  transition: background .3s, box-shadow .3s;
}
.header.is-scrolled {
  background: rgba(250, 246, 240, .95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--border);
}
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo { text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.logo__name { font-family: var(--font-title); font-size: 1.6rem; font-weight: 600; }
.logo__sub { font-size: .75rem; color: var(--text-soft); letter-spacing: .05em; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) {
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-soft);
  transition: color .2s;
}
.nav a:not(.btn):hover { color: var(--sage-dark); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 32px; height: 24px; position: relative; }
.nav-toggle span {
  position: absolute; left: 0; width: 100%; height: 2px;
  background: var(--text); border-radius: 2px; transition: transform .3s, opacity .3s;
}
.nav-toggle span:nth-child(1) { top: 2px; }
.nav-toggle span:nth-child(2) { top: 11px; }
.nav-toggle span:nth-child(3) { top: 20px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ========== Hero ========== */
.hero {
  padding: calc(var(--header-h) + 4rem) 0 6rem;
  background:
    radial-gradient(circle at 85% 20%, rgba(138, 154, 123, .18), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(192, 138, 109, .12), transparent 40%);
}
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 4rem; align-items: center; }
.hero__lead { font-size: 1.15rem; color: var(--text-soft); margin: 1.5rem 0 2.25rem; max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero__image { position: relative; }
.photo-placeholder,
.hero__image img {
  aspect-ratio: 4 / 5;
  width: 100%;
  object-fit: cover;
  border-radius: 200px 200px var(--radius) var(--radius);
  background: linear-gradient(160deg, var(--sand), #e3d6c3);
  display: grid;
  place-items: center;
  color: var(--text-soft);
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-style: italic;
  box-shadow: var(--shadow);
}
.hero__image img { height: auto; object-position: center 35%; }
.hero__badge {
  position: absolute;
  left: -1.5rem;
  bottom: 2rem;
  background: var(--white);
  padding: 1rem 1.4rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.hero__badge strong { font-family: var(--font-title); font-size: 1.8rem; color: var(--sage-dark); }
.hero__badge span { font-size: .85rem; color: var(--text-soft); }

/* ========== Seções ========== */
.section { padding: 6rem 0; }
.section--tinted { background: var(--sand); }
.section__head { max-width: 640px; margin: 0 auto 3.5rem; text-align: center; }
.section__head p:last-child:not(.eyebrow) { color: var(--text-soft); }

/* Sobre */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; }
.about__text p { color: var(--text-soft); margin-bottom: 1.25rem; }
.credentials { list-style: none; margin-top: 2rem; border-top: 1px solid var(--border); }
.about__title h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
.credentials li {
  display: grid; grid-template-columns: 9rem 1fr; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--border); font-weight: 600; line-height: 1.5;
}
.credentials span { font-weight: 400; color: var(--text-soft); }

/* Cards */
.cards { display: grid; gap: 1.5rem; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--white);
  padding: 2.25rem 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .3s;
}

.card p { color: var(--text-soft); }
.card__icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(138, 154, 123, .15);
  display: grid; place-items: center; margin-bottom: 1.25rem;
}
.card__icon svg, .contact__list svg {
  width: 26px; height: 26px; fill: none; stroke: var(--sage-dark);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.card--service { border-top: 4px solid var(--sage); display: flex; flex-direction: column; }
.card--service p { flex: 1; }
.tag {
  align-self: flex-start;
  margin-top: 1.5rem;
  font-size: .85rem; font-weight: 700;
  color: var(--sage-dark);
  background: rgba(138, 154, 123, .15);
  padding: .35rem .9rem; border-radius: 999px;
}

.cards--2 { grid-template-columns: repeat(2, 1fr); }

/* Citação */
.quote { margin: 4rem auto 0; max-width: 720px; text-align: center; }
.quote p {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.3;
  color: var(--text);
}

/* Reflexões */
.posts { display: grid; gap: 1.5rem; max-width: 760px; margin-inline: auto; }
.post {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--terracotta);
}
.post h3 { font-size: 1.9rem; margin-bottom: 1rem; }
.post p:not(.post__tag) { color: var(--text-soft); margin-bottom: 1rem; }
.post p:last-child { margin-bottom: 0; }
.post__tag {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--terracotta-text); margin-bottom: .5rem;
}

/* Consultório */
.gallery {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  grid-auto-rows: 260px;
  gap: 1rem;
}
.gallery__item {
  padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
}
.gallery__item--main { grid-row: span 2; }
.gallery__item img,
.gallery__item .photo-placeholder {
  width: 100%; height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
  font-size: 1.1rem;
  transition: transform .5s ease;
}
.gallery__item:hover img,
.gallery__item:hover .photo-placeholder { transform: scale(1.04); }
.gallery__item:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }
.gallery__item { position: relative; }
.gallery__item--video { cursor: pointer; }
.gallery__item video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.gallery__play {
  position: absolute; left: 1rem; bottom: 1rem;
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem 1rem .5rem .5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--text); font-weight: 700; font-size: .9rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
  transition: transform .25s;
}
.gallery__item--video:hover .gallery__play { transform: translateY(-2px); }
.gallery__play svg {
  width: 32px; height: 32px; padding: 8px 7px 8px 9px;
  border-radius: 50%; background: var(--sage-dark); fill: var(--white);
}

.office-info {
  margin-top: 2.5rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.5rem;
  text-align: center;
}
.office-info p { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.office-info svg {
  width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--sage-dark);
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(30, 28, 25, .92);
  display: flex; align-items: center; justify-content: center;
  padding: 4rem 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox__content { max-width: min(1000px, 100%); max-height: 100%; display: flex; }
.lightbox__content img,
.lightbox__content video,
.lightbox__content .photo-placeholder {
  max-width: 100%; max-height: calc(100vh - 8rem);
  max-height: calc(100dvh - 8rem);
  border-radius: 12px; object-fit: contain;
}
.lightbox__content .photo-placeholder { width: min(700px, 90vw); aspect-ratio: 4 / 3; height: auto; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: none; border: 0; color: var(--white);
  cursor: pointer; line-height: 1; opacity: .8; transition: opacity .2s;
}
.lightbox__close:hover, .lightbox__nav:hover { opacity: 1; }
.lightbox__close { top: 1rem; right: 1.5rem; font-size: 2.8rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); font-size: 4rem; padding: 1rem; }
.lightbox__nav--prev { left: .5rem; }
.lightbox__nav--next { right: .5rem; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 1rem; }
.faq__item { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.faq__item summary {
  list-style: none; cursor: pointer;
  padding: 1.4rem 3.5rem 1.4rem 1.75rem;
  font-weight: 700; position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 1.75rem; top: 50%;
  transform: translateY(-50%); font-size: 1.6rem; font-weight: 400;
  color: var(--sage-dark); transition: transform .3s;
}
.faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__item p { padding: 0 1.75rem 1.5rem; color: var(--text-soft); }

/* Contato */
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact__text > p { color: var(--text-soft); }
.contact__list { list-style: none; margin-top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.contact__list li { display: flex; gap: 1rem; align-items: flex-start; }
.contact__list svg { flex-shrink: 0; margin-top: .15rem; }
.contact__list a { text-decoration: none; }
.contact__list a:hover { color: var(--sage-dark); }

.form {
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 1.1rem;
}
.form label { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea {
  font: inherit; font-weight: 400;
  padding: .8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--cream);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(138, 154, 123, .25);
}
.form input.is-invalid { border-color: #c0675a; }
.form textarea { resize: vertical; }
.form__note { font-size: .85rem; color: var(--text-soft); text-align: center; }

/* Footer */
.footer { background: var(--text); color: #d8d2c8; padding: 3rem 0 calc(6rem + env(safe-area-inset-bottom)); font-size: .9rem; }
.footer__inner { display: flex; flex-direction: column; gap: 1rem; text-align: center; align-items: center; }
.footer .logo__name { color: var(--white); }
.footer__warning { max-width: 520px; opacity: .85; }
.footer__copy { opacity: .85; }

/* WhatsApp flutuante */
.whatsapp-float {
  position: fixed; z-index: 90;
  right: calc(1.25rem + env(safe-area-inset-right));
  bottom: calc(1.25rem + env(safe-area-inset-bottom));
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .4);
  transition: transform .25s;
}

.whatsapp-float svg { width: 32px; height: 32px; fill: var(--white); }

/* Animação de entrada */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (hover: hover) {
  .btn:hover { background: var(--text); border-color: var(--text); transform: translateY(-2px); }
  .card:hover { transform: translateY(-4px); }
  .whatsapp-float:hover { transform: scale(1.08); }
}
.btn:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ========== Responsivo ========== */

/* Menu vira "hambúrguer" até 1024px para não apertar os 7 links */
@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: .25rem;
    padding: 1rem 1.5rem 1.75rem;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    background: var(--cream);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .06);
    transform: translateY(-120%);
    visibility: hidden;
    transition: transform .3s, visibility .3s;
  }
  .nav a:not(.btn) { padding: .75rem 1rem; font-size: 1.05rem; }
  .nav .btn { margin-top: .75rem; }
  .nav.is-open { transform: none; visibility: visible; }
  .header:has(.nav.is-open) { background: var(--cream); box-shadow: 0 1px 0 var(--border); }
}

@media (max-width: 900px) {
  .hero { padding-top: calc(var(--header-h) + 2.5rem); }
  .hero__inner, .about, .contact__inner { grid-template-columns: 1fr; gap: 3rem; }
  .hero__image { max-width: 420px; margin-inline: auto; width: 100%; }
  .hero__badge { left: 1rem; bottom: -1.75rem; }
  .cards--3, .cards--2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; gap: .75rem; }
  .gallery__item--main { grid-column: span 2; grid-row: span 3; }
  .quote { margin-top: 3rem; }
}

@media (max-width: 560px) {
  :root { --header-h: 68px; }
  body { font-size: 1rem; }
  .section { padding: 4rem 0; }
  .section__head { margin-bottom: 2.5rem; }
  .hero { padding-bottom: 4rem; }
  .hero__lead { font-size: 1.05rem; }
  .hero__actions .btn { flex: 1 1 100%; text-align: center; }
  .logo__name { font-size: 1.4rem; }
  .logo__sub { font-size: .7rem; }
  .card { padding: 1.75rem 1.5rem; }
  .form { padding: 1.75rem; }
  .credentials li { grid-template-columns: 1fr; gap: 0; }
  .post { padding: 1.75rem; }
  .post h3 { font-size: 1.6rem; }
  .faq__item summary { padding: 1.2rem 3rem 1.2rem 1.25rem; }
  .faq__item p { padding: 0 1.25rem 1.25rem; }
  .office-info p { flex-direction: column; text-align: center; }
  .lightbox__nav { font-size: 3rem; padding: .5rem; }
}

/* Telas grandes: mais respiro */
@media (min-width: 1440px) {
  .container { width: min(1200px, 100% - 4rem); }
  .hero { padding-bottom: 8rem; }
}
