/*
Theme Name: Sonamea
Theme URI: https://sonamea.de
Author: Sonamea
Author URI: https://sonamea.de
Description: Custom one-page WordPress theme for Bettina Müller — professional German voice artist. Lean, GDPR-compliant, self-hosted assets, native HTML5 audio player. No third-party services, no external requests.
Version: 0.2.0
Requires at least: 6.3
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sonamea
Tags: one-page, custom-menu, custom-logo, translation-ready
*/

/* ============================================================
   1. Self-hosted fonts (WOFF2, latin subset)
   ============================================================ */

@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/cormorant-garamond-400.woff2") format("woff2");
}

@font-face {
	font-family: "Cormorant Garamond";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("assets/fonts/cormorant-garamond-600.woff2") format("woff2");
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/inter-400.woff2") format("woff2");
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("assets/fonts/inter-500.woff2") format("woff2");
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/inter-700.woff2") format("woff2");
}

/* ============================================================
   2. Design tokens
   ============================================================ */

:root {
	/* Color */
	--sonamea-bg: #e0ded4;
	--sonamea-bg-soft: #d2cfbf;
	--sonamea-text: #1f1d18;
	--sonamea-text-soft: #4a4740;
	--sonamea-text-muted: #6b685f;
	--sonamea-accent: #1f1d18;
	--sonamea-rule: rgba(31, 29, 24, 0.18);
	--sonamea-rule-strong: rgba(31, 29, 24, 0.38);
	--sonamea-focus: #1f1d18;

	/* Typography */
	--sonamea-font-serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
	--sonamea-font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	--sonamea-line-body: 1.65;
	--sonamea-line-heading: 1.15;
	--sonamea-tracking-caps: 0.16em;
	--sonamea-tracking-heading: 0.05em;

	/* Type scale — five tiers (mobile-first). Every text on the site
	   resolves to one of these. Add new tiers only when justified. */
	--sonamea-fs-caption:    0.8125rem;  /* 13  — timestamps, copyright, fine print */
	--sonamea-fs-body:       1rem;       /* 16  — body, labels, form text */
	--sonamea-fs-subheading: 1.0625rem;  /* 17  — subheads, lead, demo titles, nav brand */
	--sonamea-fs-heading:    1.75rem;    /* 28  — section headings, subpage titles */
	--sonamea-fs-display:    2.25rem;    /* 36  — hero positioning line */

	/* Spacing — single 4px-based scale. Every margin, padding, and gap in
	   the codebase must resolve to one of these tokens. Pick the closest
	   tier; if none fits, the tier is what needs adjusting, not the value. */
	--sonamea-space-1: 0.25rem;   /*  4 */
	--sonamea-space-2: 0.5rem;    /*  8 */
	--sonamea-space-3: 0.75rem;   /* 12 */
	--sonamea-space-4: 1rem;      /* 16 */
	--sonamea-space-5: 1.5rem;    /* 24 */
	--sonamea-space-6: 2rem;      /* 32 */
	--sonamea-space-7: 3rem;      /* 48 */
	--sonamea-space-8: 4rem;      /* 64 */
	--sonamea-space-9: 6rem;      /* 96 */

	/* Layout */
	--sonamea-max-w: 1100px;
	--sonamea-content-w: 720px;
	--sonamea-gutter: clamp(1.25rem, 5vw, 4rem);
	--sonamea-section-py: clamp(2.5rem, 6vw, 4.5rem);

	/* Misc */
	--sonamea-radius: 0;
	--sonamea-transition: 160ms ease-out;
}

@media (min-width: 768px) {
	:root {
		--sonamea-fs-subheading: 1.125rem;  /* 18 */
		--sonamea-fs-heading:    1.5rem;   /* 36 */
		--sonamea-fs-display:    2rem;      /* 48 */
	}
}

@media (min-width: 1024px) {
	:root {
		--sonamea-fs-heading: 1.75rem;    /* 40 */
		--sonamea-fs-display: 2.5rem;   /* 52 */
	}
}

/* ============================================================
   3. Reset + base
   ============================================================ */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: var(--sonamea-space-8); /* clears the sticky .site-nav for anchor jumps */
}

body {
	margin: 0;
	background: var(--sonamea-bg);
	color: var(--sonamea-text);
	font-family: var(--sonamea-font-sans);
	font-size: var(--sonamea-fs-body);
	line-height: var(--sonamea-line-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

img,
picture,
video,
audio {
	max-width: 100%;
	display: block;
	height: auto;
}

a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: opacity var(--sonamea-transition);
}

a:hover,
a:focus-visible {
	opacity: 0.7;
}

button {
	font: inherit;
	color: inherit;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
}

:focus-visible {
	outline: 2px solid var(--sonamea-focus);
	outline-offset: 3px;
}

/* ============================================================
   4. Accessibility helpers
   ============================================================ */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--sonamea-space-4);
	z-index: 100;
	background: var(--sonamea-text);
	color: var(--sonamea-bg);
	padding: var(--sonamea-space-2) var(--sonamea-space-4);
	text-decoration: none;
}

.skip-link:focus {
	top: var(--sonamea-space-4);
}

/* ============================================================
   5. Layout primitives
   ============================================================ */

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-main {
	flex: 1 0 auto;
}

.section {
	padding-block: var(--sonamea-section-py);
	padding-inline: var(--sonamea-gutter);
}

.section__inner {
	max-width: var(--sonamea-max-w);
	margin-inline: auto;
}

.section--align-left .section__inner {
	margin-inline: 0 auto;
}

.section__heading {
	font-family: var(--sonamea-font-serif);
	font-weight: 600;
	font-size: var(--sonamea-fs-heading);
	letter-spacing: var(--sonamea-tracking-heading);
	line-height: var(--sonamea-line-heading);
	text-transform: uppercase;
	margin: 0 0 var(--sonamea-space-7);
}

/* ============================================================
   5b. Sticky site navigation
   ============================================================ */

.site-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--sonamea-bg);
	border-bottom: 1px solid var(--sonamea-rule);
}

.site-nav__inner {
	position: relative;
	max-width: var(--sonamea-max-w);
	margin-inline: auto;
	padding-inline: var(--sonamea-gutter);
	padding-block: var(--sonamea-space-3);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sonamea-space-5);
}

@media (min-width: 1024px) {
	.site-nav__inner {
		padding-inline: 0;
	}
}

.site-nav__brand {
	font-family: var(--sonamea-font-serif);
	font-weight: 500;
	font-size: var(--sonamea-fs-subheading);
	letter-spacing: var(--sonamea-tracking-caps);
	text-transform: uppercase;
	text-decoration: none;
}

.site-nav__brand:hover,
.site-nav__brand:focus-visible {
	text-decoration: none;
	opacity: 1;
}

.site-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--sonamea-space-5);
	font-size: var(--sonamea-fs-body);
}

.site-nav__link {
	text-decoration: none;
}

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

/* --- Hamburger toggle ---------------------------------------------------
   Hidden by default. Made visible only on small screens AND only when the
   page has been JS-enhanced (`html.js`), so no-JS users always see the menu
   inline even on mobile. */

.site-nav__toggle {
	display: none;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: var(--sonamea-text);
}

.site-nav__toggle-bars {
	display: inline-block;
	width: 22px;
	height: 16px;
	position: relative;
}

.site-nav__toggle-bar {
	position: absolute;
	left: 0;
	right: 0;
	height: 1.5px;
	background: currentColor;
	transition: transform var(--sonamea-transition), opacity var(--sonamea-transition);
}

.site-nav__toggle-bar:nth-child(1) { top: 2px; }
.site-nav__toggle-bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.site-nav__toggle-bar:nth-child(3) { bottom: 2px; }

/* Animate to an "X" when expanded. */
.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(1) {
	top: 50%;
	transform: translateY(-50%) rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(2) {
	opacity: 0;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-bar:nth-child(3) {
	bottom: auto;
	top: 50%;
	transform: translateY(-50%) rotate(-45deg);
}

/* --- Mobile (≤ 767px) with JS: hamburger pattern ---------------------- */

@media (max-width: 767px) {
	.js .site-nav__toggle {
		display: inline-flex;
	}

	/* Collapse the menu by default on mobile when JS is active. Show it
	   when the toggle's aria-expanded is true (general-sibling selector). */
	.js .site-nav__menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--sonamea-bg);
		border-bottom: 1px solid var(--sonamea-rule);
		padding: var(--sonamea-space-4) var(--sonamea-gutter) var(--sonamea-space-5);
	}

	.js .site-nav__toggle[aria-expanded="true"] ~ .site-nav__menu {
		display: block;
		/* Match the nav's own border-bottom (closed-state line) so the
		   open-state separator doesn't read as a heavier doubled rule. */
		border-top: 1px solid var(--sonamea-rule);
	}

	.js .site-nav__list {
		flex-direction: column;
		gap: var(--sonamea-space-4);
	}
}

/* --- No-JS fallback on mobile: keep menu inline but stack tightly ----- */

@media (max-width: 480px) {
	.site-nav__inner {
		gap: var(--sonamea-space-4);
	}
	.site-nav__list {
		gap: var(--sonamea-space-4);
	}
}

/* ============================================================
   6. Hero
   ============================================================ */

.section--hero {
	padding-block: clamp(2rem, 6vw, 4rem);
	text-align: center;
}

.hero__inner {
	/* Widened from 720px so a hero slideshow can match the content width of
	   other sections (75% of the section's max width). Text children stay
	   visually centered via `text-align: center` + `align-items: center`. */
	max-width: var(--sonamea-max-w);
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--sonamea-space-6);
}

.hero__name {
	margin: 0;
	font-family: var(--sonamea-font-serif);
	font-weight: 800;
	font-size: var(--sonamea-fs-heading);
	letter-spacing: var(--sonamea-tracking-caps);
	text-transform: uppercase;
}

.hero__positioning {
	margin: 0;
	font-family: var(--sonamea-font-serif);
	font-weight: 800;
	font-size: var(--sonamea-fs-display);
	letter-spacing: var(--sonamea-tracking-heading);
	line-height: 1.1;
	text-transform: uppercase;
}

.hero__portrait {
	margin: var(--sonamea-space-5) 0 var(--sonamea-space-4);
	max-width: 520px;
	width: 100%;
}

/* When the figure hosts the slideshow it always spans the full section
   width, regardless of viewport — the 3-up grid needs the horizontal room
   to keep each slide a usable size. */
.hero__portrait--slideshow {
	max-width: 100%;
}

.hero__portrait-img {
	border-radius: 8px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	width: 100%;
	height: auto;
}

/* ----- Hero slideshow (2+ images) -----
   Layout: side-by-side grid showing up to 3 slides at once. The number of
   visible columns is driven by the `--slideshow-visible` custom property set
   inline on the stage (min(count, 3)). When more than 3 slides are configured,
   the JS rotates a sliding window via data-active="true" on each slide. */

.hero__slideshow {
	width: 100%;
}

.hero__slideshow:focus-visible {
	outline: 2px solid var(--sonamea-focus);
	outline-offset: 4px;
}

.hero__slideshow-stage {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(var(--slideshow-visible, 3), 1fr);
	gap: var(--sonamea-space-5);
	aspect-ratio: var(--slideshow-visible, 3) / 1;
}

/* On narrow viewports, 3 squares share the gutter-bounded width and become
   too small. Collapse to a single visible slide; the JS reads this value
   back from the computed style so the active-window size matches. */
@media (max-width: 639px) {
	.hero__slideshow-stage {
		--slideshow-visible: 1 !important;
	}
}

/* Arrows are noise when the visible window already holds every slide.
   Hidden by default for counts of 2 or 3 (desktop visible = 3), then
   re-shown on mobile where visible drops to 1. */
.hero__slideshow[data-count="2"] .hero__slideshow-controls,
.hero__slideshow[data-count="3"] .hero__slideshow-controls {
	display: none;
}

@media (max-width: 639px) {
	.hero__slideshow[data-count="2"] .hero__slideshow-controls,
	.hero__slideshow[data-count="3"] .hero__slideshow-controls {
		display: flex;
	}
}

.hero__slideshow-slide {
	display: none;
	width: 100%;
	height: 100%;
}

.hero__slideshow-slide[data-active="true"] {
	display: block;
}

.hero__slideshow-slide .hero__portrait-img {
	width: 100%;
	height: 100%;
}

.hero__slideshow-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sonamea-space-5);
	margin-top: var(--sonamea-space-5);
}

.hero__slideshow-arrow {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--sonamea-text);
	background: transparent;
	border: 1px solid var(--sonamea-rule-strong);
	border-radius: 0;
	cursor: pointer;
	transition: background var(--sonamea-transition), color var(--sonamea-transition);
}

.hero__slideshow-arrow:hover,
.hero__slideshow-arrow:focus-visible {
	background: var(--sonamea-text);
	color: var(--sonamea-bg);
	opacity: 1;
}

.hero__tagline {
	margin: 0;
	font-family: var(--sonamea-font-serif);
	font-weight: 400;
	font-size: var(--sonamea-fs-heading);
	letter-spacing: var(--sonamea-tracking-caps);
	text-transform: uppercase;
}

/* ============================================================
   7. Demos
   ============================================================ */

.section--demos {
	background: var(--sonamea-bg);
}

.section--demos .section__inner {
	max-width: var(--sonamea-max-w);
	margin-inline: auto;
}

.demos__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--sonamea-space-6);
	max-width: 100%;
	counter-reset: sonamea-demo;
}

@media (min-width: 768px) {
	.demos__list {
		max-width: 75%;
	}
}

.demos__empty {
	color: var(--sonamea-text-muted);
	font-style: italic;
}

/* Disclaimer note rendered at the bottom of the demos section. The text is
   editable from the static Home page (group block `sonamea-section--demos-note`)
   with a literal fallback in the template. Font size and weight inherit from
   body defaults; color matches the demo timestamps (light grey) and the text
   is italic. Top margin matches the section heading → content gap
   (var(--sonamea-space-7)). */
.demos__note {
	margin: var(--sonamea-space-7) 0 0;
	color: #8f8c84;
	font-style: italic;
}

/* The block-editor wrapper around the note carries the same className the
   home-block lookup matches against — strip its default block spacing so
   the note's own `margin-top` token is the only vertical rhythm in play. */
.sonamea-section--demos-note {
	margin: 0;
	padding: 0;
}

.demo {
	counter-increment: sonamea-demo;
}

/* When JS has enhanced the demo, lay it out as two columns:
   52px play button | flexible content stack. Without JS, the
   .demo stays a plain block (native <audio> + title + description). */
.demo[data-sonamea-player="enhanced"] {
	display: grid;
	grid-template-columns: 52px 1fr;
	column-gap: var(--sonamea-space-4);
	align-items: center;
}

.demo__main {
	display: flex;
	flex-direction: column;
	gap: var(--sonamea-space-2);
	min-width: 0;
}

.demo__title {
	margin: 0;
	font-family: var(--sonamea-font-sans);
	font-weight: 500;
	font-size: var(--sonamea-fs-subheading);
	letter-spacing: 0.01em;
}

.demo__title::before {
	content: counter(sonamea-demo) ".";
	display: inline-block;
	margin-right: var(--sonamea-space-2);
	color: #a8a59c;
	font-variant-numeric: tabular-nums;
}

.demo__description {
	margin: 0;
	color: var(--sonamea-text-soft);
	font-size: var(--sonamea-fs-body);
}

.demo__missing {
	margin: 0;
	color: var(--sonamea-text-muted);
	font-size: var(--sonamea-fs-body);
	font-style: italic;
}

/* ============================================================
   8. Custom audio player
   The player progressively enhances the native <audio>. The
   button is inserted as the left grid-cell of `.demo`; the
   progress controls land at the bottom of `.demo__main`. Without
   JS, the native controls remain visible.
   ============================================================ */

.demo__audio {
	width: 100%;
	max-width: 100%;
}

/* When JS has taken over, hide the native element entirely. */
.demo[data-sonamea-player="enhanced"] .demo__audio {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.demo__play {
	flex: 0 0 auto;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 1.5px solid var(--sonamea-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--sonamea-text);
	background: transparent;
	transition: background var(--sonamea-transition), color var(--sonamea-transition);
}

.demo__play:hover,
.demo__play:focus-visible {
	background: var(--sonamea-text);
	color: var(--sonamea-bg);
	opacity: 1;
}

.demo__play[aria-pressed="true"] {
	background: var(--sonamea-text);
	color: var(--sonamea-bg);
}

.demo__play-icon {
	width: 16px;
	height: 16px;
	display: block;
	fill: currentColor;
}

.demo__progress-wrap {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: var(--sonamea-space-2);
	min-width: 0;
}

.demo__progress {
	flex: 1 1 auto;
	height: 10px;
	display: flex;
	align-items: center;
	cursor: pointer;
	position: relative;
	min-width: 80px;
	overflow: hidden;
}

.demo__progress::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	height: 2px;
	background: var(--sonamea-rule-strong);
	top: 50%;
	transform: translateY(-50%);
}

.demo__progress-fill {
	position: absolute;
	inset-block: 0;
	left: 0;
	width: var(--sonamea-progress, 0%);
	max-width: 100%;
	display: flex;
	align-items: center;
}

.demo__progress-fill::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	height: 2px;
	background: var(--sonamea-text);
	top: 50%;
	transform: translateY(-50%);
}

/* Thumb is a sibling of the fill, positioned along the full track via the
   shared `--sonamea-progress` custom property. The `left` value is clamped
   between [thumb-radius, 100% - thumb-radius] so the thumb stays fully
   visible at both 0% and 100%, regardless of `overflow: hidden` on
   `.demo__progress`. */
.demo__progress-thumb {
	--sonamea-thumb-r: 5px;
	position: absolute;
	top: 50%;
	left: max(
		var(--sonamea-thumb-r),
		min(
			var(--sonamea-progress, 0%),
			calc(100% - var(--sonamea-thumb-r))
		)
	);
	transform: translate(-50%, -50%);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--sonamea-text);
}

.demo__time {
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
	font-size: var(--sonamea-fs-caption);
	color: #8f8c84;
	text-align: right;
}

/* ============================================================
   9. References / Services (toggleable, CPT-backed)
   ============================================================ */

.references__placeholder,
.services__placeholder {
	color: var(--sonamea-text-muted);
	font-style: italic;
	margin: 0;
}

/* --- References grid --- */

.references__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--sonamea-space-6);
	grid-template-columns: 1fr;
}

@media (min-width: 560px) {
	.references__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.references__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.reference-card {
	display: flex;
	flex-direction: column;
	gap: var(--sonamea-space-4);
}

/* When the card has a URL set, the title's <a> stretches over the whole
   card via ::after so the entire surface is a click target. Screen
   readers still hear a single, clearly named link (the title). */
.reference-card--linked {
	position: relative;
}

.reference-card__link {
	color: inherit;
	text-decoration: none;
}

.reference-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.reference-card__link:focus-visible {
	outline: none;
}

.reference-card--linked:has(.reference-card__link:focus-visible) {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.reference-card--linked:hover .reference-card__title,
.reference-card--linked:focus-within .reference-card__title {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.reference-card__image-wrap {
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: rgba(0, 0, 0, 0.04);
}

.reference-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.reference-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--sonamea-space-2);
}

.reference-card__title {
	margin: 0;
	font-family: var(--sonamea-font-serif);
	font-size: var(--sonamea-fs-subheading);
	font-weight: 600;
	line-height: 1.25;
}

.reference-card__term {
	margin: 0;
	font-size: var(--sonamea-fs-body);
	color: var(--sonamea-text-soft);
	letter-spacing: 0.02em;
}

.reference-card__content {
	font-size: var(--sonamea-fs-body);
	line-height: var(--sonamea-line-body);
}

.reference-card__content p {
	margin: 0 0 var(--sonamea-space-3);
}

.reference-card__content p:last-child {
	margin-bottom: 0;
}

/* --- Services card grid --- */

.services__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: var(--sonamea-space-5);
	grid-template-columns: 1fr;
}

@media (min-width: 560px) {
	.services__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.services__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.service-card {
	display: flex;
	flex-direction: column;
	gap: var(--sonamea-space-3);
	padding: var(--sonamea-space-5);
	background: rgba(255, 255, 255, 0.35);
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.service-card__title {
	margin: 0;
	font-family: var(--sonamea-font-serif);
	font-size: var(--sonamea-fs-subheading);
	font-weight: 600;
	line-height: 1.25;
}

.service-card__content {
	font-size: var(--sonamea-fs-body);
	line-height: var(--sonamea-line-body);
}

.service-card__content p {
	margin: 0 0 var(--sonamea-space-3);
}

.service-card__content p:last-child {
	margin-bottom: 0;
}

/* ============================================================
   10. About
   ============================================================ */

.about__body {
	max-width: var(--sonamea-content-w);
	font-size: var(--sonamea-fs-body);
	line-height: var(--sonamea-line-body);
}

.about__body p {
	margin: 0 0 var(--sonamea-space-5);
}

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

.about__schwerpunkte {
	margin-top: var(--sonamea-space-6);
	max-width: var(--sonamea-content-w);
	font-size: var(--sonamea-fs-subheading);
}

/* ============================================================
   11. Contact
   ============================================================ */

.contact__subhead {
	font-family: var(--sonamea-font-sans);
	font-weight: 500;
	font-size: var(--sonamea-fs-subheading);
	margin: 0 0 var(--sonamea-space-5);
}

.contact__form-wrap {
	max-width: 100%;
	margin-bottom: var(--sonamea-space-7);
}

@media (min-width: 768px) {
	.contact__form-wrap {
		max-width: 75%;
	}
}

.contact__placeholder {
	color: var(--sonamea-text-muted);
	font-style: italic;
	margin: 0;
}

.contact__direct {
	margin: 0;
	font-size: var(--sonamea-fs-body);
}

.contact__direct a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* ============================================================
   11b. Contact form (sonamea-contact plugin)
   ============================================================ */

.sc-form {
	max-width: 100%;
	margin: 0;
}

.sc-status {
	margin-bottom: var(--sonamea-space-5);
}

.sc-status__msg {
	margin: 0;
	padding: var(--sonamea-space-4) var(--sonamea-space-5);
	border-left: 3px solid var(--sonamea-text);
	background: var(--sonamea-bg-soft);
	font-size: var(--sonamea-fs-body);
	line-height: 1.5;
}

.sc-status__msg--success {
	border-left-color: var(--sonamea-text);
}

.sc-status__msg--error {
	border-left-color: #8a2a1f;
}

/* Form is replaced with .sc-complete after a successful submission —
   visual treatment matches .sc-status__msg--success so the transition
   from "form visible" to "success block" doesn't feel like a different
   surface. */
.sc-complete {
	margin: 0;
	padding: var(--sonamea-space-4) var(--sonamea-space-5);
	border-left: 3px solid var(--sonamea-text);
	background: var(--sonamea-bg-soft);
}

.sc-complete__msg {
	margin: 0;
	font-size: var(--sonamea-fs-body);
	line-height: 1.5;
}

.sc-label {
	display: inline-flex;
	gap: 0.25em;
	font-size: var(--sonamea-fs-body);
	color: var(--sonamea-text-soft);
}

.sc-required {
	color: var(--sonamea-text);
}

.sc-input,
.sc-input--textarea {
	font: inherit;
	font-size: var(--sonamea-fs-body);
	color: var(--sonamea-text);
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--sonamea-rule-strong);
	padding: 0.5rem 0;
	transition: border-color var(--sonamea-transition);
}

.sc-input:focus,
.sc-input--textarea:focus {
	outline: none;
	border-bottom-color: var(--sonamea-text);
}

.sc-input--textarea {
	resize: vertical;
	min-height: 7rem;
	line-height: 1.55;
}

.sc-input[aria-invalid="true"] {
	border-bottom-color: #8a2a1f;
}

.sc-field__error {
	margin: 0.25rem 0 0;
	font-size: var(--sonamea-fs-body);
	color: #8a2a1f;
}

.sc-field--privacy {
	margin-top: var(--sonamea-space-5);
}

.sc-checkbox {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--sonamea-space-3);
	/* Align the box with the first line of the label, not the block center,
	   so a wrapped label keeps the box near its first-line cap height. */
	align-items: start;
	font-size: var(--sonamea-fs-body);
	line-height: 1.5;
	color: var(--sonamea-text-soft);
	cursor: pointer;
}

/* Custom checkbox — square box, dark fill + light check when active. */
.sc-checkbox input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	/* Top offset = roughly half the difference between line-height ascent
	   and the box height, so the box's vertical center sits near the first
	   line's x-height. */
	margin-top: 0.2em;
	width: 1.125rem;
	height: 1.125rem;
	border: 1.5px solid var(--sonamea-text);
	border-radius: 2px;
	background: transparent;
	position: relative;
	cursor: pointer;
	flex-shrink: 0;
	transition: background var(--sonamea-transition);
}

.sc-checkbox input[type="checkbox"]:checked {
	background: var(--sonamea-text);
}

.sc-checkbox input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='%23dcd9c8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 90% 90%;
}

.sc-checkbox input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--sonamea-focus);
	outline-offset: 2px;
}

.sc-checkbox input[type="checkbox"][aria-invalid="true"] {
	border-color: #8a2a1f;
}

.sc-checkbox__label a {
	color: inherit;
}

.sc-actions {
	margin-top: var(--sonamea-space-6);
}

.sc-submit {
	display: inline-block;
	font-family: var(--sonamea-font-sans);
	font-weight: 500;
	font-size: var(--sonamea-fs-body);
	letter-spacing: 0.04em;
	padding: var(--sonamea-space-3) var(--sonamea-space-5);
	color: var(--sonamea-bg);
	background: var(--sonamea-text);
	border: 1px solid var(--sonamea-text);
	cursor: pointer;
	transition: background var(--sonamea-transition), color var(--sonamea-transition), opacity var(--sonamea-transition);
	min-height: 44px;
}

.sc-submit:hover,
.sc-submit:focus-visible {
	background: transparent;
	color: var(--sonamea-text);
	opacity: 1;
}

.sc-submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ============================================================
   12. Footer
   ============================================================ */

.site-footer {
	padding-block: var(--sonamea-space-7);
	padding-inline: var(--sonamea-gutter);
	border-top: 1px solid var(--sonamea-rule);
}

.site-footer__inner {
	max-width: var(--sonamea-max-w);
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	gap: var(--sonamea-space-4);
}

@media (min-width: 768px) {
	.site-footer__inner {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

.site-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: var(--sonamea-space-5);
	font-size: var(--sonamea-fs-body);
}

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

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

.site-footer__copyright {
	margin: 0;
	font-size: var(--sonamea-fs-caption);
	color: var(--sonamea-text-muted);
}

/* ============================================================
   13. Subpages (Impressum, Datenschutz)
   ============================================================ */

.site-main--subpage {
	padding-block: var(--sonamea-section-py);
	padding-inline: var(--sonamea-gutter);
}

.subpage {
	max-width: var(--sonamea-max-w);
	margin-inline: auto;
}

.subpage__title {
	font-family: var(--sonamea-font-serif);
	font-weight: 600;
	font-size: var(--sonamea-fs-heading);
	letter-spacing: var(--sonamea-tracking-heading);
	text-transform: uppercase;
	margin: 0 0 var(--sonamea-space-7);
}

.subpage__content {
	max-width: var(--sonamea-content-w);
}

.subpage__content p {
	margin: 0 0 var(--sonamea-space-5);
}

.subpage__content strong {
	font-weight: 700;
}

/* Impressum lead lines.
   "Bettina Müller" and "Kontakt" are authored as the first line of the
   first and second paragraphs respectively (each followed by <br> + the
   address / contact details). ::first-line honors the <br>, so bumping
   the weight here bolds exactly those two words without touching the
   page content or the other subpages. Slug-scoped via the body class
   WP emits for the page (`page-impressum`). */
body.page-impressum .subpage__content > p:nth-of-type(1)::first-line,
body.page-impressum .subpage__content > p:nth-of-type(2)::first-line {
	font-weight: 800;
}

/* ============================================================
   14. Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}
