/*
Theme Name: Naumburg For Future
Theme URI: https://naumburgforfuture.de/
Author: Naumburg For Future
Description: Schlankes, eigens für Naumburg For Future entwickeltes Theme. Uebernimmt Header, Navigation, Footer, globale Typografie, Farben und responsive Grundstruktur. Seiteninhalte werden mit Elementor gepflegt.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Tested up to: 6.7
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: naumburg-for-future
*/

/* ==========================================================================
   1. Design-Tokens (zentrale Farben, Schriften, Abstaende, Breakpoints)
   ========================================================================== */

:root {
	/* Farbsystem - an die Markenfarben von Greenpeace Deutschland
	   angelehnt (greenpeace.de: --color-brand-green #73be1e,
	   --color-antracite #313131, --color-decoration-natural #f2ede4).
	   Das kraeftige Markengruen (--nff-color-accent) wird bewusst NUR
	   als Flaeche/Fuellung eingesetzt (Buttons, große Akzente), nie als
	   kleiner Fließtext/Link, weil es auf hellem Hintergrund allein zu
	   wenig Kontrast fuer Text hat (WCAG). Fuer Links/Ueberschriften/
	   Fokus-Ringe kommt eine abgedunkelte, textkontrast-taugliche
	   Gruen-Variante zum Einsatz. Siehe doku/04-ELEMENTOR-GLOBAL-SETTINGS.md */
	--nff-color-primary: #3f7a0d;        /* dunkles, textkontrast-taugliches Gruen (Links, Ueberschriften, Fokus) */
	--nff-color-primary-dark: #2e5c0a;   /* Hover/aktiv-Zustaende von --nff-color-primary */
	--nff-color-accent: #73be1e;         /* Greenpeace-Markengruen als Flaeche (Buttons, große Akzente) */
	--nff-color-accent-hover: #5fa70f;   /* Hover-Zustand von --nff-color-accent */
	--nff-color-accent-soft: #c2eb99;    /* helles Gruen fuer sanfte Hervorhebungen/Badges */
	--nff-color-background: #f2ede4;     /* warmes helles Beige (Greenpeace "natural") */
	--nff-color-surface: #ffffff;        /* Flaechen/Karten auf Beige */
	--nff-color-text: #313131;           /* Anthrazit (Greenpeace-Textfarbe) */
	--nff-color-text-muted: #5c5c5c;
	--nff-color-border: #e3e3e3;
	--nff-color-focus: #2e5c0a;

	/* Typografie - Systemschriften: keine externen Anfragen, keine
	   Font-Dateien zu pflegen, siehe doku/01-ANALYSE-UND-PLAN.md */
	--nff-font-heading: "Iowan Old Style", "Georgia", "Noto Serif", serif;
	--nff-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;

	--nff-content-max: 1320px;
	--nff-content-narrow: 760px;
	--nff-space-s: clamp(0.75rem, 0.6rem + 0.5vw, 1.25rem);
	--nff-space-m: clamp(1.5rem, 1.1rem + 1.5vw, 2.5rem);
	--nff-space-l: clamp(2.5rem, 1.8rem + 3vw, 5rem);
	--nff-radius: 0.5rem;
}

@media (prefers-color-scheme: dark) {
	/* Bewusst kein separates Dark-Theme: die Website ist auf ein warmes,
	   helles Creme ausgelegt. Wir stellen nur sicher, dass Systemfelder
	   (z. B. Formularelemente) nicht unlesbar werden. */
	:root {
		color-scheme: light;
	}
}

/* ==========================================================================
   2. Basis-Reset
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
	margin: 0;
	background: var(--nff-color-background);
	color: var(--nff-color-text);
	font-family: var(--nff-font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
}

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

h1, h2, h3, h4 {
	font-family: var(--nff-font-heading);
	color: var(--nff-color-primary);
	line-height: 1.2;
	margin: 0 0 var(--nff-space-s);
}

h1 { font-size: clamp(2.25rem, 1.7rem + 2.5vw, 3.75rem); }
h2 { font-size: clamp(1.6rem, 1.35rem + 1.1vw, 2.375rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem); }

p { margin: 0 0 var(--nff-space-s); max-width: 70ch; }

a { color: var(--nff-color-primary); }
a:hover { color: var(--nff-color-primary-dark); }

/* Sichtbarer Fokuszustand fuer Tastaturbedienung, siehe Abschnitt 37 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--nff-color-focus);
	outline-offset: 2px;
}

/* ==========================================================================
   3. Skip-Link (Barrierefreiheit)
   ========================================================================== */

.nff-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--nff-color-primary);
	color: #fff;
	padding: 0.75em 1.25em;
	border-radius: 0 0 var(--nff-radius) 0;
	text-decoration: none;
}

.nff-skip-link:focus {
	left: 0;
}

/* ==========================================================================
   4. Layout-Hilfsklassen
   ========================================================================== */

.nff-container {
	max-width: var(--nff-content-max);
	margin-inline: auto;
	padding-inline: var(--nff-space-m);
}

/* ==========================================================================
   5. Header & Navigation
   ========================================================================== */

.nff-site-header {
	background: var(--nff-color-background);
	border-bottom: 1px solid var(--nff-color-border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.nff-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--nff-space-s);
	padding-block: 0.9rem;
}

.nff-site-branding {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
}

.nff-site-branding img {
	max-height: 44px;
	width: auto;
}

.nff-site-branding__name {
	font-family: var(--nff-font-heading);
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--nff-color-primary);
}

.nff-primary-nav ul {
	list-style: none;
	display: flex;
	gap: clamp(1rem, 0.5rem + 1.5vw, 2.25rem);
	margin: 0;
	padding: 0;
}

.nff-primary-nav a {
	text-decoration: none;
	font-weight: 600;
	color: var(--nff-color-text);
	padding: 0.5rem 0.1rem;
}

.nff-primary-nav a:hover { color: var(--nff-color-primary); }

.nff-menu-toggle {
	display: none;
	appearance: none;
	background: var(--nff-color-primary);
	color: #fff;
	border: 0;
	border-radius: var(--nff-radius);
	padding: 0.6rem 0.9rem;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 767px) {
	.nff-menu-toggle { display: inline-flex; align-items: center; gap: 0.5rem; }

	.nff-primary-nav {
		display: none;
		width: 100%;
		order: 3;
	}

	.nff-primary-nav.is-open { display: block; }

	.nff-primary-nav ul {
		flex-direction: column;
		gap: 0;
		border-top: 1px solid var(--nff-color-border);
		padding-block: 0.5rem;
	}

	.nff-primary-nav a {
		display: block;
		padding: 0.85rem 0.25rem;
		min-height: 44px;
	}

	.nff-header-inner {
		flex-wrap: wrap;
	}
}

/* ==========================================================================
   6. Buttons (auch von Elementor-Buttons via Klasse nutzbar)
   ========================================================================== */

.nff-button,
.elementor-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border-radius: var(--nff-radius);
	padding: 0.85rem 1.6rem;
	font-weight: 600;
	text-decoration: none;
	min-height: 44px;
	transition: background-color 150ms ease, color 150ms ease;
}

.nff-button--primary {
	/* Kraeftiges Markengruen als Flaeche + dunkler Text statt Weiß:
	   weiße Schrift auf #73be1e faellt unter den WCAG-Mindestkontrast. */
	background: var(--nff-color-accent);
	color: var(--nff-color-text);
}

.nff-button--primary:hover {
	background: var(--nff-color-primary-dark);
	color: #fff;
}

.nff-button--secondary {
	background: transparent;
	color: var(--nff-color-primary);
	border: 2px solid var(--nff-color-primary);
}

.nff-button--secondary:hover { background: var(--nff-color-primary); color: #fff; }

/* ==========================================================================
   7. Footer
   ========================================================================== */

.nff-site-footer {
	background: var(--nff-color-primary);
	color: #eef2ec;
	margin-top: var(--nff-space-l);
}

.nff-footer-inner {
	display: grid;
	gap: var(--nff-space-m);
	padding-block: var(--nff-space-l) var(--nff-space-m);
	grid-template-columns: 1.3fr 1fr 1fr;
}

@media (max-width: 767px) {
	.nff-footer-inner { grid-template-columns: 1fr; text-align: left; }
}

.nff-site-footer h2,
.nff-site-footer h3 {
	color: #fff;
	font-size: 1.05rem;
	margin-bottom: 0.75rem;
}

.nff-site-footer a {
	color: #eef2ec;
}

.nff-site-footer a:hover { color: var(--nff-color-accent); }

.nff-footer-brand p { color: #d8e0d3; max-width: 40ch; }

.nff-footer-links ul,
.nff-footer-social ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.nff-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding-block: var(--nff-space-s);
	font-size: 0.9rem;
	color: #cdd7c8;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	justify-content: space-between;
}

/* ==========================================================================
   8. Elementor-Kompatibilitaet
   ========================================================================== */

/* Verhindert, dass Elementor-Container ungewollt breiter als der
   definierte Inhaltsbereich laufen, falls "Boxed" statt "Full Width"
   verwendet wird. Zentrale Breite bitte primaer ueber die Elementor
   Site Settings (Layout > Content Width) auf --nff-content-max setzen. */
.elementor-section.elementor-section-boxed > .elementor-container {
	max-width: var(--nff-content-max);
}
