/**
 * KOPFPUNK Handmade — Website
 *
 * Beitrags-Sektionen nach Vorlage uberding.net (Werte aus deren CSS gemessen).
 */

/* -------------------------------------------------------------------------
 * Schrift (lokal)
 * ---------------------------------------------------------------------- */

@font-face {
	font-family: "HK Grotesk";
	src: url("../fonts/hkgrotesk-regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "HK Grotesk";
	src: url("../fonts/hkgrotesk-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "HK Grotesk";
	src: url("../fonts/hkgrotesk-medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "HK Grotesk";
	src: url("../fonts/hkgrotesk-bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* -------------------------------------------------------------------------
 * Basis
 * ---------------------------------------------------------------------- */

:root {
	--kph-font: "HK Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
	--kph-bg: #fffcfc;
	--kph-ink: #1c1c1c;
	--kph-ink-strong: #161616;
	--kph-muted: #596f6f;
	--kph-accent: #b8d8d6;
	--kph-container: 1300px;
	--kph-gutter: 21px;
	--kph-side: 72px;
	--kph-section-space: 56px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--kph-bg);
	color: var(--kph-ink);
	font-family: var(--kph-font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: inherit;
}

:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100000;
	padding: 10px 16px;
	background: #000;
	color: #fff;
	text-decoration: none;
}

.skip-link:focus {
	left: 8px;
}

/* -------------------------------------------------------------------------
 * Header-Sektion: Logo oben, Headline + Text unten — alles im Bild
 * ---------------------------------------------------------------------- */

.kph-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: max(560px, min(92vh, 1000px));
	overflow: hidden;
	color: var(--kph-ink-strong);
}

.kph-hero.is-light {
	color: #fff;
}

.kph-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.kph-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kph-hero__brand,
.kph-hero__content {
	position: relative;
	z-index: 1;
}

.kph-hero__brand {
	display: flex;
	justify-content: flex-start;
	padding: 40px 40px 0;
}

@media (max-width: 699px) {
	.kph-hero__brand {
		padding: 20px 20px 0;
	}
}

.kph-hero__logo {
	display: block;
}

/* Größe über die Höhe — funktioniert für Hoch- und Querformat-Logos gleich */
.kph-hero__logo img {
	display: block;
	width: auto;
	height: clamp(90px, 16vh, 160px);
	max-width: 70vw;
	object-fit: contain;
}

/* Dunkles Bild hinter dem Logo: Logo weiß */
.kph-hero.has-light-logo .kph-hero__logo img {
	filter: brightness(0) invert(1);
}

.kph-hero__content {
	width: min(var(--kph-container), 100% - 2 * var(--kph-side));
	margin: 0 auto;
	padding: 40px 0 var(--kph-section-space);
	text-align: center;
}

.kph-hero__headline {
	margin: 0 auto 16px;
	max-width: 900px;
	color: inherit;
	font-size: clamp(30px, 4vw, 44px);
	font-weight: 700;
	line-height: 1.2;
}

.kph-hero__text {
	max-width: 760px;
	margin: 0 auto;
	font-size: 18px;
	line-height: 1.6;
}

.kph-hero__text p {
	margin: 0 0 1em;
}

.kph-hero__text p:last-child {
	margin-bottom: 0;
}

/* -------------------------------------------------------------------------
 * Beitrags-Sektion
 * ---------------------------------------------------------------------- */

.kph-posts {
	--kph-per-page: 3;
	padding: var(--kph-section-space) 0;
}

.kph-posts.has-bg {
	background: var(--kph-section-bg);
}

.kph-posts__inner {
	position: relative;
	width: min(var(--kph-container), 100% - 2 * var(--kph-side));
	margin: 0 auto;
}

/* Name hochkant, links neben den Bildern */
.kph-posts__label {
	position: absolute;
	top: 4px;
	right: calc(100% + 21px);
	margin: 0;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	white-space: nowrap;
	color: var(--kph-ink-strong);
	font-size: 16px;
	font-weight: 400;
	line-height: 19px;
}

/* Slider */
.kph-slider {
	position: relative;
}

.kph-slider__viewport {
	overflow: hidden;
}

.kph-slider__track {
	display: flex;
	gap: var(--kph-gutter);
	margin: 0;
	padding: 0;
	list-style: none;
	transition: transform 0.5s ease;
	touch-action: pan-y;
}

.kph-slider__slide {
	flex: 0 0 calc((100% - (var(--kph-per-page) - 1) * var(--kph-gutter)) / var(--kph-per-page));
	min-width: 0;
}

/* Pfeile: dünne Linie mit Spitze */
.kph-slider__arrow {
	position: absolute;
	top: 0;
	bottom: 46px;
	width: 35px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--kph-ink);
	cursor: pointer;
}

.kph-slider__arrow--prev {
	right: calc(100% + 10px);
}

.kph-slider__arrow--next {
	left: calc(100% + 10px);
}

.kph-slider__arrow::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 35px;
	height: 1px;
	background: currentColor;
}

.kph-slider__arrow::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 0;
	height: 0;
	margin-top: -4.5px;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
}

.kph-slider__arrow--prev::after {
	left: 0;
	border-right: 6px solid currentColor;
}

.kph-slider__arrow--next::after {
	right: 0;
	border-left: 6px solid currentColor;
}

.kph-slider__arrow[hidden] {
	display: none;
}

/* Karte */
.kph-card {
	position: relative;
}

.kph-card__frame {
	display: block;
	aspect-ratio: 420 / 504;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.05);
}

.kph-card__image {
	-webkit-user-drag: none;
	user-select: none;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.kph-card__content {
	margin-top: 21px;
}

.kph-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	margin: 0 0 14px;
	color: var(--kph-muted);
	font-size: 12px;
	font-weight: 500;
	line-height: 13.2px;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.kph-card__sep {
	display: inline-block;
	width: 56px;
	height: 1px;
	margin: 0 7px 0 6px;
	background: currentColor;
}

.kph-card__title {
	margin: 0 0 14px;
	color: var(--kph-ink-strong);
	font-size: 21px;
	font-weight: 700;
	line-height: 27.3px;
}

.kph-card__title a {
	text-decoration: none;
}

.kph-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.kph-card__title a:focus-visible {
	outline: none;
}

.kph-card:focus-within {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.kph-card__action {
	display: inline-flex;
	align-items: center;
	color: #000;
	font-size: 15.2px;
	line-height: 18.46px;
	text-decoration: none;
}

.kph-card__action::before {
	content: "";
	width: 15.2px;
	height: 1px;
	margin-right: 7.6px;
	background: currentColor;
}

/* Seitenzahlen */
.kph-slider__pages {
	display: flex;
	justify-content: center;
	gap: 21px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.kph-slider__pages button {
	margin: 0;
	padding: 0;
	border: 0;
	border-bottom: 1px solid transparent;
	background: transparent;
	color: var(--kph-ink);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 16.8px;
	cursor: pointer;
}

.kph-slider__pages button[aria-current="true"] {
	color: var(--kph-muted);
	border-bottom-color: var(--kph-muted);
}

/* Dunkler Hintergrund: Schrift automatisch hell */
.kph-posts.is-dark,
.kph-posts.is-dark .kph-posts__label,
.kph-posts.is-dark .kph-card__title,
.kph-posts.is-dark .kph-card__action,
.kph-posts.is-dark .kph-slider__arrow,
.kph-posts.is-dark .kph-slider__pages button {
	color: #fff;
}

.kph-posts.is-dark .kph-card__meta,
.kph-posts.is-dark .kph-slider__pages button[aria-current="true"] {
	color: rgba(255, 255, 255, 0.72);
	border-bottom-color: rgba(255, 255, 255, 0.72);
}

/* -------------------------------------------------------------------------
 * Beitrag / Seite (nach Vorlage uberding.net)
 * ---------------------------------------------------------------------- */

.kph-single-head {
	background: var(--kph-accent);
	padding-bottom: 110px;
}

.kph-single-head__brand {
	display: flex;
	padding: 40px 40px 0;
}

.kph-single-head__logo {
	display: block;
}

.kph-single-head__logo img {
	display: block;
	width: auto;
	height: clamp(70px, 10vh, 110px);
	max-width: 60vw;
	object-fit: contain;
}

.kph-single-head__inner {
	position: relative;
	z-index: 0;
	width: min(var(--kph-container), 100% - 2 * var(--kph-side));
	margin: 0 auto;
	padding-top: 56px;
}

/* Große Initiale hinter dem Titel */
.kph-single-head__initial {
	position: absolute;
	z-index: -1;
	left: 0;
	top: 14px;
	padding-top: 14px;
	color: var(--kph-bg);
	font-size: 306px;
	font-weight: 700;
	line-height: 202px;
	pointer-events: none;
	user-select: none;
}

.kph-single-head__cats {
	color: var(--kph-muted);
	font-size: 13px;
	font-weight: 500;
	line-height: 16px;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.kph-single-head__cats a {
	text-decoration: none;
}

.kph-single-head__cats a:hover {
	text-decoration: underline;
}

.kph-single-head__title {
	margin: 0;
	padding-top: 14px;
	color: var(--kph-ink-strong);
	font-size: 50px;
	font-weight: 700;
	line-height: 60px;
}

.kph-single-head__meta {
	margin-top: 21px;
	color: var(--kph-ink-strong);
	font-size: 16px;
	font-weight: 500;
	line-height: 19.2px;
}

.kph-single-head__author {
	font-weight: 700;
}

.kph-single-head__dot {
	margin: 0 8px;
}

/* Inhalt + Seitenleiste */
.kph-single__body {
	position: relative;
	width: min(var(--kph-container), 100% - 2 * var(--kph-side));
	margin: -54px auto 0;
	padding-bottom: var(--kph-section-space);
}

.kph-single__body.has-side {
	display: grid;
	grid-template-columns: minmax(0, 909px) 300px;
	justify-content: space-between;
	column-gap: 60px;
}

.kph-single__main {
	max-width: 909px;
	min-width: 0;
}

.kph-single__image {
	margin: 0 0 56px;
}

.kph-single__image img {
	display: block;
	width: 100%;
	height: auto;
}

.kph-single__side {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 36px;
}

.kph-single__side-label {
	position: absolute;
	top: 3px;
	right: calc(100% + 20px);
	margin: 0;
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	white-space: nowrap;
	color: var(--kph-ink-strong);
	font-size: 16px;
	font-weight: 400;
	line-height: 19px;
}

.kph-card--square .kph-card__frame {
	aspect-ratio: 1 / 1;
}

.kph-card__excerpt {
	margin: 0 0 14px;
	font-size: 16px;
	line-height: 24px;
}

/* Fließtext */
.entry-content {
	font-size: 18px;
	line-height: 27px;
	color: var(--kph-ink);
}

.entry-content > * {
	margin-top: 0;
	margin-bottom: 42px;
}

.entry-content > p:first-child {
	font-size: 24px;
	font-weight: 700;
	line-height: 36px;
	letter-spacing: -0.24px;
}

.entry-content h2 {
	margin-bottom: 35px;
	color: var(--kph-ink-strong);
	font-size: 26px;
	font-weight: 700;
	line-height: 31.2px;
}

.entry-content h3,
.entry-content h4 {
	margin-bottom: 21px;
	color: var(--kph-ink-strong);
	font-size: 21px;
	font-weight: 700;
	line-height: 27.3px;
}

.entry-content a {
	background: var(--kph-accent);
	color: var(--kph-ink-strong);
	font-weight: 700;
	text-decoration: none;
}

.entry-content a:hover,
.entry-content a:focus-visible {
	background: var(--kph-ink-strong);
	color: #fff;
}

.entry-content a:has(> img) {
	background: none;
}

.entry-content ul,
.entry-content ol {
	padding-left: 24px;
}

.entry-content li {
	margin-bottom: 8px;
}

.entry-content blockquote {
	margin-left: 0;
	margin-right: 0;
	padding-left: 24px;
	border-left: 3px solid var(--kph-accent);
	font-size: 21px;
	line-height: 31.5px;
}

.entry-content hr {
	border: 0;
	border-top: 1px solid rgba(0, 0, 0, 0.15);
	margin: 56px 0;
}

.entry-content img {
	display: block;
	max-width: 100%;
	height: auto;
}

.entry-content figure,
.entry-content .wp-caption {
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

.entry-content figcaption,
.entry-content .wp-caption-text {
	margin: 10px 0 0;
	color: var(--kph-muted);
	font-size: 14px;
	line-height: 21px;
}

.entry-content iframe,
.entry-content video {
	max-width: 100%;
}

.entry-content .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.entry-content .alignleft {
	float: left;
	margin: 0 24px 24px 0;
}

.entry-content .alignright {
	float: right;
	margin: 0 0 24px 24px;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

/* -------------------------------------------------------------------------
 * Footer
 * ---------------------------------------------------------------------- */

.site-footer {
	width: min(var(--kph-container), 100% - 2 * var(--kph-side));
	margin: 0 auto;
	padding: var(--kph-section-space) 0 24px;
	font-size: 14px;
}

.site-info {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 8px 24px;
}

.site-info__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.site-info__legal a {
	text-decoration: none;
}

.site-info__legal a:hover,
.site-info__legal a:focus-visible {
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
 * Responsive
 * ---------------------------------------------------------------------- */

@media (max-width: 1099px) {
	.kph-posts {
		--kph-per-page: 2;
	}

	.kph-single__body.has-side {
		display: block;
	}

	.kph-single__side {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 21px;
		margin-top: 56px;
	}

	.kph-single__side-label {
		position: static;
		grid-column: 1 / -1;
		writing-mode: horizontal-tb;
		transform: none;
	}
}

@media (max-width: 699px) {
	:root {
		--kph-side: 20px;
		--kph-section-space: 40px;
	}

	.kph-posts {
		--kph-per-page: 1;
	}

	/* Name über den Beiträgen statt hochkant */
	.kph-posts__label {
		position: static;
		margin: 0 0 16px;
		writing-mode: horizontal-tb;
		transform: none;
	}

	.kph-slider__arrow {
		display: none;
	}

	.kph-slider__pages {
		flex-wrap: wrap;
		gap: 10px 16px;
	}

	.kph-single-head__brand {
		padding: 20px 20px 0;
	}

	.kph-single-head__inner {
		padding-top: 32px;
	}

	.kph-single-head__initial {
		font-size: 180px;
		line-height: 120px;
	}

	.kph-single-head__title {
		font-size: 32px;
		line-height: 38px;
	}

	.kph-single-head {
		padding-bottom: 80px;
	}

	.kph-single__body {
		margin-top: -40px;
	}

	.kph-single__image {
		margin-bottom: 32px;
	}

	.kph-single__side {
		grid-template-columns: 1fr;
		gap: 36px;
	}

	.entry-content > p:first-child {
		font-size: 20px;
		line-height: 30px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kph-slider__track {
		transition: none;
	}
}
