/* =============================================
   leo-cinema.css — Cinematic hero video section
   Fixed: caption clean (no overlap), chapters merged into right panel
   ============================================= */

/* ── Cinematic Hero Container ── */
.cinema-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--warm-black);
}

/* ── Film grain overlay ── */
.cinema-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  z-index: 2;
  pointer-events: none;
  animation: grain 0.5s steps(1) infinite;
}
@keyframes grain {
  0%  { transform: translate(0,0); }
  25% { transform: translate(-2%,-1%); }
  50% { transform: translate(1%,2%); }
  75% { transform: translate(-1%,1%); }
  100%{ transform: translate(2%,-2%); }
}

/* ── Scenes ── */
.cinema-scenes { position: absolute; inset: 0; z-index: 1; }
.cinema-scene  { position: absolute; inset: 0; opacity: 0; transition: opacity 2s ease-in-out; }
.cinema-scene.active { opacity: 1; }
.cinema-scene-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  filter: saturate(0.75) contrast(1.05);
  transition: transform 10s linear;
}
.cinema-scene.active .cinema-scene-img { transform: scale(1.08); }
.cinema-scene::after {
  content: ''; position: absolute; inset: 0;
  background: var(--scene-grade, rgba(0,0,0,0));
  mix-blend-mode: multiply;
}

/* ── Letterbox bars ── */
.cinema-letterbox-top,
.cinema-letterbox-bot {
  position: absolute; left: 0; right: 0;
  height: clamp(40px,8vh,80px);
  background: var(--warm-black);
  z-index: 5;
  transition: height 0.6s var(--ease-out);
}
.cinema-letterbox-top { top: 0; }
.cinema-letterbox-bot { bottom: 0; }
.cinema-hero.expanded .cinema-letterbox-top,
.cinema-hero.expanded .cinema-letterbox-bot { height: 0; }

/* ── Dark gradient overlay ── */
.cinema-overlay {
  position: absolute; inset: 0; z-index: 3;
  background:
    linear-gradient(to bottom,
      rgba(26,24,20,0.45) 0%,
      rgba(26,24,20,0.0)  35%,
      rgba(26,24,20,0.0)  50%,
      rgba(26,24,20,0.80) 100%),
    linear-gradient(to right,
      rgba(26,24,20,0.65) 0%,
      rgba(26,24,20,0.0)  55%);
}


/* ═══════════════════════════════════════════════
   CAPTION — anchored bottom-left, stacked clean
   No overlap: location → title → subtitle → CTA
════════════════════════════════════════════════ */
.cinema-caption {
  position: absolute;
  z-index: 4;
  left: 0; right: 0; bottom: 0;
  /* leave room for right panel (chapters + bar) */
  padding-bottom: calc(clamp(40px,8vh,80px) + var(--sp-10));
  padding-left:   var(--container-pad);
  padding-right:  calc(var(--container-pad) + 130px);
  max-width: var(--container-max);
  margin: 0 auto;
  /* stack vertically, anchored to bottom */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* ①  Location pill — subtle emerald tag */
.cinema-location {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: var(--fw-medium);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--emerald-soft);
  background: rgba(45,106,79,0.18);
  border: 1px solid rgba(116,198,157,0.22);
  border-radius: var(--r-full);
  padding: 4px 14px;
  margin-bottom: var(--sp-4);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s 0.3s, transform 0.9s 0.3s;
}
.cinema-caption.visible .cinema-location { opacity: 1; transform: translateY(0); }

/* ②  Big title */
.cinema-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--fw-normal);
  line-height: 1.0;
  color: var(--off-white);
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-5);
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 1.2s 0.55s var(--ease-out), transform 1.2s 0.55s var(--ease-out);
}
.cinema-caption.visible .cinema-title { opacity: 1; transform: translateY(0); }

/* ③  Subtitle — single line, fades in after title */
.cinema-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
  margin-bottom: var(--sp-8);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.9s 0.85s, transform 0.9s 0.85s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.cinema-caption.visible .cinema-subtitle { opacity: 1; transform: translateY(0); }

/* ④  CTA buttons row */
.cinema-cta {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s 1.15s, transform 0.8s 1.15s;
}
.cinema-caption.visible .cinema-cta { opacity: 1; transform: translateY(0); }


/* ═══════════════════════════════════════════════
   RIGHT PANEL — chapters merged with progress bar
   One single column: chapters → separator → bar
════════════════════════════════════════════════ */
.cinema-progress {
  position: absolute;
  bottom: calc(clamp(40px,8vh,80px) + var(--sp-6));
  right: var(--container-pad);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

/* Chapters now INSIDE .cinema-progress via HTML order */
.cinema-chapters {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.cinema-chapter {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-direction: row;  /* label ← dot → */
  cursor: pointer;
  opacity: 0.32;
  transition: opacity 0.3s;
}
.cinema-chapter.active { opacity: 1; }
.cinema-chapter:hover  { opacity: 0.62; }

/* Chapter dot — same color as progress fill when active */
.cinema-chapter-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  flex-shrink: 0;
  transition: width 0.3s, height 0.3s, background 0.3s;
}
.cinema-chapter.active .cinema-chapter-dot {
  width: 7px; height: 7px;
  background: var(--emerald-soft); /* same as progress fill */
}
.cinema-chapter-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  font-family: var(--font-body);
  white-space: nowrap;
}

/* Thin line connecting chapters to bar */
.cinema-chapters-sep {
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.15);
  align-self: flex-end;
  margin-bottom: var(--sp-2);
}

/* Scene counter */
.cinema-scene-num {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.2em;
  font-family: var(--font-body);
  align-self: flex-end;
  margin-bottom: var(--sp-2);
}

/* Progress bar track */
.cinema-progress-track {
  width: 2px; height: 65px;
  background: rgba(255,255,255,0.15);
  position: relative;
  border-radius: 1px;
  align-self: flex-end;
}
.cinema-progress-fill {
  width: 2px;
  background: var(--emerald-soft);
  border-radius: 1px;
  position: absolute; top: 0;
  transition: height 0.08s linear;
}


/* ── Scroll hint (center-bottom) ── */
.cinema-scroll {
  position: absolute;
  bottom: calc(clamp(40px,8vh,80px) + var(--sp-6));
  left: 50%; transform: translateX(-50%);
  z-index: 5;
  display: flex; flex-direction: column;
  align-items: center; gap: var(--sp-2);
  opacity: 0; transition: opacity 1s 2s;
  pointer-events: none;
}
.cinema-hero .cinema-scroll.show { opacity: 1; }
.cinema-scroll span {
  font-size: 9px; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(255,255,255,0.38); font-family: var(--font-body);
}
.cinema-scroll-line {
  width: 1px; height: 38px;
  background: rgba(255,255,255,0.2);
  position: relative; overflow: hidden; border-radius: 1px;
}
.cinema-scroll-line::after {
  content: ''; position: absolute; top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--emerald-soft);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine { 0%{top:-100%} 100%{top:100%} }


/* ── CTA buttons ── */
.btn-cinema-primary {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  padding: 0.85rem var(--sp-8);
  background: var(--emerald); color: var(--off-white);
  font-family: var(--font-body); font-size: var(--text-sm);
  font-weight: var(--fw-medium); letter-spacing: 0.12em; text-transform: uppercase;
  border-radius: var(--r-sm); transition: background 0.25s, transform 0.2s;
}
.btn-cinema-primary:hover { background: var(--emerald-light); transform: translateY(-1px); }

.btn-cinema-ghost {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  padding: 0.85rem var(--sp-8);
  background: transparent; color: rgba(255,255,255,0.85);
  font-family: var(--font-body); font-size: var(--text-sm);
  font-weight: var(--fw-medium); letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.35); border-radius: var(--r-sm);
  transition: border-color 0.25s, background 0.25s;
}
.btn-cinema-ghost:hover { border-color: rgba(255,255,255,0.7); background: rgba(255,255,255,0.08); }


/* ── Responsive ── */
@media (max-width: 900px) {
  .cinema-chapters { display: none; }
  .cinema-chapters-sep { display: none; }
  .cinema-caption { padding-right: var(--container-pad); }
}
@media (max-width: 768px) {
  .cinema-title { font-size: clamp(2.5rem, 12vw, 5rem); }
  .cinema-subtitle { white-space: normal; }
}
