/* livros.css - Via Traco - Spiral Intro */

/* ══ SPIRAL SECTION ════════════════════════════════════════════════ */
.lsi {
  position: relative;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
  padding-top: 64px;
}

/* Stage: flex row  VIA | spiral | TRACO */
.lsi__stage {
  display: flex;
  align-items: center;
  width: 100%;
  height: 70vh;
  max-width: 1440px;
  position: relative;
  z-index: 2;
}

/* Words */
.lsi__word {
  font-family: "CSClingan", var(--serif);
  font-size: clamp(56px, 8vw, 108px);
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -.01em;
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
  opacity: 0;
  transition: opacity .7s ease;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 3;
}
.lsi__word--via   { padding-left: clamp(20px, 4vw, 56px); }
.lsi__word--traco { padding-right: clamp(20px, 4vw, 56px); }
.lsi__word.lsi-in  { opacity: 1; }
.lsi__word.lsi-out { opacity: 0 !important; transition: opacity .5s ease; }

/* Spiral container - flex fills space between words */
.lsi__spiral {
  flex: 1;
  position: relative;
  height: 100%;
  min-width: 0;
  overflow: visible;
  /* No isolation - images render cleanly without blend mode */
}

/* ── Book covers: clean, no blend mode, tangent-rotated ribbon ── */
.lsi__cover {
  position: absolute;
  width: 72px;
  height: 92px;
  object-fit: cover;
  border-radius: 1px;
  /* NO mix-blend-mode - clean images on any background */
  /* NO box-shadow */
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity .3s ease, transform .55s cubic-bezier(.22,1,.36,1);
}

/* ══ TEXT PHASE (after spiral clears) ══════════════════════════════ */
.lsi__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 80px;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s ease;
}
.lsi__text.lsi-text-in  { opacity: 1; pointer-events: auto; }
.lsi__text.lsi-text-out { opacity: 0 !important; pointer-events: none; transition: opacity .4s ease; }

.lsi__text-headline {
  font-family: "CSClingan", var(--serif);
  font-size: clamp(26px, 3.5vw, 48px);
  font-weight: 300;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -.01em;
  text-transform: none;
  margin: 0 0 20px;
}
.lsi__text-body {
  font-family: "CSClingan", var(--serif);
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 1.8;
  color: var(--ink2);
  max-width: 520px;
  margin: 0 0 28px;
}
.lsi__text-cta {
  display: inline-block;
  font-family: "CSClingan", var(--serif);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: .20em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1.5px solid var(--ink);
  padding-bottom: 2px;
  transition: color .2s, border-color .2s;
  cursor: pointer;
}
.lsi__text-cta:hover { color: var(--green); border-color: var(--green); }

/* ══ HIDE THEATER HERO TEXT ════════════════════════════════════════ */
#hero .hero-inner { display: none; }

/* ══ SCROLL FADE STATE ═════════════════════════════════════════════ */
.lsi__text.lsi-text-out { opacity: 0 !important; }

/* ══ MOBILE ════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .lsi { height: auto; min-height: 100vh; padding-top: 80px; }
  .lsi__stage {
    flex-direction: column;
    align-items: center;
    height: auto;
    padding: 0;
  }
  .lsi__word {
    font-size: clamp(44px, 13vw, 68px);
    padding: 10px 0 !important;
    text-align: center;
    width: 100%;
  }
  .lsi__spiral {
    width: 100%;
    height: 62vw;
    min-height: 260px;
    max-height: 440px;
    flex: none;
  }
  .lsi__cover { width: 52px; height: 66px; }
  .lsi__text  { padding: 20px 28px; }
  .lsi__text-headline { font-size: clamp(22px, 7vw, 34px); }
}

/* ══ LIVROS: ABERTURA (vídeo de assinatura) ═══════════════════════
   Primeira tela: vídeo autoplay + Role para ver
   Fluxo normal — não é fixed overlay
═══════════════════════════════════════════════════════════════ */
.lv-abertura {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lv-abertura__video-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  padding: 40px;
}

.lv-abertura__video {
  max-width: 60vw;
  max-height: 60vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* CTA: ícone de scroll + "ROLE PARA VER" */
.lv-abertura__cta {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: lvCtaAppear 0.8s ease 4.5s forwards; /* aparece após o vídeo */
}

@keyframes lvCtaAppear {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 0.7; transform: translateX(-50%) translateY(0); }
}

.lv-abertura__cta span {
  font-family: "Noto Sans", sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink2);
  white-space: nowrap;
}

.lv-abertura__cta .scroll-indicator-gif {
  width: 28px;
  opacity: 0.6;
}

/* ══ LIVROS: TEXTO EDITORIAL ══════════════════════════════════════
   Segunda tela: "De Via Impressa a Via Traço"
═══════════════════════════════════════════════════════════════ */
.lv-texto-editorial {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(60px, 10vh, 120px) clamp(28px, 8vw, 120px);
  border-top: 1px solid var(--rule);
  background: var(--bg);
}

.lv-texto-editorial__inner {
  max-width: 680px;
  text-align: center;
}

.lv-txt-headline {
  font-family: "Noto Sans", sans-serif;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 200;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: clamp(20px, 3vh, 36px);
  text-transform: none;
  letter-spacing: -.01em;
}

.lv-txt-body {
  font-family: "Noto Sans", sans-serif;
  font-size: clamp(0.875rem, 1.3vw, 1.05rem);
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink2);
  letter-spacing: .02em;
}

/* ══ RESPONSIVO ════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .lv-abertura__video { max-width: 85vw; max-height: 50vh; }
  .lv-texto-editorial { padding: 48px 24px; }
}

/* PATCH: vídeo inicial da página Livros sem bloco aparente */
.livros-intro,
.livros-intro__media,
.livros-intro__video,
.livros-hero,
.livros-hero-video,
.livros-hero-video video {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  mix-blend-mode: normal !important;
  border: none !important;
  outline: none !important;
}

/* Indicador de rolagem ao fim da seção "A Via Traço e os Livros de Arte"
   (mesmo GIF + rótulo da home, centralizado). */
.lv-txt-scroll {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-top: 48px;
}
.lv-txt-scroll span {
  font-family: "Noto Sans", sans-serif;
  font-size: 10px; letter-spacing: .22em; color: rgba(28,27,24,.36);
  text-transform: uppercase;
}


/* ─────────────────────────────────────────────────────────────
   Correção de empilhamento: a barra de progresso vertical (#prog)
   é position:fixed com z-index:1000 e cobre 100% da viewport, então
   aparecia POR CIMA do rodapé preto. Aqui rebaixamos a barra e
   elevamos o footer, de modo que o rodapé cubra a linha verde —
   ela termina visualmente no topo do footer. Escopado à página
   Livros (.livros-page) para não afetar outras páginas.
   O nav/menu (z-index 1000/1001) continua acima de tudo.
   ───────────────────────────────────────────────────────────── */
.livros-page #prog { z-index: 5; pointer-events: none; }
.livros-page footer { position: relative; z-index: 10; }

/* ═══════════════════════════════════════════════════════════════════
   Via Traço · correção v27 · abertura de Livros de Arte
   A moldura acompanha exatamente a proporção do vídeo e recorta suas
   bordas fora da janela, evitando a linha de 1 px em outros computadores.
   ═══════════════════════════════════════════════════════════════════ */
.lv-abertura__video-wrap {
  padding: 40px !important;
  overflow: visible !important;
}

.lv-abertura__video-frame {
  position: relative !important;
  width: min(60vw, calc(60vh * 16 / 9)) !important;
  max-width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  flex: 0 0 auto !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  isolation: isolate !important;
}

.lv-abertura__video-frame .lv-abertura__video {
  position: absolute !important;
  inset: -8px !important;
  width: calc(100% + 16px) !important;
  height: calc(100% + 16px) !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  margin: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: #fff !important;
  transform: translateZ(0) !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
}

@media (max-width: 768px) {
  .lv-abertura__video-wrap {
    padding: 24px !important;
  }

  .lv-abertura__video-frame {
    width: min(88vw, calc(52vh * 16 / 9)) !important;
  }
}
