/* cinematic.css — kinowe animacje scrollowe (hero scrub, sekcja boxy, scrapbook)
   Tryby:
   - html.cinema-on  → pełne scrubbery canvas (desktop, motion OK)
   - html:not(.cinema-on)  → statyczne fallbacki (reduced-motion / mobile / brak JS) */

/* ===== HERO — scroll-scrubbing klipu ===== */
.hero-scrub {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	background: url('../assets/video/hero-poster.webp?v=2') center / cover no-repeat;
}
.hero-scrub__canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}
/* w trybie kinowym canvas zastępuje stare tło ::before (zoomOut) */
html.cinema-on .header::before {
	display: none;
}
html.cinema-on .header {
	padding-bottom: 0;
}
/* delikatna winieta dla czytelności tytułu na jasnym wideo */
html.cinema-on .hero-scrub::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at center 42%, rgba(30, 18, 10, 0.18) 0%, rgba(30, 18, 10, 0) 55%),
		linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.16));
	pointer-events: none;
}
/* fala na dole hero: niewidoczna na starcie, wyłania się pod koniec najazdu (klasa z JS) */
html.cinema-on .header::after {
	opacity: 0;
	transition: opacity 0.45s ease;
}
html.cinema-on .header.wave-in::after {
	opacity: 1;
}
/* CSS-owa animacja wejścia (riseUp) wyłączona w trybie kinowym — przejmuje ją GSAP */
html.cinema-on .header .reveal {
	animation: none;
	opacity: 1;
	transform: none;
}

/* fallback: bez kina zostaje stare tło ::before — chowamy scrub */
html:not(.cinema-on) .hero-scrub {
	display: none;
}

/* ===== SEKCJA KINOWA BOXY (antipasti makro) ===== */
.cinema-boxy {
	position: relative;
	background: #1d140c;
}
.cinema-boxy__stage {
	position: relative;
	height: 100vh;
	overflow: hidden;
}
.cinema-boxy__canvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
	background: url('../assets/video/antipasti-poster.webp') center / cover no-repeat;
}
.cinema-boxy__callouts {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}
.cinema-boxy__callout {
	position: absolute;
	z-index: 2;
	max-width: min(46ch, 74vw);
	font-family: var(--heading-font, 'Caveat', cursive);
	font-weight: 600;
	font-size: clamp(3.5rem, 5.8vw, 6rem);
	line-height: 1.08;
	color: #f9e8c3; /* jaśniejsze, kremowe złoto */
	text-shadow:
		0 2px 6px rgba(20, 10, 4, 0.8),
		0 4px 22px rgba(20, 10, 4, 0.65),
		0 0 52px rgba(20, 10, 4, 0.4);
	pointer-events: none;
}
.cinema-boxy__callout small {
	display: block;
	margin-top: 0.35em;
	font-family: 'Comfortaa', sans-serif;
	font-weight: 400;
	font-size: clamp(1.25rem, 1.55vw, 1.65rem);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #fdf6e7;
	text-shadow: 0 1px 4px rgba(20, 10, 4, 0.85), 0 3px 14px rgba(20, 10, 4, 0.6);
}
.cinema-boxy__callout::after {
	content: '';
	display: block;
	width: 58%;
	margin-top: 0.18em;
	border-bottom: 3px dashed rgba(249, 232, 195, 0.85);
	border-radius: 2px;
}
.cinema-boxy__callout--1 { left: clamp(1.5rem, 7vw, 9rem); bottom: 18%; }
.cinema-boxy__callout--2 { right: clamp(1.5rem, 7vw, 9rem); top: 16%; text-align: right; }
.cinema-boxy__callout--2::after { margin-left: auto; }
.cinema-boxy__callout--3 { left: 50%; bottom: 14%; transform: translateX(-50%); text-align: center; }
.cinema-boxy__callout--3::after { margin: 0.18em auto 0; }

/* fallback bez kina: niższa statyczna „pocztówka" z posterem i chipami */
html:not(.cinema-on) .cinema-boxy__stage {
	height: clamp(320px, 56vh, 560px);
}
html:not(.cinema-on) .cinema-boxy__callout {
	position: static;
	transform: none;
	text-align: center;
	margin: 0;
}
html:not(.cinema-on) .cinema-boxy__callout::after { display: none; }
html:not(.cinema-on) .cinema-boxy__callouts {
	position: absolute;
	inset: auto 0 clamp(1rem, 4vh, 2.4rem) 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 2.4rem;
	justify-content: center;
	align-items: baseline;
	padding: 0 1.2rem;
}
html:not(.cinema-on) .cinema-boxy__callout { font-size: clamp(2rem, 3.4vw, 3rem); }
html:not(.cinema-on) .cinema-boxy__callout small { display: none; }

/* ===== JAK ZAMÓWIĆ — linia SVG rysowana scrollem ===== */
.jz__connector--svg {
	/* geometrię (position/top/left/width) dziedziczy z .jz__connector */
	height: auto;
	overflow: visible;
}
.jz__connector--svg .jz-line {
	stroke: #c9a06a;
	stroke-width: 3.4;
	stroke-linecap: round;
	stroke-dasharray: 1.6 2.1; /* przerywana (jednostki pathLength/100) */
	fill: none;
}
.jz__connector--svg .jz-line-heart {
	stroke: #c08552;
	stroke-width: 2.6;
	fill: rgba(217, 138, 151, 0.28);
	transform-box: fill-box;
	transform-origin: center;
}
/* bez JS/kina: linia i serduszka w pełni widoczne */
html:not(.cinema-on) .jz-line-mask-path {
	stroke-dashoffset: 0 !important;
}

/* ===== dostępność / wydajność ===== */
@media (prefers-reduced-motion: reduce) {
	.header::before {
		animation: none !important;
	}
	.hero-scrub { display: none; }
}
html.cinema-on .opinia__deco,
html.cinema-on .opinia__stamp,
html.cinema-on .onas-stamp {
	will-change: transform, opacity;
}
