/**
 * GM Theme – refined typography (4.0.0).
 *
 * Only type: sizes, weights, line heights, letter spacing and rendering.
 * Colours, spacing and layout of the original design stay unchanged.
 * Same values as extras/typografie-originalseite.css; the blog and post
 * templates (blog.css, post.css) set their own, matching sizes.
 *
 * Loaded after frontend.css and the global styles, before blog/post/custom CSS.
 */

/* 1. Rendering, body text --------------------------------------------- */

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

:root {
	/* Body text 15–16 px instead of 14–16 px: easier to read on phones. */
	--wp--preset--font-size--medium: clamp(0.9375rem, 0.91rem + 0.12vw, 1rem);
}

body {
	font-feature-settings: "cv11", "ss01";
	letter-spacing: -0.006em;
	line-height: 1.65;
}

:root :where(h1, h2, h3, h4, h5, h6) {
	text-wrap: balance;
}

:root :where(p) {
	text-wrap: pretty;
}

:root :where(strong, b) {
	font-weight: 600;
}

/* 2. Headings: smaller, medium weight --------------------------------- */

:root h1 {
	font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.018em;
}

:root h2 {
	font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.015em;
}

:root h3 {
	font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.012em;
}

:root h4 {
	font-size: 1.1875rem;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: -0.01em;
}

:root h5 {
	font-size: 1.0625rem;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -0.008em;
}

:root h6 {
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -0.006em;
}

/* 3. Headings in page content: one scale instead of many inline sizes -- */

.wp-block-post-content h1.wp-block-heading {
	font-size: clamp(1.875rem, 1.5rem + 1.5vw, 2.5rem) !important;
	font-weight: 500 !important;
	line-height: 1.15 !important;
	letter-spacing: -0.018em !important;
}

.wp-block-post-content h2.wp-block-heading {
	font-size: clamp(1.625rem, 1.35rem + 1vw, 2.125rem) !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	letter-spacing: -0.015em !important;
}

.wp-block-post-content h3.wp-block-heading {
	font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem) !important;
	font-weight: 500 !important;
	line-height: 1.25 !important;
	letter-spacing: -0.012em !important;
}

.wp-block-post-content :is(h4, h5, h6).wp-block-heading {
	font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem) !important;
	font-weight: 500 !important;
	line-height: 1.35 !important;
	letter-spacing: -0.01em !important;
}

/* Page titles on large photos ("Über mich", "Know-how"). */
.wp-block-post-content > .wp-block-cover:first-child:has(> img.wp-block-cover__image-background) :is(h1, h2) {
	font-size: clamp(2rem, 1.5rem + 2vw, 3rem) !important;
	font-weight: 500 !important;
	line-height: 1.1 !important;
	letter-spacing: -0.02em !important;
}

/* Blog posts set their own reading line height (post.css). */
.wp-block-post-content:not(.gm-post__content) p {
	line-height: 1.7;
}

/* 4. Post cards outside the blog templates (e.g. "Neueste Beiträge" on
      the home page); the blog / related grids are styled in their CSS. */

.wp-block-post-template:not(.gm-news__grid):not(.gm-related__grid) .wp-block-post-title {
	font-size: 1.0625rem !important;
	font-weight: 500 !important;
	line-height: 1.35;
	letter-spacing: -0.008em !important;
}

.wp-block-post-template:not(.gm-news__grid):not(.gm-related__grid) .wp-block-post-excerpt {
	line-height: 1.6;
}

.wp-block-post-template:not(.gm-news__grid):not(.gm-related__grid) :is(.wp-block-post-date, .wp-block-post-terms) {
	font-size: 0.8125rem !important;
	letter-spacing: 0;
}

/* 5. Header menu: quieter (desktop bar only, not the mobile overlay) ---- */

@media (min-width: 600px) {

	header .wp-block-navigation {
		font-size: 0.9375rem !important;
		font-weight: 400;
		letter-spacing: 0.01em;
	}

	header .wp-block-navigation .wp-block-navigation__submenu-container {
		font-size: 0.875rem;
	}
}

/* 6. Captions and buttons ---------------------------------------------- */

.wp-element-caption,
figcaption {
	font-size: 0.8125rem;
	line-height: 1.45;
}

/* Image cards (Galerien, Know-how, Angebote). */
.eb-advanced-image-wrapper figcaption.eb-image-caption-wrap {
	font-size: 1rem !important;
	font-weight: 500 !important;
	letter-spacing: -0.006em;
	line-height: 1.35;
}

.wp-element-button,
.wp-block-button__link,
.fluentform .ff-btn-submit {
	font-size: 0.9375rem !important;
	font-weight: 500 !important;
	letter-spacing: 0;
}
