/* MMS Law — formulário de análise de perfil (LP Brasil)
   Usa as variáveis de cor e fonte da página, com valores de reserva. */

.mf {
  --mf-paper: var(--paper, #F9F9F9);
  --mf-ink: var(--graphite, #575756);
  --mf-accent: #8F806B;
  --mf-taupe: var(--taupe, #998B75);
  --mf-rule: rgba(87, 87, 86, .2);
  --mf-error: #A3392B;
  --mf-display: var(--display, "Tenor Sans", Georgia, serif);
  --mf-text: var(--text, "Roboto", system-ui, sans-serif);
  --mf-gutter: clamp(1rem, 4vw, 2.5rem);

  position: fixed; inset: 0; z-index: 1000;
  display: flex; flex-direction: column;
  background: var(--mf-paper); color: var(--mf-ink);
  font: 300 1.0625rem/1.6 var(--mf-text);
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  animation: mf-fade .25s ease;
}
.mf[hidden] { display: none; }
.mf *, .mf *::before, .mf *::after { box-sizing: border-box; }
.mf :focus-visible { outline: 2px solid var(--mf-taupe); outline-offset: 3px; }

/* barra superior: voltar | logo | fechar, com a barra de progresso embaixo */
.mf-bar {
  position: sticky; top: 0; z-index: 1;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: .75rem var(--mf-gutter);
  background: var(--mf-paper);
}
.mf-back, .mf-close {
  display: inline-flex; align-items: center; gap: .4rem;
  min-height: 44px; padding: 0 .25rem;
  border: 0; background: none; color: inherit; cursor: pointer;
  font: 400 .9375rem/1 var(--mf-text);
}
.mf-back { justify-self: start; }
.mf-back[hidden] { display: inline-flex; visibility: hidden; }
.mf-close { justify-self: end; width: 44px; justify-content: center; border-radius: 50%; }
.mf-close:hover, .mf-back:hover { color: var(--mf-accent); }
.mf-back svg, .mf-close svg { width: 20px; height: 20px; flex: none; }
.mf-logo { height: 40px; width: auto; display: block; }
.mf-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(87, 87, 86, .1); }
.mf-progress span { display: block; height: 100%; width: 0; background: var(--mf-taupe); transition: width .35s ease; }

/* área da pergunta */
.mf-main { flex: 1; padding: clamp(2.25rem, 9vh, 5.5rem) var(--mf-gutter) 3rem; }
.mf-step { width: 100%; max-width: 40rem; margin: 0 auto; animation: mf-in .35s ease; }
.mf-title {
  margin: 0; font: 400 1.6875rem/1.22 var(--mf-display);
  letter-spacing: -.005em; text-wrap: balance; color: var(--mf-ink);
}
.mf-title:focus { outline: none; }
.mf-sub { margin: 1rem 0 0; font-size: 1rem; line-height: 1.65; max-width: 64ch; text-wrap: pretty; }
.mf-meta { display: flex; align-items: center; gap: .5rem; margin: 1.15rem 0 0; font-size: .875rem; font-weight: 400; color: var(--mf-accent); }
.mf-meta svg { width: 17px; height: 17px; flex: none; }

/* opções em cards */
.mf-options { margin: 1.75rem 0 0; padding: 0; list-style: none; display: grid; gap: .75rem; }
.mf-opt {
  width: 100%; min-height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem; text-align: left;
  background: #fff; color: var(--mf-ink);
  border: 1px solid var(--mf-rule); border-radius: 14px;
  font: 400 1.0625rem/1.4 var(--mf-text); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.mf-opt:hover { border-color: var(--mf-taupe); }
.mf-opt span { text-wrap: balance; }
.mf-opt i {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid rgba(87, 87, 86, .35);
  display: grid; place-items: center; transition: background-color .15s, border-color .15s;
}
.mf-opt i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s; }
.mf-opt[aria-pressed="true"] { border-color: var(--mf-accent); background: rgba(153, 139, 117, .1); }
.mf-opt[aria-pressed="true"] i { background: var(--mf-accent); border-color: var(--mf-accent); }
.mf-opt[aria-pressed="true"] i::after { transform: scale(1); }

/* botão principal (mesmo estilo dos botões da página) */
.mf-btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  margin-top: 2rem; padding: 1.15rem 2.5rem; width: 100%;
  background: var(--mf-accent); color: #fff; border: 1px solid transparent; border-radius: 999px;
  font: 400 .9375rem/1.2 var(--mf-display); letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; transition: background-color .2s;
}
.mf-btn:hover { background: var(--mf-ink); }

/* contato */
.mf-form { margin-top: 2rem; display: grid; gap: 1.25rem; }
.mf-field label { display: block; margin-bottom: .4rem; font-weight: 400; font-size: .9375rem; }
.mf-field input {
  width: 100%; padding: .9rem 1rem;
  background: #fff; color: var(--mf-ink);
  border: 1px solid var(--mf-rule); border-radius: 12px;
  font: 400 1.0625rem/1.3 var(--mf-text); /* 17px evita zoom no iOS */
}
.mf-field input:focus { outline: none; border-color: var(--mf-taupe); box-shadow: 0 0 0 3px rgba(153, 139, 117, .2); }
.mf-field input[aria-invalid="true"] { border-color: var(--mf-error); }
.mf-hint { margin: .4rem 0 0; font-size: .875rem; text-wrap: pretty; color: rgba(87, 87, 86, .85); }
.mf-error { margin: .4rem 0 0; font-size: .875rem; text-wrap: pretty; font-weight: 400; color: var(--mf-error); }
.mf-error:empty { display: none; }
.mf-field .mf-consent { display: grid; margin: 0; font-weight: 300; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; font-size: .9375rem; line-height: 1.5; cursor: pointer; text-wrap: pretty; }
.mf-consent input { width: 20px; height: 20px; margin: .15rem 0 0; accent-color: var(--mf-accent); }
.mf-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* tela final */
.mf-final .mf-btn { margin-top: 2.25rem; }
.mf-disclaimer { margin: 3rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--mf-rule); font-size: .875rem; color: rgba(87, 87, 86, .85); text-wrap: pretty; }

@media (max-width: 420px) {
  .mf-btn { padding-inline: 1.25rem; font-size: .8125rem; letter-spacing: .03em; }
}

@media (min-width: 760px) {
  .mf-step { max-width: 48rem; }
  .mf-title { font-size: 2.125rem; }
  .mf-sub { font-size: 1.0625rem; }
  .mf-opt { padding: 1.1rem 1.35rem; }
  .mf-btn { width: auto; }
  .mf-logo { height: 46px; }
}

@keyframes mf-fade { from { opacity: 0; } }
@keyframes mf-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  .mf, .mf-step { animation: none; }
  .mf-progress span { transition: none; }
}

html.mf-lock, html.mf-lock body { overflow: hidden; }
