/* Instituto Müller — site institucional
   Mesmo sistema visual do site de Emagrecimento (drsergiomuller.netlify.app),
   adaptado para um hub institucional com 3 especialidades. */

:root {
  --ink: #14120F;
  --ink-2: #1E1B16;
  --ink-3: #0F0D0B;
  --cream: #F6F2EA;
  --paper: #FFFFFF;
  --line-light: #E7E0D2;
  --line-light-2: #DFD7C7;
  --gold: #C69C4E;
  --gold-soft: #E0C58E;
  --gold-dark: #A8813A;
  --text: #211D18;
  --text-mid: #3B352C;
  --text-muted: #6E675C;
  --on-dark: #F7F2E7;
  --on-dark-muted: #B5AC9B;
  --on-dark-faint: #8E8474;

  --container: 1240px;
  --section-pad: clamp(72px, 8vw, 128px);

  --duration-fast: 150ms;
  --duration-normal: 480ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: 'Jost', system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

img { display: block; max-width: 100%; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, blockquote p {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: var(--section-pad) 24px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 2px;
  font-family: 'Jost', sans-serif;
  font-weight: 500;
  letter-spacing: .03em;
  font-size: 15px;
  padding: 18px 30px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--duration-fast) ease, color var(--duration-fast) ease,
              border-color var(--duration-fast) ease, transform var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-soft); color: var(--ink); box-shadow: 0 10px 28px -10px rgba(198,156,78,0.55); }
.btn-outline-dark { border-color: rgba(198,156,78,0.45); color: var(--gold-soft); }
.btn-outline-dark:hover { background: rgba(198,156,78,0.1); color: #F1E4C8; }
.btn-outline-light { border-color: var(--ink); color: var(--ink); }
.btn-outline-light:hover { background: var(--ink); color: var(--on-dark); }
.btn:active { transform: scale(0.97); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(20,18,15,0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(198,156,78,0.22);
}
.site-header .container {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 38px; width: auto; }
.brand-name { display: flex; flex-direction: column; gap: 2px; }
.brand-name strong {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: .16em;
  color: #E8DFCE;
  line-height: 1;
}
.brand-name span {
  font-size: 9.5px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
}
.main-nav { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a:not(.btn) {
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #B9B0A0;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%; background-repeat: no-repeat; background-size: 0% 1px;
  padding-bottom: 2px;
  transition: background-size var(--duration-normal) var(--ease-out-expo), color var(--duration-fast) ease;
}
.main-nav a:not(.btn):hover { color: #E8DFCE; background-size: 100% 1px; }
.main-nav .btn { padding: 12px 22px; white-space: nowrap; }

/* ---------- Hero institucional ---------- */
.hero {
  background: var(--ink);
  color: #F1EBDD;
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero picture, .hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(15,13,11,0.82) 0%, rgba(15,13,11,0.88) 60%, rgba(15,13,11,0.94) 100%);
}
.hero .container {
  position: relative; z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding-top: 60px;
  padding-bottom: 60px;
}
.hero-kicker { display: flex; align-items: center; gap: 12px; }
.hero-kicker .rule { width: 34px; height: 1px; background: var(--gold); display: block; }
.hero-kicker span:last-child { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--on-dark);
}
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero-copy { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.65; color: var(--on-dark-muted); max-width: 34em; margin: 0; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }
.hero-ctas .btn-gold { padding: 19px 34px; font-size: 15px; }
.hero-ctas .btn-outline-dark { padding: 18px 30px; font-size: 15px; }
.hero-location {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-faint);
  padding-top: 8px;
}
.hero-location .rule { width: 30px; height: 1px; background: rgba(241,235,221,0.3); display: block; }

/* ---------- Sobre / números ---------- */
.about { background: var(--cream); }
.about .container { display: flex; flex-direction: column; gap: 48px; align-items: center; text-align: center; }
.about-head { display: flex; flex-direction: column; gap: 18px; max-width: 30em; }
.about-head h2 { font-size: clamp(31px, 3.6vw, 48px); line-height: 1.12; margin: 0; }
.about > .container > p { font-size: 16.5px; line-height: 1.75; color: var(--text-muted); max-width: 46em; margin: 0; }
.about-stats { display: flex; flex-wrap: wrap; gap: clamp(32px, 6vw, 72px); justify-content: center; }
.about-stat { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.about-stat .num { font-family: 'Cormorant Garamond', serif; font-size: clamp(52px, 6vw, 72px); color: var(--gold-dark); line-height: 1; }
.about-stat .label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }

/* ---------- Especialidades ---------- */
.specialties { background: var(--paper); border-top: 1px solid var(--line-light); }
.section-head { display: flex; flex-direction: column; gap: 18px; max-width: 34em; margin: 0 auto 56px; text-align: center; align-items: center; }
.section-head h2 { font-size: clamp(31px, 3.6vw, 48px); line-height: 1.12; margin: 0; }
.section-head p { font-size: 16.5px; line-height: 1.7; color: var(--text-muted); margin: 0; }
.specialties-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1px; background: var(--line-light-2); }
.specialty-card { background: var(--paper); display: flex; flex-direction: column; }
.specialty-media { position: relative; height: 320px; overflow: hidden; }
.specialty-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%;
  transition: transform 1.1s var(--ease-out-expo);
}
.specialty-card:hover .specialty-media img { transform: scale(1.045); }

.specialty-media-rotate picture {
  position: absolute; inset: 0; z-index: 1;
  opacity: 0;
}
.specialty-media-rotate picture:first-child { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .specialty-media-rotate picture { animation: specialty-crossfade 10s ease-in-out infinite; }
  .specialty-media-rotate picture:nth-child(2) { animation-delay: 5s; }
}
@keyframes specialty-crossfade {
  0%, 40% { opacity: 1; }
  50%, 90% { opacity: 0; }
  100% { opacity: 1; }
}

.specialty-num {
  position: absolute; left: 24px; bottom: 24px; z-index: 2;
  font-family: 'Cormorant Garamond', serif; font-size: 40px; color: var(--on-dark); line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
}
.specialty-body { padding: 32px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.specialty-body h3 { font-weight: 500; font-size: 24px; line-height: 1.25; margin: 0; color: var(--text); }
.specialty-doctor { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); }
.specialty-body p { font-size: 15px; line-height: 1.65; color: var(--text-muted); margin: 0; flex: 1; }
.specialty-body .btn { align-self: flex-start; margin-top: 8px; padding: 13px 22px; font-size: 13.5px; }

/* ---------- Equipe ---------- */
.team { background: var(--cream); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 40px 32px; }
.team-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.team-photo {
  width: 148px; height: 148px; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--line-light-2); margin-bottom: 16px;
  transition: border-color var(--duration-fast) ease;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out-expo); }
.team-card:hover .team-photo { border-color: var(--gold); }
.team-card:hover .team-photo img { transform: scale(1.06); }
.team-card h3 { font-family: 'Cormorant Garamond', serif; font-weight: 500; font-size: 19px; margin: 0; color: var(--text); }
.team-role { font-size: 12px; letter-spacing: .08em; color: var(--gold-dark); margin-top: 2px; }
.team-cred { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Localização ---------- */
.location { background: var(--paper); border-top: 1px solid var(--line-light); }
.location .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(32px, 4vw, 60px); align-items: center; }
.location-copy { display: flex; flex-direction: column; gap: 24px; }
.location-copy h2 { font-size: clamp(29px, 3.2vw, 42px); line-height: 1.14; margin: 0; }
.location-table { display: flex; flex-direction: column; border-top: 1px solid var(--line-light); }
.location-table div { padding: 18px 0; border-bottom: 1px solid var(--line-light); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.location-table .k { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: #9A9284; }
.location-table .v { font-size: 15.5px; color: var(--text-mid); text-align: right; }
.location-copy > a { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid var(--gold); padding-bottom: 4px; align-self: flex-start; }
.location-map { width: 100%; height: clamp(300px, 34vw, 440px); border: 1px solid var(--line-light); overflow: hidden; }
.location-map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.35) contrast(1.02); }

/* ---------- CTA final ---------- */
.final-cta { background: var(--ink); color: #F1EBDD; padding: clamp(76px, 9vw, 128px) 24px; text-align: center; }
.final-cta .container { display: flex; flex-direction: column; gap: 26px; align-items: center; }
.final-cta .eyebrow { color: var(--gold); }
.final-cta h2 { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.1; margin: 0; color: var(--on-dark); max-width: 20em; }
.final-cta p { font-size: 16.5px; line-height: 1.7; color: var(--on-dark-muted); margin: 0; max-width: 40em; }
.final-cta .hero-ctas { padding-top: 8px; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--ink-3); color: var(--on-dark-faint); padding: clamp(48px, 5vw, 72px) 24px 32px; }
.site-footer .container { display: flex; flex-direction: column; gap: 44px; }
.footer-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px; align-items: start; }
.footer-brand { display: flex; flex-direction: column; gap: 16px; }
.footer-brand img { height: 60px; width: auto; object-fit: contain; object-position: left center; }
.footer-brand span { font-size: 13.5px; line-height: 1.7; font-weight: 300; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col .head { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: #847D6D; }
.footer-col a, .footer-col span { font-size: 14px; color: var(--on-dark-faint); }
.footer-col a {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%; background-repeat: no-repeat; background-size: 0% 1px;
  padding-bottom: 1px;
  transition: background-size var(--duration-normal) var(--ease-out-expo), color var(--duration-fast) ease;
}
.footer-col a:hover { color: var(--gold); background-size: 100% 1px; }
.footer-bottom { border-top: 1px solid rgba(241,235,221,0.09); padding-top: 24px; display: flex; flex-wrap: wrap; gap: 16px 40px; justify-content: space-between; }
.footer-bottom .legal { font-size: 11.5px; line-height: 1.7; font-weight: 300; color: #847D6D; max-width: 70ch; }
.footer-bottom .copyright { font-size: 11.5px; color: #847D6D; font-weight: 300; }

/* ---------- Intro da marca ---------- */
html.intro-active, html.intro-active body { overflow: hidden; height: 100%; }
.site-intro {
  position: fixed; inset: 0; z-index: 500;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  opacity: 1;
  transition: opacity .4s ease;
}
.site-intro.is-hiding { opacity: 0; }
.site-intro-mark {
  width: 84px; height: auto;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity .45s var(--ease-out-expo), transform .45s var(--ease-out-expo);
  will-change: transform, opacity;
}
.site-intro-mark.is-visible { opacity: 1; transform: scale(1); }
.site-intro-mark.is-traveling {
  transition: transform .6s var(--ease-out-expo), opacity .35s ease .3s;
  opacity: 0;
}

/* ---------- Reveal ao rolar a página ---------- */
.reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity var(--duration-normal) var(--ease-out-expo),
                transform var(--duration-normal) var(--ease-out-expo);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}
:is(.about-stat, .specialty-card, .team-card):nth-child(1) { --reveal-delay: 0ms; }
:is(.about-stat, .specialty-card, .team-card):nth-child(2) { --reveal-delay: 90ms; }
:is(.about-stat, .specialty-card, .team-card):nth-child(3) { --reveal-delay: 180ms; }
:is(.about-stat, .specialty-card, .team-card):nth-child(4) { --reveal-delay: 270ms; }
:is(.about-stat, .specialty-card, .team-card):nth-child(5) { --reveal-delay: 360ms; }
:is(.about-stat, .specialty-card, .team-card):nth-child(6) { --reveal-delay: 450ms; }

/* ---------- Grão sutil (evita a sensação de "flat design" genérico) ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 140px 140px;
}
