/*
 * 5.2 Hero und 5.3 Belegleiste (Laufband).
 * Werte „Handy · Desktop“ aus DESIGN.md.
 */

/* ---------- Hero ---------- */

.hk-hero {
	padding: 16px 16px 24px;
}

.hk-hero-raster {
	display: flex;
	flex-direction: column;
}

/* Handy und Fallback: Foto zuerst. */
.hk-hero-foto {
	position: relative;
	order: -1;
	margin-bottom: 22px; /* 12 px plus 10 px */
}

.hk-hero-bild {
	margin: 0;
}

.hk-hero-bild img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--karte);
	background-color: var(--wp--preset--color--creme);
}

/* Suchleiste auf dem Foto: echter Text, eine Zeile, abgeschnitten. */
.hk-suchleiste {
	position: absolute;
	right: 8px;
	bottom: 7%;
	left: 8px;
	box-sizing: border-box;
	overflow: hidden;
	padding: 12px 44px 12px 16px;
	border-radius: var(--wp--custom--radius--pille);
	background-color: var(--wp--preset--color--white);
	box-shadow: var(--wp--custom--schatten--suche);
	color: var(--wp--preset--color--ink);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.hk-suchleiste::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 20px;
	height: 20px;
	transform: translateY(-50%);
	background-color: currentColor;
	-webkit-mask: url("../icons/icon_lupe.svg") center / contain no-repeat;
	mask: url("../icons/icon_lupe.svg") center / contain no-repeat;
}

/* Mauszeiger über der Suchleiste (weiß mit schwarzer Kontur, aus der Datei). */
.hk-hero-foto::after {
	content: "";
	position: absolute;
	bottom: calc(7% + 36px);
	left: 68%;
	width: 24px;
	height: 30px;
	background: url("../icons/icon_mauszeiger.svg") center / contain no-repeat;
	pointer-events: none;
}

/* Headline mit Stickern. Die pinke Kopie liefert inc/interaktion.php. */
.hk-sticker {
	position: relative;
	isolation: isolate;
	margin-bottom: 10px;
	font-size: clamp(30px, 9.6vw, 36px);
	line-height: 1.3;
}

.hk-sticker mark {
	margin-inline: 0.08em;
	padding: 0;
	background: none !important;
	color: var(--wp--preset--color--white) !important;
}

.hk-sticker-kopie {
	position: absolute;
	inset: 0;
	z-index: -1;
	color: transparent;
	pointer-events: none;
}

.hk-sticker-kopie mark {
	color: var(--wp--preset--color--pink) !important;
	-webkit-text-stroke: 0.26em var(--wp--preset--color--pink);
	paint-order: stroke fill;
}

.hk-hero-unterzeile {
	margin-bottom: 18px;
	font-size: 17px;
	line-height: 1.6;
}

/* Zwei Buttons nebeneinander, je halbe Breite. */
.hk-hero-buttons {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin: 0;
}

.hk-hero-buttons .wp-block-button {
	flex: 1 1 0;
	min-width: 0;
}

.hk-hero-buttons .wp-block-button__link.wp-element-button {
	width: 100%;
	min-height: 46px;
	padding: 0 12px;
	font-size: 14px;
}

.hk-hero-hinweis {
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.5;
}

/* Highlights: drei Kreise als Sprunglinks. */
.hk-hero-highlights {
	display: flex;
	justify-content: space-around;
	margin-top: 24px;
}

.hk-highlight a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: var(--wp--preset--color--ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	transition: transform var(--wp--custom--dauer--lift) ease-out;
}

.hk-highlight a:hover {
	color: var(--wp--preset--color--ink);
	transform: translateY(-2px);
}

/* Kreis: Ring 2 px cobalt, 3 px Luft, Füllung creme, Icon 32 px. */
.hk-highlight a::before {
	content: "";
	box-sizing: border-box;
	width: 70px;
	height: 70px;
	border-radius: 50%;
	background: var(--wp--preset--color--creme) var(--hk-bild) center / 32px no-repeat;
	box-shadow:
		inset 0 0 0 2px var(--wp--preset--color--cobalt),
		inset 0 0 0 5px var(--wp--preset--color--paper);
}

.hk-highlight-film {
	--hk-bild: url("../icon_filmklappe_cobalt.svg");
}

.hk-highlight-stapel {
	--hk-bild: url("../icon_ebenen-stapel_cobalt.svg");
}

/* „über mich“: Avatar füllt den Kreis. */
.hk-highlight-avatar a::before {
	background: var(--wp--preset--color--creme) url("../16.svg") center / calc(100% - 10px) no-repeat;
}

/* ---------- Belegleiste (Laufband) ---------- */

.hk-laufband {
	position: relative;
	padding: 14px 0;
}

.hk-laufband-spur {
	overflow: hidden;
	padding: 4px 0;
}

.hk-laufband-spur:focus-visible {
	outline: 3px solid var(--wp--preset--color--white);
	outline-offset: -3px;
}

.hk-laufband-zug {
	display: flex;
	width: max-content;
}

.hk-laufband .hk-pillen {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	margin: 0;
	padding-right: 8px;
}

.hk-pille .wp-block-button__link.wp-element-button {
	min-height: 44px;
	padding: 9px 16px;
	border: 1.5px solid var(--wp--preset--color--white);
	background-color: transparent;
	color: var(--wp--preset--color--white);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
	transition:
		background-color var(--wp--custom--dauer--lift) ease-out,
		color var(--wp--custom--dauer--lift) ease-out;
}

.hk-pille .wp-block-button__link.wp-element-button:is(:hover, :focus-visible) {
	transform: none;
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--cobalt);
}

.hk-pille .wp-block-button__link.wp-element-button:focus-visible {
	outline-offset: -6px;
	outline-color: var(--wp--preset--color--cobalt);
}

/* Bewegung nur mit JavaScript (ohne JS steht das Band), 38 s, endlos. */
.hk-js .hk-laufband-zug {
	animation: hk-laufband var(--wp--custom--dauer--laufband) linear infinite;
}

@keyframes hk-laufband {
	from {
		transform: translateX(0);
	}

	to {
		transform: translateX(-50%);
	}
}

/* Hält an bei Hover, Fokus und Pause. */
.hk-laufband:is(:hover, :focus-within) .hk-laufband-zug,
.hk-laufband.is-pausiert .hk-laufband-zug {
	animation-play-state: paused;
}

/* Pause-Knopf rechts über dem Band, Pillen laufen weich darunter aus. */
.hk-laufband-knopf {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: stretch;
	margin: 0;
}

.hk-laufband-knopf .wp-block-button {
	display: flex;
}

.hk-laufband-knopf .wp-block-button__link.wp-element-button {
	min-width: 44px;
	min-height: 44px;
	height: 100%;
	padding: 0 12px 0 18px;
	border-radius: 0;
	background: linear-gradient(to right, rgba(29, 86, 207, 0), var(--wp--preset--color--cobalt) 14px);
	color: var(--wp--preset--color--white);
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
}

.hk-laufband-knopf .wp-block-button__link.wp-element-button:hover {
	transform: none;
}

.hk-laufband-knopf .wp-block-button__link.wp-element-button:focus-visible {
	outline-color: var(--wp--preset--color--white);
	outline-offset: -4px;
}

/* Ohne JavaScript und bei reduzierter Bewegung: Band steht und lässt sich wischen. */
html:not(.hk-js) .hk-laufband-spur {
	overflow-x: auto;
	padding-left: 16px;
}

html:not(.hk-js) .hk-laufband :is(.hk-pillen.hk-pillen-kopie, .hk-laufband-knopf) {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.hk-laufband-spur {
		overflow-x: auto;
		padding-left: 16px;
	}

	.hk-laufband :is(.hk-pillen.hk-pillen-kopie, .hk-laufband-knopf) {
		display: none;
	}

	.hk-highlight a:hover {
		transform: none;
	}
}

/* ---------- Desktop ab 700 px ---------- */

@media (min-width: 700px) {
	.hk-hero {
		padding: 64px max(24px, calc((100% - 1152px) / 2)) 80px;
	}

	.hk-hero-foto {
		margin-bottom: 32px;
	}

	.hk-suchleiste {
		right: 14px;
		left: 14px;
		padding: 14px 52px 14px 20px;
		font-size: 16px;
	}

	.hk-suchleiste::after {
		right: 20px;
		width: 22px;
		height: 22px;
	}

	.hk-hero-foto::after {
		bottom: calc(7% + 42px);
		width: 26px;
		height: 32px;
	}

	.hk-sticker {
		margin-bottom: 16px;
		font-size: clamp(40px, 4.6vw, 60px);
	}

	.hk-hero-unterzeile {
		margin-bottom: 28px;
		font-size: 21px;
	}

	.hk-hero-buttons {
		flex-wrap: wrap;
		gap: 12px;
	}

	.hk-hero-buttons .wp-block-button {
		flex: none;
	}

	.hk-hero-buttons .wp-block-button__link.wp-element-button {
		width: auto;
		min-height: 50px;
		padding: 0 30px;
		font-size: 16px;
	}

	.hk-hero-hinweis {
		margin-top: 14px;
		font-size: 15px;
	}

	.hk-hero-highlights {
		justify-content: flex-start;
		gap: 32px;
		margin-top: 40px;
	}

	.hk-highlight a {
		gap: 8px;
		font-size: 14px;
	}

	.hk-highlight a::before {
		width: 82px;
		height: 82px;
		background-size: 36px;
		box-shadow:
			inset 0 0 0 2px var(--wp--preset--color--cobalt),
			inset 0 0 0 6px var(--wp--preset--color--paper);
	}

	.hk-highlight-avatar a::before {
		background-size: calc(100% - 12px);
	}

	.hk-laufband {
		padding: 18px 0;
	}

	.hk-laufband .hk-pillen {
		gap: 10px;
		padding-right: 10px;
	}

	.hk-pille .wp-block-button__link.wp-element-button {
		padding: 10px 18px;
		font-size: 15px;
	}

	.hk-laufband-knopf .wp-block-button__link.wp-element-button {
		padding: 0 20px 0 28px;
		background: linear-gradient(to right, rgba(29, 86, 207, 0), var(--wp--preset--color--cobalt) 18px);
		font-size: 14px;
	}

	html:not(.hk-js) .hk-laufband-spur {
		padding-left: 24px;
	}
}

@media (min-width: 700px) and (prefers-reduced-motion: reduce) {
	.hk-laufband-spur {
		padding-left: 24px;
	}
}

/* Zweispaltig erst ab 861 px: Text links, Foto rechts. */
@media (min-width: 861px) {
	.hk-hero-raster {
		display: grid;
		grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
		gap: 64px;
		align-items: center;
	}

	.hk-hero-foto {
		order: 0;
		justify-self: end;
		width: 100%;
		max-width: 460px;
		margin-bottom: 0;
	}
}
