/* ==========================================================================
   Nikokolev Films — bundled styles for [nk_films_gallery] + [nk_single_project]
   Monochrome film-noir. Fonts Forum (serif) + Red Hat Display (sans) are
   enqueued by the plugin. Self-contained: works inside Divi or any theme.
   ========================================================================== */

.nk-films, .nk-sp{
  --nk-bg:        #0b0b0b;
  --nk-black:     #000000;
  --nk-paper:     #ede5d8;
  --nk-white:     #ffffff;      /* gallery light cards (odd) — per spec    */
  --nk-ink:       #16130f;
  --nk-ink-soft:  #423c33;
  --nk-cream:     #ede5d8;
  --nk-cream-dim: #cabfae;
  --nk-name:      #e9e0d2;
  --nk-muted:     #8c867b;      /* caps labels on dark              */
  --nk-muted-d:   #6c665d;      /* caps labels on white (AA 4.6:1)  */
  --nk-line-l:    rgba(237,229,216,.15);
  --nk-line-d:    rgba(22,19,15,.22);
  --nk-serif:'Forum','Times New Roman',Georgia,serif;
  --nk-sans:'Red Hat Display',system-ui,-apple-system,Segoe UI,sans-serif;
}
.nk-films *, .nk-sp *{ box-sizing:border-box; }

/* Defensive Divi neutralisers — keep the full-bleed bands from being clipped
   by Divi's 1080px row cap or an ancestor overflow:hidden. Belt-and-suspenders:
   also add the CSS Class "nk-fullbleed-row" to the Divi Row if :has() is
   unavailable. (Harmless no-op in a non-Divi theme.) */
.et_pb_section:has(.nk-films), .et_pb_row:has(.nk-films), .et_pb_row_inner:has(.nk-films),
.et_pb_section:has(.nk-sp),    .et_pb_row:has(.nk-sp),    .et_pb_row_inner:has(.nk-sp),
.nk-fullbleed-row{
  max-width:100% !important; width:100% !important; padding-left:0 !important; padding-right:0 !important; overflow:visible !important;
}
.et_pb_column:has(.nk-films), .et_pb_column_inner:has(.nk-films),
.et_pb_column:has(.nk-sp),    .et_pb_column_inner:has(.nk-sp){
  width:100% !important; margin:0 !important; overflow:visible !important;
}
/* kill Divi's link underline/box-shadow + list styling leaking into a Text module */
.nk-films a, .nk-sp a{ box-shadow:none !important; }
.nk-festival__list, .nk-credits{ list-style:none !important; }

/* ============================== FILMS GALLERY ============================== */
.nk-films{
  background:var(--nk-bg);
  /* No TOP padding: the first (latest) card is a full-bleed white band and should
     sit flush under the header. Top padding only added a dark strip / hard line
     above it. Keep BOTTOM padding for breathing room after the last card. */
  padding-block: 0 clamp(3.5rem, 9vw, 8rem);
  font-family:var(--nk-sans);
  -webkit-font-smoothing:antialiased;
}
.nk-films__list{ display:block; }

.nk-films__item{
  max-width:1180px;
  margin: 0 auto clamp(3rem, 8vw, 7rem);
}
.nk-films__item:first-child{ margin-top:0; }

/* whole card is ONE link (single tab stop, single SEO link) — the link is the
   grid, so title + meta stay grouped in the text column. */
.nk-films__link{
  display:grid;
  grid-template-columns: 1.05fr 1fr;
  align-items:center;
  column-gap: clamp(1.75rem, 5vw, 5.5rem);
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
  text-decoration:none; color:inherit;
}

/* image — ratio on the container so a missing image still reserves space */
.nk-films__media{
  display:block; margin:0; overflow:hidden;
  background:#050505; aspect-ratio: 3 / 2; order:1;
}
.nk-films__media img{
  display:block; width:100%; height:100%; object-fit:cover;
  filter:grayscale(1) contrast(1.02);
  transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .6s ease;
}
.nk-films__item:hover .nk-films__media img{
  transform:scale(1.04); filter:grayscale(1) contrast(1.06) brightness(1.05);
}

/* text column (title + meta grouped — robust to any length / missing meta) */
.nk-films__text{ order:2; display:block; }
.nk-films__title{
  font-family:var(--nk-serif); font-weight:400;
  font-size: clamp(2rem, 4.4vw, 3.45rem); line-height:1.04;
  letter-spacing:.005em; color:var(--nk-cream); margin:0 0 1.1rem;
}
.nk-films__meta{
  display:block; font-family:var(--nk-sans); font-size: clamp(.74rem, 1vw, .82rem);
  font-weight:500; letter-spacing:.2em; text-transform:uppercase;
  color:var(--nk-muted); margin:0; line-height:1.6;
}
.nk-films__meta .sep{ color:inherit; opacity:.6; margin:0 .15em; }
.nk-films__meta:after{
  content:""; display:block; width:64px; height:1px;
  background:var(--nk-cream-dim); opacity:.5; margin-top:1.6rem;
}

/* alternation: even rows put image on the right */
.nk-films__item:nth-child(even) .nk-films__media{ order:2; }
.nk-films__item:nth-child(even) .nk-films__text{ order:1; }

/* Alternating bands: ODD cards (1,3,5…) on a full-bleed white band, EVEN cards
   stay dark on the gallery bg (client request). Pure #fff per spec. */
.nk-films__item:nth-child(odd){
  background:var(--nk-white);
  box-shadow: 0 0 0 100vmax var(--nk-white);
  clip-path: inset(0 -100vmax);
  padding-block: clamp(3rem, 6vw, 5rem);
  position:relative; z-index:1;
}
.nk-films__item:nth-child(odd) .nk-films__title{ color:var(--nk-ink); }
.nk-films__item:nth-child(odd) .nk-films__meta{ color:var(--nk-muted-d); }
.nk-films__item:nth-child(odd) .nk-films__meta:after{ background:var(--nk-ink); opacity:.32; }
@media print{ .nk-films__item:nth-child(odd){ box-shadow:none; clip-path:none; } }

/* load-more */
.nk-films__more{ text-align:center; margin-top: clamp(2.5rem, 6vw, 5rem); }
.nk-loadmore{
  font-family:var(--nk-sans); display:inline-flex; align-items:center; gap:.7em;
  font-size:.78rem; font-weight:600; letter-spacing:.24em; text-transform:uppercase;
  color:var(--nk-cream-dim); background:none; border:0; cursor:pointer;
  padding:.9em .6em; transition:color .35s ease, gap .35s ease;
}
.nk-loadmore:hover{ color:#fff; gap:1em; }
.nk-loadmore[hidden]{ display:none; }
.nk-loadmore .arrow{ font-size:1.1em; }
.nk-loadmore[aria-busy="true"]{ opacity:.5; cursor:progress; }

/* focus + reduced motion */
.nk-films a:focus-visible, .nk-loadmore:focus-visible{ outline:2px solid var(--nk-cream); outline-offset:4px; }
.nk-films__item:nth-child(odd) a:focus-visible{ outline-color:var(--nk-ink); }
@media (prefers-reduced-motion: reduce){
  .nk-films__media img, .nk-loadmore{ transition:none !important; }
  .nk-films__item:hover .nk-films__media img{ transform:none !important; }
}

/* tablet relief + stack */
@media (max-width:1180px) and (min-width:981px){
  .nk-films__title{ font-size: clamp(1.85rem, 4vw, 2.7rem); }
  .nk-films__link{ column-gap: clamp(1.5rem, 4vw, 3rem); }
}
@media (max-width:980px){
  .nk-films__link{ grid-template-columns:1fr; row-gap: clamp(1rem,3vw,1.6rem); }
  .nk-films__media, .nk-films__item:nth-child(even) .nk-films__media{ order:0; aspect-ratio:16/11; }
  .nk-films__text, .nk-films__item:nth-child(even) .nk-films__text{ order:1; }
  .nk-films__title{ margin-bottom:.9rem; }
}
@media (max-width:560px){
  .nk-films__title{ font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .nk-films__meta:after{ margin-top:1.2rem; }
}

/* ============================== SINGLE PROJECT ============================= */
.nk-sp{
  font-family:var(--nk-sans); color:var(--nk-ink);
  line-height:1.6; -webkit-font-smoothing:antialiased;
}
/* full-bleed bands — container-independent (box-shadow bleeds to viewport,
   clip keeps each band's colour to its own height). Works inside any theme
   width; if the surrounding row is already full width, this is a harmless no-op. */
.nk-band{ width:100%; position:relative; }
.nk-band--black{
  background:var(--nk-black); color:var(--nk-cream);
  box-shadow:0 0 0 100vmax var(--nk-black); clip-path:inset(0 -100vmax);
}
.nk-band--paper{
  background:var(--nk-paper); color:var(--nk-ink);
  box-shadow:0 0 0 100vmax var(--nk-paper); clip-path:inset(0 -100vmax);
}
@media print{ .nk-band{ box-shadow:none; clip-path:none; } }

.nk-wrap{ max-width:1080px; margin-inline:auto; padding-inline:clamp(1.25rem,5vw,2.5rem); }
.nk-prose{ max-width:780px; }

.nk-eyebrow{
  font-family:var(--nk-sans); font-size:clamp(.7rem,1vw,.78rem);
  font-weight:500; letter-spacing:.3em; text-transform:uppercase;
  color:var(--nk-muted); margin:0;
}
.nk-rule{ border:0; height:1px; background:var(--nk-line-l); margin:2rem 0; }
.nk-rule--ink{ background:var(--nk-line-d); }
.nk-h2{
  font-family:var(--nk-serif); font-weight:400; color:var(--nk-ink);
  font-size:clamp(1.75rem,3.4vw,2.55rem); line-height:1.1; margin:0; letter-spacing:.01em;
}

/* hero */
.nk-hero{ padding-top:clamp(4.5rem,11vw,8.5rem); }
.nk-hero__inner{ text-align:center; }
.nk-hero__title{
  font-family:var(--nk-serif); font-weight:400; color:var(--nk-cream);
  font-size:clamp(2.8rem,8vw,5.6rem); line-height:1.02; letter-spacing:.01em; margin:1.4rem 0 0;
}
.nk-hero__logline{
  font-family:var(--nk-serif); color:var(--nk-cream-dim);
  font-size:clamp(1.15rem,2.4vw,1.6rem); line-height:1.42; max-width:640px; margin:1.6rem auto 0;
}
.nk-hero .nk-rule{ max-width:560px; margin-inline:auto; margin-block:clamp(2rem,4vw,3rem); }
.nk-credits-top{ display:flex; justify-content:center; gap:clamp(2rem,6vw,5rem); margin:0; text-align:center; flex-wrap:wrap; }
.nk-credits-top dt{ font-size:.68rem; font-weight:500; letter-spacing:.22em; text-transform:uppercase; color:var(--nk-muted); margin-bottom:.5rem; }
.nk-credits-top dd{ font-family:var(--nk-serif); font-size:clamp(1rem,1.6vw,1.15rem); color:var(--nk-name); margin:0; }
.nk-hero__media{ margin:clamp(3rem,7vw,5.5rem) 0 0; }
.nk-hero__media img{ display:block; width:100%; height:auto; aspect-ratio:21/9; object-fit:cover; filter:grayscale(1) contrast(1.03); }

/* about */
.nk-about{ padding-block:clamp(4rem,10vw,8rem); }
.nk-about .nk-prose{ margin-inline:auto; }
.nk-about .nk-rule{ margin-block:clamp(2.5rem,5vw,3.5rem); }
.nk-prose p{ font-size:1.0625rem; line-height:1.85; color:var(--nk-ink-soft); margin:0 0 1.5rem; }
.nk-prose p:last-of-type{ margin-bottom:0; }
.nk-prose .nk-h2 + .nk-rule{ margin-top:1.4rem; }
.nk-sp blockquote.nk-quote{
  border:0 !important; background:none !important; padding:0 !important; margin:0 auto !important;
  font-style:normal !important; quotes:none;
  font-family:var(--nk-serif); color:var(--nk-ink);
  font-size:clamp(1.5rem,3.4vw,2.35rem); line-height:1.32; text-align:center; max-width:760px; letter-spacing:.005em;
}
.nk-figure{ margin:clamp(2rem,4vw,3rem) 0 0; }
.nk-figure img{ display:block; width:100%; height:auto; aspect-ratio:16/7; object-fit:cover; filter:grayscale(1) contrast(1.03); }
.nk-figure figcaption{ font-size:.82rem; color:#6f665a; text-align:center; margin-top:1.1rem; letter-spacing:.01em; }

/* team */
.nk-team{ padding-block:clamp(4rem,10vw,8rem); }
.nk-team__title{ color:var(--nk-cream); text-align:center; text-transform:uppercase; letter-spacing:.32em; opacity:.85; font-size:clamp(1.5rem,3vw,2.1rem); margin-bottom:clamp(2.5rem,6vw,4.5rem); }
.nk-credits{ max-width:880px; margin:0 auto; }
.nk-credits__row{ display:grid; grid-template-columns:1fr auto; align-items:baseline; gap:1.5rem; padding:clamp(1rem,2.2vw,1.5rem) 0; border-bottom:1px solid var(--nk-line-l); }
.nk-credits__row:first-child{ border-top:1px solid var(--nk-line-l); }
.nk-credits dt{ font-size:clamp(.72rem,1vw,.8rem); font-weight:500; letter-spacing:.2em; text-transform:uppercase; color:var(--nk-muted); }
.nk-credits dd{ margin:0; text-align:right; font-family:var(--nk-serif); font-size:clamp(1.1rem,1.9vw,1.35rem); color:var(--nk-name); }
.nk-stills{ display:grid; grid-template-columns:1fr 1fr; gap:clamp(.75rem,2vw,1.5rem); margin-top:clamp(3rem,7vw,5.5rem); }
.nk-stills figure{ margin:0; }
.nk-stills img{ display:block; width:100%; height:100%; aspect-ratio:16/10; object-fit:cover; filter:grayscale(1) contrast(1.04); }

/* festival */
.nk-festival{ padding-block:clamp(4.5rem,11vw,8.5rem); text-align:center; }
.nk-festival .nk-eyebrow{ margin-bottom:clamp(1.5rem,3vw,2.2rem); }
.nk-festival__list{
  font-family:var(--nk-serif); color:var(--nk-cream); font-size:clamp(1.35rem,3vw,2.3rem);
  line-height:1.42; text-transform:uppercase; letter-spacing:.04em; max-width:900px; margin:0 auto;
  font-weight:400; list-style:none; padding:0; text-wrap:balance;
}
.nk-festival__list li{ display:inline; white-space:nowrap; }
.nk-festival__list li:not(:first-child)::before{ content:"·"; color:var(--nk-muted); margin:0 .5em; white-space:normal; }
.nk-btn{
  display:inline-block; margin-top:clamp(2.5rem,6vw,4rem); font-family:var(--nk-sans);
  font-size:.78rem; font-weight:600; letter-spacing:.22em; text-transform:uppercase; text-decoration:none;
  color:var(--nk-cream); border:1px solid rgba(237,229,216,.6);
  padding:1.05em 2.6em; transition:background .4s ease,color .4s ease,border-color .4s ease;
}
.nk-btn:hover{ background:var(--nk-cream); color:var(--nk-black); border-color:var(--nk-cream); }
.nk-sp a:focus-visible, .nk-btn:focus-visible{ outline:2px solid currentColor; outline-offset:3px; }
@media (prefers-reduced-motion: reduce){ .nk-btn{ transition:none !important; } }

@media (max-width:640px){
  .nk-credits-top{ gap:1.6rem 2.4rem; }
  .nk-stills{ grid-template-columns:1fr; }
  .nk-credits__row{ grid-template-columns:1fr; gap:.35rem; }
  .nk-credits dd{ text-align:left; }
  .nk-hero__media img{ aspect-ratio:4/3; }
  .nk-festival__list{ font-size:clamp(1rem,4.2vw,1.3rem); letter-spacing:.02em; line-height:1.5; text-wrap:normal; }
  .nk-festival__list li{ display:block; white-space:normal; }
  .nk-festival__list li:not(:first-child)::before{ content:none; }
}
