/*
 * INTL-MARKET-INTEGRATION-01 — the campaign hero on a Market's storefront route: the page H1 (that Market's country
 * heading, e.g. "Nikotinbeutel online in Deutschland entdecken") is SHOWN in the hero and leads it; the campaign copy
 * follows as the featured story. Loaded ONLY on a route's homepage with a campaign hero (pp_home_hero_title_visible(),
 * inc/assets.php); the GLOBAL root never requests this file, so its hero is exactly the approved one (H1 visually
 * hidden).
 *
 * The H1 stays OUTSIDE the rotating slides (hero-campaign.php heading rule R2 / M-4), so a carousel never hides it.
 * The hero becomes one grid whose rows the stage and every slide share (subgrid): ≥ 900 px the title row and the copy
 * row sit together in the approved vertical centring of the campaign field (the layer's former 56 / 88 px padding are
 * the outer rows); ≤ 899 px the title row follows the artwork band and opens the copy area. Artwork, world colours,
 * scrim, CTA composition and the crossfade are the component's own, unchanged.
 *
 * Contrast (≥ 900 px): ONE band, the component's own. The copy block spans the title row as well as the copy row (its
 * content, .pp-hero-copy-in, stays in the copy row), so hero-campaign.css's band (.pp-hero-copy::before — 16 px above
 * the block, 70 px feathers, out to the block's right edge + --pp-hero-band-r) runs unbroken from above the H1 to
 * below the CTAs. The block keeps GLOBAL's width (two zero-height struts: the campaign headline's 12ch at its GLOBAL
 * size, the support line's 20.4em cap), so the band ends where GLOBAL's does although the route's campaign headline is
 * smaller — the artwork is shaded as on GLOBAL. A CTA row with longer labels may run past the block without widening
 * it. (ES sets its H1 on three lines where two don't fit, so its band is taller than the others'.)
 *
 * Sizes: the H1 is the hero's largest text; the campaign headline (an H2) follows at 0.8 × the H1. Overlay: two lines
 * whose longer line ("in Deutschland entdecken", 11.1 em) ends left of the hero product — 36 px at 1440, 33 px at
 * 1280–1439, 2.75vw (24.5–34 px) at 900–1279, where the product's left edge moves with the viewport. Stack: 36 px on
 * tablets, (100vw − 32 px) / 11.4 on phones (28.8 px at 360, 34 px from 430), 23.5 px on the smallest phones. No new
 * colour, radius or control size; the H1 uses the hero's display face.
 */

.pp-hero.pp-hero--title {
	--pp-hero-h1-size: clamp(2.25rem, 2.5vw, 2.5rem);
	--pp-hero-h1-gap: 24px;
}
@media (min-width: 1280px) and (max-width: 1439px) { .pp-hero.pp-hero--title { --pp-hero-h1-size: 2.0625rem; } }
@media (min-width: 900px) and (max-width: 1279px) { .pp-hero.pp-hero--title { --pp-hero-h1-size: clamp(1.5rem, calc(2.75vw - 0.3px), 2.125rem); } }

/* ---------- Overlay (≥ 900 px): rows = top pad · free · H1 · copy · free · bottom pad ---------- */
.pp-hero.pp-hero--title {
	--pp-hero-pad-t: 56px;
	--pp-hero-pad-b: 88px;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: var(--pp-hero-pad-t) 1fr auto auto 1fr var(--pp-hero-pad-b);
	min-height: var(--pp-hero-h);
}
.pp-hero--title > .pp-hero-titlebar {
	grid-row: 3; grid-column: 1;
	position: relative; z-index: 4;
	width: 100%; min-width: 0;
	pointer-events: none;
}
.pp-hero--title > .pp-hero-stage { grid-row: 1 / -1; grid-column: 1; grid-template-rows: subgrid; }
.pp-hero--title .pp-hero-slide {
	grid-row: 1 / -1; grid-column: 1;
	display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid;
}
.pp-hero--title .pp-hero-slide > * { grid-column: 1; }
.pp-hero--title .pp-hero-layer { width: 100%; min-height: 0; padding-block: 0; }

/* The H1: the hero's display face, white on the band, two balanced lines left of the hero product. */
.pp-hero-h1 {
	margin: 0 0 var(--pp-hero-h1-gap);
	max-width: 11.4em;
	font: 600 var(--pp-hero-h1-size)/1.12 var(--pp-font-display);
	letter-spacing: -0.01em;
	color: #fff;
	text-wrap: balance;
	overflow-wrap: break-word;
	-webkit-hyphens: manual;
	hyphens: manual;
	pointer-events: auto;
}
/* The campaign headline: subordinate to the H1, one line where it fits. */
.pp-hero--title .pp-hero-title { font-size: calc(var(--pp-hero-h1-size) * .8); max-width: none; margin-bottom: 12px; }

@media (min-width: 900px) {
	/* The one band (see the file note): the copy block spans the title row and the copy row. */
	.pp-hero--title .pp-hero-layer { grid-row: 3 / 5; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; }
	.pp-hero--title .pp-hero-copy { grid-row: 1 / -1; justify-self: start; display: grid; grid-template-rows: subgrid; }
	.pp-hero--title .pp-hero-copy-in { grid-row: 2; }
	/* GLOBAL's block width: the campaign headline's 12ch at its GLOBAL size and the support line's cap at its size
	   (hero-campaign.css .pp-hero-title / .pp-hero-support, by tier). */
	.pp-hero--title .pp-hero-copy-in::before,
	.pp-hero--title .pp-hero-copy-in::after { content: ""; display: block; height: 0; pointer-events: none; }
	.pp-hero--title .pp-hero-copy-in::before { width: 12ch; font: 600 clamp(2.5rem, 3.75vw, 3.5rem)/1 var(--pp-font-display); letter-spacing: -0.02em; }
	.pp-hero--title .pp-hero-copy-in::after { width: var(--pp-hero-support-max); font: 400 17px/1 var(--pp-font-body); }
	/* A CTA row wider than that block (longer labels: sv, es) keeps its one line without widening the block — and so
	   the band — past GLOBAL's: it runs past the block's edge, inside the band's solid zone, and still wraps only past
	   --pp-hero-band-r, as on GLOBAL (the negative end margin takes it out of the block's intrinsic width). */
	.pp-hero--title .pp-hero-actions { width: max-content; max-width: var(--pp-hero-band-r); margin-inline-end: -100vw; }
	.pp-hero--title:has(> .pp-hero-stage[data-theme="light"]) .pp-hero-h1 { color: var(--pp-ink); }
}
@media (min-width: 900px) and (max-width: 1279px) {
	.pp-hero.pp-hero--title { --pp-hero-pad-t: 48px; --pp-hero-pad-b: 84px; }
	.pp-hero--title .pp-hero-copy-in::before { font-size: clamp(2.25rem, 3.4vw, 2.75rem); }
	.pp-hero--title .pp-hero-copy-in::after { font-size: 16px; }
}
@media (min-width: 900px) and (max-width: 1024px) {
	.pp-hero.pp-hero--title { --pp-hero-pad-t: 40px; --pp-hero-pad-b: 80px; --pp-hero-h1-gap: 20px; }
	.pp-hero--title .pp-hero-copy-in::before { font-size: 2.25rem; }
	.pp-hero--title .pp-hero-copy-in::after { font-size: 15px; }
}

/* ---------- Stack (≤ 899 px): rows = artwork band · H1 · copy ---------- */
/* The title row opens the copy area: the same Navy seam tint and the same feather up across the artwork seam that
   the layer carries in hero-campaign.css (moved from the layer to the title row, so the seam stays where it was). */
@media (max-width: 899px) {
	.pp-hero.pp-hero--title { grid-template-rows: auto auto 1fr; min-height: 0; --pp-hero-h1-size: 2.25rem; --pp-hero-h1-gap: 18px; }
	.pp-hero--title > .pp-hero-titlebar {
		grid-row: 2;
		padding-top: 20px;
		background: rgba(var(--pp-hero-navy-rgb), calc(var(--pp-hero-scrim) * .9));
	}
	.pp-hero--title > .pp-hero-titlebar::before {
		content: ""; position: absolute; bottom: 100%; left: 0; right: 0; height: 60px; pointer-events: none;
		background: linear-gradient(180deg, rgba(var(--pp-hero-navy-rgb), 0), rgba(var(--pp-hero-navy-rgb), calc(var(--pp-hero-scrim) * .9)));
	}
	.pp-hero--title .pp-hero-art { grid-row: 1; }
	.pp-hero--title .pp-hero-layer { grid-row: 3; padding-block: 0 56px; }
	.pp-hero--title .pp-hero-layer::before { display: none; }
	.pp-hero-h1 { max-width: 13em; }
	.pp-hero--title .pp-hero-title { margin-bottom: 8px; }
}
/* Phones: the H1 fills the column — its longer line (11.1 em) fits at (100vw − 32 px) / 11.4. */
@media (max-width: 640px) {
	.pp-hero.pp-hero--title { --pp-hero-h1-size: clamp(1.75rem, calc((100vw - 32px) / 11.4), 2.125rem); --pp-hero-h1-gap: 16px; }
	.pp-hero--title > .pp-hero-titlebar { padding-top: 18px; }
	.pp-hero--title .pp-hero-layer { padding-block: 0 52px; }
	.pp-hero-h1 { max-width: none; }
}
@media (max-width: 360px) {
	.pp-hero--title > .pp-hero-titlebar { padding-top: 14px; }
}
/* The smallest phones: two lines inside the first screen even under a browser's toolbars (320 × 460 measured). */
@media (max-width: 340px) {
	.pp-hero.pp-hero--title { --pp-hero-h1-size: 1.46875rem; }
	.pp-hero--title > .pp-hero-titlebar { padding-top: 8px; }
}
