/* ==========================================================================
   Blok 06: Galeria
   ========================================================================== */

.gallery {
	position: relative;
	padding: var(--section-y) 0;
	background: repeating-linear-gradient(
		90deg,
		var(--cream-50) 0,
		var(--cream-50) 80px,
		var(--cream-100) 80px,
		var(--cream-100) 160px
	);
}

/* Header */
.gallery-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: clamp(40px, 5vw, 72px);
	gap: var(--space-4);
}

.gallery-title {
	font-family: var(--display);
	font-weight: 350;
	font-variation-settings: "opsz" 144;
	font-size: clamp(40px, 5.4vw, 80px);
	line-height: 1;
	margin: 0;
	letter-spacing: -0.02em;
	color: var(--ink);
}

.gallery-title em {
	font-style: italic;
	color: var(--karmel);
	font-weight: 300;
}

.gallery-sub {
	max-width: 30ch;
	font-size: 16px;
	line-height: 1.5;
	color: var(--espresso);
	text-align: right;
	margin: 0;
}

/* Chapter */
.gallery .chapter {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 var(--space-2);
}

.gallery .chapter__num {
	font-family: var(--display);
	font-style: italic;
	font-size: var(--text-eyebrow);
	color: var(--karmel);
	letter-spacing: 0.1em;
}

.gallery .chapter__label {
	font-family: var(--body);
	font-size: var(--text-eyebrow);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--espresso);
}

/* Grid */
.gallery-grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	grid-auto-rows: 60px;
	gap: clamp(12px, 1.4vw, 22px);
}

.gallery-grid .tile {
	background-size: cover;
	background-position: center;
	overflow: hidden;
	position: relative;
	background-color: var(--cream-200);
}

.gallery-grid .tile::after {
	content: "";
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 0 1px rgba(26, 20, 16, 0.08);
}

/* Tile caption */
.tile__caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 8px 12px;
	background: linear-gradient(to top, rgba(26, 20, 16, 0.55), transparent);
	font-family: var(--body);
	font-size: var(--text-caption);
	color: var(--cream-50);
	letter-spacing: 0.08em;
	z-index: 1;
}

/* Tile layout classes */
.t1 { grid-column: span 4; grid-row: span 7; }
.t2 { grid-column: span 3; grid-row: span 5; }
.t3 { grid-column: span 5; grid-row: span 5; }
.t4 { grid-column: span 3; grid-row: span 6; }
.t5 { grid-column: span 4; grid-row: span 6; }
.t6 { grid-column: span 5; grid-row: span 4; }
.t7 { grid-column: span 4; grid-row: span 4; }

/* Placeholder tiles */
.tile.ph {
	background-image: none;
	background-color: var(--cream-200);
	opacity: 0.5;
}

/* Footer CTA */
.gallery-footer {
	margin-top: clamp(32px, 4vw, 56px);
	display: flex;
	justify-content: center;
}

/* Mobile */
@media (max-width: 720px) {
	.gallery-grid {
		grid-template-columns: repeat(6, 1fr);
		grid-auto-rows: 40px;
	}

	.t1,
	.t3,
	.t5 {
		grid-column: span 6;
		grid-row: span 5;
	}

	.t2,
	.t4,
	.t6,
	.t7 {
		grid-column: span 3;
		grid-row: span 4;
	}

	.gallery-head {
		flex-direction: column;
		align-items: flex-start;
	}

	.gallery-sub {
		text-align: left;
		max-width: 100%;
	}
}

/* Reveal animation — globalne `.reveal`/`.reveal.in` z dl-system.css.
 * Wcześniej tu była klasa `.is-visible` której JS nie dodaje. Usunięte.
 */
