/* NeoSense · vlog v2. Capa sobre vlog.css y v2.css (el vlog original no cambia).
   Lo mismo que hizo la portada principal: escena a pantalla completa bajo la barra transparente, que sigue viva
   después de dibujarse (esporas y cubos que suben), título con la sombra achurada, y secciones que se mueven con
   lo que ya existe: el fermentador vivo, los reels con sus animaciones reales y las gráficas que se dibujan. */

/* ---------- 1. Portada a pantalla completa ---------- */
.vlog-v2 .vlog-portada {
  --v2-franja: #304F71;                       /* el halo de las letras del título toma el azul de la escena */
  min-height: 100svh; display: flex; align-items: center; background: #304F71;
}
.vlog-v2 .vlog-portada__texto { padding-top: calc(var(--barra) + 24px); }
@media (min-width: 761px) {
  .vlog-v2 .vlog-portada__texto { padding-block: calc(var(--barra) + 40px) 64px; }
  .vlog-v2 .vlog-portada__titulo { font-size: clamp(104px, 11vw, 176px); margin-bottom: 22px; }
}
@media (max-width: 760px) {
  .vlog-v2 .vlog-portada { align-items: flex-start; }
  .vlog-v2 .vlog-portada__texto { padding-top: calc(var(--barra) + 28px); }
}
.vlog-v2 .vlog-portada__titulo.v2-sombra { display: inline-block; }

/* Índice de formatos: cuatro ligas que bajan a su sección */
.vlog-indice { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.vlog-indice a {
  font: 600 16px/1 var(--f-rotulo); color: var(--l-papel); text-decoration: none;
  padding: 11px 16px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--l-papel) 45%, transparent);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.vlog-indice a:hover, .vlog-indice a:focus-visible { background: var(--l-papel); color: var(--ns-primario-800, #0A2C37); box-shadow: none; }
.vlog-indice a:focus-visible { outline: 2px solid var(--l-papel); outline-offset: 3px; }

/* Capa de esporas: encima de la escena, debajo del texto. La dibuja js/vlog-v2.js. */
.vlog-esporas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; max-width: none; }

/* Al bajar, el texto se va más rápido y la escena se acerca, como en la portada principal */
@media screen and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .vlog-v2 #vlog-inicio { view-timeline: --vlog-portada block; }
    .vlog-v2 .vlog-portada__texto { animation: ns-lema-sale linear both; animation-timeline: --vlog-portada; animation-range: exit 0% exit 100%; }
    .vlog-v2 .vlog-portada__lienzo, .vlog-v2 .vlog-esporas { animation: ns-arte-sale linear both; animation-timeline: --vlog-portada; animation-range: exit 0% exit 100%; }
  }
}

/* ---------- 2. Para empezar: el fermentador vivo ---------- */
.vlog-v2 .vlog-escena { aspect-ratio: 1 / 1; max-width: 620px; justify-self: center; width: 100%; }
.vlog-v2 .vlog-escena .escena-marco { position: relative; width: 100%; height: 100%; }
.vlog-v2 .vlog-escena canvas, .vlog-v2 .vlog-escena img.poster { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; }

/* ---------- 3. En video: reels que corren, con barra de avance ---------- */
.vlog-v2 .reel__marco { transition: transform .6s var(--v2-curva); }
.vlog-v2 .reel:hover .reel__marco { transform: translateY(-6px); }
.vlog-v2 .reel__video { display: block; }
.reel__barra {
  position: absolute; left: 14px; right: 14px; bottom: 14px; height: 3px; border-radius: 3px; z-index: 1;
  background: color-mix(in srgb, var(--l-papel) 25%, transparent); overflow: hidden;
}
.reel__barra span { display: block; height: 100%; width: 100%; background: var(--l-papel); transform-origin: left; transform: scaleX(0); }

/* ---------- 5. En gráficas: cada portada se dibuja de izquierda a derecha al llegar ---------- */
@media screen and (prefers-reduced-motion: no-preference) {
  .vlog-v2-js .grafica__portada img { clip-path: inset(0 100% 0 0); }
  .vlog-v2-js .grafica.v2-dibujada .grafica__portada img { animation: vlog-dibuja 1.5s cubic-bezier(.65, 0, .35, 1) forwards; }
  .vlog-v2-js .grafica:nth-child(2).v2-dibujada .grafica__portada img { animation-delay: .18s; }
  .vlog-v2-js .grafica:nth-child(3).v2-dibujada .grafica__portada img { animation-delay: .36s; }
}
@keyframes vlog-dibuja { to { clip-path: inset(0 0 0 0); } }

/* ---------- 4 y 6. Notas y temas: un gesto al pasar ---------- */
.vlog-v2 .nota__num, .vlog-v2 .tema__num { transition: transform .5s var(--v2-curva); display: inline-block; }
.vlog-v2 .nota:hover .nota__num, .vlog-v2 .tema:hover .tema__num { transform: translate(-3px, -3px); }

@media print {
  .vlog-esporas, .reel__barra, .vlog-indice { display: none; }
  .grafica__portada img { clip-path: none !important; }
}
