/* ============================================================
   Miranda & Queiroz Advogados — Design System
   Fontes, tokens, componentes e responsividade.
   ============================================================ */

/* ── Fontes ──────────────────────────────────────────────── */
@font-face { font-family: 'Jost'; src: url('/assets/fonts/Jost.ttf') format('truetype'); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Harmonique Display'; src: url('/assets/fonts/HarmoniqueDisplay-Medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Harmonique Display'; src: url('/assets/fonts/HarmoniqueDisplay-SemiBold.otf') format('opentype'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Harmonique Display'; src: url('/assets/fonts/HarmoniqueDisplay-MediumItalic.otf') format('opentype'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Harmonique Display'; src: url('/assets/fonts/HarmoniqueDisplay-SemiBoldItalic.otf') format('opentype'); font-weight: 600; font-style: italic; font-display: swap; }

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --verde-900: #0c2e17;
  --verde-700: #144a25;
  --verde-500: #1a5a2e;
  --ouro:      #af9768;
  --ouro-claro:#c4ad84;
  --creme:     #e5d9c2;
  --bg:        #ece8df;
  --texto:     #1c2620;
  --texto-mut: #5b6b60;
  --fonte-titulo: 'Harmonique Display', serif;
  --fonte-corpo:  'Jost', sans-serif;
}

/* ── Reset ───────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--fonte-corpo);
  color: var(--texto);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }

/* ── FAQ (details) ───────────────────────────────────────── */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] .mq-faq-plus { transform: rotate(45deg); }
/* Abertura/fechamento suave via grid-template-rows (0fr↔1fr) — controlado por JS. */
.mq-faq-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.42s cubic-bezier(0.4, 0, 0.2, 1); }
.mq-faq-inner { overflow: hidden; min-height: 0; }
@media (prefers-reduced-motion: reduce) { .mq-faq-wrap { transition: none; } }

/* ── Animações ───────────────────────────────────────────── */
@keyframes mqFade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mqGlow { 0%,100% { opacity: 0.5; } 50% { opacity: 0.85; } }
@keyframes mqFabPulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); } 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
@keyframes mqEnter { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mqFloat  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
@keyframes mqStarPop { 0% { opacity: 0; transform: scale(0.3) rotate(-30deg); } 60% { transform: scale(1.18) rotate(4deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes mqCaret { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Estrelas: surgem da primeira à última ───────────────── */
.mq-stars { display: inline-flex; gap: 1px; }
.mq-stars .mq-star { display: inline-block; opacity: 0; }
.mq-stars.is-in .mq-star { animation: mqStarPop 0.45s cubic-bezier(.2,.7,.3,1) forwards; }
.mq-stars.is-in .mq-star:nth-child(1) { animation-delay: 0.00s; }
.mq-stars.is-in .mq-star:nth-child(2) { animation-delay: 0.12s; }
.mq-stars.is-in .mq-star:nth-child(3) { animation-delay: 0.24s; }
.mq-stars.is-in .mq-star:nth-child(4) { animation-delay: 0.36s; }
.mq-stars.is-in .mq-star:nth-child(5) { animation-delay: 0.48s; }

/* ── Máquina de escrever (depoimento em destaque) ────────── */
.mq-typing::after { content: '|'; margin-left: 1px; color: var(--ouro-claro); animation: mqCaret 0.8s steps(1) infinite; }

/* ── Entrada no carregamento (hero) ──────────────────────── */
.mq-enter   { opacity: 0; animation: mqEnter 0.9s cubic-bezier(.2,.7,.3,1) forwards; }
.mq-enter-2 { animation-delay: 0.15s; }
.mq-enter-3 { animation-delay: 0.30s; }
.mq-enter-4 { animation-delay: 0.45s; }

/* ── Fotos dos sócios flutuando suavemente ───────────────── */
.mq-float   { animation: mqFloat 5.5s ease-in-out infinite; will-change: transform; }
.mq-float-2 { animation-duration: 6.5s; animation-delay: -2.2s; }

/* ── Link "Ir para o site" (topbar LP) ───────────────────── */
.mq-gosite:hover { color: #0c2e17 !important; background: #af9768; border-color: #af9768 !important; transform: translateY(-1px); }
.mq-gosite svg { transition: transform 0.25s ease; }
.mq-gosite:hover svg { transform: translateX(3px); }

.mq-gosite-dark svg { transition: transform 0.25s ease; }
.mq-gosite-dark:hover { color: #af9768 !important; }
.mq-gosite-dark:hover svg { transform: translateX(4px); }

/* ── Botões com leve elevação ao hover ───────────────────── */
.mq-btn-lift { transition: transform 0.3s cubic-bezier(.2,.7,.3,1), box-shadow 0.3s ease, filter 0.3s ease; }
.mq-btn-lift:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(12,46,23,0.22); filter: brightness(1.04); }

/* ── Zoom sutil nas fotos dos advogados ──────────────────── */
.mq-photo-zoom { overflow: hidden; }
.mq-photo-zoom img { transition: transform 0.6s cubic-bezier(.2,.7,.3,1); }
.mq-photo-zoom:hover img { transform: scale(1.05); }

/* ── Reveal ao scroll ────────────────────────────────────── */
.mq-reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.7,.3,1); }
.mq-reveal.is-in { opacity: 1; transform: none; }

/* ── Processo: surgem em sequência e se alinham ──────────── */
[data-proc] .mq-proc-step { opacity: 0; transform: translateX(80px) scale(0.94); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.3,1); }
[data-proc].is-in .mq-proc-step { opacity: 1; transform: none; }
[data-proc].is-in .mq-proc-step:nth-child(2) { transition-delay: 0.05s; }
[data-proc].is-in .mq-proc-step:nth-child(3) { transition-delay: 0.45s; }
[data-proc].is-in .mq-proc-step:nth-child(4) { transition-delay: 0.85s; }
[data-proc].is-in .mq-proc-step:nth-child(5) { transition-delay: 1.25s; }
.mq-proc-line { opacity: 0; transition: opacity 0.6s ease 1.2s; }
[data-proc].is-in .mq-proc-line { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .mq-enter, .mq-float, .mq-reveal, [data-proc] .mq-proc-step,
  .mq-stars .mq-star { animation: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Hovers / componentes ────────────────────────────────── */
.mq-area-row:hover { background: rgba(229,217,194,0.06) !important; }
.mq-area-row:hover .mq-area-arrow { background: var(--ouro) !important; transform: rotate(0deg); }
.mq-area-row:hover .mq-area-arrow svg { stroke: var(--verde-900) !important; }
.mq-pillbtn { transition: transform 0.3s cubic-bezier(.2,.7,.3,1), box-shadow 0.3s ease, filter 0.3s ease; }
.mq-pillbtn:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(12,46,23,0.22); filter: brightness(1.04); }
.mq-pillbtn:active { transform: translateY(-1px); }
.mq-pillbtn:hover .mq-pillbtn-circ { transform: rotate(45deg); }
.mq-card-lift { transition: transform 0.4s cubic-bezier(.2,.7,.3,1), box-shadow 0.4s ease; }
.mq-card-lift:hover { transform: translateY(-8px); box-shadow: 0 24px 50px rgba(12,46,23,0.16); }
/* ── Menu: hover (sublinhado que cresce) + active por seção ─ */
.mq-navlink, .mq-navlink-h { position: relative; transition: color 0.25s ease, background 0.25s ease; }
.mq-navlink::after, .mq-navlink-h::after {
  content: ''; position: absolute; left: 16px; right: 16px; bottom: 5px; height: 2px;
  background: var(--ouro); border-radius: 2px;
  transform: scaleX(0); transform-origin: center;
  transition: transform 0.32s cubic-bezier(.2,.7,.3,1);
}
.mq-navlink:hover::after, .mq-navlink-h:hover::after { transform: scaleX(1); }
.mq-navlink-h:hover { color: #fff; }
.mq-navlink.is-active { color: var(--verde-700); font-weight: 600; }
.mq-navlink.is-active::after { transform: scaleX(1); }

/* ============================================================
   RESPONSIVIDADE
   As páginas usam estilos inline (vindos do design). As classes
   utilitárias abaixo, aplicadas nos contêineres-grid, permitem
   colapsar layouts em telas menores via !important.
   ============================================================ */
@media (max-width: 980px) {
  .mq-collapse-2      { grid-template-columns: 1fr !important; }
  .mq-collapse-4      { grid-template-columns: repeat(2, 1fr) !important; }
  .mq-collapse-3      { grid-template-columns: repeat(2, 1fr) !important; }
  .mq-hero-grid       { grid-template-columns: 1fr !important; gap: 36px !important; }
  .mq-nav-desktop     { display: none !important; }
  .mq-area-row        { grid-template-columns: 48px 1fr 48px !important; }
  .mq-area-row .mq-area-tag,
  .mq-area-row .mq-area-desc { display: none !important; }
  .mq-pad-lg          { padding: 44px 26px !important; }
}
@media (max-width: 620px) {
  .mq-collapse-3, .mq-collapse-4 { grid-template-columns: 1fr !important; }
  .mq-h1 { font-size: 40px !important; }
  .mq-h1-italic { font-size: 42px !important; }
  .mq-h2 { font-size: 34px !important; }
  .mq-sec { padding-left: 16px !important; padding-right: 16px !important; }
  .mq-pad-lg { padding: 34px 20px !important; }
  .mq-hide-sm { display: none !important; }
}

/* ============================================================
   Espaçamento de linhas mais compacto (pedido do cliente)
   ============================================================ */
body { line-height: 1.5; }
body p { line-height: 1.5 !important; }

/* ============================================================
   Página legal — Política de Privacidade
   ============================================================ */
.mq-legal h2 { font-family: var(--fonte-titulo); font-size: 22px; color: var(--verde-700); margin: 30px 0 10px; line-height: 1.25; }
.mq-legal h2:first-child { margin-top: 0; }
.mq-legal p { font-size: 15.5px; color: #3a463e; margin-bottom: 12px; }
.mq-legal ul { margin: 0 0 14px 20px; }
.mq-legal li { font-size: 15.5px; color: #3a463e; margin-bottom: 7px; line-height: 1.5; }
.mq-legal a { color: var(--verde-700); font-weight: 600; }

/* ============================================================
   Consentimento de cookies / LGPD
   ============================================================ */
.mq-consent {
  position: fixed; left: 22px; bottom: 22px; z-index: 320;
  width: 360px; max-width: calc(100vw - 44px);
  background: #fff; border: 1px solid rgba(20,74,37,0.12); border-radius: 18px;
  box-shadow: 0 24px 60px rgba(12,46,23,0.22);
  padding: 22px 22px 20px; font-family: var(--fonte-corpo);
  animation: mqEnter 0.5s cubic-bezier(.2,.7,.3,1);
}
.mq-consent[hidden], .mq-consent-fab[hidden] { display: none; }
.mq-consent-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mq-consent-ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: #eef2ea; border-radius: 10px; flex-shrink: 0; }
.mq-consent h3 { font-family: var(--fonte-titulo); font-size: 19px; color: var(--verde-700); font-weight: 600; }
.mq-consent p { font-size: 13.5px; color: var(--texto-mut); line-height: 1.55 !important; margin-bottom: 16px; }
.mq-consent a { color: var(--verde-700); font-weight: 600; }
.mq-consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mq-consent-btn { flex: 1; min-width: 92px; border: none; cursor: pointer; font-family: var(--fonte-corpo); font-size: 13.5px; font-weight: 600; padding: 11px 12px; border-radius: 10px; transition: transform .25s ease, filter .25s ease; }
.mq-consent-btn.solid { background: var(--verde-700); color: #fff; }
.mq-consent-btn.ghost { background: #f0ede4; color: var(--verde-700); }
.mq-consent-btn:hover { transform: translateY(-2px); filter: brightness(1.04); }

.mq-consent-cats { display: flex; flex-direction: column; margin-bottom: 16px; }
.mq-consent-cat { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #f0ede4; cursor: default; }
.mq-consent-cat:last-child { border-bottom: none; }
.mq-consent-cat-txt strong { display: block; font-size: 14px; color: var(--verde-700); margin-bottom: 2px; }
.mq-consent-cat-txt small { display: block; font-size: 12px; color: var(--texto-mut); line-height: 1.45; }
.mq-consent-always { flex-shrink: 0; font-size: 11px; font-weight: 600; color: var(--ouro); background: #f6f1e6; padding: 5px 10px; border-radius: 999px; }

.mq-switch { position: relative; flex-shrink: 0; width: 44px; height: 25px; cursor: pointer; }
.mq-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.mq-switch-ui { position: absolute; inset: 0; background: #d8d3c6; border-radius: 999px; transition: background .25s ease; }
.mq-switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; background: #fff; border-radius: 50%; transition: transform .25s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.mq-switch input:checked + .mq-switch-ui { background: var(--verde-500); }
.mq-switch input:checked + .mq-switch-ui::after { transform: translateX(19px); }

.mq-consent-fab {
  position: fixed; left: 22px; bottom: 22px; z-index: 315;
  display: inline-flex; align-items: center; gap: 9px;
  background: #fff; color: var(--verde-700); border: 1px solid rgba(20,74,37,0.14);
  padding: 11px 16px 11px 13px; border-radius: 999px; cursor: pointer;
  font-family: var(--fonte-corpo); font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 26px rgba(12,46,23,0.16);
  transition: transform .25s ease, box-shadow .25s ease;
}
.mq-consent-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(12,46,23,0.22); }

@media (max-width: 620px) {
  .mq-consent { left: 12px; right: 12px; bottom: 12px; width: auto; }
  /* No mobile o botão fica só com o ícone (sem a palavra "Privacidade") */
  .mq-consent-fab { left: 12px; bottom: 12px; gap: 0; padding: 13px; border-radius: 50%; }
  .mq-consent-fab span { display: none; }
}

/* ============================================================
   Carrossel de depoimentos
   ============================================================ */
.mq-carousel-viewport { overflow: hidden; }
.mq-carousel-track { display: flex; transition: transform 0.6s cubic-bezier(.2,.7,.3,1); }
.mq-slide { flex: 0 0 100%; min-width: 0; padding: 8px 10px; }
.mq-carousel-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 30px; }
.mq-carousel-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--verde-700); border: 1px solid rgba(20,74,37,0.16);
  cursor: pointer; box-shadow: 0 8px 20px rgba(12,46,23,0.08);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.mq-carousel-arrow:hover { background: var(--verde-700); color: #fff; transform: translateY(-2px); }
.mq-carousel-dots { display: inline-flex; align-items: center; gap: 8px; }
.mq-dot {
  width: 9px; height: 9px; border-radius: 999px; border: none; padding: 0;
  background: rgba(20,74,37,0.22); cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}
.mq-dot.is-active { width: 26px; background: var(--ouro); }
@media (prefers-reduced-motion: reduce) {
  .mq-carousel-track { transition: none !important; }
}

/* ============================================================
   Ajustes — estrelas no carrossel, redes sociais e rodapé
   ============================================================ */
/* Estrelas dentro do carrossel ficam estáticas (não repetem a cada slide) */
[data-carousel] .mq-star { opacity: 1 !important; animation: none !important; transform: none !important; }

/* Hover nos ícones de redes sociais (rodapé) */
.mq-social { transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease; }
.mq-social:hover { background: var(--ouro); border-color: var(--ouro); transform: translateY(-3px); }
.mq-social:hover svg { stroke: var(--verde-900); }

/* Hover nos links de texto do rodapé */
footer a:not(.mq-social):not(.mq-dev-by) { transition: color 0.25s ease, opacity 0.25s ease; }
footer a:not(.mq-social):not(.mq-dev-by):hover { color: #fff !important; }

/* "Desenvolvido por" — Inovaccio */
.mq-dev-by { transition: color 0.25s ease; }
.mq-dev-by:hover { color: rgba(229,217,194,0.95) !important; }
.mq-dev-by img { opacity: 0.8; transition: transform 0.25s ease, opacity 0.25s ease; margin: 0 0 2px 0; }
.mq-dev-by:hover img { opacity: 1; transform: scale(1.06); }

/* ============================================================
   Estrelas do Google (topo + depoimentos) — loop a cada 5s
   ============================================================ */
@keyframes mqStarLoop {
  0%   { opacity: 0; transform: scale(0.3) rotate(-30deg); }
  6%   { opacity: 1; transform: scale(1.18) rotate(4deg); }
  12%  { opacity: 1; transform: scale(1) rotate(0); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
.mq-stars.mq-loop .mq-star { opacity: 0; animation: mqStarLoop 5s ease-in-out infinite; }
.mq-stars.mq-loop .mq-star:nth-child(1) { animation-delay: 0.00s; }
.mq-stars.mq-loop .mq-star:nth-child(2) { animation-delay: 0.12s; }
.mq-stars.mq-loop .mq-star:nth-child(3) { animation-delay: 0.24s; }
.mq-stars.mq-loop .mq-star:nth-child(4) { animation-delay: 0.36s; }
.mq-stars.mq-loop .mq-star:nth-child(5) { animation-delay: 0.48s; }
@media (prefers-reduced-motion: reduce) {
  .mq-stars.mq-loop .mq-star { opacity: 1 !important; animation: none !important; transform: none !important; }
}

/* ============================================================
   Hovers mais suaves — botão de envio e rodapé
   ============================================================ */
/* O botão de envio tinha "transition: background" inline (lift instantâneo). */
form[data-mq-form] button[type="submit"] {
  transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), box-shadow 0.45s ease, background 0.3s ease !important;
}
form[data-mq-form] button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(12,46,23,0.12);
  filter: none;
}

/* Rodapé: botão e ícones com movimento mais sutil e fluido */
footer .mq-pillbtn { transition: transform 0.45s cubic-bezier(0.4,0,0.2,1), box-shadow 0.45s ease, filter 0.3s ease; }
footer .mq-pillbtn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,0.16); filter: none; }
.mq-social { transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), background 0.35s ease, border-color 0.35s ease; }
.mq-social:hover { transform: translateY(-2px); }

/* ============================================================
   Menu mobile (hambúrguer + overlay)
   ============================================================ */
.mq-burger {
  display: none; align-items: center; justify-content: center;
  width: 46px; height: 46px; flex-shrink: 0;
  background: transparent; border: 1px solid currentColor; border-radius: 12px;
  cursor: pointer; transition: background 0.2s ease, transform 0.2s ease;
}
.mq-burger:active { transform: scale(0.94); }

.mq-mobile-menu {
  position: fixed; inset: 0; z-index: 400;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 40px 24px;
  background: radial-gradient(120% 120% at 80% 10%, #1a5a2e 0%, #144a25 42%, #0c2e17 100%);
  animation: mqFade 0.3s ease;
}
.mq-mobile-menu[hidden] { display: none; }
.mq-mm-close {
  position: absolute; top: 20px; right: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: rgba(229,217,194,0.08); border: 1px solid rgba(229,217,194,0.2);
  color: #e5d9c2; cursor: pointer; transition: background 0.2s ease;
}
.mq-mm-close:hover { background: rgba(229,217,194,0.16); }
.mq-mm-nav { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mq-mm-nav a {
  font-family: var(--fonte-titulo); font-size: 1.9rem; font-weight: 500;
  color: #e5d9c2; text-decoration: none; padding: 8px 14px; border-radius: 12px;
  transition: color 0.2s ease;
}
.mq-mm-nav a:hover { color: #fff; }
.mq-mm-cta { margin-top: 26px; }

/* Liga o menu mobile / desliga o CTA do topo em telas pequenas */
@media (max-width: 980px) {
  .mq-burger { display: inline-flex; }
  .mq-header-cta { display: none !important; }
}

/* ============================================================
   Offset de rolagem por âncora (não ficar atrás do header fixo)
   ============================================================ */
#topo, #sobre, #areas, #processo, #socios, #depoimentos, #faq, #instagram, #contato {
  scroll-margin-top: 92px;
}
@media (max-width: 620px) { #topo, #sobre, #areas, #processo, #socios, #depoimentos, #faq, #instagram, #contato { scroll-margin-top: 80px; } }
