:root {
  --fundo: #ededf0;
  --bloco: #ffffff;
  --tinta: #1b1b1f;
  --tinta-suave: #74747c;
  --filete: #e3e2e6;
  --acento: #ED1C55;
  --acento-fundo: #fce4ea;
  --acento-texto: #ffffff;
  --ok: #1f8a52;
  --logo-claro: block;
  --logo-escuro: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fundo: #101012;
    --bloco: #1a1a1e;
    --tinta: #f0eff2;
    --tinta-suave: #8c8b92;
    --filete: #2a2a30;
    --acento-fundo: rgba(237, 28, 85, 0.16);
    --ok: #55c98a;
    --logo-claro: none;
    --logo-escuro: block;
  }
}
:root[data-theme="dark"] {
  --fundo: #101012;
  --bloco: #1a1a1e;
  --tinta: #f0eff2;
  --tinta-suave: #8c8b92;
  --filete: #2a2a30;
  --acento-fundo: rgba(237, 28, 85, 0.16);
  --ok: #55c98a;
  --logo-claro: none;
  --logo-escuro: block;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--fundo);
  color: var(--tinta);
  font-family: "Proxima Nova", Inter, system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.display, h1, h2, h3, .rotulo, .btn, .mini {
  font-family: "Futura PT", Jost, "Century Gothic", sans-serif;
}

.topo {
  display: flex;
  justify-content: center;
  padding: 1.6rem 1rem 0.6rem;
}
.logo { width: 9rem; height: auto; }
.logo-clara { display: var(--logo-claro); }
.logo-escura { display: var(--logo-escuro); }

.wrap {
  flex: 1;
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 4vw, 2rem) 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.progresso {
  height: 0.35rem;
  border-radius: 999px;
  background: var(--filete);
  overflow: hidden;
}
.progresso-barra {
  height: 100%;
  width: 0%;
  background: var(--acento);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.progresso-texto {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tinta-suave);
}

.card {
  background: var(--bloco);
  border-radius: 20px;
  padding: clamp(1.3rem, 4vw, 2rem);
  min-width: 0;
}

h1 {
  font-weight: 600;
  font-size: clamp(1.4rem, 4vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.subtitulo {
  color: var(--tinta-suave);
  font-size: 0.92rem;
  margin-top: 0.5rem;
}

.campos {
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.campo label.rotulo {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.55rem;
}

.campo input[type="text"],
.campo input[type="number"],
.campo textarea {
  width: 100%;
  background: var(--fundo);
  border: 1px solid var(--filete);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--tinta);
}
.campo input:focus, .campo textarea:focus {
  outline: 2px solid var(--acento);
  outline-offset: 1px;
}
.campo textarea { min-height: 5rem; resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.chip {
  border: 1px solid var(--filete);
  background: var(--fundo);
  color: var(--tinta);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  user-select: none;
}
.chip:hover { border-color: var(--acento); }
.chip.selecionado {
  background: var(--acento);
  border-color: var(--acento);
  color: var(--acento-texto);
  font-weight: 600;
}
.chip:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }

.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.7rem;
}
.galeria-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  aspect-ratio: 4 / 3;
  background: var(--fundo);
}
.galeria-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.galeria-item.selecionado { border-color: var(--acento); }
.galeria-item .check {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--acento);
  color: var(--acento-texto);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}
.galeria-item.selecionado .check { display: flex; }

.info-texto { color: var(--tinta-suave); font-size: 0.98rem; line-height: 1.6; }

.nav {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
}
.btn {
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn-principal { background: var(--acento); color: var(--acento-texto); margin-left: auto; }
.btn-principal:hover { opacity: 0.92; }
.btn-fantasma { background: transparent; color: var(--tinta-suave); }
.btn-fantasma:hover { color: var(--tinta); }
.btn-fantasma:disabled { visibility: hidden; }
.btn:disabled { opacity: 0.5; cursor: default; }

.rodape {
  text-align: center;
  padding: 1.2rem 1rem 2rem;
  color: var(--tinta-suave);
  font-size: 0.8rem;
}

.tela-final { text-align: center; padding: 2rem 0; }
.tela-final .marca-check {
  width: 3.2rem; height: 3.2rem; border-radius: 999px;
  background: var(--ok); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin: 0 auto 1.2rem;
}

.erro-envio {
  background: var(--acento-fundo);
  color: var(--acento);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
}

/* honeypot, nunca visível a humanos */
.hp { position: absolute; left: -9999px; top: -9999px; }

@media (max-width: 30rem) {
  .nav { flex-direction: column-reverse; }
  .btn-principal { margin-left: 0; }
  .btn-fantasma { text-align: center; }
}
