/*
Theme Name: andrewegner.de
Theme URI: https://andrewegner.de/
Author: André Egner
Description: Clean, bespoke implementation for andrewegner.de — no page-builder, no inherited legacy theme dependency. Built classic-PHP-template style for full control over the approved Dark Editorial layout and interaction system.
Version: 1.21.4
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.1
License: Proprietary
Text Domain: andrewegner-de
*/

/* ---------- Self-hosted fonts (no runtime third-party request — see assets/fonts/LICENSE.txt) ---------- */

@font-face {
	font-family: "Fraunces";
	src: url("assets/fonts/fraunces-variable.woff2") format("woff2");
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Inter";
	src: url("assets/fonts/inter-variable.woff2") format("woff2");
	font-weight: 380 720;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "JetBrains Mono";
	src: url("assets/fonts/jetbrains-mono-variable.woff2") format("woff2");
	font-weight: 400 500;
	font-style: normal;
	font-display: swap;
}

/* ---------- Design tokens — docs/DESIGN.md ---------- */

:root {
	/* Dark Editorial palette. One coherent near-black field across the whole page —
	   section transitions are carried by thin graphite rules, never by shifting blacks. */
	--color-bg: #000000;
	--color-bg-raised: #0a0a0a;
	--color-fg: #f2efe8;
	--color-fg-muted: #a5a09a;
	/* WU-04 a11y fix (2026-09-03): was #5f5b56 — 3.12:1 direct and 2.42:1 for the 0.82-opacity
	   inactive pillar numerals, below the WCAG 2.2 AA floors (4.5:1 small text / 3:1 large). #807a73
	   measures 4.95:1 direct (footer meta, 12px) and 3.59:1 at 0.82 (pillar index, 40px). */
	--color-fg-dim: #807a73;
	--color-rule: #1c1c1c;
	--color-rule-strong: #2b2b2b;
	--color-accent-silver: #c9cbc4;
	--color-accent-warm: #d8b98c;
	--color-accent-violet: #8f7fe8;
	--color-accent-refraction: #7fd8e0;
	--color-focus: #7fd8e0;
	--gradient-accent: linear-gradient(90deg, var(--color-accent-violet), var(--color-accent-refraction));

	--font-display: "Fraunces", Georgia, serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

	--text-eyebrow: 0.75rem;
	--text-body: 1rem;
	--text-body-lg: clamp(1.0625rem, 0.95rem + 0.4vw, 1.3125rem);
	--text-h2: clamp(2.25rem, 1.5rem + 3.1vw, 3.75rem);
	--text-h1-hero: clamp(3rem, 1.9rem + 5.3vw, 5.5rem);
	--text-h3: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
	--text-kpi: clamp(1.5rem, 1.05rem + 1.5vw, 2.25rem);

	--space-1: 0.5rem;
	--space-2: 1rem;
	--space-3: 1.5rem;
	--space-4: 2.5rem;
	--space-5: 4rem;
	--space-6: 6rem;
	--space-7: 9rem;

	--container-max: 1400px;
	--container-pad: clamp(1.25rem, 3vw, 4rem);

	--motion-fast: 150ms;
	--motion-base: 400ms;
	--motion-slow: 800ms;
	--ease-editorial: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset / base ---------- */

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

html {
	background: var(--color-bg);
	color-scheme: dark;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-fg);
	font-family: var(--font-body);
	font-size: var(--text-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: inherit;
	text-decoration: none;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-display);
	font-weight: 500;
	line-height: 1.1;
	margin: 0;
}

p {
	margin: 0;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

.container {
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.eyebrow {
	display: block;
	font-family: var(--font-mono);
	font-size: var(--text-eyebrow);
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--color-accent-silver);
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	background: var(--color-bg-raised);
	color: var(--color-fg);
	padding: var(--space-2) var(--space-3);
	border: 1px solid var(--color-accent-silver);
}

.skip-link:focus {
	left: var(--space-2);
	top: var(--space-2);
}

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

/* Global reduced-motion behavior — every future JS-driven effect (WU-03) must also gate
   itself the same way via the prefersReducedMotion() check in assets/js/main.js, since
   this rule alone can't stop a JS timeline from ever starting. */
@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;
	}
}
