/* ==========================================================================
   Instituto Moema — style.css
   ========================================================================== */

:root {
  --azul: #123a4d;
  --azul-escuro: #0b2530;
  --teal: #2fb8a6;
  --teal-escuro: #1f8f81;
  --gelo: #f4f8f9;
  --branco: #ffffff;
  --texto: #1b2a30;
  --texto-suave: #55686e;
  --borda: rgba(18, 58, 77, 0.12);
  --whatsapp: #22c35e;
  --whatsapp-escuro: #1aa34d;

  --fonte-titulo: "Manrope", "Segoe UI", Arial, sans-serif;
  --fonte-texto: "Inter", "Segoe UI", Arial, sans-serif;

  --raio: 16px;
  --sombra-suave: 0 10px 30px rgba(11, 37, 48, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--fonte-texto);
  color: var(--texto);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

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

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

h1, h2, h3 {
  font-family: var(--fonte-titulo);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--azul-escuro);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; }

p { line-height: 1.65; color: var(--texto-suave); margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 72px 0; position: relative; }
.section-alt { background: var(--gelo); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--teal-escuro);
  margin: 0 0 0.6em;
}
.eyebrow.center, h2.center { text-align: center; }
h2.center { margin-left: auto; margin-right: auto; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: var(--whatsapp-escuro); }

.btn-outline { background: transparent; border-color: rgba(255,255,255,0.8); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.15); }

.btn-small { padding: 9px 18px; font-size: 0.88rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--borda);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--fonte-titulo);
  font-weight: 700;
  color: var(--azul-escuro);
  font-size: 1.05rem;
}
.logo-icon { color: var(--teal-escuro); flex-shrink: 0; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 60;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--azul-escuro);
  border-radius: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 600;
  font-size: 0.94rem;
}
.main-nav a:not(.btn):hover { color: var(--teal-escuro); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(86vh, 680px);
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,37,48,0.5) 0%, rgba(11,37,48,0.74) 55%, rgba(9,30,39,0.94) 100%);
}
.hero-content {
  position: relative;
  padding-bottom: 64px;
  padding-top: 140px;
}
.hero-content h1 { color: #fff; }
.hero-content .eyebrow { color: #8fe4d8; }
.hero-tagline { color: #e7f2f0; font-size: 1.1rem; max-width: 560px; }
.hero-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-weight: 700;
}
.hero-rating .stars { color: #ffc94d; letter-spacing: 2px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

/* Entrada do hero: roda sempre no carregamento, sem depender de scroll/JS */
@keyframes fade-up-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-content .eyebrow { animation: fade-up-in 0.6s ease both; }
  .hero-content h1 { animation: fade-up-in 0.6s ease 0.08s both; }
  .hero-content .hero-tagline { animation: fade-up-in 0.6s ease 0.16s both; }
  .hero-content .hero-rating { animation: fade-up-in 0.6s ease 0.24s both; }
  .hero-content .hero-ctas { animation: fade-up-in 0.6s ease 0.32s both; }
}

/* ---------- Split layout ---------- */
.split {
  display: grid;
  gap: 48px;
  align-items: center;
}
.split-media, .split-text { min-width: 0; }

/* ---------- Image / video frame (proporção fixa) ---------- */
.img-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--raio);
  background: var(--gelo);
}
.img-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-frame--landscape { aspect-ratio: 5 / 4; }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--raio);
  background: var(--azul-escuro);
  box-shadow: var(--sombra-suave);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Serviços / Procedimentos ---------- */
.servicos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}
.servico-card {
  background: var(--gelo);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 30px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.servico-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sombra-suave);
  border-color: transparent;
}
.servico-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, rgba(47,184,166,0.22), rgba(18,58,77,0.14));
  margin-bottom: 16px;
}
.servico-icon { color: var(--azul); }
.servico-card h3 { margin-bottom: 6px; }
.servico-card p { margin: 0; font-size: 0.95rem; }

/* ---------- Diferenciais ---------- */
.diferenciais-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 44px;
  position: relative;
  z-index: 1;
}
.diferencial-card {
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 30px 26px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.diferencial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sombra-suave);
  border-color: transparent;
}
.diferencial-badge {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, rgba(47,184,166,0.24), rgba(18,58,77,0.16));
  color: var(--azul);
}
.diferencial-card h3 { margin-bottom: 8px; font-size: 1.02rem; }
.diferencial-card p { margin: 0; font-size: 0.94rem; }

/* ---------- Carrossel de avaliações ---------- */
.avaliacoes-sub { max-width: 480px; margin: 0 auto 8px; }

.carousel {
  position: relative;
  margin: 0 -20px;
}
.carousel-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 16px 20px 28px;
  scroll-padding: 16px 20px 28px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.review-card {
  flex: 0 0 min(320px, 82vw);
  scroll-snap-align: start;
  background: var(--branco);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.review-stars { color: #ffc94d; letter-spacing: 2px; margin-bottom: 10px; }
.review-card p { flex-grow: 1; font-size: 0.94rem; color: var(--texto); }
.review-author { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.review-name { font-weight: 700; color: var(--azul-escuro); font-size: 0.92rem; }
.review-badge { font-size: 0.78rem; color: var(--texto-suave); }

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}
.carousel-controls button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--borda);
  background: var(--branco);
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--azul-escuro);
  transition: background 0.15s ease;
}
.carousel-controls button:hover { background: var(--gelo); }
.carousel-controls button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ---------- Contato ---------- */
.contato-lista {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contato-lista li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.98rem;
}
.contato-lista svg { color: var(--teal-escuro); flex-shrink: 0; margin-top: 2px; }
.contato-lista a:hover { color: var(--teal-escuro); }

.map-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--raio);
  overflow: hidden;
  border: 1px solid var(--borda);
}

/* ---------- WhatsApp flutuante ---------- */
.whatsapp-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(34, 195, 94, 0.4);
  z-index: 40;
  transition: transform 0.15s ease;
}
.whatsapp-fab:hover { transform: scale(1.06); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--azul-escuro);
  color: #cfe3df;
  padding: 32px 0 90px;
  text-align: center;
  font-size: 0.9rem;
}
.site-footer p { color: inherit; margin: 0 0 6px; }
.footer-note { font-size: 0.8rem; color: #93b0ab; }

/* ---------- Decoração sutil de fundo ---------- */
#procedimentos, #diferenciais { overflow: hidden; }
#procedimentos::before, #diferenciais::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}
#procedimentos::before {
  top: -160px;
  right: -160px;
  background: radial-gradient(circle, rgba(47,184,166,0.14) 0%, rgba(47,184,166,0) 70%);
}
#diferenciais::before {
  bottom: -180px;
  left: -160px;
  background: radial-gradient(circle, rgba(18,58,77,0.1) 0%, rgba(18,58,77,0) 70%);
}
#procedimentos .container, #diferenciais .container { position: relative; z-index: 1; }

/* ---------- Animações de entrada ao rolar a página ----------
   Por padrão, todo elemento .reveal fica totalmente visível: se o
   JavaScript não carregar por qualquer motivo, nada some da página.
   Só quando o JS adiciona a classe "js" ao <html> é que o elemento
   começa oculto, aguardando entrar em cena. Além disso, script.js tem
   um fallback que revela tudo à força após um tempo, então nenhum
   conteúdo pode ficar escondido para sempre. */
.reveal { opacity: 1; transform: none; }

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.68, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.68, 0.36, 1);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.servicos-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.servicos-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.servicos-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

.diferenciais-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.diferenciais-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.diferenciais-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Acessibilidade ---------- */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ==========================================================================
   Responsivo
   ========================================================================== */

@media (min-width: 640px) {
  .servicos-grid { grid-template-columns: 1fr 1fr; }
  .diferenciais-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }

  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split-media { order: 2; }

  .servicos-grid { grid-template-columns: repeat(4, 1fr); }
  .diferenciais-grid { grid-template-columns: repeat(4, 1fr); }

  .site-footer { padding-bottom: 32px; }
  .whatsapp-fab { display: none; }
}

@media (max-width: 899px) {
  .main-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--branco);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 24px 24px 32px;
    box-shadow: 0 18px 36px rgba(11, 37, 48, 0.14);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav a:not(.btn) {
    width: 100%;
    padding: 16px 4px;
    font-family: var(--fonte-titulo);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--azul-escuro);
    border-bottom: 1px solid var(--borda);
  }
  .main-nav a:not(.btn):active { color: var(--teal-escuro); }
  .main-nav .btn {
    margin-top: 24px;
    justify-content: center;
    padding: 16px 26px;
    font-size: 1.02rem;
  }
}

@media (min-width: 1200px) {
  .container { max-width: 1180px; }
}
