/* Reviver: a reabertura contada como abertura de filme.
   Cortina fechada, a luz sobe por trás, a logo entra em foco; a cortina abre e passa na frente do texto,
   revelando a sala e a data. A cortina é desenhada ao vivo em cena.js; sem WebGL, a página abre direto. */
@font-face { font-family: "Cormorant Garamond"; src: url("cormorant-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: block; }
@font-face { font-family: "Cormorant Garamond"; src: url("cormorant-300i.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("manrope.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

:root {
  --marfim: #f8f1e7;
  --g: clamp(16px, 4vw, 48px);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --lw: clamp(150px, 42vw, 184px);   /* largura da logo no topo */
  --topo: max(22px, env(safe-area-inset-top));
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #070405; }
body { margin: 0; min-height: 100vh; min-height: 100svh; color: var(--marfim); font: 400 1rem/1.55 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, p { margin: 0; }
:focus-visible { outline: 2px solid var(--marfim); outline-offset: 3px; border-radius: 6px; }

/* a sala: um plano nítido e um desfocado por cima, que some quando o foco abre */
.plano { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: #120806; }
.fundo { position: absolute; inset: 0; background: url("fundo.webp") 64% 48% / cover no-repeat; filter: saturate(.94) brightness(.96); }
@media (max-aspect-ratio: 1/1) { .fundo { background-image: url("fundo-vertical.webp"); background-position: 50% 50%; } }
.fundo-desfocado { filter: blur(20px) saturate(.94) brightness(.66); opacity: 0; transform: scale(1.06); }
.veu { position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(72% 40% at 50% 47%, rgba(9, 4, 3, .46), rgba(9, 4, 3, 0) 76%),
  linear-gradient(180deg, rgba(9, 4, 3, .6) 0%, rgba(9, 4, 3, 0) 22%, rgba(9, 4, 3, 0) 66%, rgba(9, 4, 3, .66) 100%); }

/* a cortina fica entre o título e o resto: é ela que revela a data */
#cortina { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; display: block; }
/* tela preta até a cortina carregar; se o script nem rodar, some sozinha */
.capa { position: fixed; inset: 0; z-index: 5; background: #050303; pointer-events: none; animation: capa .4s 4s forwards; }

.palco { overflow: clip; min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; gap: 20px; padding: var(--topo) var(--g) max(16px, env(safe-area-inset-bottom)); text-align: center; }
.logo { position: relative; z-index: 3; display: block; width: var(--lw); height: auto; filter: drop-shadow(0 2px 18px rgba(9, 4, 3, .55)); }
.titulo { position: relative; z-index: 1; align-self: center; }
h1 { font-family: var(--serif); font-weight: 300; font-variant-numeric: lining-nums; text-shadow: 0 2px 34px rgba(9, 4, 3, .6), 0 0 90px rgba(255, 190, 130, .16); }
.pre { display: block; font-style: italic; font-size: clamp(1.7rem, 7.4vw, 2.3rem); line-height: 1.1; margin-bottom: .1em; opacity: .94; }
.data { display: block; font-size: 23.4vw; line-height: .9; letter-spacing: -.025em; white-space: nowrap; }
.d1, .d2 { display: block; }
.contador { font: italic 300 clamp(1.45rem, 6.2vw, 1.8rem)/1.2 var(--serif); font-variant-numeric: lining-nums; min-height: 1.2em; margin-top: .55em; opacity: .94; text-shadow: 0 1px 22px rgba(9, 4, 3, .7); }

.vidro { position: relative; z-index: 3; width: min(100%, 1120px); display: grid; gap: 14px; padding: 18px; text-align: left; border-radius: 22px; background: rgba(18, 9, 7, .46); border: 1px solid rgba(255, 228, 200, .18); box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(28px) saturate(140%); backdrop-filter: blur(28px) saturate(140%); }
.corpo { font-size: .975rem; line-height: 1.5; color: rgba(248, 241, 231, .94); }
.contatos { display: grid; gap: 10px; justify-items: start; }
.whats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.bt { display: inline-flex; align-items: center; gap: .55em; min-height: 48px; padding: .55em 1.15em; border-radius: 999px; color: #fff; font-weight: 600; font-size: .9875rem; line-height: 1.2; text-decoration: none; white-space: nowrap; background: linear-gradient(180deg, #99232f 0%, #7e101a 55%, #6a0c16 100%); box-shadow: 0 12px 30px -10px rgba(150, 25, 40, .8), inset 0 1px 0 rgba(255, 255, 255, .24); transition: filter .2s, transform .2s; }
.bt:hover { filter: brightness(1.14); }
.bt:active { transform: scale(.98); }
.bt svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.fone { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; color: rgba(248, 241, 231, .94); }
.ig { color: rgba(248, 241, 231, .94); padding-block: .2em; font-size: .9375rem; text-decoration: underline; text-decoration-color: rgba(248, 241, 231, .4); text-decoration-thickness: 1px; text-underline-offset: .28em; overflow-wrap: anywhere; transition: color .2s, text-decoration-color .2s; }
.ig:hover { color: #fff; text-decoration-color: #fff; }

@media (min-width: 720px) {
  :root { --lw: clamp(180px, 15vw, 230px); }
  .pre { font-size: clamp(2.2rem, 3.4vw, 3.4rem); }
  .data { font-size: min(12.2vw, 27vh); }
  .d1, .d2 { display: inline-block; }
  .contador { font-size: clamp(1.6rem, 2.1vw, 2.1rem); }
  .vidro { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 16px 22px; }
  .contatos { justify-items: end; }
}
@media (min-width: 1120px) {
  .contatos { grid-auto-flow: column; align-items: center; gap: 24px; }
}

/* linha do tempo da abertura (a cortina segue o mesmo relógio em cena.js) */
@media (prefers-reduced-motion: no-preference) {
  .abertura .capa { animation: capa 1.1s .1s ease-out forwards; }
  .abertura .plano { animation: dolly 15s 1.5s cubic-bezier(.16, .6, .3, 1) both; }
  .abertura .fundo-desfocado { animation: foco-sala 3.2s 3.1s ease-in-out backwards; }
  .abertura .logo { animation: logo 3.9s .55s cubic-bezier(.45, 0, .2, 1) both; }
  .abertura .pre { animation: nitido 1.7s 3.5s cubic-bezier(.2, .7, .2, 1) both; }
  .abertura .data { animation: nitido 2.1s 3.3s cubic-bezier(.2, .7, .2, 1) both; }
  .abertura .contador { animation: nitido 1.3s 5.1s cubic-bezier(.2, .7, .2, 1) both; }
  .abertura .vidro { animation: vidro 1.5s 5.2s cubic-bezier(.2, .7, .2, 1) both; }
}
.pulou *, .pulou .capa { animation: none !important; }
.pulou .capa, .sem-capa .capa { display: none; }
/* as letras se aproximam devagar; só onde há folga na largura */
@media (min-width: 720px) and (prefers-reduced-motion: no-preference) {
  .abertura .data { animation: nitido 2.1s 3.3s cubic-bezier(.2, .7, .2, 1) both, entra-letra 4.2s 3.1s cubic-bezier(.16, .7, .2, 1) both; }
}
@keyframes capa { from { opacity: 1; } to { opacity: 0; } }
@keyframes dolly { from { transform: scale(1.13); } to { transform: scale(1.02); } }
@keyframes foco-sala { from { opacity: 1; } to { opacity: 0; } }
@keyframes logo {
  0% { opacity: 0; filter: blur(16px) drop-shadow(0 2px 18px rgba(9, 4, 3, .55)); transform: translateY(calc(50vh - var(--topo) - var(--lw) * .2203)) scale(1.85); }
  30% { opacity: 1; filter: blur(0) drop-shadow(0 2px 18px rgba(9, 4, 3, .55)); transform: translateY(calc(50vh - var(--topo) - var(--lw) * .2203)) scale(1.85); }
  58% { transform: translateY(calc(50vh - var(--topo) - var(--lw) * .2203)) scale(1.85); }
  100% { opacity: 1; filter: blur(0) drop-shadow(0 2px 18px rgba(9, 4, 3, .55)); transform: none; }
}
@keyframes nitido { from { opacity: 0; filter: blur(20px); } to { opacity: 1; filter: blur(0); } }
@keyframes entra-letra { from { letter-spacing: .05em; } to { letter-spacing: -.025em; } }
@keyframes vidro { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
