/* ==========================================================================
   Contagem decrescente (index.php)
   ========================================================================== */
/* Título do cartaz (componente em base.css); aqui só o tamanho nesta página */
.hero-title { font-size: min(clamp(3.4rem, 15vw, 8.5rem), 18vh); }

.fade-in { opacity: 0; animation: fadeUp .9s cubic-bezier(.2, .7, .2, 1) forwards; }
.fade-in.d1 { animation-delay: .1s; }
.fade-in.d2 { animation-delay: .3s; }
.fade-in.d3 { animation-delay: .45s; }
.fade-in.d4 { animation-delay: .6s; }
.fade-in.d5 { animation-delay: .75s; }

/* Subtítulo do evento como divisor por baixo do título (nunca como rótulo por cima). */
.deco-label { font-family: var(--font-label); width: 100%; max-width: 560px; margin: 0; font-size: .72rem; font-weight: 700; letter-spacing: .38em; text-transform: uppercase; white-space: nowrap; }
.deco-label::before, .deco-label::after { flex: 1 1 16px; width: auto; max-width: 140px; } /* os filetes encolhem, o texto não parte */
@media (prefers-reduced-motion: reduce) { .fade-in { opacity: 1; } }

/* ------------------------------------------------------------ Countdown */
.countdown-main {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(14px, 2.6vh, 26px);
  padding: clamp(16px, 6vh, 48px) 16px 24px;
  text-align: center;
}
.marquee {
  position: relative;
  margin-top: 6px;
  padding: min(clamp(26px, 4vw, 40px), 6vh) clamp(18px, 4.5vw, 52px);
  border-radius: 22px;
  background: linear-gradient(180deg, #1f180b, #0b0905 70%);
  border: 2px solid var(--gold-deep);
  box-shadow:
    0 0 0 6px #0b0905, 0 0 0 8px var(--gold-deep),
    0 30px 80px rgba(0, 0, 0, .85),
    0 0 90px rgba(212, 175, 55, .18),
    inset 0 0 40px rgba(0, 0, 0, .8);
}
.marquee::before, .marquee::after { /* lâmpadas do letreiro */
  content: ''; position: absolute; inset: 5px; border-radius: 17px; padding: 11px;
  background: radial-gradient(circle, #fffbe6 0 1.8px, #ffd76a 2.8px, rgba(255, 200, 80, .25) 4.5px, transparent 6px) 0 0 / 22px 22px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: bulbs 1.1s steps(1) infinite;
  pointer-events: none;
}
.marquee::after { background-position: 11px 11px; animation-delay: -.55s; }
@keyframes bulbs { 0% { opacity: 1; } 50% { opacity: .18; } }

.countdown { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: center; gap: clamp(4px, 1.6vw, 16px); }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: clamp(60px, 17vw, 136px); }
.cd-num {
  display: block;
  font-family: var(--font-display); font-weight: 600;
  font-size: min(clamp(2.6rem, 11.5vw, 6.8rem), 15vh);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(246, 226, 122, .35));
}
.cd-num.tick { animation: tick .5s cubic-bezier(.25, 1, .5, 1); }
@keyframes tick { 0% { transform: translateY(-8%); filter: brightness(1.7) drop-shadow(0 0 22px rgba(255, 240, 180, .8)); } 100% { transform: none; } }
.cd-label { font-family: var(--font-label); margin-top: 10px; font-size: clamp(.64rem, 1.7vw, .78rem); font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); padding-left: .32em; }
.cd-sep { font-family: var(--font-display); font-size: min(clamp(2rem, 8vw, 5rem), 11vh); line-height: 1.15; color: var(--gold-deep); animation: blink 1s steps(1) infinite;  font-weight: 600; text-transform: uppercase; }
.cd-soon { display: none; margin: 0; font-family: var(--font-display); font-size: clamp(2.2rem, 9vw, 5rem); line-height: 1.1;  font-weight: 600; text-transform: uppercase; }
.countdown.is-soon .cd-unit, .countdown.is-soon .cd-sep { display: none; }
.countdown.is-soon .cd-soon { display: block; }
.date-line { font-family: var(--font-label); margin: 4px 0 0; font-size: clamp(.8rem, 2.4vw, 1rem); font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-pale); }

body.is-final .cd-num[data-unit="s"] { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.12); filter: brightness(1.6) drop-shadow(0 0 30px rgba(255, 230, 150, .9)); } }

@media (max-width: 480px) {
  .cd-sep { display: none; }
  .cd-unit { min-width: 0; flex: 1; }
  .cd-label { letter-spacing: .14em; padding-left: .14em; }
  .deco-label { letter-spacing: .26em; }
  .countdown { gap: 6px; width: 100%; }
  .marquee { width: 100%; }
}

/* Passadeira vermelha com baias ao fundo (por trás do conteúdo; desvanece para o preto no topo) */
.stage-floor { position: fixed; left: 0; right: 0; bottom: 0; z-index: -1; height: 62vh; pointer-events: none; } /* passadeira longa: perde-se no escuro ao fundo */
.stage-floor img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; opacity: .92; }
.countdown-main { position: relative; z-index: 1; }
@media (max-width: 600px) { .stage-floor { height: 50vh; } }
.page-countdown .site-footer { display: none; } /* repetia o título e ficava ilegível sobre a passadeira */

/* Brilhos dourados animados (assets/js/glitter.js, WebGL): no ar, por cima da passadeira e por baixo do conteúdo */
.glitter { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; opacity: .55; }

/* Cerimónia de abertura (assets/js/cerimonia-abertura.js): túnel de luz nos últimos 5s, depois o globo até à Bradco */
.opening { position: fixed; inset: 0; z-index: 70; width: 100%; height: 100%; opacity: 0; pointer-events: none; mix-blend-mode: screen; }
.opening[hidden] { display: none; }
body.is-warp-full .countdown-main, body.is-warp-full .garnish, body.is-warp-full .stage-floor, body.is-warp-full .glitter, body.is-warp-full .paparazzi, body.is-warp-full .pp-flashes, body.is-warp-full .bg { opacity: 0; transition: opacity 1.2s ease; }
/* os holofotes e as estrelas do fundo apagam-se enquanto o túnel de luz cresce (últimos 5s): no zero já não se veem */
body.is-warp .bg { opacity: 0; transition: opacity 3s ease; }
body.is-globe .opening { mix-blend-mode: normal; } /* o globo precisa de fundo opaco */
.opening-caption {
  position: fixed; left: 0; right: 0; bottom: calc(9vh + env(safe-area-inset-bottom)); z-index: 75; margin: 0; text-align: center;
  font-family: var(--font-label); font-weight: 600; font-size: clamp(.9rem, 2.6vw, 1.3rem); letter-spacing: .3em; text-transform: uppercase; color: var(--gold-pale);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8); opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s cubic-bezier(.25, 1, .5, 1); pointer-events: none;
}
.opening-caption span { color: var(--gold); }
.opening-caption.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Paparazzi (assets/js/fotografos.js): só os flashes, a disparar das laterais da passadeira, junto às baias.
   As silhuetas (assets/img/fotografos.svg) ficam invisíveis e servem apenas de mapa das câmaras;
   câmaras viradas para o centro; os flashes saem do vidro de cada câmara.
   ========================================================================== */
/* a mesma caixa da passadeira (.stage-floor): o SVG usa o mesmo viewBox e o mesmo "slice" */
.paparazzi { position: fixed; left: 0; right: 0; bottom: 0; z-index: -1; height: 62vh; pointer-events: none; }
.pp-flashes { position: fixed; inset: 0; z-index: -1; pointer-events: none; } /* os flashes por cima de tudo (o tapete não lhes corta a luz) */
@media (max-width: 600px) { .paparazzi { height: 50vh; } }
.pp-crowd { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; visibility: hidden; } /* silhuetas invisíveis: só marcam de onde sai cada flash (o vidro de cada câmara) */

/* o flash: núcleo branco, auréola quente e uma cruz de brilho */
.pp-flash { position: fixed; width: 0; height: 0; }
.pp-flash::before, .pp-flash::after {
  content: ''; position: absolute; left: 0; top: 0; width: var(--s); height: var(--s);
  opacity: 0; mix-blend-mode: screen;
}
.pp-flash::before {
  background: radial-gradient(circle, #fff 0 4%, rgba(255, 250, 235, .9) 8%, rgba(255, 236, 190, .35) 22%, transparent 60%);
  animation: pp-pop .32s cubic-bezier(.2, .8, .3, 1) forwards;
}
.pp-flash::after {
  width: calc(var(--s) * 1.5); height: calc(var(--s) * 1.5);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .95), transparent) center / 100% 2px no-repeat,
    linear-gradient(0deg, transparent, rgba(255, 255, 255, .95), transparent) center / 2px 70% no-repeat;
  animation: pp-glint .28s ease-out forwards;
}
@keyframes pp-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}
@keyframes pp-glint {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(.3); }
  15% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(.6); }
}

/* A passadeira (e os fotógrafos) perdem-se no fundo por transparência, não por uma cor por cima:
   assim não fica emenda contra o brilho e a vinheta do fundo da página. */
.stage-floor img {
  -webkit-mask-image: linear-gradient(to top, #000 34%, rgba(0, 0, 0, .55) 58%, rgba(0, 0, 0, .15) 78%, transparent 94%);
  mask-image: linear-gradient(to top, #000 34%, rgba(0, 0, 0, .55) 58%, rgba(0, 0, 0, .15) 78%, transparent 94%);
}
