/* Projeto MUSA — mesma linguagem visual do Connect (tema Boudoir):
   fundo cinza-carvão, lilás acinzentado nos detalhes, título em serifa. */

:root {
  --fundo: #191a1b;
  --fundo2: #1f2123;
  --cartao: #1f2123;
  --borda: #2b2f32;
  --destaque: #b69bbd; /* lilás acinzentado: textos e detalhes */
  --botao: #58405e;
  --botao-forte: #6b4f73;
  --botao-texto: #f0e8f2;
  --texto: #edeff1;
  --texto2: #b3bac0;
  --texto3: #7c848c;
  --erro: #d08a82;
  --erro-fundo: #2a1e1d;
  --largura: 60rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* o display dos botões e das prévias venceria o hidden do navegador */
[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}
p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--destaque);
}

img {
  max-width: 100%;
}

/* ---------------- topo ---------------- */
.topo {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: rgb(25 26 27 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borda);
}

.topo-marca img {
  display: block;
  max-height: 3rem;
  max-width: 11rem;
  width: auto;
  object-fit: contain;
}

/* ---------------- capa ---------------- */
.capa {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3.5rem 1.25rem 3rem;
  text-align: center;
}

.sobrinho {
  color: var(--destaque);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

/* o h1 é a logo: ela já traz o nome e o slogan */
.capa h1 {
  margin: 0 0 1.5rem;
}

.logo-musa {
  width: min(100%, 30rem);
  height: auto;
  display: block;
  margin: 0 auto;
}

.capa-texto {
  color: var(--texto2);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.capa-nota {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--texto3);
}

/* ---------------- botões ---------------- */
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.85rem;
  padding: 0.85rem 1.6rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    opacity 0.15s;
}

.botao-cheio {
  background: var(--botao);
  color: var(--botao-texto);
}
.botao-cheio:hover {
  background: var(--botao-forte);
}

.botao-contorno {
  background: transparent;
  border-color: color-mix(in srgb, var(--destaque) 45%, transparent);
  color: var(--destaque);
  font-weight: 500;
}
.botao-contorno:hover {
  border-color: var(--destaque);
}

.topo-cta {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.botao-enviar {
  width: 100%;
  margin-top: 1.5rem;
  font-size: 1.05rem;
  padding: 1rem;
}

.botao[disabled] {
  opacity: 0.5;
  cursor: progress;
}

/* ---------------- seções ---------------- */
.secao {
  max-width: var(--largura);
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
  border-top: 1px solid var(--borda);
}

.secao h2 {
  font-size: clamp(1.9rem, 6vw, 2.5rem);
  margin-bottom: 1.25rem;
}

.secao h3 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.sub-secao {
  color: var(--texto2);
  margin-top: -0.5rem;
}

.secao p {
  color: var(--texto2);
}

.destaque-bloco {
  border-left: 3px solid var(--destaque);
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--texto) !important;
  font-size: 1.05rem;
}

.duas-colunas {
  display: grid;
  gap: 2.5rem;
}

.centro {
  text-align: center;
  margin-top: 1.5rem;
}

.nota {
  font-size: 0.875rem;
  color: var(--texto3) !important;
}

.aviso {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--texto3) !important;
}

/* ---------------- listas ---------------- */
.lista-marcada {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  color: var(--texto2);
}

.lista-marcada li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
}

.lista-marcada li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--destaque);
}

.passos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.passos li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.passo-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--destaque) 40%, transparent);
  color: var(--destaque);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
}

.cartao-aviso {
  margin-top: 1.5rem;
  background: var(--cartao);
  border: 1px solid var(--borda);
  border-left: 3px solid var(--destaque);
  border-radius: 1rem;
  padding: 1.25rem;
}

.cartao-aviso h3 {
  font-size: 1.15rem;
  color: var(--destaque);
  margin-bottom: 0.75rem;
}

/* ---------------- formulário ---------------- */
.campos {
  display: grid;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.campo small {
  font-weight: 400;
  color: var(--texto3);
}

.obrigatorio {
  color: var(--destaque);
}

.opcional {
  color: var(--texto3);
  font-weight: 400;
  font-size: 0.85rem;
}

input[type="text"],
input[type="tel"],
input[type="date"],
textarea {
  width: 100%;
  border: 1px solid var(--borda);
  border-radius: 0.6rem;
  background: #141516;
  color: var(--texto);
  font: inherit;
  padding: 0.7rem 0.8rem;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--destaque);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--destaque) 20%, transparent);
}

input[aria-invalid="true"] {
  border-color: var(--erro);
}

textarea {
  resize: vertical;
}

.fotos {
  margin: 1.75rem 0 0;
  border: 1px solid var(--borda);
  border-radius: 1rem;
  padding: 1.25rem;
}

.fotos legend {
  padding: 0 0.5rem;
  font-weight: 700;
}

.fotos-campos {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.foto-campo {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.foto-campo input[type="file"] {
  font-size: 0.85rem;
  color: var(--texto3);
}

.foto-campo input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  border: 1px solid var(--borda);
  border-radius: 0.5rem;
  background: var(--cartao);
  color: var(--texto2);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}

.previa {
  width: 7.5rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 0.6rem;
  border: 1px solid var(--borda);
}

/* campo-isca contra robô: fora da tela, mas não display:none (robô ignoraria) */
.isca {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.erro {
  margin-top: 1rem;
  background: var(--erro-fundo);
  color: var(--erro);
  border-radius: 0.6rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
}

/* ---------------- FAQ ---------------- */
.faq {
  display: grid;
  gap: 0.5rem;
}

.faq details {
  border: 1px solid var(--borda);
  border-radius: 0.75rem;
  background: var(--cartao);
  padding: 0.9rem 1.1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--destaque);
  font-size: 1.25rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0.75rem 0 0;
  color: var(--texto2);
  font-size: 0.95rem;
}

/* ---------------- rodapé ---------------- */
.rodape {
  border-top: 1px solid var(--borda);
  padding: 2.5rem 1.25rem 3rem;
  text-align: center;
  color: var(--texto3);
  font-size: 0.85rem;
}

.rodape-logo {
  max-height: 3.5rem;
  max-width: 10rem;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.rodape-nome {
  color: var(--texto2);
  margin-bottom: 0.15rem;
}

.rodape-local,
.rodape-links {
  margin-bottom: 0.15rem;
}

.rodape-links {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.botao-grande {
  font-size: 1.1rem;
  padding: 1rem 2.25rem;
}

/* ---------------- convite pessoal (convite.html) ---------------- */
.convite {
  max-width: var(--largura);
  margin: 0 auto;
}

.carregando {
  padding: 5rem 1.25rem;
  text-align: center;
  color: var(--texto3);
}

.capa-convite {
  padding-top: 2.5rem;
}

.logo-convite {
  width: min(100%, 20rem);
  margin-bottom: 1.5rem;
}

.titulo-convite {
  font-size: clamp(2.25rem, 9vw, 3.25rem);
  margin-bottom: 0.75rem;
}

.pre-linha {
  white-space: pre-line;
}

.form-resposta {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.escolha {
  display: grid;
  gap: 0.75rem;
}

.opcao {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--borda);
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.opcao:has(input:checked) {
  border-color: var(--destaque);
  background: color-mix(in srgb, var(--destaque) 10%, transparent);
}

.opcao input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--botao-forte);
}

@media (min-width: 40rem) {
  .escolha {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------------- modais ---------------- */
dialog {
  border: 1px solid var(--borda);
  border-radius: 1.25rem;
  background: var(--fundo2);
  color: var(--texto);
  padding: 0;
  width: min(34rem, calc(100vw - 2rem));
  max-height: 90vh;
}

dialog::backdrop {
  background: rgb(0 0 0 / 0.75);
}

/* ---------------- modal de tela cheia (os formulários) ----------------
   Ocupa a tela toda no celular; no computador vira uma janela alta e centrada.
   O miolo rola sozinho, com o topo e os botões sempre à vista. */
dialog.tela-cheia {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  border: none;
  border-radius: 0;
  margin: 0;
  background: var(--fundo);
}

dialog.tela-cheia form {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.modal-topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--borda);
  background: var(--fundo2);
}

.modal-topo strong {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-passo {
  display: block;
  font-size: 0.75rem;
  color: var(--destaque);
}

.fechar {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--texto3);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.fechar:hover {
  background: var(--cartao);
  color: var(--texto);
}

.modal-rolagem {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  /* o conteúdo nunca encosta nos botões de baixo */
  padding-bottom: 2rem;
}

.modal-rolagem > .sub-secao {
  margin-top: 0;
}

.modal-titulo {
  font-size: 1.75rem;
}

.modal-rodape {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem max(1rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--borda);
  background: var(--fundo2);
}

.modal-rodape .botao {
  flex: 1;
}

dialog.tela-cheia select {
  width: 100%;
  border: 1px solid var(--borda);
  border-radius: 0.6rem;
  background: #141516;
  color: var(--texto);
  font: inherit;
  padding: 0.7rem 0.8rem;
  outline: none;
}

@media (min-width: 48rem) {
  dialog.tela-cheia {
    width: min(46rem, calc(100vw - 3rem));
    max-width: min(46rem, calc(100vw - 3rem));
    height: min(52rem, calc(100dvh - 3rem));
    max-height: calc(100dvh - 3rem);
    /* sem o auto a janela cola no canto: o margin:0 de cima vale só no celular */
    margin: auto;
    border: 1px solid var(--borda);
    border-radius: 1.25rem;
    overflow: hidden;
  }

  .modal-rolagem {
    padding: 1.75rem;
  }

  .modal-rodape {
    justify-content: flex-end;
  }

  .modal-rodape .botao {
    flex: 0 0 auto;
    min-width: 11rem;
  }
}

.modal-conteudo {
  padding: 1.5rem;
}

.modal-conteudo h2 {
  font-size: 1.9rem;
}

.modal-sub {
  color: var(--destaque);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.modal-texto {
  margin-top: 1rem;
  max-height: 32vh;
  overflow-y: auto;
  padding-right: 0.5rem;
  font-size: 0.875rem;
  color: var(--texto2);
}

.modal-texto p {
  margin-bottom: 0.75rem;
}

.aceites {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.aceites label {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--texto2);
  cursor: pointer;
}

.aceites input {
  margin: 0.25rem 0 0;
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  accent-color: var(--botao-forte);
}

.aceite-opcional {
  border-top: 1px solid var(--borda);
  padding-top: 0.85rem;
}

.aceite-opcional em {
  color: var(--texto3);
  font-style: normal;
}

.modal-botoes {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.modal-botoes .botao {
  flex: 1;
}

.modal-sucesso {
  text-align: center;
}

.modal-sucesso .selo {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #1e2a21;
  color: #7fb98e;
  font-size: 1.75rem;
}

.modal-sucesso p {
  color: var(--texto2);
  font-size: 0.95rem;
}

.modal-sucesso .botao {
  margin-top: 1.25rem;
}

/* ---------------- telas maiores ---------------- */
@media (min-width: 40rem) {
  .secao {
    padding: 3.5rem 2rem;
  }
  .campos {
    grid-template-columns: 1fr 1fr;
  }
  .campo-largo {
    grid-column: 1 / -1;
  }
  .fotos-campos {
    grid-template-columns: 1fr 1fr;
  }
  .duas-colunas {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  .passos {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 2.5rem;
  }
  .botao-enviar {
    width: auto;
    min-width: 18rem;
    display: flex;
    margin-left: auto;
    margin-right: auto;
  }
}
