/* ═══════════════════════════════════════════
   NIKHIL MEHTA — BILLYKID
═══════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --black:      #000000;
  --dark:       #141414;
  --mid:        #2a2a2a;
  --dim:        #505050;
  --muted:      #808080;
  --light:      #c0c0c0;
  --white:      #ffffff;

  /* Film palette */
  --film-cream:   #f5f3e4;
  --film-crimson: #6e0f17;
  --film-gold:    #f8bc1e;
  --film-blue:    #6b92aa;
  --film-green:   #152212;
  --film-sage:    #84a896;

  --accent: var(--film-gold);

  --font-display: 'Neue Montreal', sans-serif;
  --font-mono:    'Neue Montreal Mono', 'Neue Montreal', monospace;

  --nav-h:       80px;
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);

  /* Gallery */
  --slide-w:     68vw;     /* width of the active centre slide */
  --slide-peek:  11vw;     /* how much of prev/next is visible */
  --slide-gap:   24px;
  --slide-aspect: 16/9;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { display: block; object-fit: cover; }
a { text-decoration: none; color: inherit; }
button { background: none; border: none; cursor: pointer; font-family: inherit; }

main { flex: 1; margin-top: var(--nav-h); }

/* ── Film Grain ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
  opacity: 0.035;
  z-index: 9999;
}

/* ═══════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--nav-h);
  background: var(--black);
  border-bottom: 1px solid var(--mid);
  transition: border-color 0.4s;
}
.nav.scrolled { border-bottom: 1px solid rgba(255,255,255,0.12); }

.nav-logo {
  position: absolute;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
}
.nav-logo-img {
  height: 56px;
  width: 56px;
  object-fit: contain;
  mix-blend-mode: lighten;
  transition: opacity 0.2s;
}
.nav-logo:hover .nav-logo-img { opacity: 0.75; }

.nav-links {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 36px;
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover { color: var(--white); }
.nav-link:hover::after { width: 100%; }

.nav-menu-btn {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-menu-btn span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

/* ── Mobile Menu ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 48px;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-in-out);
}
.mobile-menu.open { transform: translateX(0); }

.mobile-close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 1.2rem;
  color: var(--muted);
  transition: color 0.2s;
}
.mobile-close:hover { color: var(--white); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}
.mobile-nav-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 10vw, 4rem);
  letter-spacing: 0.05em;
  color: var(--dim);
  transition: color 0.2s;
}
.mobile-nav-link:hover { color: var(--white); }

.mobile-footer {
  position: absolute;
  bottom: 32px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--dim);
}

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 40px 48px 48px;
  border-top: 1px solid var(--mid);
  margin-top: auto;
}
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2em;
  color: var(--white);
}
.footer-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.footer-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  transition: color 0.2s;
  align-self: flex-start;
  text-transform: uppercase;
}
.footer-info:hover { color: var(--white); }

/* ═══════════════════════════════════════════
   FILM PAGE — HERO
═══════════════════════════════════════════ */
.film-section {
  padding: 80px 48px 0;
  max-width: 1200px;
  margin: 0 auto;
}

.film-top {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: start;
  margin-bottom: 72px;
}

.film-poster-wrap {
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.9s var(--ease-out) 0.1s forwards;
}
.film-poster {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
}

.film-info {
  display: flex;
  flex-direction: column;
  padding-top: 8px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.9s var(--ease-out) 0.25s forwards;
}

.film-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 32px;
}

.film-logline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 600;
  line-height: 1.75;
  color: var(--light);
  margin-bottom: 40px;
  max-width: 520px;
}

/* ═══════════════════════════════════════════
   CREDITS
═══════════════════════════════════════════ */
.film-credits {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.45s forwards;
  margin-bottom: 5%;
}

.credit-item {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 13px 0;
}

.credit-role {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: lowercase;
  white-space: nowrap;
  min-width: 140px;
  flex-shrink: 0;
}

.credit-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════
   GALLERY — CINEMATIC SLIDER
═══════════════════════════════════════════ */
.gallery-section {
  padding: 0 0 80px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.5s forwards;
}

.gallery-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 0 48px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.gallery-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.gallery-count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--dim);
  transition: opacity 0.3s;
}
.gallery-slider-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.gallery-slider {
  display: flex;
  align-items: center;
  gap: var(--slide-gap);
  padding: 0 calc((100vw - var(--slide-w)) / 2);
  will-change: transform;
  transition: transform 0.7s var(--ease-out);
}
.gallery-slide {
  flex: 0 0 var(--slide-w);
  aspect-ratio: var(--slide-aspect);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 2px;

  /* non-active slides: shrink + dim + blur */
  transform: scale(0.92);
  opacity: 0.3;
  filter: blur(1px);
  transition:
    transform 0.7s var(--ease-out),
    opacity   0.7s var(--ease-out),
    filter    0.7s var(--ease-out);
}

.gallery-slide.is-active {
  transform: scale(1);
  opacity: 1;
  filter: blur(0px);
  cursor: default;
}

/* ── Adjacent slides (immediately left/right): visible peekers ── */
.gallery-slide.is-prev,
.gallery-slide.is-next {
  opacity: 0.22;
  filter: blur(0.5px);
  transform: scale(0.94);
  cursor: pointer;
}

/* Still image inside slide */
.gallery-slide img.gallery-still {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out);
}

.gallery-slide.is-active:hover img.gallery-still {
  transform: scale(1.03);
}


/* ── Edge fade overlays — left and right vignettes ── */
.gallery-edge {
  position: absolute;
  top: 0; bottom: 0;
  width: calc(var(--slide-peek) + 20px);
  pointer-events: none;
  z-index: 2;
}
.gallery-edge--left {
  left: 0;
  background: linear-gradient(to right, var(--black) 0%, transparent 100%);
}
.gallery-edge--right {
  right: 0;
  background: linear-gradient(to left, var(--black) 0%, transparent 100%);
}

/* ── Controls ── */
.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 32px;
  padding: 0 48px;
}

.gallery-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  transition: color 0.2s;
  padding: 8px 0;
}
.gallery-btn svg { flex-shrink: 0; }
.gallery-btn:hover { color: var(--white); }
.gallery-btn:disabled { opacity: 0.2; cursor: default; }

/* ── Dot strip ── */
.gallery-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.gallery-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dim);
  transition: background 0.3s, transform 0.3s, width 0.3s;
  flex-shrink: 0;
}
.gallery-dot.is-active {
  background: var(--accent);
  width: 20px;
  border-radius: 2px;
}

/* ═══════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(0,0,0,0.96);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}
.lightbox-close:hover { color: var(--white); }

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 900px) {
  :root {
    --slide-w:    80vw;
    --slide-peek: 8vw;
  }

  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }

  .film-section { padding: 48px 24px 0; }
  .gallery-header { padding: 0 24px; }
  .gallery-controls { padding: 0 24px; gap: 24px; }

  .film-top {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 48px;
  }
  .film-poster-wrap {
    max-width: 260px;
    margin: 0 auto;
  }
  .film-poster-wrap::before { display: none; }
  .film-title { font-size: clamp(2.5rem, 12vw, 4rem); }

  .credit-role { min-width: 110px; }

  .footer { padding: 32px 24px 40px; }
}

@media (max-width: 560px) {
  :root {
    --slide-w:    88vw;
    --slide-peek: 5vw;
    --slide-gap:  16px;
  }

  .credit-item { flex-direction: column; gap: 2px; padding: 11px 0; }
  .credit-role { min-width: unset; }

  .gallery-dots { display: none; }

  .footer { flex-direction: column; gap: 24px; }
}