/**
 * Solumondo Foundation v3
 * Einheitliche Basis fuer alle Seiten: Typo-Achsen, Button-Zentrierung, Kontrast.
 */

body.solumondo-app .solumondo-page-shell,
body.solumondo-app .solumondo-home-shell,
body.solumondo-app .solumondo-produktwelten-shell {
	width: min(100%, 92rem);
	margin-inline: auto;
}

/* Global stage: navy baseline + subtle animated orange dust */
body.solumondo-app .site-main {
	position: relative;
	isolation: isolate;
	background:
		radial-gradient(circle at 12% -8%, color-mix(in srgb, var(--solumondo-orange) 10%, transparent), transparent 26rem),
		radial-gradient(circle at 88% 4%, color-mix(in srgb, var(--solumondo-orange) 8%, transparent), transparent 28rem),
		linear-gradient(180deg, #050b14 0%, #081426 52%, #0b1b33 100%) !important;
}

body.solumondo-app .site-main::before,
body.solumondo-app .site-main::after {
	content: "";
	position: absolute;
	z-index: 0;
	pointer-events: none;
	border-radius: 50%;
	filter: blur(2px);
}

body.solumondo-app .site-main::before {
	top: -14rem;
	right: -10rem;
	width: min(54rem, 84vw);
	height: min(54rem, 84vw);
	background: radial-gradient(circle, color-mix(in srgb, var(--solumondo-orange) 16%, transparent) 0%, transparent 64%);
}

body.solumondo-app .site-main::after {
	bottom: -16rem;
	left: -12rem;
	width: min(46rem, 72vw);
	height: min(46rem, 72vw);
	background: radial-gradient(circle, color-mix(in srgb, var(--solumondo-orange) 10%, transparent) 0%, transparent 66%);
}

@media (prefers-reduced-motion: no-preference) {
	body.solumondo-app .site-main::before {
		animation: sol-orb-float 24s ease-in-out infinite alternate;
	}
	body.solumondo-app .site-main::after {
		animation: sol-orb-float 30s ease-in-out infinite alternate-reverse;
	}
}

body.solumondo-app .site-main > * {
	position: relative;
	z-index: 1;
}

body.solumondo-app :where(.solumondo-section__header, .solumondo-page-hero__inner, .solumondo-hero__content) {
	text-align: center !important;
}

/* Global alignment contract: all primary content blocks stay centered */
body.solumondo-app :where(
	.solumondo-page-shell,
	.solumondo-home-shell,
	.solumondo-produktwelten-shell,
	.entry-content,
	.solumondo-card,
	.solumondo-promo-slot,
	.solumondo-path-card,
	.solumondo-cat-card,
	.solumondo-catalog-card,
	.solumondo-reason-card,
	.solumondo-reason-detail,
	.solumondo-explorer-tab,
	.solumondo-explorer-item,
	.solumondo-explorer-item__text,
	.solumondo-explorer-detail
) {
	text-align: center !important;
}

body.solumondo-app :where(
	.solumondo-reason-card,
	.solumondo-reason-detail,
	.solumondo-explorer-tab,
	.solumondo-explorer-item,
	.solumondo-explorer-item__text,
	.solumondo-explorer-detail
) {
	align-items: center;
	align-content: center;
	justify-content: center;
}

body.solumondo-app :where(.solumondo-reason-detail__list, .solumondo-explorer-list) {
	list-style-position: inside;
	padding-left: 0;
}

/* List cleanup: no lost left-side bullets on any primary page */
body.solumondo-app :where(
	.solumondo-page-shell,
	.solumondo-home-shell,
	.solumondo-produktwelten-shell,
	.entry-content
) ul {
	list-style: none !important;
	padding-left: 0 !important;
	margin-left: 0 !important;
}

body.solumondo-app :where(
	.solumondo-page-shell,
	.solumondo-home-shell,
	.solumondo-produktwelten-shell,
	.entry-content
) ul li::marker {
	content: "" !important;
}

body.solumondo-app :where(h1, h2, h3) {
	text-wrap: balance;
	letter-spacing: -0.02em;
}

body.solumondo-app :where(p, li) {
	text-wrap: pretty;
}

/* Hero kompakt am Seitenanfang, keine "Luftblase" */
body.solumondo-app.solumondo-page-3610 .solumondo-hero {
	padding-top: clamp(0.8rem, 1.8vw, 1.6rem) !important;
	padding-bottom: clamp(1.8rem, 3.2vw, 3rem) !important;
	min-block-size: auto !important;
}

body.solumondo-app.solumondo-page-3610 .solumondo-hero__grid {
	width: min(100%, 86rem);
	margin-inline: auto;
	gap: clamp(1rem, 2.4vw, 2rem) !important;
	justify-items: center;
}

/* Harte, optische Zentrierung aller Kern-Buttons */
body.solumondo-app .solumondo-btn,
body.solumondo-app .solumondo-power-btn,
body.solumondo-app .solumondo-path-card__cta--btn,
body.solumondo-app .wp-block-button__link,
body.solumondo-app .kb-button,
body.solumondo-app .uagb-buttons-repeater,
body.solumondo-app .solu-btn-main,
body.solumondo-app .woocommerce a.button,
body.solumondo-app .woocommerce button.button,
body.solumondo-app .solumondo-app-strip__btn,
body.solumondo-app .solumondo-footer-app-btn,
body.solumondo-app .solumondo-app-install-trigger {
	display: grid !important;
	place-items: center !important;
	align-content: center !important;
	text-align: center !important;
	line-height: 1 !important;
	min-height: clamp(3.2rem, 2.9rem + 0.8vw, 4rem) !important;
	padding-block: 0 !important;
	padding-inline: clamp(1rem, 0.8rem + 0.8vw, 1.8rem) !important;
	appearance: none !important;
	-webkit-appearance: none !important;
}

body.solumondo-app .solumondo-btn :where(span, strong, em),
body.solumondo-app .solumondo-power-btn :where(span, strong, em),
body.solumondo-app .solumondo-path-card__cta--btn :where(span, strong, em),
body.solumondo-app .wp-block-button__link :where(span, strong, em),
body.solumondo-app .kb-button :where(span, strong, em),
body.solumondo-app .uagb-buttons-repeater :where(span, strong, em),
body.solumondo-app .solu-btn-main :where(span, strong, em),
body.solumondo-app .solumondo-app-install-trigger :where(span, strong, em),
body.solumondo-app .solumondo-quick-access__cta :where(span, strong, em) {
	line-height: 1 !important;
	text-align: center !important;
	position: relative;
	top: 0;
}

body.solumondo-app :where(.solumondo-btn, .solumondo-power-btn, .solumondo-quick-access__cta, .solumondo-app-install-trigger, .solumondo-footer-app-btn) :where(br) {
	display: none !important;
}

/* Kontrastgrundlage nach WCAG 2.2 AA (Text >= 4.5:1, UI >= 3:1) */
body.solumondo-app {
	--sol-foundation-text-on-light: #0c1726;
	--sol-foundation-muted-on-light: #2e3d52;
	--sol-foundation-text-on-dark: #f6f8fc;
	--sol-foundation-muted-on-dark: #d6ddea;
}

body.solumondo-app :where(.entry-content, .solumondo-page-shell:not(.solumondo-mkt-shell)) :where(h1, h2, h3, h4) {
	color: var(--sol-foundation-text-on-light) !important;
}

body.solumondo-app :where(.entry-content, .solumondo-page-shell:not(.solumondo-mkt-shell)) :where(p, li, td, th, label) {
	color: var(--sol-foundation-muted-on-light) !important;
}

body.solumondo-app :where(
	.solumondo-hero,
	.solumondo-page-hero--dark,
	.solumondo-mkt-shell .solumondo-page-hero,
	.solumondo-mkt-shell .solumondo-section__header,
	.solumondo-section--dark,
	.solumondo-pw-hero,
	.solumondo-footer
) :where(h1, h2, h3, h4, p, li, a) {
	color: var(--sol-foundation-text-on-dark) !important;
	-webkit-text-fill-color: var(--sol-foundation-text-on-dark) !important;
}

body.solumondo-app :where(.solumondo-hero, .solumondo-page-hero--dark, .solumondo-section--dark, .solumondo-pw-hero, .solumondo-footer) :where(p, li) {
	color: var(--sol-foundation-muted-on-dark) !important;
	-webkit-text-fill-color: var(--sol-foundation-muted-on-dark) !important;
}

/* Dark components: Standardtexte/Hinweise immer ausreichend hell */
body.solumondo-app :where(
	.solumondo-hero,
	.solumondo-pw-hero,
	.solumondo-page-hero--dark,
	.solumondo-section--dark,
	.solumondo-card--dark,
	.solumondo-path-card--b2b,
	.solu-hero-partner,
	.solumondo-footer
) :where(
	.solumondo-lead,
	.solumondo-path-card__text,
	.solumondo-explorer-tab__hint,
	.solumondo-explorer-item__hint,
	.solumondo-catalog-stat span,
	.solumondo-hero-hub__metric span,
	.solumondo-footer__tagline,
	.solumondo-kicker,
	.solu-info-card p,
	.solu-calc-box p
) {
	color: #eaf0fa !important;
	-webkit-text-fill-color: #eaf0fa !important;
}

/* Dark links ohne Hover lesbar */
body.solumondo-app :where(
	.solumondo-hero,
	.solumondo-pw-hero,
	.solumondo-page-hero--dark,
	.solumondo-section--dark,
	.solumondo-card--dark,
	.solumondo-path-card--b2b,
	.solumondo-footer
) a:not(.solumondo-btn):not(.wp-block-button__link):not(.kb-button):not(.uagb-buttons-repeater) {
	color: #ffd6a6 !important;
	-webkit-text-fill-color: #ffd6a6 !important;
	text-decoration-color: #ffd6a6 !important;
}

/* Finale Kontrast-Absicherung fuer Buttons und Interaktionszustande */
body.solumondo-app .solumondo-btn:not(.solumondo-btn--ghost):not(.solumondo-btn--ghost-on-light),
body.solumondo-app .solumondo-power-btn,
body.solumondo-app .solumondo-path-card__cta--btn,
body.solumondo-app .wp-block-button__link,
body.solumondo-app .kb-button,
body.solumondo-app .uagb-buttons-repeater,
body.solumondo-app .woocommerce a.button,
body.solumondo-app .woocommerce button.button {
	background: #ff6a00 !important;
	border: 2px solid #b84900 !important;
	color: #101820 !important;
	-webkit-text-fill-color: #101820 !important;
}

body.solumondo-app .solumondo-btn:not(.solumondo-btn--ghost):not(.solumondo-btn--ghost-on-light):hover,
body.solumondo-app .solumondo-power-btn:hover,
body.solumondo-app .solumondo-path-card__cta--btn:hover,
body.solumondo-app .wp-block-button__link:hover,
body.solumondo-app .kb-button:hover,
body.solumondo-app .uagb-buttons-repeater:hover,
body.solumondo-app .woocommerce a.button:hover,
body.solumondo-app .woocommerce button.button:hover {
	background: #ff7f24 !important;
	border-color: #101820 !important;
	color: #101820 !important;
	-webkit-text-fill-color: #101820 !important;
}

body.solumondo-app .solumondo-btn--ghost,
body.solumondo-app .solumondo-btn--ghost-on-light,
body.solumondo-app .solumondo-app-install-trigger:not(.solumondo-power-btn),
body.solumondo-app .solumondo-footer-app-btn {
	background: rgba(255, 255, 255, 0.1) !important;
	border: 2px solid rgba(255, 255, 255, 0.72) !important;
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
}

body.solumondo-app :where(.solumondo-page-shell, .entry-content) a:not(.solumondo-btn):not(.wp-block-button__link):not(.kb-button):not(.uagb-buttons-repeater) {
	color: #b84900 !important;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

body.solumondo-app :where(a, button, input, select, textarea):focus-visible {
	outline: 3px solid #ff8c2f !important;
	outline-offset: 2px;
}

@media (prefers-contrast: more) {
	body.solumondo-app {
		--sol-foundation-text-on-light: #050b14;
		--sol-foundation-muted-on-light: #152235;
		--sol-foundation-text-on-dark: #ffffff;
		--sol-foundation-muted-on-dark: #eef3ff;
	}
}

/* Contrast fail-safe matrix: Light surfaces -> dark text, Dark surfaces -> light text */
body.solumondo-app :where(
	.has-white-background-color,
	.has-theme-palette9-background-color,
	.has-theme-palette8-background-color,
	.solu-info-card,
	.solu-calc-box,
	.solumondo-explorer-tab,
	.solumondo-explorer-item,
	.solumondo-cat-card,
	.solumondo-catalog-card,
	.solumondo-path-card:not(.solumondo-path-card--b2b),
	.solumondo-card:not(.solumondo-card--dark),
	[style*="background:#fff"],
	[style*="background: #fff"],
	[style*="background-color:#fff"],
	[style*="background-color: #fff"],
	[style*="background: rgb(255, 255, 255)"],
	[style*="background-color: rgb(255, 255, 255)"]
) :where(h1, h2, h3, h4, h5, h6, p, li, a, span, label, small, strong, em, td, th, dt, dd) {
	color: #0c1726 !important;
	-webkit-text-fill-color: #0c1726 !important;
}

body.solumondo-app :where(
	.has-theme-palette7-background-color,
	.solumondo-hero,
	.solumondo-pw-hero,
	.solumondo-page-hero--dark,
	.solumondo-section--dark,
	.solumondo-path-card--b2b,
	.solumondo-card--dark,
	.solumondo-footer,
	.solu-hero-partner,
	[style*="background:#050b14"],
	[style*="background: #050b14"],
	[style*="background-color:#050b14"],
	[style*="background-color: #050b14"],
	[style*="background: rgb(5, 11, 20)"],
	[style*="background-color: rgb(5, 11, 20)"]
) :where(h1, h2, h3, h4, h5, h6, p, li, a, span, label, small, strong, em, td, th, dt, dd) {
	color: #f5f8ff !important;
	-webkit-text-fill-color: #f5f8ff !important;
}

/* Readability fail-safe: known light cards always get dark text */
body.solumondo-app :where(
	.solu-info-card,
	.solu-calc-box,
	.solumondo-reason-card,
	.solumondo-reason-detail,
	.solumondo-explorer-tab,
	.solumondo-explorer-item,
	.solumondo-explorer-detail,
	.solumondo-catalog-card,
	.solumondo-cat-card,
	.solumondo-path-card:not(.solumondo-path-card--b2b)
) {
	color: #0c1726 !important;
	-webkit-text-fill-color: #0c1726 !important;
}

body.solumondo-app :where(
	.solu-info-card,
	.solu-calc-box,
	.solumondo-reason-card,
	.solumondo-reason-detail,
	.solumondo-explorer-tab,
	.solumondo-explorer-item,
	.solumondo-explorer-detail,
	.solumondo-catalog-card,
	.solumondo-cat-card,
	.solumondo-path-card:not(.solumondo-path-card--b2b)
) :where(h1, h2, h3, h4, h5, h6, p, li, span, strong, small, label, a) {
	color: #0c1726 !important;
	-webkit-text-fill-color: #0c1726 !important;
}

/* Inputs must always stay readable */
body.solumondo-app :where(input, select, textarea) {
	background-color: #ffffff !important;
	color: #0c1726 !important;
	-webkit-text-fill-color: #0c1726 !important;
	border-color: #5e6f86 !important;
}

body.solumondo-app :where(input::placeholder, textarea::placeholder) {
	color: #4a5d75 !important;
	opacity: 1;
}

/* Mobile: kompakte vertikale Rhythmen */
@media (max-width: 767px) {
	body.solumondo-app .solumondo-page-shell,
	body.solumondo-app .solumondo-home-shell,
	body.solumondo-app .solumondo-produktwelten-shell {
		padding-inline: 0.8rem;
	}

	body.solumondo-app.solumondo-page-3610 .solumondo-hero {
		padding-top: 0.55rem !important;
		padding-bottom: 1.45rem !important;
	}

	body.solumondo-app.solumondo-page-3610 .solumondo-actions--dual {
		grid-template-columns: 1fr !important;
	}
}
