/* ==========================================================================
   Página inicial: só o que é exclusivo desta página (posição e tamanho de cada tela).
   Os componentes (títulos, botões, perguntas, contador, acordeão, carrossel, citação)
   ficam em componentes.css. Telas da página:
     Computador: 1 Banner · 2 Números + Escritório · 3 Práticas · 4 Profissionais · 5 Mapa + Rodapé
     Celular/tablet: Números e Escritório viram duas telas.
   ========================================================================== */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* --- 1. Banner -------------------------------------------------------------- */
#home { scroll-margin-top: 0; }
.rm-tela--banner { min-height: 0; display: block; }
.home-video { overflow: hidden; }
.rm-hero__veu {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 20, 20, .78) 0%, rgba(20, 20, 20, .45) 45%, rgba(20, 20, 20, .05) 80%),
    linear-gradient(0deg, rgba(20, 20, 20, .55) 0%, rgba(20, 20, 20, 0) 40%);
}
.rm-hero { position: absolute; left: 0; right: 0; bottom: 14vh; z-index: 4; color: #fff; }
.rm-hero__titulo {
  margin: 0 0 10px !important; font-family: var(--rm-titulos); font-size: 60px !important; font-weight: 300 !important;
  line-height: 1.08 !important; letter-spacing: .02em; text-transform: uppercase; color: #fff; text-wrap: balance;
}
.rm-hero__linha { display: block; font-family: inherit !important; font-size: inherit !important; font-weight: 300 !important; line-height: inherit !important; }
.rm-hero__titulo em, .rm-hero__titulo em .rm-letra { font-style: normal; font-weight: 300 !important; color: #fff !important; }
.rm-hero__titulo .rm-letra { font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; line-height: inherit !important; color: inherit !important; }
.rm-hero__sub { margin: 0 0 44px !important; max-width: 560px; font-size: 20px !important; line-height: 1.6 !important; letter-spacing: .02em; color: var(--rm-dourado) !important; }
.rm-hero__acoes { display: flex; flex-wrap: wrap; gap: 14px; transition: opacity .8s ease, transform .8s ease; }
.rm-hero.is-aguardando .rm-hero__acoes { opacity: 0; transform: translateY(12px); }
.home-video .rm-rolar {
  position: absolute; left: 50%; bottom: 36px; z-index: 5; transform: translateX(-50%);
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255, 255, 255, .45); border-radius: 50%; color: #fff;
  animation: rm-quicar 2.4s ease-in-out infinite;
}
.home-video .rm-rolar:hover { border-color: var(--rm-dourado); color: var(--rm-dourado); }
@keyframes rm-quicar { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }
@media (prefers-reduced-motion: reduce) { .home-video .rm-rolar { animation: none; } }
@media (min-width: 768px) { .rm-hero__linha { white-space: nowrap; } }
@media (max-width: 767px) {
  .rm-hero { bottom: 120px; }
  .rm-hero__veu { background: linear-gradient(0deg, rgba(20, 20, 20, .85) 0%, rgba(20, 20, 20, .35) 60%, rgba(20, 20, 20, .15) 100%); }
  .rm-hero__titulo { font-size: 40px !important; }
  .rm-hero__sub { margin-bottom: 28px !important; font-size: 15px !important; letter-spacing: 0; white-space: nowrap; }
  .rm-hero__acoes .rm-botao, .rm-hero__acoes .rm-fluxo { flex: 1 1 100%; width: auto; }
}

/* --- 2. Números que impressionam ------------------------------------------- */
.rm-numeros { position: relative; overflow: hidden; background: #fff; padding: 0; isolation: isolate; }
.rm-numeros::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .9) 75%);
}
.rm-numeros__lista {
  list-style: none; margin: 80px auto 0; padding: 0; max-width: 1100px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px;
}
.rm-numeros__item { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
/* rótulo em negrito, quebrando antes da última palavra (a quebra vem do Blade) */
.rm-numeros__rotulo { font-size: 16px !important; font-weight: 700 !important; line-height: 1.3 !important; color: var(--rm-grafite) !important; }
@media (max-width: 991px) { .rm-numeros__lista { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .rm-numeros__lista { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; margin-top: 40px; }
  .rm-numeros__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* --- 3. Nosso Escritório ---------------------------------------------------- */
.rm-escritorio { background: var(--rm-grafite); color: #e6e6e6; padding: 0; }
.rm-escritorio__grade { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; align-items: start; }
.rm-escritorio__intro .rm-titulo { margin-bottom: 14px; }
.rm-escritorio__apoio { margin: 0 0 8px; padding-left: 64px; max-width: 420px; font-size: 17px !important; line-height: 1.7 !important; color: var(--rm-cinza-claro) !important; }
@media (max-width: 991px) { .rm-escritorio__grade { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
@media (max-width: 767px) {
  .rm-escritorio__grade { gap: 20px; }
  .rm-escritorio__apoio { padding-left: 52px; font-size: 15px !important; }
}

/* --- 4. Práticas de Atuação ------------------------------------------------- */
.rm-praticas { background: #fff; padding-left: 0; padding-right: 0; }

/* --- 5. Nossos Profissionais ------------------------------------------------ */
.rm-profissionais { background: var(--rm-preto); color: #fff; padding-left: 0; padding-right: 0; border-top: 1px solid rgba(208, 193, 123, .25); }
.rm-profissionais__topo { margin-bottom: 48px; align-items: start; }
.rm-profissionais .rm-setas { margin-top: 24px; padding-left: 64px; }
.rm-profissionais__texto { font-size: 18px !important; line-height: 1.8 !important; color: var(--rm-cinza-claro) !important; justify-self: start; }
.rm-profissionais .rm-fluxo { margin-top: 8px; }
@media (max-width: 767px) {
  .rm-profissionais .rm-setas { padding-left: 52px; margin-top: 16px; }
  .rm-profissionais__texto { font-size: 14px !important; line-height: 1.6 !important; }
  .rm-profissionais__topo { margin-bottom: 28px; }
  .rm-profissionais .rm-carrossel { margin-bottom: 8px; }
}

/* --- 6. Mapa + rodapé: o mapa ocupa a altura da tela menos o rodapé ---------- */
.rm-tela--mapa { height: auto !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; }
#contato iframe { display: block; width: 100%; height: calc(100svh - var(--rodape, 180px)) !important; min-height: 240px; }

/* ==========================================================================
   Encaixe em telas: cada módulo cabe exatamente em uma tela (tamanhos pela altura, svh)
   ========================================================================== */
.rm-praticas.rm-tela, .rm-numeros.rm-tela { padding-top: calc(var(--topo, 121px) + 3svh); padding-bottom: 3svh; }
.rm-escritorio.rm-tela, .rm-profissionais.rm-tela { justify-content: flex-start; padding-top: calc(var(--topo, 121px) + var(--rm-respiro)); padding-bottom: 3svh; }

/* Computador: Números (em cima) e Escritório (embaixo) dividem a tela meio a meio;
   quando uma pergunta abre, o Escritório cresce e os Números encolhem até o mínimo do conteúdo. */
@media (min-width: 992px) {
  .rm-tela-dupla { height: 100svh; display: flex; flex-direction: column; overflow: hidden; }
  .rm-tela-dupla > .rm-tela { flex: 1 1 0; min-height: min-content; scroll-snap-align: none; }
  .rm-tela-dupla > .rm-numeros { padding-top: calc(var(--topo, 121px) + 2.5svh); padding-bottom: 2svh; }
  .rm-tela-dupla > .rm-escritorio { padding-top: var(--rm-respiro); padding-bottom: 2.5svh; }
  #escritorio { scroll-margin-top: var(--numeros-h, 0px) !important; }

  .rm-numeros__titulo { font-size: clamp(30px, 4.6svh, 52px) !important; margin-bottom: 1svh; }
  .rm-numeros__subtitulo { font-size: clamp(14px, 1.8svh, 17px) !important; }
  .rm-numeros__lista { margin-top: clamp(14px, 3svh, 56px); }
  .rm-contador { font-size: clamp(36px, 6.2svh, 60px) !important; }
  .rm-numeros__rotulo { font-size: clamp(13px, 1.7svh, 16px) !important; }

  .rm-faq__pergunta button { min-height: clamp(44px, 6.3svh, 72px); padding: 1svh 0; font-size: clamp(22px, 3.1svh, 30px) !important; }
  .rm-faq__texto { font-size: clamp(13px, 1.6svh, 15px) !important; line-height: 1.6 !important; }
  .rm-faq__texto p { margin-bottom: 1svh !important; }
  .rm-tela-dupla .rm-faq__conteudo .rm-fluxo { margin: 1.8svh 0 1.2svh !important; }

  .rm-praticas .rm-acc { margin-top: 3.5svh; margin-bottom: 0; }
  .rm-acc__foto { height: clamp(260px, calc(100svh - var(--topo, 121px) - 300px), 600px); }

  .rm-profissionais__topo { margin-bottom: 3svh; }
  .rm-pessoa__foto { aspect-ratio: auto; height: clamp(200px, calc(100svh - var(--topo, 121px) - 440px), 420px); margin-bottom: 1.2svh; }
  .rm-carrossel { margin-bottom: 2svh; }
}
@media (min-width: 992px) and (max-height: 780px) { .rm-faq__texto { line-height: 1.5 !important; } }

@media (max-width: 991px) { .rm-numeros.rm-tela { padding-bottom: 4svh; } .rm-escritorio.rm-tela { padding-bottom: 4svh; } }
@media (max-width: 767px) {
  .rm-numeros.rm-tela, .rm-escritorio.rm-tela, .rm-praticas.rm-tela, .rm-profissionais.rm-tela { padding-bottom: 2svh; }
  .rm-acc__foto { height: clamp(190px, calc((100svh - var(--topo, 121px) - 320px) / 2), 340px); }
  .rm-pessoa__foto { aspect-ratio: auto; height: clamp(180px, calc(100svh - var(--topo, 121px) - 520px), 340px); }
}

/* celulares baixos (ex.: 360x740, 375x667): compacta para cada módulo caber */
@media (max-width: 767px) and (max-height: 780px) {
  .rm-numeros.rm-tela, .rm-praticas.rm-tela { padding-top: calc(var(--topo, 121px) + 1.5svh); }
  .rm-numeros.rm-tela, .rm-praticas.rm-tela, .rm-profissionais.rm-tela, .rm-escritorio.rm-tela { padding-bottom: 1.5svh; }
  .rm-titulo { font-size: 26px !important; }
  .rm-escritorio__apoio { line-height: 1.5 !important; }
  .rm-faq__pergunta button { min-height: 40px !important; padding: 6px 0 !important; font-size: 20px !important; }
  .rm-faq__texto { font-size: 12.5px !important; line-height: 1.45 !important; }
  .rm-faq__texto p { margin-bottom: 6px !important; }
  .rm-faq__conteudo .rm-fluxo { margin: 10px 0 8px !important; }
  .rm-numeros__subtitulo, .rm-profissionais__texto { font-size: 13px !important; line-height: 1.5 !important; }
  .rm-praticas .rm-acc { margin-top: 16px; }
  .rm-acc__foto { height: clamp(150px, calc((100svh - var(--topo, 121px) - 300px) / 2), 340px); }
  .rm-pessoa__foto { height: clamp(150px, calc(100svh - var(--topo, 121px) - 470px), 340px); margin-bottom: 6px; }
  .rm-pessoa__nome { font-size: 16px !important; }
  .rm-profissionais .rm-fluxo { margin-top: 0; }
}
/* celulares bem baixos (até 700 px de altura, ex.: iPhone SE): esconde textos de apoio secundários */
@media (max-width: 767px) and (max-height: 700px) {
  .rm-escritorio__apoio, .rm-profissionais__texto { display: none !important; }
  .rm-numeros__lista { margin-top: 18px; gap: 16px 20px; }
  .rm-contador { font-size: 34px !important; }
  .rm-pessoa__foto { height: clamp(130px, calc(100svh - var(--topo, 121px) - 420px), 300px); }
}

/* o fundo do bloco do mapa (imagem do tema) fica sempre escondido pelo mapa: não precisa ser baixado */
#contato.map-container { background: #e5e3df none !important; }

/* Celular: manchete com efeito leve (home.js) — cada linha sobe e aparece inteira */
.rm-leve { opacity: .01; transform: translateY(14px); transition: opacity .5s ease, transform .6s cubic-bezier(.22, 1, .36, 1); }
.rm-leve.is-visivel { opacity: 1; transform: none; }
