/*
Theme Name: WERKRAUM x HORNNISSEN
Theme URI: https://werkraum.example
Author: Werkraum
Author URI: https://werkraum.example
Description: Klassisches, pixelgenau umgesetztes PHP-Theme fuer WERKRAUM x HORNNISSEN. Enthaelt Startseite mit Hero-Slider, Linoldruck-Seite mit Slider, Wir/Incentives/Kontakt mit Bild+Text sowie Impressum/Datenschutz/AGB. Hauptmenue und Footer-Menue werden bei Aktivierung automatisch angelegt.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: werkraum
*/

/* =========================================================
   0. FONTS
   ========================================================= */
@font-face {
	font-family: 'Roboto Condensed';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/roboto-condensed-latin-400-normal.woff2') format('woff2');
}
@font-face {
	font-family: 'Roboto Condensed';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('assets/fonts/roboto-condensed-latin-700-normal.woff2') format('woff2');
}

/* =========================================================
   1. DESIGN TOKENS
   Referenzbreite der Vorlagen: 1920px (siehe Beispielseiten).
   Werte per clamp() zwischen Tablet und Desktop fluessig,
   damit die Vorlage bei 1920px pixelgenau, darunter proportional
   skaliert. Unter 760px greift ein eigenes Mobile-Layout.
   ========================================================= */
:root{
	/* Farben laut Vorgabe */
	--color-yellow: #ffea3d;
	--color-black: #000000;
	--color-white: #ffffff;
	--color-lilac: #d7c8fa;
	--color-ink: #1a1a1a;

	/* Header / Footer / Hero */
	--header-height: clamp(120px, 10.4167vw, 200px);
	--footer-height: clamp(32px, 2.0833vw, 40px);
	--hero-height: clamp(360px, 45.8333vw, 880px);

	/* Abstaende (aus Vorlage vermessen) */
	--pad-left: clamp(20px, 2.0833vw, 40px);
	--pad-right: clamp(20px, 6.3542vw, 122px);
	--content-pad-x: clamp(20px, 2.2917vw, 44px);
	--content-max: 1300px;

	/* Logos */
	--logo-werkraum-w: clamp(120px, 11.9792vw, 230px);
	--logo-hornnissen-w: clamp(96px, 8.1771vw, 157px);

	/* Typografie */
	--font-nav: clamp(15px, 1.4583vw, 28px);
	--font-footer: clamp(14px, 1.1458vw, 22px);
	--font-h1: clamp(34px, 4.1667vw, 80px);
	--font-h2: clamp(28px, 3.125vw, 60px);
	--font-body: clamp(16px, 1.6667vw, 32px);
	--line-body: clamp(24px, 3.0208vw, 58px);
	--nav-gap: clamp(18px, 3.125vw, 60px);
	--footer-gap: clamp(16px, 2.1875vw, 42px);

	--section-pad-y: clamp(40px, 4.6875vw, 90px);
}

/* =========================================================
   2. RESET / BASE
   ========================================================= */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
	margin: 0;
	font-family: 'Roboto Condensed', Arial, Helvetica, sans-serif;
	font-weight: 400;
	color: var(--color-black);
	background: var(--color-white);
	line-height: 1.4;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,p{ margin: 0; }
button{ font-family: inherit; }

.sr-only{
	position: absolute;
	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: 8px; top: -60px;
	background: var(--color-black);
	color: var(--color-white);
	padding: 10px 16px;
	z-index: 1000;
	transition: top .2s ease;
}
.skip-link:focus{ top: 8px; }

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

/* =========================================================
   3. LAYOUT WRAPPER (Flexbox, sticky footer)
   Start-Seite: Header + Hero + Footer = exakt 100vh, kein Scroll.
   Andere Seiten: min-height 100vh, Footer bleibt unten "kleben".
   ========================================================= */
.site-wrapper{
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.site-main{
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
}

.tpl-start .site-wrapper{
	height: 100vh;
	min-height: 100vh;
	overflow: hidden;
}
.tpl-start .site-main{ flex: 1 1 auto; min-height: 0; }

/* =========================================================
   4. HEADER
   ========================================================= */
.site-header{
	background: var(--color-yellow);
	color: var(--color-black);
	flex: 0 0 auto;
	height: var(--header-height);
}
.site-header__inner{
	position: relative;
	height: 100%;
	padding: 0 var(--pad-right) 0 var(--pad-left);
}

.brand-logo-link{ display: inline-block; line-height: 0; }

.brand-logo--hornnissen{
	position: absolute;
	left: var(--pad-left);
	top: 6%;
	width: var(--logo-hornnissen-w);
	height: auto;
	transform: translateX(calc(293 / 230.86 * var(--logo-werkraum-w)));
}
.brand-logo--werkraum{
	position: absolute;
	left: var(--pad-left);
	bottom: 11.5%;
	width: var(--logo-werkraum-w);
	height: auto;
}

.main-nav{
	position: absolute;
	right: var(--pad-right);
	font-size: var(--font-nav);
	line-height: 1;
	/* line-height:1 raeumt bei Roboto Condensed noch minimal Platz fuer
	   Unterlaengen unterhalb der sichtbaren Zeichen frei. Fein-Korrektur,
	   damit die sichtbare Textunterkante exakt auf der Logo-Unterkante
	   sitzt (pixelgenau an der Kundenvorlage abgeglichen). */
	bottom: calc(11.5% - 0.2em);
}
.main-nav ul{
	display: flex;
	align-items: baseline;
	gap: var(--nav-gap);
}
.main-nav a{
	display: inline-block;
	font-size: var(--font-nav);
	font-weight: 400;
	line-height: 1;
	white-space: nowrap;
}
.main-nav .current-menu-item > a,
.main-nav a:hover,
.main-nav a:focus-visible{
	font-weight: 700;
}

.header-instagram{
	position: absolute;
	top: calc(100% - 11.5% - (var(--logo-werkraum-w) * 113 / 231));
	right: var(--pad-right);
	width: clamp(24px, 2.1354vw, 41px);
	line-height: 0;
}
.header-instagram img{
	width: 100%;
	height: auto;
	display: block;
}

.nav-toggle{
	display: none;
	position: absolute;
	right: var(--pad-left);
	top: 50%;
	transform: translateY(-50%);
	width: 40px; height: 32px;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	flex-direction: column;
	justify-content: space-between;
	z-index: 20;
}
.nav-toggle span{
	display: block;
	height: 3px;
	width: 100%;
	background: var(--color-black);
	transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1){ transform: translateY(13px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3){ transform: translateY(-13px) rotate(-45deg); }

/* =========================================================
   5. FOOTER
   ========================================================= */
.site-footer{
	background: var(--color-black);
	color: var(--color-white);
	flex: 0 0 auto;
	min-height: var(--footer-height);
}
.site-footer__inner{
	height: 100%;
	min-height: var(--footer-height);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--footer-gap);
	padding: 10px var(--pad-left);
}
.site-footer__copy{
	font-size: var(--font-footer);
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}
.footer-nav{ font-size: var(--font-footer); line-height: 1; }
.footer-nav ul{
	display: flex;
	flex-wrap: wrap;
	gap: var(--footer-gap);
}
.footer-nav a{
	font-size: var(--font-footer);
	font-weight: 400;
	white-space: nowrap;
}
.footer-nav a:hover,
.footer-nav a:focus-visible{ font-weight: 700; }

/* =========================================================
   6. HERO / SLIDER
   Start = 3-Bild-Slider mit Textoverlay, Linoldruck = 3-Bild-Slider
   ========================================================= */
.hero{
	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--color-ink);
}
.tpl-start .hero{ flex: 1 1 auto; min-height: 0; }
.hero--plain{ height: var(--hero-height); flex: 0 0 auto; }

.hero__slide{
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .9s ease;
}
.hero__slide.is-active{ opacity: 1; visibility: visible; }

.hero__overlay{
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	padding: 0 var(--pad-left);
	background: linear-gradient(0deg, rgba(0,0,0,.45), rgba(0,0,0,0) 55%);
}
.hero__title{
	font-size: var(--font-h1);
	font-weight: 700;
	color: var(--color-white);
	max-width: 18ch;
	line-height: 1.05;
}
.hero__text{
	margin-top: 18px;
	font-size: var(--font-body);
	color: var(--color-white);
	max-width: 40ch;
}

.hero__dots{
	position: absolute;
	left: var(--pad-left);
	bottom: 28px;
	display: flex;
	gap: 12px;
	z-index: 5;
}
.hero__dot{
	width: 11px; height: 11px;
	border-radius: 50%;
	border: 2px solid var(--color-white);
	background: transparent;
	padding: 0;
	cursor: pointer;
}
.hero__dot.is-active{ background: var(--color-white); }

/* =========================================================
   7. CONTENT SECTION (lila Flaeche)
   ========================================================= */
.page-section{
	background: var(--color-lilac);
	color: var(--color-black);
	flex: 1 0 auto;
	display: flex;
	align-items: stretch;
}
.page-section__inner{
	width: 100%;
	max-width: var(--content-max);
	padding: var(--section-pad-y) var(--content-pad-x);
}
.page-title{
	font-size: var(--font-h1);
	font-weight: 700;
	line-height: 1.05;
	margin-bottom: var(--section-pad-y);
}
.page-content{
	font-size: var(--font-body);
	line-height: var(--line-body);
	max-width: 40ch;
}
.page-content p + p{ margin-top: 1em; }

/* Seiten ohne Bild (Impressum, Datenschutz, AGB) */
.page-section--text-only .page-section__inner{ padding-top: var(--section-pad-y); }
.page-content--legal{ max-width: 60ch; }
.page-content--legal h2{
	font-size: var(--font-h2);
	font-weight: 700;
	margin-top: 1.4em;
	margin-bottom: .5em;
}
.page-content--legal h2:first-child{ margin-top: 0; }

/* =========================================================
   8. RESPONSIVE / MOBILE (<760px)
   ========================================================= */
@media (max-width: 900px){
	.brand-logo--hornnissen{ transform: none; left: auto; right: var(--pad-left); }
}

@media (max-width: 760px){
	:root{
		--header-height: auto;
		--pad-left: 20px;
		--pad-right: 20px;
	}
	.site-header__inner{
		padding: 18px 64px 18px 20px;
		display: flex;
		align-items: center;
	}
	.brand-logo--werkraum{ position: static; width: 140px; }
	.brand-logo--hornnissen{ position: static; width: 100px; margin-bottom: 6px; }
	.site-header__brand{ display: flex; flex-direction: column; align-items: flex-start; }

	.nav-toggle{ display: flex; }
	.header-instagram{ display: none; }

	.main-nav{
		position: fixed;
		inset: 0;
		top: 0;
		background: var(--color-yellow);
		padding: 100px 24px 24px;
		transform: translateY(-100%);
		transition: transform .25s ease;
		z-index: 15;
		overflow-y: auto;
	}
	.main-nav.is-open{ transform: translateY(0); }
	.main-nav ul{ flex-direction: column; align-items: flex-start; gap: 22px; }
	.main-nav a{ font-size: 28px; }

	.tpl-start .site-wrapper{ height: auto; min-height: 100vh; overflow: visible; }
	.tpl-start .hero{ min-height: 70vh; }

	.hero--plain{ height: 62vw; }

	.page-section__inner{ padding: 48px 20px; }
	.hero__overlay{ padding: 0 20px; }

	.site-footer__inner{ padding: 16px 20px; }
}
