/* Tema "onda": a onda que acende a rua (cinema na rolagem, usado com onda.js).
   A rolagem controla o vídeo: a rua apagada, a onda roxa passando no asfalto molhado e a loja acendendo.
   Sem JavaScript (ou se o vídeo falhar), fica uma abertura estática com a rua e todo o texto visível. */
:root {
  --cine-noite: #050507;
  --cine-lilas: #ede9fe;
  --cine-traco: rgba(255, 255, 255, .5);
  --cine-veu-forte: rgba(5, 5, 7, .82);
  --cine-veu-medio: rgba(5, 5, 7, .45);
  --cine-veu-zero: rgba(5, 5, 7, 0);
  --cine-altura: 460vh;
  --cine-zoom: .12;   /* quanto a loja cresce até o fim da cena (lido pelo onda.js) */
}

.cine { position: relative; background: var(--cine-noite); }
.cine-palco { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.cine-on { height: var(--cine-altura); }
.cine-on .cine-palco { position: sticky; top: 0; }

.cine-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%;
  transform-origin: 58% 48%; will-change: transform; }  /* o zoom cresce a partir do centro da vitrine da loja */
.cine-veu { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--cine-veu-forte) 0%, var(--cine-veu-medio) 42%, var(--cine-veu-zero) 72%),
    linear-gradient(180deg, var(--cine-veu-medio) 0%, var(--cine-veu-zero) 24%, var(--cine-veu-zero) 68%, var(--cine-veu-forte) 100%); }

.cine-texto { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center;
  align-items: flex-start; padding-top: 96px; padding-bottom: 96px; }
.cine-titulo { font-size: clamp(40px, 5.6vw, 84px); line-height: .98; letter-spacing: -0.045em; font-weight: 700; margin-bottom: 28px; }
.cine-linha { display: block; white-space: nowrap; padding-bottom: .06em; }
.cine-roxo { background: linear-gradient(100deg, var(--cine-lilas) 0%, var(--accent-soft) 35%, var(--accent) 75%, var(--accent-deep) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.cine-fim { max-width: 520px; }
.cine .hero-sub, .cine .hero-ctas { animation: none; }
.cine .hero-sub { margin-bottom: 30px; }
.cine .hero-ctas { margin-bottom: 0; }

/* Com o JS: o título nasce só no contorno e se preenche com a rolagem (--f); o resto aparece no fim */
.cine-on .cine-linha { color: transparent; -webkit-text-stroke: 1px var(--cine-traco);
  background: linear-gradient(90deg, var(--text), var(--text)) no-repeat 0 0 / var(--f, 0%) 100%;
  -webkit-background-clip: text; background-clip: text; }
.cine-on .cine-roxo { background-image: linear-gradient(100deg, var(--cine-lilas) 0%, var(--accent-soft) 35%, var(--accent) 75%, var(--accent-deep) 100%);
  -webkit-text-stroke-color: var(--accent-soft); }
.cine-on .cine-fim { opacity: 0; transform: translateY(16px); pointer-events: none; will-change: opacity, transform; }
.cine-on .cine-fim.ativo { pointer-events: auto; }

/* Detalhe da marca: a linha em forma de onda se revela junto com a luz que atravessa a rua (--q) */
.cine-onda { position: absolute; left: 0; bottom: 12vh; z-index: 1; width: 100%; height: 56px; display: none; pointer-events: none;
  fill: none; stroke: var(--accent); stroke-width: 2.5; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 10px var(--glow));
  clip-path: inset(0 calc(100% - var(--q, 0) * 100%) 0 0); }
.cine-on .cine-onda { display: block; }

.cine-dica { position: absolute; left: 0; right: 0; bottom: 3.5vh; z-index: 2; display: none; text-align: center;
  font: 600 12px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.cine-dica i { display: block; width: 1px; height: 24px; margin: 10px auto 0; background: var(--muted); animation: cine-desce 1.6s var(--ease) infinite; }
.cine-on .cine-dica { display: block; will-change: opacity; }
@keyframes cine-desce { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* Tela de carregamento: o vídeo precisa estar inteiro para a rolagem ficar suave */
.cine-carregando { position: absolute; inset: 0; z-index: 5; display: none; place-content: center; justify-items: center; gap: 14px;
  background: var(--cine-noite); transition: opacity .6s var(--ease);
  font: 500 12px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.cine-carregando svg { width: 120px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-dasharray: .3 .7; animation: cine-corre 1.4s linear infinite; }
@keyframes cine-corre { to { stroke-dashoffset: -1; } }
.cine-on .cine-carregando { display: grid; }
.cine-carregando.foi { opacity: 0; pointer-events: none; }

@media (max-width: 640px) {
  /* no celular a vitrine fica no meio da altura: título no alto (andar de cima), botões embaixo (asfalto), loja livre no meio */
  :root { --cine-zoom: .06; }
  .cine-texto { justify-content: flex-start; padding-top: 92px; padding-bottom: 9vh; }
  .cine-fim { margin-top: auto; width: 100%; max-width: none; }
  .cine-video { object-position: 58% 50%; transform-origin: 58% 48%; }
  .cine-veu { background: linear-gradient(180deg, var(--cine-veu-forte) 0%, var(--cine-veu-medio) 26%, var(--cine-veu-zero) 37%,
    var(--cine-veu-zero) 60%, var(--cine-veu-forte) 74%, var(--cine-noite) 100%); }
  .cine-titulo { font-size: clamp(38px, 11vw, 52px); margin-bottom: 20px; }
  .cine .eyebrow { margin-bottom: 18px; }
  .cine .hero-sub { font-size: 16px; margin-bottom: 20px; }
  .cine .hero-ctas { width: 100%; }
  .cine-onda { bottom: 2vh; height: 34px; }
  .cine-dica { bottom: 2.5vh; }
}

@media (prefers-reduced-motion: reduce) {
  /* a altura da cena NÃO muda (senão o progresso trava em 0); só param os movimentos que andam sozinhos */
  .cine-dica i, .cine-carregando svg { animation: none; }
}
