/* PrugnatoR – ergänzende Styles zu theme.json */

/* ---------- Farbmodus (Standard: dunkel, hell per Umschalter) ---------- */

:root {
	color-scheme: dark;
	--pr-header-bg: rgba(7, 9, 15, 0.78);
	--pr-line: rgba(201, 206, 214, 0.08);
	--pr-glow: rgba(20, 80, 255, 0.18);
	--pr-hover-text: #ffffff;
}

/* Die Paletten-Variablen aus theme.json werden im hellen Modus überschrieben. */
:root[data-theme="light"] {
	color-scheme: light;
	--wp--preset--color--base: #f4f6fb;
	--wp--preset--color--surface: #ffffff;
	--wp--preset--color--surface-2: #f9fafd;
	--wp--preset--color--border: #d8deea;
	--wp--preset--color--contrast: #0b1020;
	--wp--preset--color--muted: #4f5b72;
	--wp--preset--color--chrome: #2f3747;
	--wp--preset--color--primary-light: #0b3be0;
	--wp--preset--gradient--chrome: linear-gradient(135deg, #0b1020 0%, #3c4556 45%, #1a2030 60%, #4a5466 100%);
	--pr-header-bg: rgba(244, 246, 251, 0.85);
	--pr-line: rgba(11, 16, 32, 0.08);
	--pr-glow: rgba(20, 80, 255, 0.10);
	--pr-hover-text: #0b1020;
}

html {
	scroll-behavior: smooth;
}

body {
	background:
		radial-gradient(ellipse 80% 50% at 80% -10%, var(--pr-glow), transparent 60%),
		var(--wp--preset--color--base);
	background-attachment: fixed;
	-webkit-font-smoothing: antialiased;
}

/* Keine Lücken zwischen Header, Inhalt und Footer */
.wp-site-blocks > * {
	margin-block-start: 0;
}

main > .wp-block-post-content > .alignfull:first-child {
	margin-block-start: 0;
}

.wp-block-post-content > .alignfull + .alignfull {
	margin-block-start: 0;
}

::selection {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary-light);
	outline-offset: 3px;
}

/* ---------- Header ---------- */

.pr-header {
	position: sticky;
	top: 0;
	z-index: 50;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	background: var(--pr-header-bg);
	border-bottom: 1px solid var(--pr-line);
}

/* backdrop-filter macht den Header zum Bezugsrahmen für position:fixed –
   das mobile Menü-Overlay würde sonst auf die Header-Höhe beschnitten. */
.pr-header:has(.is-menu-open) {
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	background: var(--wp--preset--color--base);
}

.admin-bar .pr-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .pr-header {
		top: 46px;
	}
}

.pr-brand {
	text-decoration: none;
	color: inherit;
}

.pr-brand .wp-block-site-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.pr-brand .wp-block-site-title a span,
.pr-tld {
	color: var(--wp--preset--color--primary-light);
}

.wp-block-navigation .wp-block-navigation-item__content {
	color: var(--wp--preset--color--chrome);
	text-decoration: none;
	transition: color 0.2s ease;
}

.wp-block-navigation .wp-block-navigation-item__content:hover,
.wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	color: var(--pr-hover-text);
}

@media (max-width: 600px) {
	.pr-header-cta {
		display: none !important;
	}
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 1.5rem;
	padding: 0.35rem 0;
}

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--base) !important;
	color: var(--wp--preset--color--contrast) !important;
}

/* ---------- Block-Stile ---------- */

.is-style-chrome,
.pr-chrome-text {
	background: var(--wp--preset--gradient--chrome);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent !important;
}

.is-style-chrome .pr-accent,
.pr-accent {
	background: var(--wp--preset--gradient--blue);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.is-style-eyebrow {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary-light);
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.is-style-eyebrow::before {
	content: "";
	width: 2rem;
	height: 2px;
	background: var(--wp--preset--gradient--blue);
	flex: none;
}

.has-text-align-center.is-style-eyebrow {
	justify-content: center;
}

.wp-block-group.is-style-card {
	background: linear-gradient(180deg, var(--wp--preset--color--surface-2), var(--wp--preset--color--surface));
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	padding: clamp(1.25rem, 3vw, 2rem);
	position: relative;
	overflow: hidden;
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.wp-block-group.is-style-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 2px;
	background: var(--wp--preset--gradient--blue);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.wp-block-group.is-style-card:hover {
	transform: translateY(-3px);
	border-color: rgba(91, 140, 255, 0.45);
	box-shadow: 0 18px 40px -20px rgba(20, 80, 255, 0.45);
}

.wp-block-group.is-style-card:hover::before {
	opacity: 1;
}

.wp-block-button .wp-block-button__link {
	transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
	box-shadow: 0 8px 24px -10px rgba(20, 80, 255, 0.7);
}

.wp-block-button .wp-block-button__link:hover {
	transform: translateY(-1px);
}

.wp-block-button.is-style-ghost .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--wp--preset--color--chrome);
	box-shadow: none;
}

.wp-block-button.is-style-ghost .wp-block-button__link:hover {
	background: var(--pr-line);
}

/* ---------- Abschnitte ---------- */

.pr-hero {
	position: relative;
	overflow: hidden;
}

.pr-hero__logo img {
	filter: drop-shadow(0 20px 50px rgba(20, 80, 255, 0.35));
	animation: pr-float 7s ease-in-out infinite;
}

@keyframes pr-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-10px); }
}

.pr-section-alt {
	background: var(--wp--preset--color--surface);
	border-top: 1px solid var(--pr-line);
	border-bottom: 1px solid var(--pr-line);
}

.pr-icon {
	width: 3rem;
	height: 3rem;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: rgba(20, 80, 255, 0.14);
	border: 1px solid rgba(91, 140, 255, 0.35);
	color: var(--wp--preset--color--primary-light);
	font-size: 1.4rem;
	line-height: 1;
}

.pr-step-number {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2.5rem;
	font-weight: 800;
	line-height: 1;
	background: var(--wp--preset--gradient--blue);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.pr-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.pr-tag,
.taxonomy-branche a,
.wp-block-post-terms a {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	padding: 0.2rem 0.6rem;
	border-radius: 999px;
	background: rgba(20, 80, 255, 0.14);
	color: var(--wp--preset--color--primary-light);
	text-decoration: none;
}

.wp-block-post-terms .wp-block-post-terms__separator {
	display: none;
}

.wp-block-post-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

/* Referenz-Karten */
.pr-ref-card .wp-block-post-featured-image {
	margin: calc(-1 * clamp(1.25rem, 3vw, 2rem)) calc(-1 * clamp(1.25rem, 3vw, 2rem)) 1rem;
	overflow: hidden;
}

.pr-ref-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.pr-ref-card:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

.pr-ref-card .wp-block-post-title a {
	text-decoration: none;
	color: inherit;
}

/* Referenz-Metadaten */
.pr-meta-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 1.25rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	background: var(--wp--preset--color--surface);
}

.pr-meta-list dt {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--wp--preset--color--muted);
}

.pr-meta-list dd {
	margin: 0.2rem 0 0;
	font-weight: 600;
}

/* ---------- Download Monitor ---------- */

.pr-downloads {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
	gap: 1.25rem;
	list-style: none;
	padding: 0;
	margin: 0;
}

.pr-download {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	box-sizing: border-box; /* Rasterzeile streckt die Karte; Innenabstand zählt mit. */
	background: linear-gradient(180deg, var(--wp--preset--color--surface-2), var(--wp--preset--color--surface));
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	padding: 1.5rem;
	transition: border-color 0.25s ease, transform 0.25s ease;
}

.pr-download:hover {
	border-color: rgba(91, 140, 255, 0.45);
	transform: translateY(-2px);
}

.pr-download__head {
	display: flex;
	gap: 0.9rem;
	align-items: flex-start;
}

.pr-download__title {
	margin: 0;
	font-size: 1.2rem;
}

.pr-download__version {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8rem;
	color: var(--wp--preset--color--muted);
}

.pr-download__desc {
	color: var(--wp--preset--color--muted);
	font-size: 0.95rem;
	margin: 0;
	flex: 1;
}

.pr-download__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	padding-top: 0.75rem;
	border-top: 1px solid var(--wp--preset--color--border);
	font-size: 0.85rem;
	color: var(--wp--preset--color--muted);
}

.pr-download__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.55rem 1.1rem;
	border-radius: 6px;
	background: var(--wp--preset--color--primary);
	color: #fff !important;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	text-decoration: none;
	transition: background 0.2s ease;
}

.pr-download__btn:hover {
	background: var(--wp--preset--color--primary-light);
}

.pr-download-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.pr-download-filter a {
	padding: 0.4rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	color: var(--wp--preset--color--chrome);
	text-decoration: none;
	font-size: 0.9rem;
}

.pr-download-filter a:hover,
.pr-download-filter a.is-active {
	border-color: var(--wp--preset--color--primary);
	background: rgba(20, 80, 255, 0.15);
	color: var(--pr-hover-text);
}

/* ---------- Kontaktformular (Contact Form 7) ---------- */

.wpcf7 form {
	display: grid;
	gap: 1.1rem;
}

.wpcf7 label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--wp--preset--color--chrome);
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 select,
.wpcf7 textarea {
	width: 100%;
	margin-top: 0.35rem;
	padding: 0.8rem 1rem;
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary-light);
	box-shadow: 0 0 0 3px rgba(20, 80, 255, 0.25);
}

.wpcf7 .wpcf7-acceptance label {
	font-weight: 400;
	color: var(--wp--preset--color--muted);
}

.wpcf7 input[type="submit"] {
	justify-self: start;
	padding: 0.85rem 1.8rem;
	border: 0;
	border-radius: 6px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	cursor: pointer;
}

.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--primary-light);
}

.pr-form-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 1.1rem;
}

.wpcf7 form .wpcf7-response-output {
	margin: 0;
	border-radius: 8px;
}

/* ---------- Footer ---------- */

/* Der Footer bleibt in beiden Modi dunkel (Markenanker, weißes Logo). */
.pr-footer {
	color-scheme: dark;
	--wp--preset--color--contrast: #f2f5fa;
	--wp--preset--color--muted: #9aa4b8;
	--wp--preset--color--chrome: #c9ced6;
	--wp--preset--color--border: #243049;
	color: var(--wp--preset--color--contrast);
	border-top: 1px solid rgba(201, 206, 214, 0.08);
	background: #05070c;
}

.pr-footer a {
	color: var(--wp--preset--color--chrome);
	text-decoration: none;
}

.pr-footer a:hover {
	color: #fff;
}

.pr-parent-brand img {
	opacity: 0.85;
	transition: opacity 0.2s ease;
}

.pr-parent-brand:hover img {
	opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Hell/Dunkel-Umschalter ---------- */

.pr-theme-toggle {
	display: inline-grid;
	place-items: center;
	flex: none;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, transform 0.3s ease;
}

.pr-theme-toggle:hover {
	border-color: var(--wp--preset--color--primary-light);
	color: var(--wp--preset--color--primary-light);
	transform: rotate(15deg);
}

.pr-theme-toggle svg {
	width: 1.15rem;
	height: 1.15rem;
}

/* Dunkel: Sonne zeigen (wechselt zu hell) – Hell: Mond zeigen. */
.pr-theme-toggle .pr-moon,
:root[data-theme="light"] .pr-theme-toggle .pr-sun {
	display: none;
}

:root[data-theme="light"] .pr-theme-toggle .pr-moon {
	display: block;
}

/* Im hellen Modus braucht die Bildmarke etwas mehr Tiefe. */
:root[data-theme="light"] .pr-hero__logo img {
	filter: drop-shadow(0 20px 40px rgba(20, 80, 255, 0.25));
}

.pr-footer-list {
	list-style: none;
	padding-left: 0;
}

/* ---------- Preis auf der Download-Karte ---------- */

.pr-download__head > div {
	flex: 1;
	min-width: 0;
}

.pr-download__price {
	flex: none;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	border: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--muted);
	white-space: nowrap;
}

.pr-download.is-paid .pr-download__price {
	border-color: transparent;
	background: var(--wp--preset--gradient--blue);
	color: #ffffff;
}

/* ---------- Shop: Warenkorb & Kasse (Download Monitor) ---------- */

.dlm-checkout form,
.dlm-cart {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 900px) {
	.dlm-checkout form {
		grid-template-columns: 1.2fr 1fr;
		align-items: start;
	}
}

.dlm-checkout-billing,
.dlm-checkout-order-review,
.dlm-cart table {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	padding: clamp(1rem, 3vw, 1.75rem);
}

.dlm-checkout h2 {
	font-size: var(--wp--preset--font-size--large);
	margin-top: 0;
}

.dlm-checkout input[type="text"],
.dlm-checkout input[type="email"],
.dlm-checkout select {
	width: 100%;
	padding: 0.7rem 0.9rem;
	font: inherit;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	box-sizing: border-box;
}

.dlm-checkout .dlm-checkout-field-error {
	border-color: #e5484d;
}

.dlm-checkout table,
.dlm-cart table {
	width: 100%;
	border-collapse: collapse;
}

.dlm-checkout th,
.dlm-checkout td,
.dlm-cart th,
.dlm-cart td {
	padding: 0.6rem 0.25rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
	text-align: left;
}

.pr-checkout-legal {
	display: grid;
	gap: 0.9rem;
	margin: 1.25rem 0;
	font-size: 0.9rem;
	color: var(--wp--preset--color--muted);
}

.pr-checkbox {
	display: flex;
	gap: 0.7rem;
	align-items: flex-start;
	padding: 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
}

.pr-checkbox input {
	margin-top: 0.25rem;
	flex: none;
	accent-color: var(--wp--preset--color--primary);
}

.pr-checkbox.is-invalid {
	border-color: #e5484d;
}

.pr-checkout-legal-error {
	color: #e5484d;
	font-weight: 600;
}

#dlm_checkout_submit,
.dlm-cart .dlm-button,
.dlm-cart a.button {
	display: inline-block;
	width: 100%;
	padding: 0.95rem 1.5rem;
	border: 0;
	border-radius: 6px;
	background: var(--wp--preset--color--primary);
	color: #ffffff;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700;
	font-size: 1.05rem;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

#dlm_checkout_submit:hover {
	background: var(--wp--preset--color--primary-light);
}

/* Kasse/Warenkorb in voller Inhaltsbreite statt Textspalte */
.is-layout-constrained > .dlm-checkout,
.is-layout-constrained > .dlm-cart {
	max-width: var(--wp--style--global--wide-size) !important;
}

/* Zahlungsarten: Plugin-Hintergründe an das Theme anpassen */
.dlm-checkout-payment ul {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
}

.dlm-checkout-payment li,
.dlm-checkout-payment label {
	background: transparent !important;
	color: var(--wp--preset--color--contrast);
}

.dlm-checkout-payment li {
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
}

.dlm-checkout-payment label {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	font-weight: 600;
}

.dlm-checkout-payment input {
	accent-color: var(--wp--preset--color--primary);
}

.dlm_gateway_details p {
	margin: 0.35rem 0 0;
	font-size: 0.85rem;
	color: var(--wp--preset--color--muted);
}

.dlm-checkout .dlm-checkout-billing,
.dlm-checkout .dlm-checkout-order-review {
	float: none;
	width: auto;
}

/* Header bei mittleren Breiten: Menü einzeilig halten. Der CTA entfällt dort,
   „Kontakt“ steht ohnehin im Menü. Unter 600 px übernimmt das Burger-Menü. */
.pr-header .wp-block-navigation-item__content,
.pr-header .wp-block-button__link {
	white-space: nowrap;
}

@media (max-width: 1100px) {
	.pr-header-cta {
		display: none !important;
	}

	.pr-header .wp-block-navigation__container {
		gap: 1.1rem !important;
	}
}

/* Burger-Menü schon bis 900 px (WordPress schaltet fest bei 600 px um –
   dazwischen passen die Menüpunkte nicht neben Logo und Umschalter). */
@media (min-width: 600px) and (max-width: 899px) {
	.pr-header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.pr-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}
