/* ==========================================================================
   Movies page: fixed-background hero, a self-hosted-video Screenings grid,
   YouTube trailer embed, and an About section with credits. The stills
   grid further down reuses the shared .gallery-grid component from
   css/gallery.css (same as the portfolio pages), so it isn't styled here
   -- see that file instead.
   ========================================================================== */

/* ---- Hero ---- */

.movie-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 6vw 80px;
  overflow: hidden; /* the ::before background scales up to 1.1x -- this keeps its edges from ever showing a gap */
}

/* The background image lives here, on its own layer behind .movie-hero-content,
   so the push-in animation's transform only ever touches the photo -- never
   the title/tagline/button, which stay perfectly still and sharp.

   Note: this used to also carry background-attachment: fixed for a desktop
   parallax effect. CSS spec (and every mainstream browser) neutralizes
   background-attachment: fixed on an element that has its own transform --
   it silently falls back to scroll -- so that couldn't coexist with the
   scale() animation below on the same layer. Traded it for the zoom, since
   mobile already used scroll-attachment anyway (unaffected either way). */
.movie-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(10, 10, 10, 0.55) 60%, var(--bg) 100%),
    url('../images/movie/cover/jameson-thermitus-movie-une-seconde-chance-background.jpg');
  background-size: cover;
  background-position: center;
  animation: hero-push-in 16s ease-in-out infinite alternate;
}

.movie-hero-content {
  position: relative;
  z-index: 1;
}

@keyframes hero-push-in {
  from { transform: scale(1); }
  to   { transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .movie-hero::before {
    animation: none;
  }
}

.movie-hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.movie-hero-title {
  margin-top: 18px;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}

.movie-hero-tagline {
  margin-top: 22px;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-style: italic;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.movie-hero-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
}

.movie-hero-cta {
  display: inline-block;
  padding: 16px 36px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.movie-hero-cta:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
}

@media (max-width: 480px) {
  .movie-hero-cta-group {
    flex-direction: column;
    gap: 14px;
  }
}

/* ---- Screenings ---- */

.screenings-section {
  padding: 100px 0;
}

.screenings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* desktop default */
  gap: 20px; /* comfortable breathing room -- these are 4 large items, not a dense photo grid */
  margin-top: 8px;
}

@media (max-width: 1024px) {
  .screenings-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.screening-item {
  display: flex;
  flex-direction: column;
}

.screening-video-wrap {
  position: relative; /* anchors the absolutely-positioned play icon */
}

.screening-video {
  width: 100%;
  height: auto; /* native aspect ratio, not forced/cropped -- these are portrait phone-shot clips */
  display: block;
  background: #000;
  cursor: pointer;
}

.screening-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none; /* purely visual -- clicks pass through to the video beneath */
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* js/screening-video.js toggles this on the wrap based on the video's own
   play/pause/ended events, so it's correct regardless of what changed
   playback state -- the first click, native controls, or another video's
   script-driven .pause(). */
.screening-video-wrap.is-playing .screening-play-icon {
  opacity: 0;
}

.screening-caption {
  margin-top: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
}

@media (max-width: 640px) {
  .screenings-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

/* ---- Trailer ---- */

.trailer-section {
  padding: 100px 0;
  text-align: center;
}

.trailer-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 6vw;
}

.video-responsive {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background: #000;
}

.video-responsive iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- About the film ---- */

.about-film-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}

.about-film-copy .body-text {
  margin-bottom: 28px;
}

.about-film-copy .body-text.is-draft-note {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  border-left: 2px solid var(--border);
  padding-left: 14px;
}

.credits-list {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 2;
}

.credits-list strong {
  color: var(--text);
  font-weight: 400;
}

.about-film-image img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 860px) {
  .about-film-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-film-image {
    order: -1;
    max-width: 420px;
    margin: 0 auto;
  }
}

/* ---- Gallery ---- */
/* The stills grid itself is the shared .gallery-grid component (see
   css/gallery.css, also used by the portfolio pages) -- nothing
   movie-page-specific needed here beyond linking that stylesheet, which
   movies.html already does. */
