/*
Theme Name: Draußenwetter
Author: Jan Althaus
Description: Block-Theme für Draußenwetter im hellen WetterCube-Design (weiß, Himmelblau, Orange, Navy). Montserrat wird lokal ausgeliefert, es gibt keine Verbindung zu Fremd-Diensten. Hell und dunkel folgen dem Gerät.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: draussenwetter
*/

:root {
	--dwt-bg: #ffffff;
	--dwt-flaeche: #f5fbfe;
	--dwt-rand: #b9d6e4;
	--dwt-text: #111827;
	--dwt-text2: #4b5563;
	--dwt-himmel: #87ceeb;
	--dwt-marke-akzent: #2b7fa3;
	--dwt-link: #1a6f9c;
	--dwt-navy: #0b2545;
	--dwt-fuss-bg: #0a1626;
	--dwt-fuss-text: #9fb1c4;
	color-scheme: light dark;
}
:root[data-design="dark"] {
	--dwt-bg: #0a1626;
	--dwt-flaeche: #0e2036;
	--dwt-rand: #27445e;
	--dwt-text: #e8f1f8;
	--dwt-text2: #a4b6c8;
	--dwt-link: #8fd0ee;
	--dwt-marke-akzent: #87ceeb;
	--dwt-navy: #87ceeb;
	--dwt-fuss-bg: #06101c;
	--dwt-fuss-text: #8aa0b5;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-design="light"]) {
		--dwt-bg: #0a1626;
		--dwt-flaeche: #0e2036;
		--dwt-rand: #27445e;
		--dwt-text: #e8f1f8;
		--dwt-text2: #a4b6c8;
		--dwt-link: #8fd0ee;
		--dwt-marke-akzent: #87ceeb;
		--dwt-navy: #87ceeb;
		--dwt-fuss-bg: #06101c;
		--dwt-fuss-text: #8aa0b5;
	}
}
:root[data-design="light"] { color-scheme: light; }
:root[data-design="dark"] { color-scheme: dark; }

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
a { text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--dwt-himmel); outline-offset: 2px; border-radius: 6px; }
.wp-site-blocks > * { margin-block-start: 0 !important; margin-block-end: 0 !important; }

/* Kopf */
.dwt-kopf {
	position: sticky; top: 0; z-index: 20;
	background: color-mix(in srgb, var(--dwt-bg) 92%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--dwt-rand);
}
.admin-bar .dwt-kopf { top: 32px; }
@media (max-width: 782px) { .admin-bar .dwt-kopf { top: 46px; } }
.dwt-kopf-in { max-width: 1120px; margin: 0 auto; padding: 0 20px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dwt-marke { font-weight: 600; font-size: 24px; letter-spacing: -0.5px; color: var(--dwt-text) !important; text-decoration: none !important; white-space: nowrap; }
.dwt-marke b { font-weight: 600; color: var(--dwt-marke-akzent); }
.dwt-marke-wrap { display: flex; align-items: baseline; gap: 2px 10px; flex-wrap: wrap; }
.dwt-von { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dwt-text2) !important; text-decoration: none !important; white-space: nowrap; }
.dwt-von:hover { color: var(--dwt-link) !important; }
.dwt-kopf .wp-block-navigation { font-size: 15px; font-weight: 500; }
.dwt-kopf .wp-block-navigation a { text-decoration: none; }
.dwt-kopf .wp-block-navigation a:hover { color: var(--dwt-link); }

/* Seiten */
.dwt-seite h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); letter-spacing: -0.02em; }

/* Fuß */
.dwt-fuss { background: var(--dwt-fuss-bg); color: var(--dwt-fuss-text); padding: 40px 20px; font-size: 14px; }
.dwt-fuss-in { max-width: 1120px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.dwt-fuss p { margin: 0 0 8px; }
.dwt-fuss b { color: #fff; }
.dwt-fuss a { color: #cfe3f1; margin-right: 16px; text-decoration: none; }
.dwt-fuss a:hover { text-decoration: underline; }
.dwt-fuss .dwt-links { display: flex; flex-wrap: wrap; gap: 4px 0; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Ratgeber-Artikel */
.dwt-artikel .dwt-kategorie { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.dwt-artikel .dwt-kategorie a { color: var(--dwt-link); text-decoration: none; }
.dwt-artikel .dwt-datum { color: var(--dwt-text2); font-size: 14px; margin: 0 0 28px; }
.dwt-artikel .wp-block-post-content { font-size: 17px; line-height: 1.7; }
.dwt-artikel .wp-block-post-content h2 { font-size: 24px; margin: 2em 0 0.5em; }
.dwt-artikel .wp-block-post-content h3 { font-size: 19px; margin: 1.6em 0 0.4em; }
.dwt-artikel .wp-block-post-content table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 1.2em 0; }
.dwt-artikel .wp-block-post-content th, .dwt-artikel .wp-block-post-content td { border-bottom: 1px solid var(--dwt-rand); padding: 8px 10px; text-align: left; vertical-align: top; }
.dwt-artikel .wp-block-post-content th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dwt-text2); }
.dwt-artikel .dw-quellenzeile, .dwt-artikel .dw-hinweisbox { font-size: 14px; color: var(--dwt-text2); }
.dwt-artikel .dw-hinweisbox { border: 1px solid var(--dwt-rand); border-radius: 12px; padding: 12px 16px; background: var(--dwt-flaeche); }
.dwt-artikel .dw-projektbox { border-left: 4px solid var(--dwt-himmel); padding: 4px 0 4px 16px; margin: 1.6em 0; }
.dwt-weiter { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--dwt-rand); }
.dwt-weiter h2 { font-size: 18px; margin: 0 0 10px; }
.dwt-weiter ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.dwt-weiter a { display: inline-block; padding: 7px 13px; border: 1px solid var(--dwt-rand); border-radius: 999px; font-size: 14px; text-decoration: none; color: var(--dwt-text); }
.dwt-weiter a:hover { border-color: var(--dwt-himmel); }

/* Umschalter hell / automatisch / dunkel im Kopf */
.dwt-design { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--dwt-rand); border-radius: 999px; background: transparent; color: var(--dwt-text); cursor: pointer; }
.dwt-design:hover { border-color: var(--dwt-himmel); }
.dwt-design svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dwt-design .i-hell, .dwt-design .i-dunkel { display: none; }
html[data-design="light"] .dwt-design .i-auto, html[data-design="dark"] .dwt-design .i-auto { display: none; }
html[data-design="light"] .dwt-design .i-hell { display: block; }
html[data-design="dark"] .dwt-design .i-dunkel { display: block; }
