/*
  Mendes Odontologia — Landing Page institucional estática
  CSS puro, sem frameworks. Visual editorial/premium com paleta mate profunda.
*/

:root {
  --paper: #f3eee5;
  --paper-soft: #faf7f0;
  --graphite: #1f2522;
  --graphite-soft: #343c36;
  --olive: #26352b;
  --olive-2: #3f4f39;
  --old-gold: #a8894b;
  --muted-gold: #d8c7a3;
  --line: rgba(31, 37, 34, 0.16);
  --line-light: rgba(243, 238, 229, 0.18);
  --shadow: 0 28px 90px rgba(19, 27, 22, 0.16);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
  --header-height: 82px;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--graphite);
  text-rendering: geometricPrecision;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
a,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header: começa leve e fica compacto/vidrado no scroll */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 72px);
  color: var(--paper-soft);
  transition: background 0.45s var(--ease), color 0.45s var(--ease), height 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.site-header::after {
  content: "";
  position: absolute;
  left: clamp(22px, 5vw, 72px);
  right: clamp(22px, 5vw, 72px);
  bottom: 0;
  height: 1px;
  background: rgba(250, 247, 240, 0.18);
  transition: background 0.45s var(--ease);
}

.site-header.is-scrolled {
  height: 70px;
  background: rgba(243, 238, 229, 0.86);
  color: var(--graphite);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 45px rgba(31, 37, 34, 0.08);
}

.site-header.is-scrolled::after {
  background: rgba(31, 37, 34, 0.11);
}

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 13px;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid currentColor;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1;
}

.brand-text {
  font-size: 0.73rem;
  line-height: 1.05;
  text-transform: uppercase;
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 38px);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.site-nav a {
  position: relative;
  opacity: 0.82;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: currentColor;
  transition: right 0.35s var(--ease);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  right: 0;
}

.nav-cta {
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  padding: 12px 18px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--old-gold);
  border-color: var(--old-gold);
  color: var(--paper-soft);
}

.nav-toggle {
  display: none;
}

/* Elementos recorrentes */
.section-dark {
  background: var(--olive);
  color: var(--paper-soft);
}

.eyebrow,
.section-kicker {
  margin: 0 0 22px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--old-gold);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.045em;
}

h1 {
  margin: 0;
  font-size: clamp(4.35rem, 10vw, 10.8rem);
  max-width: 980px;
}

h2 {
  margin: 0;
  font-size: clamp(3rem, 6.4vw, 7.6rem);
}

p {
  line-height: 1.75;
}

.button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 25px;
  cursor: pointer;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button-gold {
  background: var(--old-gold);
  color: var(--paper-soft);
}

.button-gold:hover,
.button-gold:focus-visible {
  background: #92733a;
}

.button-ghost {
  border: 1px solid rgba(250, 247, 240, 0.44);
  color: var(--paper-soft);
}

.button-ghost:hover,
.button-ghost:focus-visible {
  border-color: var(--old-gold);
  color: var(--muted-gold);
}

/* Scroll Reveal: o JS adiciona .is-visible via IntersectionObserver */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 {
  transition-delay: 0.12s;
}

.delay-2 {
  transition-delay: 0.24s;
}

/* Hero assimétrico */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  align-items: end;
  gap: clamp(30px, 5vw, 80px);
  padding: calc(var(--header-height) + 70px) clamp(22px, 5vw, 72px) 70px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 18%, rgba(168, 137, 75, 0.18), transparent 28%),
    linear-gradient(105deg, rgba(38, 53, 43, 0.98) 0%, rgba(38, 53, 43, 0.92) 53%, rgba(31, 37, 34, 0.72) 100%);
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  padding-bottom: 4vh;
}

.hero-lead {
  max-width: 560px;
  margin: 30px 0 0 12vw;
  color: rgba(250, 247, 240, 0.72);
  font-size: clamp(1rem, 1.3vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 42px 0 0 12vw;
}

.hero-visual {
  align-self: center;
  justify-self: end;
  width: min(100%, 470px);
  height: min(68vh, 670px);
  margin: 0 0 7vh;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual img {
  filter: saturate(0.76) contrast(1.04) brightness(0.92);
  transform: scale(1.03);
}

.hero-visual figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: 245px;
  padding: 14px 16px;
  background: rgba(31, 37, 34, 0.52);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(250, 247, 240, 0.8);
}

.hero-note {
  position: absolute;
  left: clamp(22px, 5vw, 72px);
  bottom: 32px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
  max-width: 330px;
  color: rgba(250, 247, 240, 0.64);
}

.hero-note span {
  font-family: var(--serif);
  color: var(--old-gold);
  font-size: 2.1rem;
}

.hero-note p {
  margin: 4px 0 0;
  font-size: 0.9rem;
}

/* Filosofia */
.intro {
  padding: clamp(90px, 13vw, 180px) clamp(22px, 5vw, 72px);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.62fr);
  gap: clamp(35px, 7vw, 110px);
  align-items: start;
}

.intro h2 {
  max-width: 920px;
}

.intro-text {
  margin-top: 12vh;
  color: rgba(31, 37, 34, 0.72);
}

.intro-text p + p {
  margin-top: 28px;
}

/* Especialidades sem cards */
.specialties {
  padding: clamp(85px, 12vw, 170px) clamp(22px, 5vw, 72px);
  background: var(--paper-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.specialties-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.44fr) minmax(420px, 1fr) minmax(260px, 0.42fr);
  gap: clamp(28px, 4vw, 70px);
  align-items: start;
}

.specialties-heading {
  position: sticky;
  top: 110px;
}

.specialties-heading h2 {
  font-size: clamp(2.6rem, 4.2vw, 5.4rem);
}

.specialties-heading p {
  margin-top: 22px;
  color: rgba(31, 37, 34, 0.58);
}

.service-list {
  border-top: 1px solid var(--line);
}

.service-row {
  width: 100%;
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: baseline;
  gap: 20px;
  padding: clamp(24px, 4vw, 44px) 0;
  background: transparent;
  color: var(--graphite);
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
}

.service-number {
  font-family: var(--serif);
  color: var(--old-gold);
  font-size: 1.6rem;
}

.service-name {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.6vw, 6.4rem);
  line-height: 0.88;
  letter-spacing: -0.055em;
  transition: transform 0.45s var(--ease), color 0.45s var(--ease);
}

.service-meta {
  justify-self: end;
  color: rgba(31, 37, 34, 0.5);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.service-row:hover .service-name,
.service-row:focus-visible .service-name,
.service-row.is-active .service-name {
  color: var(--olive-2);
  transform: translateX(18px);
}

.service-preview {
  position: sticky;
  top: 110px;
  margin-top: 18vh;
}

.service-preview img {
  height: 320px;
  filter: saturate(0.72) contrast(1.03);
  box-shadow: 0 22px 70px rgba(31, 37, 34, 0.13);
  transition: opacity 0.32s var(--ease), transform 0.45s var(--ease);
}

.service-preview.is-changing img {
  opacity: 0.38;
  transform: translateY(8px);
}

.service-preview p {
  margin: 22px 0 0;
  color: rgba(31, 37, 34, 0.64);
  font-size: 0.92rem;
}

/* Experiência */
.experience {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: clamp(34px, 7vw, 120px);
  align-items: center;
  padding: clamp(90px, 13vw, 185px) clamp(22px, 5vw, 72px);
}

.experience-image {
  height: min(68vh, 720px);
  margin-left: clamp(0px, 4vw, 72px);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.experience-image img {
  filter: saturate(0.7) contrast(1.08) brightness(0.86);
}

.experience-copy {
  max-width: 780px;
}

.experience-copy h2 {
  font-size: clamp(3.1rem, 6vw, 7rem);
}

.process-list {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  border-top: 1px solid var(--line-light);
}

.process-list li {
  display: grid;
  grid-template-columns: minmax(180px, 0.42fr) 1fr;
  gap: 28px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line-light);
}

.process-list span {
  color: var(--muted-gold);
  font-weight: 600;
}

.process-list p {
  margin: 0;
  color: rgba(250, 247, 240, 0.68);
}

/* Galeria editorial */
.atelier {
  position: relative;
  padding: clamp(90px, 14vw, 200px) clamp(22px, 5vw, 72px) clamp(70px, 11vw, 150px);
}

.atelier::before {
  content: "";
  position: absolute;
  right: -12vw;
  top: 22%;
  width: 42vw;
  height: 42vw;
  border-radius: 50%;
  background: rgba(168, 137, 75, 0.08);
  pointer-events: none;
}

.atelier-title {
  max-width: 840px;
  margin-left: min(13vw, 180px);
}

.atelier-gallery {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(250px, 0.56fr) minmax(300px, 1fr);
  gap: clamp(28px, 5vw, 78px);
  align-items: end;
  margin-top: 70px;
}

.atelier-gallery figure {
  margin: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-tall {
  height: min(72vh, 720px);
}

.gallery-wide {
  height: min(48vh, 500px);
  transform: translateY(-12%);
}

.atelier-gallery img {
  filter: saturate(0.76) contrast(1.02);
  transition: transform 0.8s var(--ease);
}

.atelier-gallery figure:hover img {
  transform: scale(1.04);
}

/* Citação */
.quote-section {
  padding: clamp(85px, 13vw, 170px) clamp(22px, 10vw, 150px);
  background: var(--paper-soft);
  text-align: left;
}

.quote-section blockquote {
  margin: 0;
  max-width: 1040px;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 6vw, 7.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.quote-author {
  margin: 30px 0 0 35vw;
  color: rgba(31, 37, 34, 0.6);
}

/* CTA final */
.contact-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  padding: clamp(80px, 11vw, 150px) clamp(22px, 5vw, 72px);
  background: var(--olive);
  color: var(--paper-soft);
}

.contact-copy h2 {
  max-width: 850px;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-width: 230px;
}

.contact-link {
  color: rgba(250, 247, 240, 0.74);
  border-bottom: 1px solid rgba(250, 247, 240, 0.34);
  padding-bottom: 5px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 26px clamp(22px, 5vw, 72px);
  color: rgba(31, 37, 34, 0.56);
  font-size: 0.82rem;
  background: var(--paper);
}

.site-footer p {
  margin: 0;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 22px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.modal.is-open {
  pointer-events: auto;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 12, 0.62);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(100%, 620px);
  max-height: min(90vh, 820px);
  overflow-y: auto;
  background: var(--paper-soft);
  color: var(--graphite);
  padding: clamp(30px, 5vw, 58px);
  box-shadow: 0 32px 110px rgba(0, 0, 0, 0.32);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.45s var(--ease);
}

.modal.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--graphite);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.modal-panel h2 {
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  margin-bottom: 28px;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 8px;
}

.contact-form span {
  color: rgba(31, 37, 34, 0.62);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(31, 37, 34, 0.22);
  border-radius: 0;
  background: transparent;
  color: var(--graphite);
  padding: 13px 0;
  outline: none;
  resize: vertical;
  transition: border-color 0.25s var(--ease);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  border-color: var(--old-gold);
}

.form-submit {
  margin-top: 10px;
  justify-self: start;
}

.form-feedback {
  min-height: 24px;
  margin: 0;
  color: var(--olive-2);
  font-weight: 600;
}

/* Responsivo */
@media (max-width: 1020px) {
  .hero,
  .intro-grid,
  .specialties-layout,
  .experience,
  .contact-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: start;
  }

  .hero-lead,
  .hero-actions,
  .atelier-title {
    margin-left: 0;
  }

  .hero-visual {
    justify-self: start;
    width: min(100%, 560px);
    height: 52vh;
    margin: 8px 0 58px clamp(60px, 18vw, 180px);
  }

  .intro-text {
    margin-top: 0;
    max-width: 680px;
  }

  .specialties-heading,
  .service-preview {
    position: static;
  }

  .service-preview {
    margin-top: 0;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: center;
  }

  .service-preview img {
    height: 250px;
  }

  .experience-image {
    margin-left: 0;
    height: 48vh;
  }

  .gallery-wide {
    transform: none;
  }

  .quote-author {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 72px;
  }

  .site-header {
    background: rgba(38, 53, 43, 0.96);
    color: var(--paper-soft);
  }

  .site-header.is-scrolled {
    background: rgba(38, 53, 43, 0.96);
    color: var(--paper-soft);
  }

  .eyebrow,
  .section-kicker {
    font-size: 0.67rem;
    letter-spacing: 0.13em;
  }

  .nav-toggle {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 7px;
    width: 44px;
    height: 44px;
    place-content: center;
    border: 1px solid rgba(250, 247, 240, 0.28);
    background: transparent;
    cursor: pointer;
  }

  .nav-toggle span {
    width: 18px;
    height: 1px;
    background: currentColor;
    transition: transform 0.3s var(--ease);
  }

  .nav-toggle.is-open span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .nav-toggle.is-open span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(82vw, 360px);
    height: 100vh;
    padding: 110px 32px 32px;
    background: var(--olive);
    color: var(--paper-soft);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 25px;
    transform: translateX(100%);
    transition: transform 0.45s var(--ease);
    box-shadow: -24px 0 60px rgba(0, 0, 0, 0.22);
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  h1 {
    /* Ajuste mobile: mantém impacto editorial sem cortar palavras longas. */
    font-size: clamp(3rem, 14vw, 4.85rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  h2 {
    font-size: clamp(2.65rem, 14vw, 4.8rem);
  }

  .hero {
    min-height: auto;
    padding-top: 118px;
    padding-bottom: 54px;
  }

  .hero-lead {
    margin-top: 24px;
  }

  .hero-actions {
    margin-top: 32px;
  }

  .hero-visual {
    width: 86%;
    height: 390px;
    margin-left: auto;
    margin-bottom: 70px;
  }

  .hero-note {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: -35px;
  }

  .button {
    width: 100%;
  }

  .service-row {
    grid-template-columns: 38px 1fr;
    gap: 12px;
  }

  .service-meta {
    grid-column: 2;
    justify-self: start;
    margin-top: 6px;
  }

  .service-name {
    font-size: clamp(2.35rem, 12vw, 4.1rem);
  }

  .service-row:hover .service-name,
  .service-row:focus-visible .service-name,
  .service-row.is-active .service-name {
    transform: translateX(6px);
  }

  .service-preview {
    grid-template-columns: 1fr;
  }

  .service-preview img {
    height: 260px;
  }

  .process-list li {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .atelier-gallery {
    grid-template-columns: 1fr;
    margin-top: 42px;
  }

  .gallery-tall,
  .gallery-wide {
    height: 360px;
  }

  .contact-actions {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}

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

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