/* Motion layer shared by all pages: smooth scroll, line reveals, logo hop, intro.
   Everything here is decorative; with prefers-reduced-motion it switches off. */

html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ── Before motion.js runs (class set by the inline script in <head>) ── */
/* elements that will be split stay hidden until split, so they don't flash */
html.m-motion :is([data-split], .hero-film-title, .film-card-title, .section-label, .card-title, main h1, .content h1):not([data-m-split]) { visibility: hidden; }
/* first visit to the home page: black screen until the intro is in place */
html.m-intro-pending body { background: #080808; }
html.m-intro-pending body > * { visibility: hidden; }

/* ── Word-by-word reveal ── */
.m-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.m-wi { display: inline-block; transform: translateY(105%); transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1); transition-delay: calc(var(--i, 0) * 55ms + var(--d, 0ms)); will-change: transform; }
.m-in .m-wi { transform: translateY(0); }

/* ── Logo: letters hop one after another on hover ── */
.m-l { display: inline-block; transform-origin: 50% 75%; }
.m-hop .m-l { animation: m-hop 0.86s cubic-bezier(0.33, 1, 0.68, 1) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes m-hop {
  0%   { transform: translateY(0) rotate(0); }
  32%  { transform: translateY(-0.14em) rotate(-5deg); }
  100% { transform: translateY(0) rotate(0); }
}

/* ── Intro (home page, once per session) ── */
.m-intro { position: fixed; inset: 0; z-index: 1000; background: #080808; color: #f5f0e8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; cursor: pointer; transition: clip-path 1.1s cubic-bezier(0.76, 0, 0.24, 1); clip-path: inset(0 0 0 0); }
.m-intro.m-out { clip-path: inset(0 0 100% 0); }
.m-intro-title { font-family: 'Cormorant Garamond', serif; font-weight: 300; font-size: clamp(54px, 11vw, 168px); letter-spacing: 0.08em; line-height: 1; text-transform: uppercase; }
.m-intro-sub { font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: #9a9080; }
.m-intro-sub em { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 20px; letter-spacing: 0.04em; text-transform: none; color: #e8c97a; }
.m-intro-tc { position: absolute; left: 40px; bottom: 36px; font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 0.2em; color: #9a9080; font-variant-numeric: tabular-nums; }
.m-intro-tc::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #e8c97a; margin-right: 10px; vertical-align: 1px; animation: m-blink 1s steps(2) infinite; }
.m-intro-skip { position: absolute; right: 40px; bottom: 36px; font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: #9a9080; }
.m-intro-bar { position: absolute; left: 0; bottom: 0; height: 1px; background: #e8c97a; width: 0; transition: width 2.2s linear; }
.m-intro.m-run .m-intro-bar { width: 100%; }
@keyframes m-blink { 50% { opacity: 0; } }

@media (max-width: 768px) {
  .m-intro-tc { left: 24px; bottom: 28px; }
  .m-intro-skip { right: 24px; bottom: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html.m-motion * { visibility: visible !important; }
  .m-wi { transform: none !important; transition: none !important; }
  .m-hop .m-l { animation: none !important; }
  .m-intro { display: none !important; }
}
