:root {
  --ink: #0e0d0e;
  --ink-2: #171517;
  --ink-3: #221f21;
  --paper: #f1eee8;
  --paper-2: #e6e1d8;
  --text: #ece8e1;
  --text-muted: #cdc7bf;
  --text-dim: #9a938c;
  --line: rgba(236, 232, 225, 0.12);
  --red: #b70000;
  --red-hi: #d81e1e;

  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --kb: clamp(150px, 17vw, 260px);
  /* lewa krawędź kolumny treści — hero i nagłówek wyrównane do sekcji niżej */
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2));

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
svg { width: 1em; height: 1em; }

:focus-visible { outline: 2px solid var(--red-hi); outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--paper); color: var(--ink);
  text-decoration: none; transition: top 0.2s;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Typografia ---------- */
.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--red);
}
.h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lead {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.45;
  color: var(--text);
}
p { margin: 0 0 1em; text-wrap: pretty; }

/* Bodoni Moda przy dużym rozmiarze automatycznie przełącza się na wariant
   z włosowatymi kreskami — wymuszamy niższy „opsz”, żeby cienkie linie
   (np. lewa kreska „M”) były czytelne na ciemnym tle. */
.h2, .hero-title, .kicker, .lead, .brand-mark, .clip-title, .quote p,
.cast-names li, .cast-list dd, .ph-index {
  font-optical-sizing: none;
  font-variation-settings: "opsz" 18;
}
.hero-title { font-variation-settings: "opsz" 28; }

/* ---------- Nagłówek ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  padding-left: var(--edge);
  padding-right: calc(var(--kb) + var(--gutter));
  transition: background-color 0.4s var(--ease), padding 0.4s var(--ease), backdrop-filter 0.4s;
}
.site-header.is-solid {
  background: rgba(14, 13, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding-top: 12px; padding-bottom: 12px;
  padding-right: var(--edge);
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; }
.brand-mark {
  font-family: var(--serif); font-style: italic; font-size: 20px; letter-spacing: 0.01em;
}
.site-header nav { display: flex; gap: clamp(14px, 2.2vw, 32px); }
.site-header nav a {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
  color: var(--text-muted); padding: 6px 0; position: relative;
  transition: color 0.2s;
}
.site-header nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--red-hi); transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.site-header nav a:hover { color: var(--text); }
.site-header nav a:hover::after { transform: scaleX(1); }

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  font: 500 14px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn--primary { background: var(--red); color: #fff; }
.btn--primary:hover { background: var(--red-hi); }
.btn--ghost { border-color: rgba(236, 232, 225, 0.35); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); }
.btn--dark { background: var(--ink); color: var(--paper); }
.btn--dark:hover { background: var(--red); }
.btn--dark svg { fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--ink);
}
#hero-gl {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.hero.gl-ready #hero-gl { opacity: 1; }
.hero.no-gl {
  background:
    linear-gradient(90deg, var(--ink) 40%, rgba(14, 13, 14, 0.4)),
    url("../assets/img/plakat.jpg") right center / contain no-repeat,
    var(--ink);
}
.hero-inner {
  position: relative; z-index: 1;
  width: 100%;
  padding: 120px var(--gutter) 96px;
  padding-left: var(--edge);
  padding-right: calc(var(--kb) + var(--gutter) * 1.5);
  pointer-events: none;
}
.hero-inner a, .hero-inner .btn { pointer-events: auto; }
.kicker {
  margin: 0 0 18px;
  font-family: var(--serif); font-weight: 500; font-size: clamp(18px, 2vw, 24px); color: var(--text);
  letter-spacing: 0.01em;
}
.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(56px, 10.5vw, 156px);
  line-height: 0.92;
  letter-spacing: -0.02em;
}
.hero-title span { display: block; }
.hero-title-sm {
  font-style: italic;
  font-weight: 500;
  font-size: 0.52em;
  line-height: 1.25;
  color: #e2ddd5;
  padding-left: 0.12em;
}
.hero-lede {
  max-width: 34ch;
  margin: 32px 0 32px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-credits {
  margin: 48px 0 0; display: grid; gap: 10px; max-width: 560px;
}
.hero-credits div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.hero-credits dt { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); padding-top: 3px; }
.hero-credits dd { margin: 0; font-size: 15px; color: var(--text); }

.scroll-cue {
  position: absolute; z-index: 1; left: var(--edge); bottom: 28px;
  width: 1px; height: 56px; background: var(--line); overflow: hidden;
}
.scroll-cue span {
  position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--text);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue { to { top: 100%; } }

/* Wejście hero */
.hero-inner > * { animation: rise 1.1s var(--ease) both; }
.hero-inner > :nth-child(2) { animation-delay: 0.08s; }
.hero-inner > :nth-child(3) { animation-delay: 0.22s; }
.hero-inner > :nth-child(4) { animation-delay: 0.3s; }
.hero-inner > :nth-child(5) { animation-delay: 0.38s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Sekcje ---------- */
.section {
  padding: clamp(56px, 7vw, 104px) var(--gutter);
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
}
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* O spektaklu */
.about {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 7vw, 112px); align-items: center;
}
.about-media {
  background: var(--paper);
  padding: clamp(16px, 3vw, 40px);
}
.about-media img { width: 100%; height: auto; }
.about-text p:not(.lead):not(.eyebrow) { color: var(--text-muted); max-width: 58ch; }
.about-text .h2 { margin-bottom: 28px; }

/* Reportaż */
.yt {
  position: relative; aspect-ratio: 16 / 9; background: var(--ink-2); overflow: hidden;
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-meta { margin-top: 16px; font-size: 14px; color: var(--text-dim); }
.yt-meta a { color: var(--text-muted); text-underline-offset: 3px; }
.yt-meta a:hover { color: var(--text); }

/* Fragmenty */
.clips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); }
.clip { margin: 0; }
.clip:nth-child(2) { transition-delay: 0.08s; }
.clip-frame {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-2);
}
.clip-frame video { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.clip:hover .clip-frame video { transform: scale(1.03); }
.clip-play {
  position: absolute; right: 14px; bottom: 14px; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5); background: rgba(14,13,14,.4); color: #fff; cursor: pointer;
  display: grid; place-items: center; backdrop-filter: blur(6px);
  transition: background-color .25s, border-color .25s;
}
.clip-play svg { width: 18px; height: 18px; fill: currentColor; margin-left: 2px; }
.clip-play:hover { background: var(--red); border-color: var(--red); }
.clip figcaption {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; padding-top: 14px;
}
.clip-no { font-family: var(--serif); font-style: italic; color: var(--red-hi); grid-row: span 2; }
.clip-title { font-family: var(--serif); font-size: 20px; line-height: 1.3; }
.clip-note { font-size: 13px; color: var(--text-dim); }
.clip-note:empty { display: none; }

/* Placeholdery (puste sloty na materiały) */
.is-empty {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 18px;
  background:
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(236,232,225,.045) 37px 38px),
    var(--ink-2);
  border: 1px solid var(--line);
}
.ph-index { font-family: var(--serif); font-size: clamp(40px, 5vw, 64px); line-height: 1; color: rgba(236,232,225,.22); }
.ph-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); line-height: 1.5; }

/* Recenzja — jasna „biała klawiatura” */
.recenzja {
  max-width: none;
  background: var(--paper);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}
.recenzja::after {
  /* pasek klawiszy przy prawej krawędzi, jak na okładce */
  content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: clamp(40px, 8vw, 120px);
  background:
    repeating-linear-gradient(180deg,
      var(--ink) 0 22px, transparent 22px 40px, var(--ink) 40px 62px, transparent 62px 80px,
      transparent 80px 120px, var(--ink) 120px 142px, transparent 142px 160px,
      var(--ink) 160px 182px, transparent 182px 200px, var(--ink) 200px 222px, transparent 222px 280px);
  -webkit-mask: linear-gradient(90deg, #000 62%, transparent 62%);
          mask: linear-gradient(90deg, #000 62%, transparent 62%);
  opacity: 0.9;
}
.recenzja-inner {
  max-width: var(--max); margin: 0 auto; padding-right: clamp(48px, 10vw, 160px);
}
.recenzja .eyebrow { color: #4f4944; }
.quote { margin: 0 0 36px; }
.quote p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 6.2vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 17ch;
}
.quote-meta { margin-bottom: 36px; }
.quote-source { margin: 0 0 4px; font-size: 17px; }
.quote-context { margin: 0; font-size: 14px; color: #4f4944; }

/* Galeria */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(160px, 18vw, 260px);
  grid-auto-flow: dense;
  gap: clamp(8px, 1.4vw, 16px);
}
.shot { position: relative; overflow: hidden; margin: 0; padding: 0; border: 0; background: var(--ink-2); color: inherit; font: inherit; text-align: left; }
button.shot { cursor: zoom-in; }
.shot--wide { grid-column: span 2; }
.shot--tall { grid-row: span 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .5s; filter: grayscale(.25); }
.shot:hover img { transform: scale(1.04); filter: none; }
.shot-credit {
  position: absolute; left: 10px; bottom: 8px; font-size: 11px; letter-spacing: .04em;
  color: rgba(255,255,255,.85); text-shadow: 0 1px 6px rgba(0,0,0,.8);
  opacity: 0; transition: opacity .3s;
}
.shot:hover .shot-credit, .shot:focus-visible .shot-credit { opacity: 1; }
.shot:nth-child(4n+2) { transition-delay: .06s; }
.shot:nth-child(4n+3) { transition-delay: .12s; }
.shot:nth-child(4n+4) { transition-delay: .18s; }

/* Obsada */
.cast {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px);
  border-top: 1px solid var(--line); padding-top: clamp(28px, 4vw, 48px);
}
.cast-names { list-style: none; margin: 0; padding: 0; }
.cast-names li {
  font-family: var(--serif); font-size: clamp(28px, 3.6vw, 48px); line-height: 1.15;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.cast-names li span { color: var(--text-muted); }
.cast-names small {
  display: block; font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--red-hi); margin-top: 4px;
}
.cast-list { margin: 0; display: grid; gap: 22px; align-content: start; }
.cast-list dt { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); }
.cast-list dd { margin: 4px 0 0; font-family: var(--serif); font-size: 24px; }

/* Autor */
.autor {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 7vw, 112px); align-items: end;
}
.autor-photo { margin: 0; }
.autor-photo img { width: 100%; height: auto; filter: grayscale(1) contrast(1.05); }
.autor-text .h2 { margin-bottom: 24px; }
.autor-text p:not(.lead):not(.eyebrow) { color: var(--text-muted); max-width: 60ch; }

/* Stopka */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px var(--gutter) 40px;
  display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: end;
  max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto;
}
.footer-label { margin: 0 0 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); }
.footer-logo-link { display: inline-block; transition: opacity .2s; }
.footer-logo-link:hover { opacity: .8; }
.footer-logo { width: 180px; height: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: flex-end; }
.footer-links a { font-size: 14px; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-legal { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--text-dim); }

/* Lightbox */
.lightbox {
  width: min(1200px, 100vw - 32px); max-height: calc(100vh - 32px); padding: 0; border: 0;
  background: transparent; color: var(--text); overflow: visible;
}
.lightbox::backdrop { background: rgba(8, 7, 8, 0.92); backdrop-filter: blur(4px); }
.lightbox[open] { animation: lb .4s var(--ease); }
@keyframes lb { from { opacity: 0; transform: scale(.98); } }
.lightbox-body figure { margin: 0; }
.lightbox-body img, .lightbox-body video { width: 100%; max-height: calc(100vh - 120px); object-fit: contain; background: #000; }
.lightbox-body figcaption { padding-top: 12px; font-size: 14px; color: var(--text-muted); }
.lightbox-close {
  position: absolute; top: -48px; right: 0; width: 44px; height: 44px; border: 0; background: transparent; color: var(--text); cursor: pointer;
  display: grid; place-items: center;
}
.lightbox-close svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; }

/* ---------- Responsywność ---------- */
@media (max-width: 960px) {
  .about, .autor, .cast { grid-template-columns: 1fr; }
  .about-media { max-width: 520px; }
  .autor-photo { max-width: 360px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shot--tall { grid-row: span 1; }
  /* 3 szerokie + 15 zwykłych = nieparzysta liczba pól — ostatnie domyka rząd */
  .shot:last-child { grid-column: span 2; }
}

@media (max-width: 720px) {
  .site-header nav { display: none; }
  .site-header, .site-header.is-solid { padding-right: var(--edge); }
}

@media (max-width: 640px) {
  :root { --kb: max(76px, 22vw); }
  body { font-size: 16px; }
  .hero { align-items: flex-end; }
  .hero-inner { padding-top: 96px; padding-bottom: 88px; padding-right: calc(var(--kb) + 16px); }
  .hero-title { font-size: clamp(44px, 14vw, 72px); }
  .hero-credits { display: none; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .clips { grid-template-columns: 1fr; }
  .gallery { grid-auto-rows: 42vw; }
  .shot--tall { grid-row: span 1; }
  .site-footer { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-inner > *, .scroll-cue span { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; }
}
