/*
 * Wilke design tokens — the single set of values every style is built from.
 * Documented in design.md. Change a value here and it changes everywhere.
 *
 * Colors are mirrored in Elementor → Site Settings → Global Colors — keep both in sync.
 */

:root {
	/* ── Colors ───────────────────────────────────────────── */
	/* Official Wilke brand colors (brand/Farbwerte_neu_Wilke_Technology.png) */
	--wilke-color-brand-green: #7baa2b; /* Wilke green (leaf). Backgrounds + graphics; on white only for large graphics (2.75:1) */
	--wilke-color-brand-black: #000000; /* Wilke black ("Wilke") */
	--wilke-color-brand-grey:  #9c9c9c; /* Wilke 50% grey ("Technology"). Decorative only, never text on white (2.75:1) */

	/* Roles (use these in components) */
	--wilke-color-primary:        var(--wilke-color-brand-green); /* primary buttons + text badges, white text. Designer's choice 2026-10-10: logo green + white = 2.8:1, below WCAG AA 4.5:1 (accepted, see design.md §3) */
	--wilke-color-on-primary:     #ffffff; /* text on primary */
	--wilke-color-primary-text:   #4e7518; /* derived darker green for green text/links on white (5.4:1) */
	--wilke-color-primary-hover:  #1a1a1a; /* primary button hover: anthracite bg, white text */
	--wilke-color-dark:           #1a1a1a; /* anthracite: dark sections, footer (softer than pure black for large areas) */
	--wilke-color-white:          #ffffff;
	--wilke-color-bg-light:       #fafafa; /* subtle surface: hover states, footer, placeholders (Vercel-feel: barely-there grey) */
	--wilke-color-bg-muted:       #f2f2f2; /* pressed / hover on light surfaces */
	--wilke-color-text:           #1a1a1a; /* body text */
	--wilke-color-text-secondary: #5c5c5c; /* captions, meta, supporting text (6.7:1) */
	--wilke-color-border:         #ebebeb; /* hairlines, card borders, dividers, frame lines */
	--wilke-color-border-strong:  #d4d4d4; /* outlines of secondary buttons, inputs */
	--wilke-color-frame-mark:     var(--wilke-color-brand-grey); /* "+" marks where frame lines cross */
	--wilke-color-accent:         var(--wilke-color-brand-green); /* markers, icons, active states */
	--wilke-color-focus:          #4e7518; /* keyboard focus ring */

	/* ── Font families ────────────────────────────────────── */
	/* Fira = free web equivalent of Wilke print font FF Meta. Swap here if FF Meta web licenses exist. */
	--wilke-font-sans: "Fira Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--wilke-font-mono: "Fira Mono", ui-monospace, Consolas, "Courier New", monospace;

	/* ── Font weights ─────────────────────────────────────── */
	--wilke-weight-regular:  400;
	--wilke-weight-medium:   500;
	--wilke-weight-semibold: 600;

	/* ── Type scale (fluid between 360px and 1440px viewport) ── */
	--wilke-text-h1:    clamp(2.5rem, 1.83rem + 2.96vw, 4.5rem);    /* 40 → 72px */
	--wilke-text-h2:    clamp(2rem, 1.67rem + 1.48vw, 3rem);        /* 32 → 48px */
	--wilke-text-h3:    clamp(1.5rem, 1.33rem + 0.74vw, 2rem);      /* 24 → 32px */
	--wilke-text-h4:    clamp(1.25rem, 1.17rem + 0.37vw, 1.5rem);   /* 20 → 24px */
	--wilke-text-lead:  clamp(1.125rem, 1.08rem + 0.19vw, 1.25rem); /* 18 → 20px intro text */
	--wilke-text-body:  1.0625rem;                                  /* 17px */
	--wilke-text-small: 0.875rem;                                   /* 14px */
	--wilke-text-nav:   0.875rem;                                   /* 14px, restrained navigation */
	--wilke-text-button: 0.9375rem;                                 /* 15px */
	--wilke-text-spec:  0.875rem;                                   /* 14px technical data (mono) */
	--wilke-text-eyebrow: 0.8125rem;                                /* 13px overline labels (mono) */

	/* ── Line heights ─────────────────────────────────────── */
	--wilke-leading-tight: 1.1;  /* H1, H2 */
	--wilke-leading-snug:  1.3;  /* H3, H4, buttons */
	--wilke-leading-body:  1.6;  /* paragraphs */

	/* ── Letter spacing ───────────────────────────────────── */
	--wilke-tracking-tight:   -0.03em;  /* H2 */
	--wilke-tracking-tighter: -0.035em; /* H1: dense, confident display type (Fira gets cramped below this) */
	--wilke-tracking-snug:    -0.015em; /* H3, H4 */
	--wilke-tracking-wide:   0.08em; /* uppercase eyebrow labels */

	/* ── Spacing scale (8px rhythm) ───────────────────────── */
	--wilke-space-2xs: 0.25rem; /*  4px */
	--wilke-space-xs:  0.5rem;  /*  8px */
	--wilke-space-sm:  1rem;    /* 16px */
	--wilke-space-md:  1.5rem;  /* 24px */
	--wilke-space-lg:  2.5rem;  /* 40px */
	--wilke-space-xl:  4rem;    /* 64px */
	--wilke-space-2xl: 6rem;    /* 96px */

	/* ── Layout ───────────────────────────────────────────── */
	--wilke-content-max:  1280px; /* standard content width */
	--wilke-wide-max:     1440px; /* full-bleed media / wide grids */
	--wilke-text-max:     68ch;   /* comfortable reading line length */
	--wilke-gutter:       1.25rem;                              /* page side padding: 20px mobile */
	--wilke-grid-gap:     var(--wilke-space-md);                /* 24px */
	--wilke-section-space: clamp(4rem, 2.67rem + 5.93vw, 8rem); /* 64 → 128px vertical section padding */
	--wilke-frame-inset:  1.5rem; /* frame lines sit 24px outside the content edge */
	--wilke-header-height: 72px;

	/* ── Shape & depth ────────────────────────────────────── */
	--wilke-radius-sm: 2px;  /* inputs, tags */
	--wilke-radius-md: 6px;  /* small boxes, inputs, badges */
	--wilke-radius-lg: 12px; /* media, CTA panels, dropdowns */
	--wilke-radius-pill: 999px; /* buttons, nav hover, chips */
	--wilke-border-width: 1px;
	--wilke-shadow-sm: 0 1px 2px rgb(31 35 40 / 0.06);
	--wilke-shadow-md: 0 4px 16px rgb(31 35 40 / 0.08); /* card hover only */
	--wilke-shadow-float: 0 1px 2px rgb(31 35 40 / 0.04), 0 12px 32px rgb(31 35 40 / 0.08); /* floating layers */

	/* Floating layers (sticky header, dropdowns, mobile menu, page sub-nav, cookie banner).
	   2026-11-21 user: "the transparent in the menu is not good" → solid white, no see-through blur.
	   (Was frosted glass: white 80/90 % + blur.) Names kept so every layer follows this one place. */
	--wilke-glass-bg:          #ffffff;
	--wilke-glass-bg-strong:   #ffffff;
	--wilke-glass-blur:        none;
	--wilke-glass-blur-strong: none;

	/* ── Motion ───────────────────────────────────────────── */
	--wilke-duration-fast: 150ms;
	--wilke-duration-base: 250ms;
	--wilke-ease: cubic-bezier(0.2, 0, 0, 1);
}

/* Tablet (Elementor tablet breakpoint: 768–1024px) */
@media (min-width: 768px) {
	:root {
		--wilke-gutter:   2rem;                 /* 32px */
		--wilke-grid-gap: var(--wilke-space-lg); /* 40px */
	}
}

/* Desktop (above Elementor tablet breakpoint) */
@media (min-width: 1025px) {
	:root {
		--wilke-gutter: 3rem; /* 48px */
	}
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--wilke-duration-fast: 0ms;
		--wilke-duration-base: 0ms;
	}
}

/* Glass falls back to solid white where blur is not supported or the visitor asks for less transparency. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	:root {
		--wilke-glass-bg: #ffffff;
		--wilke-glass-bg-strong: #ffffff;
	}
}

@media (prefers-reduced-transparency: reduce) {
	:root {
		--wilke-glass-bg: #ffffff;
		--wilke-glass-bg-strong: #ffffff;
		--wilke-glass-blur: none;
		--wilke-glass-blur-strong: none;
	}
}
