/* =========================================================
   A PAREDE DE DESEJOS — folha de estilo
   Estética: livro-razão em decomposição. Tinta doente,
   caligrafia que treme, escuro úmido. O conforto não mora aqui.
   ========================================================= */

/* fonte de título via Google Fonts (Metal Mania): acentos completos e licença livre */

:root {
  --void:      #070806;   /* o fundo, quase sem cor */
  --void-2:    #0d0f0b;
  --bile:      #cdbf45;   /* amarelo secundário */
  --bone:      #f2e24a;   /* amarelo backrooms, texto principal */
  --bone-dim:  #b3a531;   /* amarelo apagado */
  --blood:     #8a161a;   /* sangue seco, acentos */
  --blood-lit: #b62327;
  --rot:       #2a2415;   /* ocre podre, bordas */
  --ash:       #1a1c17;

  --sombra: 1.5px 1.5px 0 #000, 0 0 3px rgba(0,0,0,.7);  /* sombra preta da escrita */

  --fonte-mao: "Shadows Into Light Two", cursive;
  --fonte-titulo: "Metal Mania", "Butcherman", system-ui, cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(8,5,6,.60), rgba(6,3,4,.74)),
    url("parede.jpg") center top / cover no-repeat fixed,
    #0a0405;
  color: var(--bone);
  font-family: var(--fonte-mao);
  font-size: 19px;
  line-height: 1.55;
  letter-spacing: .2px;
  overflow-x: hidden;
  text-shadow: var(--sombra);
}

body { position: relative; }

/* ---------- camadas de atmosfera ---------- */

/* o sigilo do Eco marcado na parede, brilhando atrás de tudo */
.marca-eco {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: url("eco-sigilo.svg") no-repeat center 38%;
  background-size: min(82vw, 680px) auto;
  mix-blend-mode: screen;
  opacity: .55;
  animation: pulsoEco 8s ease-in-out infinite;
}
@keyframes pulsoEco {
  0%, 100% { opacity: .46; }
  50%      { opacity: .62; }
}

/* grão de filme / sujeira viva */
.grain {
  position: fixed;
  inset: -150%;
  z-index: 9;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grao .42s steps(4) infinite;
}
@keyframes grao {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-3%, 2%); }
  50%  { transform: translate(2%, -4%); }
  75%  { transform: translate(-2%, 3%); }
  100% { transform: translate(3%, -2%); }
}

/* vinheta: a luz some nas bordas */
.vignette {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background: radial-gradient(110% 85% at 50% 42%, transparent 50%, rgba(0,0,0,.62) 100%);
}

/* respiração lenta: o ambiente pulsa, como algo vivo atrás da parede */
.breath {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(60% 50% at 50% 35%, rgba(138,22,26,.10), transparent 70%);
  animation: respirar 9s ease-in-out infinite;
}
@keyframes respirar {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: .9;  transform: scale(1.06); }
}

/* ---------- estrutura ---------- */

.wall {
  position: relative;
  z-index: 10;
  max-width: 720px;
  margin: 0 auto;
  padding: 7vh 22px 4vh;
}

.cabecalho { text-align: center; margin-bottom: 5vh; }

.titulo {
  font-family: var(--fonte-titulo);
  font-size: clamp(2rem, 7.5vw, 3.6rem);
  font-weight: 400;
  color: var(--bone);
  margin: 0;
  line-height: 1.15;
  letter-spacing: 1px;
  text-shadow: 4px 4px 0 #000, 2px 2px 0 #000, 0 0 22px rgba(0,0,0,.85);
  animation: tremor 2.4s steps(8) infinite;
}
/* duplicata fantasma do título, sombra preta deslocada */
.titulo::after {
  content: attr(data-text);
  position: absolute;
  left: 0; right: 0;
  color: #000;
  opacity: .85;
  transform: translate(6px, 6px);
  filter: blur(.3px);
  z-index: -1;
}
@keyframes tremor {
  0%   { transform: translate(0,0) rotate(0deg); }
  20%  { transform: translate(.6px,-.5px) rotate(-.25deg); }
  40%  { transform: translate(-.5px,.6px) rotate(.2deg); }
  60%  { transform: translate(.4px,.4px) rotate(.15deg); }
  80%  { transform: translate(-.6px,-.3px) rotate(-.2deg); }
  100% { transform: translate(0,0) rotate(0deg); }
}

.sussurro {
  font-size: 1rem;
  color: var(--bile);
  letter-spacing: 1.5px;
  margin: .6rem 0 0;
  opacity: .8;
}

/* ---------- abas dos suplicantes ---------- */

.supplicantes { margin-bottom: 4vh; }

.abas {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.aba {
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--rot);
  background: linear-gradient(180deg, rgba(255,255,255,.015), rgba(0,0,0,.25));
  padding: 8px 12px 7px;
  min-width: 92px;
  text-align: center;
  color: var(--bone-dim);
  transition: color .25s, border-color .25s, transform .12s, box-shadow .3s;
  position: relative;
}
.aba:hover { color: var(--bone); border-color: var(--blood); }
.aba .codigo {
  display: block;
  font-size: .72rem;
  letter-spacing: 2px;
  color: var(--bile);
}
.aba .nome { display: block; font-family: var(--fonte-titulo); font-size: 1.4rem; line-height: 1.1; letter-spacing: .5px; }
.aba .contador {
  display: block;
  font-size: .8rem;
  color: var(--bone-dim);
  margin-top: 2px;
}
.aba .contador b { color: var(--blood-lit); font-weight: 400; }

.aba.ativa {
  color: var(--bone);
  border-color: var(--blood-lit);
  box-shadow: 0 0 14px rgba(182,35,39,.35), inset 0 0 18px rgba(138,22,26,.18);
  animation: aba-doente 3s steps(6) infinite;
}
@keyframes aba-doente {
  0%,100% { transform: translate(0,0); }
  33%     { transform: translate(.4px,-.4px); }
  66%     { transform: translate(-.4px,.3px); }
}

/* ---------- o rito ---------- */

.rito { margin-bottom: 4vh; }

.rotulo {
  display: block;
  font-size: 1.05rem;
  color: var(--bile);
  margin-bottom: 10px;
  letter-spacing: .4px;
}
.rotulo #quemDeseja { color: var(--bone); border-bottom: 1px dashed var(--rot); }

.entrada {
  display: flex;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 560px) {
  .entrada { flex-direction: column; }
}

.campo {
  flex: 1;
  resize: vertical;
  min-height: 96px;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--rot);
  border-left: 3px solid var(--blood);
  color: var(--bone);
  font-family: var(--fonte-mao);
  font-size: 1.25rem;
  line-height: 1.5;
  padding: 14px 16px;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.campo::placeholder { color: var(--bone-dim); opacity: .55; }
.campo:focus {
  border-color: var(--blood-lit);
  box-shadow: inset 0 0 22px rgba(138,22,26,.12), 0 0 10px rgba(138,22,26,.18);
}

/* seletor de preço 0 a 6 */
.seletor {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--rot);
  padding: 12px 12px 10px;
  background: rgba(0,0,0,.25);
  min-width: 132px;
}
.seletor-titulo {
  font-size: .8rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--bile);
}
.niveis {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.nivel {
  width: 26px; height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--rot);
  color: var(--bone-dim);
  font-size: .95rem;
  background: var(--ash);
  transition: transform .1s, color .2s, box-shadow .25s, border-color .2s;
}
.nivel:hover { transform: translateY(-2px); color: var(--bone); }
.nivel[data-n="0"] { box-shadow: inset 0 -3px 0 rgba(205,198,180,.20); }
.nivel[data-n="1"] { box-shadow: inset 0 -3px 0 rgba(150,140,90,.30); }
.nivel[data-n="2"] { box-shadow: inset 0 -3px 0 rgba(150,110,60,.40); }
.nivel[data-n="3"] { box-shadow: inset 0 -3px 0 rgba(160,80,40,.50); }
.nivel[data-n="4"] { box-shadow: inset 0 -3px 0 rgba(160,50,40,.60); }
.nivel[data-n="5"] { box-shadow: inset 0 -3px 0 rgba(150,30,32,.75); }
.nivel[data-n="6"] { box-shadow: inset 0 -3px 0 rgba(182,35,39,.95); }
.nivel.escolhido {
  color: #fff;
  border-color: var(--blood-lit);
  background: linear-gradient(180deg, rgba(138,22,26,.55), rgba(40,5,6,.7));
  box-shadow: 0 0 12px rgba(182,35,39,.6);
}
.nivel-legenda {
  font-size: .85rem;
  color: var(--bone-dim);
  text-align: center;
  min-height: 1.2em;
}

.oferecer {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  cursor: pointer;
  background: linear-gradient(180deg, #1a0708, #0c0303);
  color: var(--bone);
  border: 1px solid var(--blood);
  font-family: var(--fonte-titulo);
  font-size: 1.05rem;
  letter-spacing: 1px;
  transition: color .25s, box-shadow .3s, transform .08s, border-color .25s;
}
.oferecer:hover {
  color: #fff;
  border-color: var(--blood-lit);
  box-shadow: 0 0 20px rgba(182,35,39,.4), inset 0 0 24px rgba(138,22,26,.25);
}
.oferecer:active { transform: translateY(1px); }
.oferecer:disabled { cursor: wait; opacity: .7; }
.oferecer.pensando { animation: pensar 1.1s ease-in-out infinite; }
@keyframes pensar {
  0%,100% { box-shadow: 0 0 8px rgba(138,22,26,.2); }
  50%     { box-shadow: 0 0 26px rgba(182,35,39,.55); }
}

/* ---------- o veredito ---------- */

.veredito {
  position: relative;
  border: 1px solid var(--rot);
  border-top: 3px solid var(--blood);
  background:
    linear-gradient(180deg, rgba(20,5,6,.5), rgba(0,0,0,.45));
  padding: 26px 26px 22px;
  margin-top: 8px;
  animation: sangrar .9s ease-out both;
}
@keyframes sangrar {
  from { opacity: 0; transform: translateY(10px) scale(.99); filter: blur(2px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.veredito-marca {
  position: absolute;
  top: -2px; left: 0;
  height: 3px; width: 0;
  background: var(--blood-lit);
  animation: escorrer 1.4s ease-out forwards;
}
@keyframes escorrer { to { width: 100%; } }

.veredito-texto {
  font-size: 1.3rem;
  line-height: 1.62;
  color: var(--bone);
  margin: 0;
  white-space: pre-wrap;
}
.veredito-selo {
  margin: 16px 0 0;
  text-align: right;
  font-family: var(--fonte-titulo);
  font-size: .92rem;
  color: var(--blood-lit);
  letter-spacing: .5px;
}

/* cursor de digitação para o efeito de inscrição */
.veredito-texto.escrevendo::after {
  content: "";
  display: inline-block;
  width: 9px; height: 1.1em;
  margin-left: 2px;
  background: var(--blood-lit);
  transform: translateY(2px);
  animation: piscar .7s steps(1) infinite;
}
@keyframes piscar { 50% { opacity: 0; } }

/* ---------- avisos / rodapé ---------- */

.aviso {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px dashed var(--blood);
  background: rgba(40,5,6,.35);
  color: var(--bone);
  font-size: 1rem;
}

.rodape {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 3vh 18px 5vh;
  color: var(--bone-dim);
  font-size: .85rem;
  letter-spacing: .6px;
  opacity: .6;
}

/* respeita quem não tolera movimento */
@media (prefers-reduced-motion: reduce) {
  .grain, .breath, .titulo, .aba.ativa, .oferecer.pensando, .marca-eco { animation: none; }
}
