/* Demonstração — mural, revelação e ecrã da festa, com fotos de exemplo.
   🔴 Substitui o escalão grátis (decisão 38). Não dispara nada, não envia nada,
   não há rede: as imagens são SVG gerados por nós e vivem em /site/img/exemplo/.

   Sem JavaScript, o mural aparece inteiro e revelado — a demonstração perde a animação,
   nunca o conteúdo. */

.demo { background: var(--tinta); color: var(--papel-alto); }

.demo__faixa {
  background: var(--ambar);
  color: #1a1206;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.8rem 0;
  text-align: center;
}
.demo__faixa b { font-weight: 700; }

.demo__palco {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 62rem) {
  .demo__palco { grid-template-columns: 19rem 1fr; }
}

/* ---------- o corpo da câmara ---------- */

.camara {
  background: linear-gradient(170deg, #241a13, #140e0a);
  border: 1px solid #3f2f22;
  border-radius: 6px;
  padding: 1.3rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 18px 34px rgba(0,0,0,0.5);
  position: sticky;
  top: 5.3rem;
}
@media (max-width: 62rem) { .camara { position: static; } }

.camara__rotulo {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a7560;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid #3f2f22;
  padding-bottom: 0.7rem;
  margin-bottom: 1.1rem;
}

/* A janelinha do contador de disparos, como a roda numerada da câmara real. */
.contador {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  background: #0b0806;
  border: 1px solid #3f2f22;
  border-radius: 3px;
  padding: 0.9rem 1rem;
  margin-bottom: 1.1rem;
}
.contador__numero {
  font-family: var(--mono);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--ambar-claro);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.contador__de {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a7560;
}

.disparo {
  width: 100%;
  display: block;
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 1.1rem;
  border: none;
  border-radius: 3px;
  background: var(--vermelho);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 0 #7d2419;
  transition: transform 0.08s, box-shadow 0.08s;
}
.disparo:hover { background: #d1402f; }
.disparo:active { transform: translateY(4px); box-shadow: 0 1px 0 #7d2419; }
.disparo[disabled] { background: #3f2f22; color: #8a7560; box-shadow: 0 5px 0 #241a13; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .disparo { transition: none; } }

.camara__nota {
  font-size: 0.82rem;
  line-height: 1.45;
  color: #a6917a;
  margin: 1rem 0 0;
}
.camara__extras { display: grid; gap: 0.6rem; margin-top: 1.1rem; }
.camara__extras button {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: var(--papel-alto);
  border: 1px solid #3f2f22;
  padding: 0.65rem 0.8rem;
  cursor: pointer;
  text-align: left;
  border-radius: 3px;
}
.camara__extras button:hover { border-color: var(--ambar); color: var(--ambar-claro); }

/* O clarão do flash. Só quando o visitante dispara. */
.flash {
  position: fixed; inset: 0; background: #fff; opacity: 0;
  pointer-events: none; z-index: 95;
}
.flash.acende { animation: flash 420ms ease-out; }
@keyframes flash {
  0% { opacity: 0.82; }
  18% { opacity: 0.5; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .flash.acende { animation: none; } }

/* ---------- o mural ---------- */

.mural__cabeca {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  border-bottom: 1px solid #3f2f22;
  padding-bottom: 0.8rem;
  margin-bottom: 1.4rem;
}
.mural__titulo { margin: 0; font-size: 1.5rem; }
.mural__estado { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: #a6917a; }
.mural__estado .ponto {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--verde); margin-right: 0.45rem;
  box-shadow: 0 0 0 0 rgba(45,106,94,0.8);
  animation: pulsa 2.2s infinite;
}
@keyframes pulsa {
  0% { box-shadow: 0 0 0 0 rgba(90,190,160,0.6); }
  70% { box-shadow: 0 0 0 9px rgba(90,190,160,0); }
  100% { box-shadow: 0 0 0 0 rgba(90,190,160,0); }
}
@media (prefers-reduced-motion: reduce) { .mural__estado .ponto { animation: none; } }

.mural {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.9rem;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
}
@media (min-width: 40rem) { .mural { grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); } }

.quadro {
  position: relative;
  background: #0b0806;
  border: 1px solid #2a1f16;
  border-radius: 2px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.quadro img {
  width: 100%; height: 100%; object-fit: cover;
  transition: filter 1.5s ease-out, opacity 1.1s ease-out, transform 1.8s ease-out;
}
.quadro__hora {
  position: absolute; right: 6px; bottom: 5px;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.1em;
  color: #ffd27a; text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  background: rgba(0,0,0,0.35); padding: 1px 5px; border-radius: 2px;
}

/* Estado «ainda não revelada»: o rectângulo escuro com grão, à espera. */
.quadro--espera img { opacity: 0; filter: blur(18px) saturate(0.2) brightness(1.5); transform: scale(1.06); }
.quadro--espera .quadro__hora { opacity: 0; }
.quadro--espera::after {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--grao);
  opacity: 0.18;
}

/* Estado «a revelar»: entra meio velada e acaba nítida. */
.quadro--revela img { opacity: 1; filter: blur(0) saturate(1) brightness(1); transform: scale(1); }
.quadro--revela .quadro__hora { opacity: 1; transition: opacity 0.8s 0.7s; }
.quadro--revela::after { opacity: 0; transition: opacity 1.4s; }

/* O risco de luz que corre pelo quadro no instante em que ele chega. */
.quadro--chega::before {
  content: "";
  position: absolute; inset: -40% -10%;
  background: linear-gradient(105deg, transparent 38%, rgba(255,222,150,0.5) 50%, transparent 62%);
  animation: varre 1.15s ease-out;
  z-index: 2;
  pointer-events: none;
}
@keyframes varre {
  from { transform: translateX(-85%); opacity: 1; }
  to { transform: translateX(85%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .quadro img { transition: none; }
  .quadro--chega::before { animation: none; display: none; }
}

.quadro--meu { border-color: var(--ambar); box-shadow: 0 0 0 1px var(--ambar); }
.quadro--meu .quadro__hora { color: #1a1206; background: var(--ambar-claro); }

.mural__vazio {
  grid-column: 1 / -1;
  border: 1px dashed #3f2f22;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: #a6917a;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- o ecrã da festa ---------- */

.ecra {
  margin: 0;
  background: #060404;
  border: 10px solid #1c1510;
  border-radius: 4px;
  box-shadow: 0 26px 60px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: grid;
}
.ecra img {
  grid-area: 1 / 1;
  width: 100%; height: 100%; object-fit: contain;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.ecra img.activa { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .ecra img { transition: none; }
  .ecra img:not(.activa) { display: none; }
}
.ecra figcaption {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: start;
  padding: 1.2rem 1.4rem;
  font-family: var(--mono);
  font-size: clamp(0.7rem, 1.4vw, 0.9rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff6e2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.95);
  z-index: 3;
}
.ecra__barra {
  grid-area: 1 / 1;
  align-self: start;
  height: 3px;
  background: var(--ambar);
  width: 0;
  z-index: 3;
}
.ecra__barra.corre { animation: avanca var(--seg, 6s) linear; }
@keyframes avanca { from { width: 0; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .ecra__barra.corre { animation: none; width: 100%; } }

.ecra__legenda { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 0.9rem; }
