/* PRZ from joost.pl for MYKOLAB – https://joost.pl */
/* MYKObyPRZ – About: etapy 2020 / 130 m² / 500 m². Po prawej sekwencja „b-roll ↔ zdjęcia” wtopiona w tło, z paginacją i retro nakładką na filmach (D-265). Klasy: nprz-hist, nprz-hist__stage/set/m/cap/pager/film. */
.nprz-body .nprz-hist { position: relative; background: var(--nprz-dark); color: var(--nprz-white); overflow: clip; }
.nprz-body .nprz-hist .nprz-sec__inner { position: relative; z-index: 1; pointer-events: none; }
/* tekst zostaje klikalny, a paginacja pod nim (w scenie) też */
.nprz-body .nprz-hist .nprz-tl__tag, .nprz-body .nprz-hist .nprz-tl__body { pointer-events: auto; }

/* scena: przyklejona do ekranu, pełna szerokość okna, treść przewija się nad nią */
.nprz-hist__stage { position: sticky; top: 0; z-index: 0; width: 100vw; max-width: none; height: 100vh; height: 100svh; margin: 0 0 -100vh calc(50% - 50vw) !important; margin-bottom: -100svh !important; overflow: hidden; pointer-events: none; will-change: opacity, filter; }
/* welon: ciemny od lewej (czytelność tekstu), dół i góra wtopione w tło */
.nprz-hist__stage::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(20, 41, 39, .98) 0, rgba(20, 41, 39, .95) 24%, rgba(20, 41, 39, .55) 40%, rgba(20, 41, 39, 0) 52%), linear-gradient(180deg, var(--nprz-dark) 0, transparent 14%, transparent 80%, var(--nprz-dark) 100%); }

/* rozmyta poświata bieżącego ujęcia pod całą sceną – jak tło portretu właściciela */
.nprz-hist__bg { position: absolute; left: -10%; top: -10%; width: 120%; height: 120%; display: block; filter: blur(48px) saturate(1.15); opacity: .4; }
/* zestaw jednego etapu; zmiana etapu = zanurzenie w ciemność (blur + przezroczystość), zmiana ujęcia w etapie = płynne przenikanie */
.nprz-hist__set { position: absolute; inset: 0; opacity: 0; filter: blur(18px); transition: opacity .5s ease, filter .5s ease; }
.nprz-hist__set.is-on { opacity: 1; filter: none; transition: opacity 1.1s ease .35s, filter 1.1s ease .35s; }
.nprz-hist__m { position: absolute; right: 0; top: 0; bottom: 0; margin-block: auto; display: block; object-fit: cover; opacity: 0; filter: blur(12px); transform: scale(1.05); transition: opacity 1.2s ease, filter 1.2s ease, transform 8s ease-out; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%), linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%); -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 24%), linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%); mask-composite: intersect; }
.nprz-hist__m.is-cur { opacity: 1; filter: none; transform: none; }
/* przebija globalne „.nprz-body img { height: auto }” */
/* na ultrawide i 4K okno mediów ma limit rozmiaru (bez rozciągania ponad rozdzielczość źródła) */
.nprz-body .nprz-hist .nprz-hist__m { width: min(48vw, 1500px); height: min(100%, 1200px); max-width: none; }
/* zdjęcia o niskiej rozdzielczości: naturalna wielkość, ta sama prostokątna maska co reszta (bez owalnej winiety) */
.nprz-body .nprz-hist .nprz-hist__m.is-small { width: auto; height: auto; }
/* film nie robi powolnego zoomu (ma własny ruch) */
video.nprz-hist__m { transform: none; transition: opacity 1.2s ease, filter 1.2s ease; }

/* retro nakładka na filmach: ziarno, linie, winieta, celownik kamery, „PLAY” i licznik czasu */
.nprz-hist__film { position: absolute; right: 0; top: 0; bottom: 0; margin-block: auto; width: min(48vw, 1500px); height: min(100%, 1200px); z-index: 1; opacity: 0; transition: opacity .7s ease; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%); mask-image: linear-gradient(90deg, transparent 0, #000 24%); }
.nprz-hist__film.is-on { opacity: 1; }
.nprz-hist__film::before { content: ""; position: absolute; inset: -20%; opacity: .07; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .97 0 0 0 0 .96 0 0 0 0 .93 0 0 0 .9 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>"); animation: nprz-grain .7s steps(5) infinite; }
.nprz-hist__film::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .05) 0, rgba(0, 0, 0, .05) 1px, transparent 1px, transparent 3px); }
@keyframes nprz-grain {
	0% { transform: translate(0, 0); }
	20% { transform: translate(-3%, 2%); }
	40% { transform: translate(2%, -3%); }
	60% { transform: translate(-2%, -1%); }
	80% { transform: translate(3%, 3%); }
	100% { transform: translate(0, 0); }
}
.nprz-hist__vf { position: absolute; left: 28%; right: 4%; top: 14%; bottom: 17%; z-index: 1; }
.nprz-hist__play, .nprz-hist__tc { position: absolute; top: 16px; font-family: var(--nprz-font-cap); font-weight: 500; font-size: 14px; letter-spacing: var(--nprz-track); text-transform: uppercase; color: var(--nprz-amber); text-shadow: 0 0 8px rgba(210, 105, 24, .55); }
.nprz-hist__play, .nprz-hist__tc { padding-top: 4px; padding-bottom: 4px; background: rgba(20, 41, 39, .6); }
.nprz-hist__play { left: 18px; padding-left: 32px; padding-right: 10px; }
.nprz-hist__tc { padding-left: 10px; padding-right: 10px; }
.nprz-hist__play::before { content: ""; position: absolute; left: 10px; top: 50%; margin-top: -6px; border-left: 11px solid var(--nprz-amber); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.nprz-hist__tc { right: 18px; font-variant-numeric: tabular-nums; }
.nprz-hist__tc::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--nprz-amber); animation: nprz-rec 1.4s steps(2) infinite; }
@keyframes nprz-rec { 50% { opacity: 0; } }

/* podpis etapu: duży rok + paginacja (odcinek = ujęcie; bursztynowy z trójkątem = film) */
.nprz-hist__cap { position: absolute; right: clamp(24px, 4vw, 80px); bottom: clamp(28px, 7vh, 90px); z-index: 3; text-align: right; }
.nprz-hist__yr { display: block; margin: 0; font-family: var(--nprz-font-head); font-weight: 600; text-transform: uppercase; font-size: clamp(64px, 10vw, 180px); line-height: .9; color: var(--nprz-amber); opacity: 0; }
.nprz-hist__set.is-on .nprz-hist__yr { animation: nprz-hist-yr 2.8s ease .55s both; }
@keyframes nprz-hist-yr {
	0% { opacity: 0; transform: translateY(26px); filter: blur(10px); }
	22% { opacity: 1; transform: none; filter: none; }
	100% { opacity: .55; transform: none; filter: none; }
}
.nprz-hist__row { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 16px; }
.nprz-hist__pager { display: flex; align-items: center; gap: 5px; width: min(540px, 36vw); pointer-events: auto; }
.nprz-hist__seg { position: relative; flex: 5 1 0; min-width: 8px; height: 22px; padding: 0; border: 0; border-radius: 0; background: none; cursor: pointer; }
.nprz-hist__seg::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1px; background: rgba(247, 245, 241, .26); }
.nprz-hist__seg i { position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1px; width: 0; background: var(--nprz-white); }
.nprz-hist__seg.is-video::before { background: rgba(210, 105, 24, .4); }
.nprz-hist__seg.is-video i { background: var(--nprz-amber); }
.nprz-hist__seg.is-video::after { content: ""; position: absolute; left: 0; top: 1px; border-left: 7px solid var(--nprz-amber); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.nprz-hist__seg:hover::before { background: rgba(53, 156, 149, .8); }
.nprz-hist__n { min-width: 56px; font-family: var(--nprz-font-cap); font-weight: 500; font-size: 13px; letter-spacing: var(--nprz-track); text-transform: uppercase; color: var(--nprz-grey); text-align: right; }
.nprz-hist__pp { position: relative; flex: none; width: 30px; height: 30px; padding: 0; border: 1px solid rgba(247, 245, 241, .4); border-radius: 0; background: none; cursor: pointer; pointer-events: auto; }
.nprz-hist__pp::before, .nprz-hist__pp::after { content: ""; position: absolute; top: 9px; width: 3px; height: 10px; background: var(--nprz-white); }
.nprz-hist__pp::before { left: 10px; }
.nprz-hist__pp::after { right: 10px; }
.nprz-hist__pp.is-paused::before { left: 11px; top: 8px; width: 0; height: 0; background: none; border-left: 9px solid var(--nprz-white); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.nprz-hist__pp.is-paused::after { display: none; }
.nprz-hist__pp:hover { border-color: var(--nprz-teal); }

/* oś czasu na ciemnym tle */
.nprz-body .nprz-hist .nprz-tl__item { padding-bottom: clamp(90px, 14vh, 170px); }
.nprz-body .nprz-hist .nprz-tl__item:first-child { padding-top: 10vh; }
.nprz-body .nprz-hist .nprz-tl__item:last-child { padding-bottom: 32vh; }
.nprz-body .nprz-hist.nprz-sec { padding-bottom: 0; }
.nprz-body .nprz-hist .nprz-tl__item::before { background: rgba(247, 245, 241, .28); }
.nprz-body .nprz-hist .nprz-tl__item:last-child::before { background: linear-gradient(rgba(247, 245, 241, .28), transparent); }
.nprz-body .nprz-hist .nprz-tl__tag::after { background: var(--nprz-dark); }
.nprz-body .nprz-hist .nprz-tl__body { max-width: min(58ch, 100%); }
.nprz-body .nprz-hist .nprz-tl__body h2, .nprz-body .nprz-hist .nprz-tl__quote { color: var(--nprz-white); }
.nprz-body .nprz-hist .nprz-tl__body p { color: var(--nprz-white); opacity: .9; }
.nprz-body .nprz-hist .nprz-tl__body p.nprz-tl__pull { color: var(--nprz-teal); opacity: 1; }

@media (max-width: 1024px) {
	/* telefon i tablet: media przyklejone u góry (ok. 40% ekranu), tekst przewija się pod nimi – jak hero na stronie głównej (D-270) */
	.nprz-body .nprz-hist.nprz-sec { padding-top: 0; }
	.nprz-hist__stage { width: 100vw; height: clamp(300px, 64svh, 760px); margin: 0 0 0 calc(50% - 50vw) !important; z-index: 3; background: var(--nprz-dark); }
	.nprz-hist__stage::after { inset: 0 0 66px 0; background: linear-gradient(180deg, rgba(20, 41, 39, .6) 0, transparent 26%), linear-gradient(0deg, var(--nprz-dark) 0, rgba(20, 41, 39, .55) 30%, transparent 62%); }
	.nprz-hist__bg { display: none; }
	.nprz-hist__m { left: 0; right: auto; -webkit-mask-image: none; mask-image: none; transform: none; }
	.nprz-body .nprz-hist .nprz-hist__m { width: 100%; height: calc(100% - 66px); }
	.nprz-hist__m.is-cur { opacity: 1; }
	.nprz-hist__film { z-index: 3; left: 0; right: auto; width: 100%; height: calc(100% - 66px); -webkit-mask-image: none; mask-image: none; }
	.nprz-hist__vf { left: 0; right: 0; top: 0; bottom: 0; }
	.nprz-hist__film::before { display: none; }
	.nprz-hist__play, .nprz-hist__tc { top: auto; bottom: 10px; font-size: 12px; }
	.nprz-hist__play { left: 12px; }
	.nprz-hist__tc { right: 12px; }
	/* pasek pod mediami: rok + paginacja (nie zasłania zdjęcia ani filmu) */
	.nprz-hist__cap { left: 0; right: 0; bottom: 0; height: 66px; padding: 0 16px; display: flex; align-items: center; gap: 14px; text-align: left; background: var(--nprz-dark); }
	.nprz-hist__yr { flex: none; font-size: 34px; line-height: 1; }
	.nprz-hist__set.is-on .nprz-hist__yr { animation: nprz-hist-yr 2.4s ease .3s both; }
	.nprz-hist__row { flex: 1; min-width: 0; justify-content: flex-start; gap: 10px; margin-top: 0; }
	.nprz-hist__pager { flex: 1; width: auto; }
	.nprz-hist__seg { height: 32px; }
	.nprz-hist__n { min-width: 46px; font-size: 12px; }
	@media (max-width: 420px) { .nprz-hist__n { display: none; } }
	.nprz-hist__pp { width: 34px; height: 34px; }
	.nprz-hist__pp::before, .nprz-hist__pp::after { top: 11px; }
	.nprz-hist__pp.is-paused::before { top: 10px; }
	.nprz-body .nprz-hist .nprz-tl__item:first-child { padding-top: 22px; }
	.nprz-body .nprz-hist .nprz-tl__item { padding-bottom: 64px; }
	.nprz-body .nprz-hist .nprz-tl__item:last-child { padding-bottom: 96px; }
	.nprz-body .nprz-hist .nprz-tl__body { max-width: none; }
}
@media (max-width: 1024px) and (orientation: landscape) and (max-height: 620px) {
	.nprz-hist__stage { height: 56svh; }
}
@media (prefers-reduced-motion: reduce) {
	.nprz-hist__set, .nprz-hist__set.is-on, .nprz-hist__m, video.nprz-hist__m { transition: none; filter: none; transform: none; }
	.nprz-hist__set.is-on .nprz-hist__yr { animation: none; opacity: .8; }
	.nprz-hist__film::before, .nprz-hist__tc::before { animation: none; }
}
