/* ============================================================
   LENA
   ============================================================ */

/* ===========================================
   LENA TUTORIAL — ZOOM CINEMA
   =========================================== */

.lena-section {
  position: relative;
  /* Total height = scroll runway + sticky viewport
     Cinematic zoom over 80%, then short hold + soft exit */
  height: 250vh;
  z-index: 3;
  --exit-opacity: 1;
  /* Klare Trennung von Bcurve-Section drüber */
  margin-top: 12vh;
}

.lena-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Sanfter Übergang zur nächsten Sektion */
  opacity: var(--exit-opacity, 1);
  transition: opacity 0.1s linear;
}

.lena-text {
  position: absolute;
  top: 8vh;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: 100%;
  max-width: 720px;
  padding: 0 60px;
  z-index: 5;
  pointer-events: none;
  /* Will be controlled by JS for fade */
  --text-opacity: 1;
  opacity: var(--text-opacity);
  transition: opacity 0.1s linear;
}

.lena-eyebrow {
  font-size: 18px;
  font-weight: 500;
  color: #818CF8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.lena-h {
  font-size: 48px;
  font-weight: 600;
  color: #111;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.lena-sub {
  font-size: 16px;
  color: #555;
  line-height: 1.55;
  max-width: 520px;
  margin: 0 auto;
}

.lena-frame {
  background: #000;
  /* JS sets --progress: 0..1 */
  --progress: 0;
  position: relative;
  /* Width: 60% at progress=0, 100% at progress=1 */
  width: calc(60% + 40% * var(--progress));
  /* 16:9 aspect ratio */
  aspect-ratio: 16 / 9;
  /* Border radius: 24px → 0 */
  border-radius: calc(24px - 24px * var(--progress));
  overflow: hidden;
  /* Vertical offset: starts a bit lower so headline is visible above
     At progress=0: pushed down by ~6vh
     At progress=1: centered */
  margin-top: calc(14vh - 14vh * var(--progress));
  /* Drop shadow only when small/framed */
  box-shadow: 
    0 calc(40px - 40px * var(--progress)) calc(80px - 80px * var(--progress)) rgba(40, 25, 80, calc(0.25 - 0.25 * var(--progress)));
  background: #2a1f5a;
  will-change: width, border-radius, margin-top;
}

.lena-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center center;
  background: #000;

  filter: saturate(calc(0.45 + 0.55 * var(--progress, 0)))
          brightness(calc(1.04 - 0.04 * var(--progress, 0)));

  transform: none;
}

.lena-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(40, 25, 80, 0.3) 0%,
    transparent 60%
  );
  opacity: calc(1 - var(--progress));
  pointer-events: none;
  transition: opacity 0.1s linear;
}

.lena-sound {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 20px;
  opacity: 1;
}

.lena-sound:hover {
  transform: scale(1.06);
}

.lena-play::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 18px solid #4F46E5;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 4px;
}
