/* ============================================================
   CINEMA WORK SECTION — sticky scroll, light theme
   ============================================================ */

/* ─── OUTER SCROLL CONTAINER ─────────────────────── */
.cinema-section {
  position: relative;
  height: calc(100vh * 8);
}

/* ─── STICKY STAGE ───────────────────────────────── */
.cinema-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background-color: #f5f3ee;
  background-image:
    linear-gradient(rgba(39,41,50,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39,41,50,0.08) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ─── PROGRESS BAR ───────────────────────────────── */
.cinema-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: rgba(39,41,50,0.25);
  z-index: 50;
  transition: width 0.08s linear;
}

/* ─── SECTION HEADER ─────────────────────────────── */
.cinema-section-header {
  text-align: center;
  padding: var(--space-20) var(--space-8) var(--space-12);
  background-color: #f5f3ee;
  background-image:
    linear-gradient(rgba(39,41,50,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39,41,50,0.08) 1px, transparent 1px);
  background-size: 48px 48px;
}

.cinema-section-title {
  font-family: tiemposText, serif;
  font-size: var(--text-cs-title);
  font-weight: 400;
  color: rgb(39, 41, 50);
  margin: 0;
}

/* ─── SLIDE COUNTER ──────────────────────────────── */
.cinema-counter {
  position: absolute;
  top: 2rem;
  right: 3vw;
  z-index: 50;
  font-family: 'Geist Mono', monospace;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: rgba(39,41,50,0.35);
}
.cinema-counter strong {
  color: rgba(39,41,50,0.7);
  font-weight: 600;
}

/* ─── SLIDES ─────────────────────────────────────── */
.cinema-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity  0.25s ease;
}

.cinema-slide.is-current {
  transform: translateY(0);
  z-index: 2;
}

.cinema-slide.is-past {
  transform: translateY(-10%) scale(0.97);
  opacity: 0;
  transition: transform 0.3s ease-in, opacity 0.2s ease;
}

/* ─── ARTWORK — fills all space above the text strip ─ */
.cinema-artwork {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: transparent;
}

.work-lottie {
  width: 100%;
  height: 100%;
  display: block;
}

.work-lottie svg {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.work-artwork-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: multiply;
}

.work-safari-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ─── TILE GRID (slide 4) ────────────────────────── */
.work-tile-grid {
  position: absolute;
  inset: -20%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  transform: rotate(-8deg);
  animation: workTilesDrift 20s linear infinite;
  will-change: transform;
}

.work-tile {
  border-radius: 8px;
  overflow: hidden;
  opacity: 1;
}

.work-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes workTilesDrift {
  0%   { transform: rotate(-8deg) translateX(0); }
  100% { transform: rotate(-8deg) translateX(-33.33%); }
}

/* ─── TEXT CONTENT — fixed strip at bottom ───────── */
.cinema-content {
  flex-shrink: 0;
  padding: var(--space-5) var(--space-8) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cinema-index {
  display: block;
  font-family: 'Geist Mono', monospace;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(39,41,50,0.4);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.16,1,0.3,1) 0.25s,
              opacity  0.45s ease 0.25s;
}

.cinema-title {
  font-family: tiemposText, serif;
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  font-weight: 400;
  color: rgb(39, 41, 50);
  line-height: 1.3;
  margin: 0;
  transform: translateY(18px);
  opacity: 0;
  transition: transform 0.65s cubic-bezier(0.16,1,0.3,1) 0.1s,
              opacity  0.45s ease 0.1s;
}

.cinema-title em {
  font-style: normal;
  color: var(--color-accent-secondary);
}

.cinema-meta {
  font-family: 'Geist Mono', monospace;
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(39,41,50,0.7);
  margin: 0;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.16,1,0.3,1) 0.35s,
              opacity  0.45s ease 0.35s;
}

/* Animate text in when slide is current */
.cinema-slide.is-current .cinema-index,
.cinema-slide.is-current .cinema-title,
.cinema-slide.is-current .cinema-meta {
  transform: translateY(0);
  opacity: 1;
}

/* ─── CURSOR TOOLTIP ─────────────────────────────── */
.cinema-cursor-tip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: var(--color-accent-primary);
  color: #111;
  font-family: 'Geist', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cinema-cursor-tip.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 768px) {
  .cinema-artwork {
    width: 92vw;
  }
  .cinema-content {
    width: 92vw;
  }
  .cinema-title {
    font-size: 1.1rem;
  }
}
