/**
 * H&H Geschichte – front end. Mobile first.
 * The timeline runs along a road marking: a dashed centre line.
 */

.hhmr-history,
.hhmr-history-teaser {
	--hhmr-gs-orange: var(--hhmr-color-orange, #e35205);
	--hhmr-gs-orange-hi: var(--hhmr-color-orange-hi, #ff6a1a);
	--hhmr-gs-orange-ink: var(--hhmr-color-orange-ink, #b23d00);
	--hhmr-gs-black: var(--hhmr-color-black, #000);
	--hhmr-gs-engine: var(--hhmr-color-engine, #1a1817);
	--hhmr-gs-text: var(--hhmr-color-text, #161616);
	--hhmr-gs-muted: var(--hhmr-color-muted, #55585c);
	--hhmr-gs-line: var(--hhmr-color-line, #d5d7da);
	--hhmr-gs-chrome: var(--hhmr-color-chrome-light, #c2c4c7);
	--hhmr-gs-display: var(--hhmr-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
	--hhmr-gs-body: var(--hhmr-font-body, "Barlow", system-ui, sans-serif);
	font-family: var(--hhmr-gs-body);
}

/* Intro ---------------------------------------------------------------- */

.hhmr-history__intro {
	max-width: 46rem;
	margin: 0 0 48px;
}

.hhmr-history__intro-title {
	margin: 0;
	font-family: var(--hhmr-gs-display);
	font-size: clamp(2rem, 7vw, 3.25rem);
	font-weight: 800;
	line-height: 0.95;
	text-transform: uppercase;
}

.hhmr-history__intro-text {
	margin-top: 20px;
	font-size: 1.125rem;
	line-height: 1.65;
}

/* Timeline -------------------------------------------------------------- */

.hhmr-history__timeline {
	position: relative;
	margin: 0;
	padding: 0 0 0 36px;
	list-style: none;
}

.hhmr-history__timeline::before {
	content: "";
	position: absolute;
	top: 6px;
	bottom: 0;
	left: 9px;
	width: 3px;
	background: repeating-linear-gradient(180deg, var(--hhmr-gs-line) 0 18px, transparent 18px 34px);
}

.hhmr-history__chapter {
	position: relative;
	display: grid;
	gap: 20px;
	margin: 0 0 56px;
}

.hhmr-history__chapter:last-child {
	margin-bottom: 0;
}

.hhmr-history__marker {
	position: absolute;
	top: 10px;
	left: -36px;
	width: 21px;
	height: 21px;
	background: var(--hhmr-gs-black);
	border: 4px solid var(--hhmr-gs-orange);
	border-radius: 50%;
}

.hhmr-history__year {
	margin: 0 0 6px;
	font-family: var(--hhmr-gs-display);
	font-size: clamp(2.5rem, 12vw, 4rem);
	font-weight: 800;
	line-height: 0.9;
	color: var(--hhmr-gs-orange-ink);
	font-variant-numeric: lining-nums;
}

.hhmr-history__title {
	margin: 0;
	font-family: var(--hhmr-gs-display);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.05;
	text-transform: uppercase;
	color: var(--hhmr-gs-text);
}

.hhmr-history__text {
	margin-top: 12px;
	color: var(--hhmr-gs-text);
	font-size: 1.0625rem;
	line-height: 1.7;
}

.hhmr-history__text > :first-child {
	margin-top: 0;
}

.hhmr-history__text > :last-child {
	margin-bottom: 0;
}

.hhmr-history__media img {
	display: block;
	width: 100%;
	height: auto;
}

@media (min-width: 1024px) {
	.hhmr-history__timeline {
		padding-left: 0;
	}

	.hhmr-history__timeline::before {
		left: 50%;
		margin-left: -1.5px;
	}

	.hhmr-history__chapter {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 0 96px;
		align-items: center;
		margin-bottom: 96px;
	}

	.hhmr-history__marker {
		top: 50%;
		left: 50%;
		margin: -10px 0 0 -10px;
	}

	.hhmr-history__body {
		grid-column: 1;
		text-align: right;
	}

	.hhmr-history__media {
		grid-column: 2;
		grid-row: 1;
	}

	.hhmr-history__chapter:nth-child(even) .hhmr-history__body {
		grid-column: 2;
		text-align: left;
	}

	.hhmr-history__chapter:nth-child(even) .hhmr-history__media {
		grid-column: 1;
	}

	.hhmr-history__chapter:not(.has-image) .hhmr-history__body {
		grid-column: 1;
	}

	.hhmr-history__chapter:not(.has-image):nth-child(even) .hhmr-history__body {
		grid-column: 2;
	}
}

/* Teaser ---------------------------------------------------------------- */

.hhmr-history-teaser {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	background: #fff;
	color: var(--hhmr-gs-text);
}

.hhmr-history-teaser--dark {
	background: var(--hhmr-gs-engine);
	border-image: linear-gradient(var(--hhmr-gs-engine) 0 0) fill 0 / / 0 100vw;
	color: #fff;
}

.hhmr-history-teaser__media {
	margin: 0;
}

/* The teaser image is always shown completely, never cropped. */
.hhmr-history-teaser__media img {
	display: block;
	width: 100%;
	height: auto;
}

.hhmr-history-teaser__body {
	padding: 36px 24px 44px;
}

.hhmr-history-teaser__kicker {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	font-weight: 600;
	color: var(--hhmr-gs-orange-ink);
}

.hhmr-history-teaser--dark .hhmr-history-teaser__kicker {
	color: var(--hhmr-gs-orange-hi);
}

.hhmr-history-teaser__kicker::before {
	content: "";
	flex: 0 0 28px;
	height: 3px;
	background: currentColor;
}

.hhmr-history-teaser__title {
	margin: 0;
	font-family: var(--hhmr-gs-display);
	font-size: clamp(2rem, 8vw, 3.25rem);
	font-weight: 800;
	line-height: 0.95;
	text-transform: uppercase;
	color: inherit;
}

.hhmr-history-teaser__text {
	max-width: 36rem;
	margin-top: 18px;
	font-size: 1.0625rem;
	line-height: 1.7;
}

.hhmr-history-teaser--dark .hhmr-history-teaser__text {
	color: var(--hhmr-gs-chrome);
}

.hhmr-history-teaser__btn {
	display: inline-flex;
	align-items: center;
	min-height: 52px;
	margin-top: 28px;
	padding: 0 26px;
	background: var(--hhmr-gs-orange);
	border-radius: 2px;
	color: var(--hhmr-gs-black);
	font-family: var(--hhmr-gs-display);
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.hhmr-history-teaser__btn:hover,
.hhmr-history-teaser__btn:focus-visible {
	background: var(--hhmr-gs-black);
	color: #fff;
}

.hhmr-history-teaser--dark .hhmr-history-teaser__btn:hover,
.hhmr-history-teaser--dark .hhmr-history-teaser__btn:focus-visible {
	background: #fff;
	color: var(--hhmr-gs-black);
}

.hhmr-history-teaser__btn:focus-visible {
	outline: 3px solid var(--hhmr-gs-orange);
	outline-offset: 3px;
}

@media (min-width: 900px) {
	.hhmr-history-teaser.has-image {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: center;
	}

	.hhmr-history-teaser--image-right .hhmr-history-teaser__media {
		order: 2;
	}

	.hhmr-history-teaser__body {
		align-self: center;
		padding: 64px clamp(32px, 5vw, 80px);
	}
}
