/*
Theme Name: Mamy Marketing Theme
Description: Barrierefreies, SEO-orientiertes Block-Theme (Gutenberg / Full Site Editing) als Vorlage für neue Websites. Siehe README.md.
Version: 0.6.15
Requires at least: 6.6
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: mamy-marketing-theme
*/

/*
 * Nur das, was theme.json nicht kann. Farben, Abstände und Schriften
 * immer über die Tokens aus theme.json (var(--wp--preset--...)) verwenden.
 */

/* ---------- Barrierefreiheit ---------- */

/* Sichtbarer Fokus für alle bedienbaren Elemente (WCAG 2.4.7 / 2.4.11) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--focus-ring);
	outline-offset: var(--wp--custom--focus-offset);
}

/* Mindestgröße für Bedienelemente (WCAG 2.5.8) */
.wp-block-button__link,
.wp-element-button,
button,
input[type="submit"],
.consent button {
	min-height: var(--wp--custom--min-target);
	min-width: var(--wp--custom--min-target);
}

/* Bewegung reduzieren, wenn der Nutzer es wünscht (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------- Layout ---------- */




/* Landing-Sektionen: full width, eigener Innenabstand */
.section {
	padding-block: var(--wp--preset--spacing--70);
	padding-inline: var(--wp--preset--spacing--40);
}

.section--surface {
	background: var(--wp--preset--color--surface);
}

.section--hero {
	padding-block: var(--wp--preset--spacing--70);
}

/*
 * Platz für das Hero-Bild reservieren, bevor es geladen ist (kein Layout-Sprung, CLS).
 * Bilder aus der Mediathek bekommen von WordPress automatisch width/height. Das gilt vor allem
 * für das mitgelieferte Platzhalterbild (SVG ohne feste Größe).
 */
.section--hero .wp-block-image img {
	aspect-ratio: 3 / 2;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.section--cta {
	background: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--base);
}

.section--cta :where(h1, h2, h3, p, a:not(.wp-block-button__link)) {
	color: var(--wp--preset--color--base);
}

.section--cta .wp-block-button__link {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--primary-dark);
}

.section--cta :where(a, button):focus-visible {
	outline-color: var(--wp--preset--color--base);
}

/* Footer: Button "Cookie-Einstellungen" wie ein Link darstellen */
.consent-open {
	background: none;
	border: 0;
	color: var(--wp--preset--color--primary);
	cursor: pointer;
	font: inherit;
	padding: 0;
	text-decoration: underline;
}

/* ---------- FAQ (core/details) ---------- */

.starter-faq .wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-block: var(--wp--preset--spacing--30);
}

.starter-faq .wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
	min-height: var(--wp--custom--min-target);
}

/* ---------- Startseite (MAMY) ---------- */

.mamy-hero {
	padding-inline: var(--wp--preset--spacing--40);
}

.mamy-hero h1 {
	font-size: clamp(3rem, 2rem + 6vw, 6.5rem);
	max-width: 14ch;
}

.mamy-cards {
	gap: var(--wp--preset--spacing--40);
	margin-block: var(--wp--preset--spacing--50);
}

.mamy-card {
	border-radius: 1.25rem;
	padding: var(--wp--preset--spacing--40);
}

.mamy-card.has-surface-background-color {
	border: 1px solid var(--wp--preset--color--border);
}

/* Links in farbigen Karten: dunkle Textfarbe statt Primärfarbe (Kontrast) */
.mamy-card a {
	color: inherit;
}

.mamy-events :where(h2, p),
.mamy-events a:not(.wp-block-button__link) {
	color: var(--wp--preset--color--base);
}

/* Hero: alle Elemente linksbündig an derselben Kante */
.mamy-hero .wp-block-cover__inner-container {
	max-width: 72rem;
	width: 100%;
}

.mamy-hero .wp-block-cover__inner-container > * {
	margin-left: 0;
	margin-right: auto;
}

/* Zielgröße (WCAG 2.5.8): eigenständige Links und Website-Titel mindestens 44 px hoch */
.mamy-card a,
.wp-block-site-title a {
	align-items: center;
	display: inline-flex;
	min-height: var(--wp--custom--min-target);
}

/* Cookie-Einstellungen im Footer: gleiche Darstellung wie "Bewegung pausieren" */
.pop-footer .pop-consent-open {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	font: 400 15px/1.35 Arial, sans-serif;
	margin-top: -12px;
	min-height: 44px;
	padding: 0;
	text-align: left;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Links in Fließtext bleiben unterstrichen (nicht nur durch Farbe erkennbar, WCAG 1.4.1) */
.wp-block-post-content p a,
.wp-block-post-content li a,
.legal-page a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Rechtsseiten im Look des Prototyps (.legal-page): schmale Spalte, Rand wie die Abschnitte */
body.mamy-page-impressum .wp-block-post-content,
body.mamy-page-datenschutz .wp-block-post-content,
body.mamy-page-barrierefreiheit .wp-block-post-content {
	margin: 0 auto;
	max-width: 1040px;
	padding: 110px var(--gutter, 22px);
}

body.mamy-page-impressum .wp-block-post-title,
body.mamy-page-datenschutz .wp-block-post-title,
body.mamy-page-barrierefreiheit .wp-block-post-title {
	font-size: clamp(40px, 7vw, 80px);
	margin: 0 auto;
	max-width: 1040px;
	overflow-wrap: anywhere;
	padding: 60px var(--gutter, 22px) 0;
}

/* Korrekturen am Prototyp-Design (Kontrast, horizontaler Überlauf), siehe QUALITAETSCHECK.md */
html,
body {
	overflow-x: clip;
}

.pop-explore .pop-overline {
	color: #34272e; /* 4,95:1 auf Pink statt 4,38:1 */
}

.portfolio-note {
	color: #5f5a58; /* 5,6:1 auf dem Referenzen-Hintergrund statt 4,46:1 */
}

/* Nachprüfung 11.11.2026: Fokus auf dunklen Flächen hell, Banner-Link mindestens 24 px hoch (WCAG 2.4.11, 2.5.8) */
.pop-hero :focus-visible,
.scene-design :focus-visible,
.drone-section :focus-visible,
.pop-mobile-menu :focus-visible {
	outline-color: #fffdf9;
}

.pop-announcement a {
	align-items: center;
	display: inline-flex;
	min-height: 28px;
}
