/* ==========================================================
   PetrolPress
   02 – Typography
   Zentrale typografische Regeln für das gesamte Theme
========================================================== */


/* ==========================================================
   BASE
========================================================== */

html {
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-family-body);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-regular);
	line-height: var(--line-height-normal);
	color: var(--color-text);
	background-color: var(--color-background);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
select,
textarea {
	font-family: var(--font-family-body);
}

::selection {
	color: var(--color-primary-deep);
	background: var(--color-accent-light);
}


/* ==========================================================
   HEADINGS
========================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin-top: 0;
	margin-bottom: var(--space-4);
	font-family: var(--font-family-heading);
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-tight);
	letter-spacing: var(--letter-spacing-tight);
	color: var(--color-heading);
	text-wrap: balance;
}

h1 {
	font-size: clamp(2.75rem, 6vw, var(--font-size-5xl));
}

h2 {
	font-size: clamp(2.15rem, 4vw, var(--font-size-4xl));
}

h3 {
	font-size: clamp(1.75rem, 3vw, var(--font-size-3xl));
}

h4 {
	font-size: clamp(1.4rem, 2.3vw, var(--font-size-2xl));
}

h5 {
	font-size: clamp(1.15rem, 1.8vw, var(--font-size-xl));
}

h6 {
	font-size: var(--font-size-lg);
	letter-spacing: -0.01em;
}


/* ==========================================================
   PARAGRAPHS
========================================================== */

p {
	margin-top: 0;
	margin-bottom: var(--space-5);
}

p:last-child {
	margin-bottom: 0;
}

.lead,
.has-lead-font-size {
	font-size: clamp(1.125rem, 2vw, 1.375rem);
	line-height: var(--line-height-relaxed);
	color: var(--color-text);
}

.text-large {
	font-size: var(--font-size-lg);
	line-height: var(--line-height-relaxed);
}

.text-small {
	font-size: var(--font-size-sm);
}

.text-xs {
	font-size: var(--font-size-xs);
}

.text-muted {
	color: var(--color-text-muted);
}

.text-light {
	color: var(--color-text-light);
}


/* ==========================================================
   LINKS
========================================================== */

a {
	color: var(--color-primary);
	text-decoration: none;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
	transition:
		color var(--transition-fast),
		text-decoration-color var(--transition-fast);
}

a:hover {
	color: var(--color-primary-dark);
	text-decoration-color: currentColor;
}

a:focus-visible {
	outline: var(--focus-outline);
	outline-offset: 3px;
	border-radius: var(--radius-xs);
}

.entry-content a:not(.btn),
.comment-content a:not(.btn),
.widget_text a:not(.btn) {
	text-decoration: underline;
	text-decoration-color: rgba(11, 122, 120, 0.35);
}

.entry-content a:not(.btn):hover,
.comment-content a:not(.btn):hover,
.widget_text a:not(.btn):hover {
	text-decoration-color: currentColor;
}


/* ==========================================================
   EYEBROWS, LABELS & META
========================================================== */

.eyebrow,
.section-eyebrow,
.meta-label,
.kicker {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	margin-bottom: var(--space-3);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-bold);
	line-height: 1.2;
	letter-spacing: var(--letter-spacing-uppercase);
	text-transform: uppercase;
	color: var(--color-primary);
}

.eyebrow::before,
.section-eyebrow::before {
	content: "";
	width: 1.75rem;
	height: 1px;
	background: currentColor;
	opacity: 0.55;
}

.entry-meta,
.post-meta,
.card-meta {
	font-size: var(--font-size-sm);
	line-height: var(--line-height-snug);
	color: var(--color-text-muted);
}

.entry-meta a,
.post-meta a,
.card-meta a {
	color: inherit;
}

.entry-meta a:hover,
.post-meta a:hover,
.card-meta a:hover {
	color: var(--color-primary);
}


/* ==========================================================
   HANDWRITTEN ACCENTS
========================================================== */

.handwritten,
.script-text {
	font-family: var(--font-family-handwritten);
	font-size: 1.35em;
	font-weight: var(--font-weight-medium);
	line-height: 1;
	letter-spacing: 0;
	color: var(--color-primary);
}

.handwritten-accent {
	position: relative;
	display: inline-block;
	font-family: var(--font-family-handwritten);
	color: var(--color-accent-dark);
}

.handwritten-accent::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -0.15em;
	height: 0.35em;
	background: var(--watercolor-gold);
	border-radius: var(--radius-pill);
	transform: rotate(-1.5deg);
	z-index: var(--z-background);
}


/* ==========================================================
   LISTS
========================================================== */

ul,
ol {
	margin-top: 0;
	margin-bottom: var(--space-5);
	padding-left: 1.35rem;
}

li {
	margin-bottom: var(--space-2);
}

li:last-child {
	margin-bottom: 0;
}

.entry-content ul:not([class]),
.entry-content ol:not([class]) {
	padding-left: 1.5rem;
}

.entry-content ul:not([class]) li::marker {
	color: var(--color-primary);
}

.entry-content ol:not([class]) li::marker {
	font-weight: var(--font-weight-bold);
	color: var(--color-primary);
}


/* ==========================================================
   BLOCKQUOTES
========================================================== */

blockquote {
	position: relative;
	margin: var(--space-8) 0;
	padding: var(--space-6) var(--space-8);
	font-family: var(--font-family-heading);
	font-size: clamp(1.25rem, 2.4vw, 1.75rem);
	font-style: italic;
	line-height: var(--line-height-snug);
	color: var(--color-heading);
	background: var(--color-background-soft);
	border-left: 4px solid var(--color-accent);
	border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
	box-shadow: var(--shadow-xs);
}

blockquote p {
	margin-bottom: var(--space-3);
}

blockquote cite {
	display: block;
	margin-top: var(--space-4);
	font-family: var(--font-family-body);
	font-size: var(--font-size-sm);
	font-style: normal;
	font-weight: var(--font-weight-semibold);
	letter-spacing: var(--letter-spacing-wide);
	text-transform: uppercase;
	color: var(--color-text-muted);
}


/* ==========================================================
   STRONG, EMPHASIS & SMALL TEXT
========================================================== */

strong,
b {
	font-weight: var(--font-weight-bold);
	color: var(--color-heading);
}

em,
i {
	font-style: italic;
}

small {
	font-size: var(--font-size-sm);
	color: var(--color-text-muted);
}

mark {
	padding: 0 0.2em;
	color: var(--color-heading);
	background: var(--color-accent-light);
	border-radius: var(--radius-xs);
}


/* ==========================================================
   CODE, PRE & KEYBOARD
========================================================== */

code,
kbd,
samp {
	font-family:
		"SFMono-Regular",
		Consolas,
		"Liberation Mono",
		monospace;
	font-size: 0.92em;
}

code {
	padding: 0.16em 0.38em;
	color: var(--color-primary-dark);
	background: var(--color-primary-soft);
	border-radius: var(--radius-xs);
}

pre {
	overflow-x: auto;
	margin: var(--space-6) 0;
	padding: var(--space-6);
	font-family:
		"SFMono-Regular",
		Consolas,
		"Liberation Mono",
		monospace;
	font-size: var(--font-size-sm);
	line-height: 1.7;
	color: #e8f5f4;
	background: var(--color-primary-deep);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

pre code {
	padding: 0;
	color: inherit;
	background: transparent;
}

kbd {
	padding: 0.2em 0.45em;
	color: var(--color-white);
	background: var(--color-primary-deep);
	border-radius: var(--radius-xs);
	box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.14);
}


/* ==========================================================
   HORIZONTAL RULE
========================================================== */

hr {
	height: 1px;
	margin: var(--space-10) 0;
	background: var(--color-border);
	border: 0;
}


/* ==========================================================
   WORDPRESS CONTENT HELPERS
========================================================== */

.entry-title,
.page-title,
.archive-title {
	color: var(--color-heading);
}

.entry-title a {
	color: inherit;
}

.entry-title a:hover {
	color: var(--color-primary);
}

.entry-content,
.page-content,
.comment-content {
	font-size: var(--font-size-base);
	line-height: var(--line-height-relaxed);
}

.entry-content > * + *,
.page-content > * + * {
	margin-top: var(--space-5);
}

.entry-content h2,
.entry-content h3,
.entry-content h4,
.page-content h2,
.page-content h3,
.page-content h4 {
	margin-top: var(--space-10);
	margin-bottom: var(--space-4);
}

.entry-content h2:first-child,
.entry-content h3:first-child,
.entry-content h4:first-child {
	margin-top: 0;
}

.wp-block-heading {
	scroll-margin-top: calc(var(--header-height) + var(--space-6));
}

.wp-block-pullquote {
	padding: var(--space-8);
	border-top: 1px solid var(--color-border);
	border-bottom: 1px solid var(--color-border);
}

.wp-block-pullquote blockquote {
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.wp-block-quote.is-style-large {
	padding: var(--space-8);
}


/* ==========================================================
   ALIGNMENT & TEXT UTILITIES
========================================================== */

.text-left {
	text-align: left;
}

.text-center {
	text-align: center;
}

.text-right {
	text-align: right;
}

.text-uppercase {
	letter-spacing: var(--letter-spacing-uppercase);
	text-transform: uppercase;
}

.text-balance {
	text-wrap: balance;
}

.text-pretty {
	text-wrap: pretty;
}

.nowrap {
	white-space: nowrap;
}


/* ==========================================================
   RESPONSIVE TYPOGRAPHY
========================================================== */

@media (max-width: 782px) {

	body {
		font-size: 0.975rem;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		letter-spacing: -0.025em;
	}

	.entry-content,
	.page-content,
	.comment-content {
		line-height: 1.72;
	}

	blockquote {
		padding: var(--space-5) var(--space-6);
	}
}

@media (max-width: 480px) {

	body {
		font-size: 0.95rem;
	}

	h1 {
		font-size: clamp(2.25rem, 12vw, 3.25rem);
	}

	h2 {
		font-size: clamp(1.9rem, 10vw, 2.65rem);
	}

	h3 {
		font-size: clamp(1.55rem, 8vw, 2.15rem);
	}

	.lead,
	.has-lead-font-size {
		font-size: 1.075rem;
	}

	blockquote {
		margin: var(--space-6) 0;
		padding: var(--space-5);
		font-size: 1.2rem;
	}
}


/* ==========================================================
   ACCESSIBILITY
========================================================== */

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed;
	top: var(--space-4);
	left: var(--space-4);
	z-index: var(--z-toast);
	width: auto;
	height: auto;
	padding: var(--space-3) var(--space-4);
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-bold);
	color: var(--color-white);
	background: var(--color-primary-deep);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-lg);
}
