/*
Theme Name:  VSlide
Theme URI:   https://example.com/
Author:      Christian
Description: Portfolio-Theme mit vertikalem Hero-Slider, Projektübersicht und Projektseiten aus Gutenberg-Zeilen.
Version:     1.2.8
Requires at least: 6.3
Requires PHP: 7.4
License:     GPL-2.0-or-later
Text Domain: vslide
*/

/* ==================================================================
 * Schrift: Regesto Grotesk (Webfont-Dateien in assets/fonts/ ablegen)
 * ================================================================ */
@font-face {
	font-family: "Regesto Grotesk";
	src: url("assets/fonts/RegestoGrotesk-Regular.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Regesto Grotesk";
	src: url("assets/fonts/RegestoGrotesk-Medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Regesto Grotesk";
	src: url("assets/fonts/RegestoGrotesk-Bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* ==================================================================
 * Design-Tokens (Werte aus dem Entwurf, Rasterbreite 1280 px)
 * ================================================================ */
:root {
	--c-bg: #ffffff;
	--c-fg: #000000;
	--c-muted: #7f7f7f;
	--c-footer: #4d4d4d;
	--c-accent: #000000;

	--font: "Regesto Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;

	/* Schriftgrößen / Zeilenhöhen */
	--fs-l: 25px;  --lh-l: 30px;    /* Slider-Text, Info-Seite, Listen */
	--fs-nav: 20px;                 /* Menü, Jahreszahl */
	--fs-desc: 18px; --lh-desc: 1.2;/* Projektbeschreibung, Footer */
	--fs-sub: 13px;                 /* Projekttitel unter "work" */
	--fs-tile: 11px;                /* Titel auf den Kacheln */

	/* Abstände */
	--pad: 20px;                    /* Seitenrand Menü / Info-Seite */
	--pad-project: 25px;            /* Seitenrand Projekttexte */
	--top: 90px;                    /* Abstand Text unter dem Menü */

	--frame-max: 1920px;

	/* Hover auf verlinkten Bildern (Kacheln, Slider): Weichzeichner.
	   12 px bei 640 px Bildbreite (Entwurf), mitwachsend mit der Breite:
	   Desktop = halbe Rahmenbreite, mobil = ganze Breite. */
	--hover-blur: calc(min(50vw, var(--frame-max) / 2) * 12 / 640);
}

@media (max-width: 782px) {
	:root {
		--hover-blur: calc(100vw * 12 / 640);
		--fs-l: 20px;  --lh-l: 25px;
		--fs-nav: 18px;
		--fs-desc: 16px;
		--fs-tile: 12px;
		--pad: 16px;
		--pad-project: 16px;
		--top: 64px;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	background: var(--c-bg);
}

/* Wichtig für mix-blend-mode: explizite Hintergrundfarbe */
body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-fg);
	font-family: var(--font);
	font-size: var(--fs-desc);
	line-height: var(--lh-desc);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; }

/* ==================================================================
 * Rahmen: Inhalt max. 1920 px, links/rechts davon weiß.
 * ACHTUNG: hier kein transform / filter / opacity / isolation setzen,
 * sonst greift mix-blend-mode im Header und auf den Kacheln nicht mehr.
 * ================================================================ */
.site-frame {
	position: relative;
	max-width: var(--frame-max);
	margin: 0 auto;
	/* Footer auch auf kurzen Seiten unten */
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
}
.admin-bar .site-frame { min-height: calc(100svh - var(--wp-admin--admin-bar--height, 32px)); }
.site-frame > .site-main { flex: 1 0 auto; }

/* ==================================================================
 * Header: liegt über der linken Hälfte, weiß + Differenz
 * ================================================================ */
/* Fixiert beim Scrollen. Bleibt auch bei Fenstern > 1920 px auf der
   linken Hälfte des Rahmens. */
.site-header {
	position: fixed;
	top: 0;
	left: max(0px, (100% - var(--frame-max)) / 2);
	z-index: 200;
	width: calc(min(100%, var(--frame-max)) / 2);
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: start;
	padding: 12px var(--pad);
	color: #fff;
	mix-blend-mode: difference;
	font-size: var(--fs-nav);
	font-weight: 500;
	line-height: 1.2;
	pointer-events: none;           /* Klicks gehen durch den leeren Bereich */
}

.site-header a { text-decoration: none; pointer-events: auto; }
.site-header a:hover,
.site-header a:focus-visible { text-decoration: underline; text-underline-offset: .15em; }

.site-header__logo { grid-column: 1; grid-row: 1; justify-self: start; }

/* Menü-Einträge direkt ins Header-Raster legen */
.site-header__nav,
.site-header__nav ul { display: contents; }
.site-header__nav ul { list-style: none; }
.site-header__nav li { grid-row: 1; }
.site-header__nav li:nth-child(1) { grid-column: 2; justify-self: center; }
.site-header__nav li:nth-child(2) { grid-column: 3; justify-self: end; }
.site-header__nav li:nth-child(n+3) { display: none; } /* Entwurf: 2 Menüpunkte */

/* Projekttitel unter "work" (nur auf Projektseiten), linksbündig mit "work" */
.site-header__sub {
	grid-column: 2;
	grid-row: 1;
	justify-self: start;
	width: 0;
	white-space: nowrap;
	margin-top: 30px;
	font-size: var(--fs-sub);
	font-weight: 500;
}

/* Eingeloggt: Menü unter die WordPress-Admin-Leiste setzen */
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }

@media (max-width: 782px) {
	.site-header { width: 100%; left: 0; }
	.site-header__sub { margin-top: 24px; }
}

.site-main { display: block; }

/* Fallback-Inhalt (index.php) */
.content {
	padding: var(--top) var(--pad) 4rem;
	font-size: var(--fs-l);
	line-height: var(--lh-l);
}
.content > * { max-width: 48ch; }

/* ==================================================================
 * Footer
 * ================================================================ */
.site-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 1rem 125px;
	min-height: 143px;
	padding: 2rem var(--pad);
	background: var(--c-footer) url("assets/img/footer-texture.jpg") 0 0 / 800px auto repeat;
	color: #fff;
	font-size: var(--fs-desc);
	line-height: 1.2;
}

.site-footer__nav,
.site-footer ul {
	display: contents;
	list-style: none;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover,
.site-footer a:focus-visible { text-decoration: underline; text-underline-offset: .15em; }

@media (max-width: 782px) {
	.site-footer { gap: .75rem 2rem; min-height: 0; padding: 2.5rem var(--pad); }
}

/* ==================================================================
 * Hilfsklassen
 * ================================================================ */
.is-style-vs-muted,
.is-style-vs-muted * { color: var(--c-muted); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.screen-reader-text:focus {
	clip: auto; width: auto; height: auto;
	z-index: 1000; top: 8px; left: 8px;
	padding: .5em 1em; background: #fff; color: #000;
}

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