/* Restaurant hero (ManO2 Figma 171:2 + 171:3, Kaptol 1:2217–1:2224): a band in the restaurant's
   colour with the wordmark and the tagline, then the photo with two buttons.
   Both restaurant pages share this pattern; the band's section style (ManO2 / Kaptol) sets
   the colours, so the only difference between the pages is content and that one style. */

/* Page colour: ManO2 pages warm white, ManO pages (template "Restoran: Kaptol") the ManO cream.
   Sections without a colour of their own show it. */
body {
	--mano-page: var(--wp--preset--color--topla-bijela);
}

body.page-template-page-restoran-kaptol {
	--mano-page: var(--wp--preset--color--mano-krem);
	background-color: var(--mano-page);
}

.mano-rhero.mano-rhero {
	margin-block: 0;
}

.is-style-section-mano2 {
	--mano-tagline: var(--wp--preset--color--topla-bijela);
	--mano-tagline-lift: 20px;
}

.is-style-section-kaptol {
	--mano-tagline: var(--wp--preset--color--dark-kaptol);
	--mano-tagline-lift: 35.5px;
}

/* Band: 423px tall at 1440. The wordmark sits on a line 33px above the bottom (ManO2 614 × 143 at
   y 247; ManO 381 × 141 at y 249 — each image keeps its own size, set on the Image block); the
   tagline (serif 30/35, line break in the text) ends at the right gutter, its box 20px (ManO2) /
   35.5px (ManO) above that line (Figma 242:784 / 242:905). */
.mano-rhero__band.mano-rhero__band {
	display: grid;
	box-sizing: border-box;
	min-height: 423px;
	grid-template-columns: minmax(0, 614px) auto;
	justify-content: space-between;
	align-content: end;
	align-items: end;
	column-gap: 48px;
	margin-block: 0;
	padding: 0 var(--wp--preset--spacing--gutter) 33px;
}

.mano-rhero__band > * {
	margin-block: 0;
}

.mano-rhero__wordmark img {
	display: block;
	max-width: 100%;
	height: auto;
}

.mano-rhero__tagline.mano-rhero__tagline {
	margin-bottom: var(--mano-tagline-lift, 20px);
	color: var(--mano-tagline);
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(22px, 2.083vw, 30px); /* 30px at 1440; shrinks with the wordmark below that */
	line-height: 1.1667; /* 35px */
	white-space: nowrap; /* the line break is in the text, as in Figma */
}

/* Photo: 1442 × 601 at 1440 (cover crop), buttons 96px from the left and 114px from the bottom. */
.mano-rhero__photo.wp-block-cover {
	min-height: 0 !important;
	aspect-ratio: 1440 / 601;
	margin-block: 0;
	padding: 0 var(--wp--preset--spacing--gutter) clamp(32px, 7.92vw, 114px);
	align-items: flex-end;
	justify-content: flex-start;
	color: var(--wp--preset--color--button);
}

.mano-rhero__photo .wp-block-cover__inner-container {
	width: auto;
}

.mano-rhero__buttons.mano-rhero__buttons {
	gap: 14px;
}

.mano-rhero__buttons .wp-block-button__link {
	line-height: 16px; /* Inter "normal" at 13px, as in Figma: 13 + 16 + 13 = 42 */
}

/* Below 1024px the tagline goes under the wordmark (its line break stays; long lines may wrap). */
@media (max-width: 1023px) {
	.mano-rhero__band.mano-rhero__band {
		min-height: 0;
		grid-template-columns: minmax(0, 614px);
		align-items: start;
		row-gap: 24px;
		padding-top: clamp(124px, 18vw, 184px);
		padding-bottom: 40px;
	}

	.mano-rhero__tagline.mano-rhero__tagline {
		margin-bottom: 0;
		font-size: clamp(22px, 3.2vw, 30px);
		line-height: 1.1667;
		white-space: normal;
	}

	.mano-rhero__photo.wp-block-cover {
		aspect-ratio: auto;
		min-height: clamp(420px, 62vw, 601px) !important;
	}
}

/* Phones (Figma 353:392 ManO2, 370:1537 ManO, 402 wide): band and photo 437px each. The wordmark sits
   on the burger's row (ManO2 173 × 40 at y 123, ManO 130 × 48 at y 119), the tagline at the band's
   bottom (ManO2 serif 30/35, 36px from the bottom; ManO 20/28, 48px). The photo carries no buttons
   in the frames. Only the restaurant pages (with a wordmark); title heroes keep their rules. */
@media (max-width: 781px) {
	.mano-rhero:has(.mano-rhero__wordmark) .mano-rhero__band.mano-rhero__band {
		box-sizing: border-box;
		height: 437px;
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto auto;
		align-content: space-between;
		row-gap: 0;
		padding: 123px 16px 36px;
		-webkit-font-smoothing: antialiased; /* light on dark, as Figma renders it */
		-moz-osx-font-smoothing: grayscale;
	}

	.mano-rhero:has(.mano-rhero__wordmark) .mano-rhero__wordmark img {
		width: 173px !important; /* the Image block's inline width */
	}

	.mano-rhero:has(.mano-rhero__wordmark) .mano-rhero__tagline.mano-rhero__tagline {
		font-size: 30px;
		line-height: 35px;
	}

	.mano-rhero:has(.mano-rhero__wordmark) .is-style-section-kaptol.mano-rhero__band {
		padding-top: 119px;
		padding-bottom: 48px;
		background-color: var(--wp--preset--color--mano-dva-bez); /* the phone frame's band fill, #ded8cd */
	}

	.mano-rhero:has(.mano-rhero__wordmark) .is-style-section-kaptol .mano-rhero__wordmark img {
		width: 130px !important;
	}

	.mano-rhero:has(.mano-rhero__wordmark) .is-style-section-kaptol .mano-rhero__tagline.mano-rhero__tagline {
		font-size: 20px;
		line-height: 28px;
	}

	/* ManO's tagline wraps on its own (at 402 it breaks where the text does; narrower, or in English,
	   the desktop break would leave one word on a line). */
	.mano-rhero:has(.mano-rhero__wordmark) .is-style-section-kaptol .mano-rhero__tagline br {
		content: "";
	}

	.mano-rhero:has(.mano-rhero__wordmark) .is-style-section-kaptol .mano-rhero__tagline br::after {
		content: " ";
	}

	.mano-rhero:has(.mano-rhero__wordmark) .mano-rhero__photo.wp-block-cover {
		height: 437px;
		min-height: 0 !important;
		padding: 0;
	}

	.mano-rhero:has(.mano-rhero__wordmark) .mano-rhero__buttons {
		display: none;
	}

	/* ManO's photo: the frame shows the arch further right (its left edge at x 120, the window strip
	   at the left edge). */
	.mano-rhero:has(.mano-rhero__wordmark):has(.is-style-section-kaptol) .mano-rhero__photo .wp-block-cover__image-background {
		object-position: 28% 50%;
	}
}
