/* ═══════════ Films catalog + project modal ═══════════ */

/* ---------- hero ---------- */
.films-hero {
  min-height: 60vh;
  min-height: 60dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  padding: 160px 24px 70px;
  background: radial-gradient(ellipse 900px 600px at 50% 10%, oklch(0.2 0.012 60 / 0.4), transparent 70%);
}

.films-title {
  font-size: clamp(56px, 11vw, 170px);
  font-weight: 200;
  line-height: 1;
  margin: 0;
  letter-spacing: 0.03em;
  background: linear-gradient(100deg, oklch(0.97 0.01 90) 30%, oklch(0.8 0.06 70) 55%, oklch(0.97 0.01 90) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.films-motto {
  margin: 22px 0 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 2vw, 24px);
  color: oklch(0.95 0.004 90 / 0.75);
}

.films-back {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(0.95 0.004 90 / 0.5);
  text-decoration: none;
  margin-bottom: 30px;
  transition: color 0.3s;
}

.films-back:hover { color: oklch(0.8 0.06 70); }

/* ---------- filters ---------- */
.film-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 30px;
  margin-top: 56px;
}

.filter {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(0.95 0.004 90 / 0.5);
  padding: 10px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}

.filter:hover { color: oklch(0.95 0.004 90 / 0.9); }

.filter.is-on {
  color: oklch(0.95 0.004 90);
  border-bottom-color: oklch(0.8 0.06 70);
}

/* ---------- cards ---------- */
.films-list { padding-bottom: 80px; }

.film-card {
  position: relative;
  height: 78vh;
  margin: 0 0 6px;
  overflow: hidden;
  cursor: pointer;
  background: oklch(0.95 0.01 90 / 0.05);
  box-shadow: inset 0 0 0 1px oklch(0.95 0.01 90 / 0.12);
}

.film-card.is-hidden { display: none; }

.card-media {
  position: absolute;
  inset: 0;
  transition: transform 1.2s cubic-bezier(0.16,1,0.3,1);
  will-change: transform;
}

.film-card:hover .card-media,
.film-card:focus-visible .card-media { transform: scale(1.04); }

.card-media-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72);
}

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, oklch(0.14 0.003 270 / 0.15) 0%, oklch(0.14 0.003 270 / 0) 40%, oklch(0.14 0.003 270 / 0.88) 100%);
  pointer-events: none;
}

.card-info {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 44px;
  pointer-events: none;
}

.card-kicker {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.65;
  margin: 0 0 14px;
}

.card-title {
  font-size: clamp(34px, 5.5vw, 76px);
  font-weight: 200;
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.02;
}

.card-tagline {
  font-size: 13px;
  opacity: 0.65;
  margin: 12px 0 0;
  max-width: 480px;
  font-weight: 300;
}

.card-open {
  display: inline-block;
  margin-top: 20px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: oklch(0.8 0.06 70);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.card-open i { font-style: normal; transition: margin-left 0.3s; }

.film-card:hover .card-open,
.film-card:focus-visible .card-open { opacity: 1; transform: translateY(0); }

.film-card:hover .card-open i { margin-left: 6px; }

/* ---------- modal ---------- */
body.modal-locked { overflow: hidden; }

.film-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: oklch(0.1 0.002 270);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.film-modal.is-open { opacity: 1; visibility: visible; }

.modal-close {
  position: absolute;
  top: 26px;
  right: 34px;
  z-index: 95;
  background: oklch(0.14 0.003 270 / 0.6);
  border: 1px solid oklch(0.95 0.004 90 / 0.25);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: oklch(0.95 0.004 90);
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color 0.3s, transform 0.3s;
}

.modal-close:hover { border-color: oklch(0.8 0.06 70); transform: rotate(90deg); }

.modal-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-hero {
  position: relative;
  height: 62vh;
  overflow: hidden;
}

.modal-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, oklch(0.1 0.002 270) 100%);
  pointer-events: none;
}

/* Lighter fade when the hero is a playable video — the heavy gradient
   used for image legibility would otherwise muddy the native controls bar. */
.modal-hero:has(video)::after {
  background: linear-gradient(180deg, transparent 80%, oklch(0.1 0.002 270 / 0.55) 100%);
}

.modal-hero:has(video) .modal-hero-el {
  filter: none;
}

.modal-hero-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
}

.modal-body {
  max-width: 900px;
  margin: 0 auto;
  padding: 50px 32px 110px;
}

.modal-title {
  font-size: clamp(40px, 6vw, 84px);
  font-weight: 200;
  margin: 0;
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.modal-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 2vw, 24px);
  color: oklch(0.8 0.06 70);
  margin: 18px 0 0;
}

.modal-cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 60px;
  margin-top: 46px;
}

.modal-desc p {
  font-size: 14px;
  line-height: 1.8;
  opacity: 0.7;
  margin: 0;
  font-weight: 300;
}

.roles-head {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.5;
  margin: 0 0 14px;
}

.modal-roles ul {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
}

.modal-roles li {
  font-size: 13px;
  font-weight: 300;
  padding: 9px 0;
  border-top: 1px solid oklch(0.95 0.01 90 / 0.12);
  opacity: 0.85;
}

.modal-roles li:last-child { border-bottom: 1px solid oklch(0.95 0.01 90 / 0.12); }

.modal-year { font-size: 13px; font-weight: 300; opacity: 0.85; margin: 0; }

.modal-section { margin-top: 70px; }

.modal-bts,
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.modal-bts img,
.modal-gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  box-shadow: inset 0 0 0 1px oklch(0.95 0.01 90 / 0.12);
  filter: brightness(0.9);
}

.gallery-video-tile {
  position: relative;
  min-width: 0;
  height: 240px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px oklch(0.95 0.01 90 / 0.12);
}

.gallery-video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.75);
  pointer-events: none;
}

.tile-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: oklch(0.1 0.002 270 / 0.2);
  transition: background 0.3s ease;
}

.tile-play-icon::before {
  content: '';
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: oklch(0.95 0.01 90 / 0.9);
  transition: background 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tile-play-icon::after {
  content: '';
  position: relative;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent oklch(0.1 0.002 270);
}

.gallery-video-tile:hover .tile-play-icon,
.gallery-video-tile:focus-visible .tile-play-icon {
  background: oklch(0.1 0.002 270 / 0.4);
}

.gallery-video-tile:hover .tile-play-icon::before,
.gallery-video-tile:focus-visible .tile-play-icon::before {
  background: oklch(0.8 0.06 70);
  transform: scale(1.08);
}

.bts-slot {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  opacity: 0.4;
  text-align: center;
  padding: 0 20px;
  box-shadow: inset 0 0 0 1px oklch(0.95 0.01 90 / 0.14);
  background: oklch(0.95 0.01 90 / 0.04);
}

.modal-flow {
  margin-top: 26px;
  flex-wrap: wrap;
}

.modal-flow span { white-space: nowrap; }

.modal-actions { margin-top: 70px; text-align: center; }

.modal-soon {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.45;
}

/* ai-flow reuse (defined in videography.css) — safe fallback if not loaded */
.ai-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.6;
}

.ai-flow i { width: 54px; height: 1px; background: oklch(0.95 0.004 90 / 0.3); }

/* ---------- video lightbox (full playback popup) ---------- */
.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.video-lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: oklch(0.05 0.002 270 / 0.94);
  backdrop-filter: blur(6px);
}

.lightbox-close {
  position: absolute;
  top: 26px;
  right: 34px;
  z-index: 2;
  background: oklch(0.14 0.003 270 / 0.6);
  border: 1px solid oklch(0.95 0.004 90 / 0.25);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: oklch(0.95 0.004 90);
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color 0.3s, transform 0.3s;
}

.lightbox-close:hover { border-color: oklch(0.8 0.06 70); transform: rotate(90deg); }

#lightboxVideo {
  position: relative;
  z-index: 1;
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  width: 100%;
  box-shadow: 0 60px 140px oklch(0 0 0 / 0.6);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .film-card { height: 64vh; }
  .card-info { left: 24px; right: 24px; bottom: 32px; }
  .card-open { opacity: 1; transform: none; }

  .modal-cols { grid-template-columns: 1fr; gap: 40px; }
  .modal-hero { height: 44vh; }
  .modal-close { top: 18px; right: 18px; }
}

@media (max-width: 480px) {
  .films-hero { padding: 130px 18px 50px; }
  .film-filters { gap: 6px 18px; margin-top: 40px; }

  .film-card { height: 54vh; }
  .card-info { left: 18px; right: 18px; bottom: 22px; }

  .modal-close { width: 38px; height: 38px; font-size: 12px; }
  .modal-hero { height: 36vh; }
  .modal-body { padding: 36px 18px 80px; }

  .modal-bts, .modal-gallery { grid-template-columns: 1fr; }
  .modal-bts img, .modal-gallery img, .gallery-video-tile { height: 200px; }

  .video-lightbox { padding: 16px; }
  .lightbox-close { top: 14px; right: 14px; width: 38px; height: 38px; font-size: 12px; }
}
