/*
Theme Name: Ochs Stuckateur
Theme URI: https://media-line.de
Author: media-line
Author URI: https://media-line.de
Description: One-Page WordPress-Theme für Edgar Ochs – Ochs-Stuckateur Meisterbetrieb, Nümbrecht. Fixed Header, Dark Mode, Leaflet/OSM-Karte (lazy), Contact Form 7, Elementor-kompatibel.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ochs-stuckateur
*/

/* ═══════════════════════════════════════════════════════
   TOKENS
   ═══════════════════════════════════════════════════════ */
:root {
	/* Marke – Petrol/Teal aus dem Logo */
	--brand:        #1A6B8A;
	--brand-strong: #11526B;
	--brand-soft:   #E3EFF4;
	--accent:       #C89840; /* Gold – Meister-Akzent */

	/* Flächen & Text (Light) */
	--bg:        #F7F5F1; /* Putz-Weiß */
	--surface:   #FFFFFF;
	--ink:       #1E2A30;
	--ink-soft:  #51626B;
	--line:      #E2DED6;

	--header-h:       84px;
	--radius:         10px;
	--shadow:         0 10px 30px rgba(20, 40, 50, 0.10);
	--shadow-soft:    0 4px 14px rgba(20, 40, 50, 0.07);

	--font-display: "Raleway", system-ui, sans-serif;
	--font-body:    "Lato", system-ui, sans-serif;
}

html[data-theme="dark"] {
	--brand:        #5FA8C4;
	--brand-strong: #7FBFD8;
	--brand-soft:   #14313D;
	--accent:       #D4A855;

	--bg:        #0F1B20;
	--surface:   #16262D;
	--ink:       #E8EEF1;
	--ink-soft:  #9AB0BA;
	--line:      #24383F;

	--shadow:      0 10px 30px rgba(0, 0, 0, 0.45);
	--shadow-soft: 0 4px 14px rgba(0, 0, 0, 0.35);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	transition: background-color .3s ease, color .3s ease;
}

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

h1, h2, h3 {
	font-family: var(--font-display);
	line-height: 1.15;
	margin: 0 0 .6em;
	color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: .01em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0 0 1.1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }

.container { width: min(1140px, 92%); margin-inline: auto; }

section { padding: clamp(64px, 9vw, 110px) 0; }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-display);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--brand);
	margin-bottom: 14px;
}
/* Gesims-Linien aus dem Logo als Eyebrow-Marke */
.eyebrow::before {
	content: "";
	width: 34px;
	height: 12px;
	background: repeating-linear-gradient(
		to bottom,
		var(--accent) 0 2px,
		transparent 2px 5px
	);
}

.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }

/* Skip-Link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--brand);
	color: #fff;
	padding: 10px 18px;
	z-index: 9999;
	border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

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

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: .95rem;
	letter-spacing: .03em;
	padding: 14px 28px;
	border-radius: var(--radius);
	border: 2px solid transparent;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--brand); color: #fff !important; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
html[data-theme="dark"] .btn-primary { color: #0F1B20 !important; }

.btn-ghost { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-ghost:hover { background: var(--brand-soft); }

/* ═══════════════════════════════════════════════════════
   HEADER (fixed)
   ═══════════════════════════════════════════════════════ */
.site-header {
	position: fixed;
	inset: 0 0 auto;
	height: var(--header-h);
	z-index: 1000;
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .25s ease, box-shadow .25s ease, background-color .3s ease;
}
.site-header.is-scrolled {
	border-bottom-color: var(--line);
	box-shadow: var(--shadow-soft);
}

.header-inner {
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.site-logo { display: flex; align-items: center; gap: 14px; }
.site-logo img {
	height: 56px;
	width: auto;
	border-radius: 6px;
}
.site-logo .logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.site-logo .logo-text strong {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 1.02rem;
	letter-spacing: .12em;
	color: var(--ink);
}
.site-logo .logo-text span {
	font-size: .68rem;
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--accent);
	font-weight: 700;
}

.main-nav ul {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.main-nav a {
	display: block;
	padding: 10px 14px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: .92rem;
	color: var(--ink);
	border-radius: 8px;
}
.main-nav a:hover { color: var(--brand); background: var(--brand-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--ink);
	border-radius: 50%;
	cursor: pointer;
	transition: border-color .2s ease, transform .2s ease;
}
.theme-toggle:hover { border-color: var(--brand); transform: rotate(15deg); }
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.header-cta { padding: 11px 20px; font-size: .88rem; }

/* Burger */
.burger {
	display: none;
	width: 46px;
	height: 46px;
	border: 1px solid var(--line);
	background: var(--surface);
	border-radius: 10px;
	cursor: pointer;
	position: relative;
}
.burger span {
	position: absolute;
	left: 12px;
	right: 12px;
	height: 2px;
	background: var(--ink);
	transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 29px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* Mobile-Menü – wird per JS-Portal an <body> gehängt
   (WebKit/iOS: backdrop-filter-Header clippt sonst fixed children) */
.mobile-menu {
	position: fixed;
	inset: var(--header-h) 0 auto;
	z-index: 999;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	box-shadow: var(--shadow);
	padding: 18px 4%;
	display: none;
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu a {
	display: block;
	padding: 14px 10px;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--ink);
	border-bottom: 1px solid var(--line);
}
.mobile-menu li:last-child a { border-bottom: 0; }
.mobile-menu a:hover { color: var(--brand); }

/* ═══════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════ */
.hero {
	position: relative;
	padding: calc(var(--header-h) + clamp(56px, 10vw, 120px)) 0 clamp(72px, 11vw, 130px);
	background:
		linear-gradient(160deg, color-mix(in srgb, var(--brand) 10%, var(--bg)) 0%, var(--bg) 55%);
	overflow: hidden;
}

/* Gesims-Signatur: gestapelte Linien wie im Logo */
.hero::after {
	content: "";
	position: absolute;
	right: -120px;
	top: 50%;
	transform: translateY(-50%) rotate(0.001deg);
	width: clamp(280px, 38vw, 560px);
	height: clamp(280px, 38vw, 560px);
	background: repeating-linear-gradient(
		to bottom,
		color-mix(in srgb, var(--brand) 22%, transparent) 0 10px,
		transparent 10px 34px
	);
	-webkit-mask-image: radial-gradient(circle at 35% 50%, #000 30%, transparent 72%);
	mask-image: radial-gradient(circle at 35% 50%, #000 30%, transparent 72%);
	pointer-events: none;
}

.hero-inner { position: relative; z-index: 2; max-width: 720px; }

.hero .eyebrow { color: var(--accent); }
.hero .eyebrow::before { background: repeating-linear-gradient(to bottom, var(--brand) 0 2px, transparent 2px 5px); }

.hero h1 .accent { color: var(--brand); }

.hero-sub {
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	color: var(--ink-soft);
	max-width: 560px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	margin-top: clamp(36px, 6vw, 56px);
	padding-top: 28px;
	border-top: 1px solid var(--line);
}
.hero-facts .fact { display: flex; flex-direction: column; gap: 2px; }
.hero-facts strong {
	font-family: var(--font-display);
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--brand);
}
.hero-facts span { font-size: .85rem; color: var(--ink-soft); }

/* ═══════════════════════════════════════════════════════
   LEISTUNGEN
   ═══════════════════════════════════════════════════════ */
#leistungen { background: var(--surface); border-block: 1px solid var(--line); }

.leistungen-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 22px;
}

.leistung-card {
	position: relative;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 28px 26px 26px;
	overflow: hidden;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.leistung-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow);
	border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}
.leistung-card::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: var(--brand);
	opacity: 0;
	transition: opacity .2s ease;
}
.leistung-card:hover::before { opacity: 1; }

.leistung-num {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: .85rem;
	letter-spacing: .14em;
	color: var(--accent);
	margin-bottom: 14px;
}
.leistung-num::after {
	content: "";
	display: block;
	width: 26px;
	height: 8px;
	margin-top: 8px;
	background: repeating-linear-gradient(to bottom, var(--brand) 0 2px, transparent 2px 5px);
	opacity: .55;
}
.leistung-card p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

/* ═══════════════════════════════════════════════════════
   ÜBER MICH
   ═══════════════════════════════════════════════════════ */
.ueber-mich-inner {
	display: grid;
	grid-template-columns: minmax(280px, 420px) 1fr;
	gap: clamp(32px, 6vw, 72px);
	align-items: center;
}

.ueber-mich-image { position: relative; }
.ueber-mich-image .img-wrap {
	aspect-ratio: 4 / 5;
	border-radius: var(--radius);
	background:
		repeating-linear-gradient(to bottom, color-mix(in srgb, var(--brand) 14%, transparent) 0 8px, transparent 8px 26px),
		linear-gradient(160deg, var(--brand-soft), var(--surface));
	border: 1px solid var(--line);
	display: grid;
	place-items: center;
	font-size: 4rem;
	overflow: hidden;
}
.ueber-mich-image .img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.img-badge {
	position: absolute;
	right: -14px;
	bottom: 24px;
	background: var(--brand);
	color: #fff;
	border-radius: var(--radius);
	padding: 14px 20px;
	box-shadow: var(--shadow);
	display: flex;
	flex-direction: column;
	line-height: 1.25;
}
html[data-theme="dark"] .img-badge { color: #0F1B20; }
.img-badge .badge-title { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.img-badge .badge-main { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }

.ueber-mich-text .check-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.ueber-mich-text .check-list li { display: flex; gap: 12px; align-items: baseline; color: var(--ink-soft); }
.ueber-mich-text .check-list li::before {
	content: "✓";
	font-weight: 800;
	color: var(--accent);
	flex: 0 0 auto;
}

/* ═══════════════════════════════════════════════════════
   REFERENZEN / GALERIE
   ═══════════════════════════════════════════════════════ */
#referenzen { background: var(--surface); border-block: 1px solid var(--line); }

.galerie-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 18px;
}
.galerie-item {
	aspect-ratio: 4 / 3;
	border-radius: var(--radius);
	overflow: hidden;
	border: 1px solid var(--line);
	background:
		repeating-linear-gradient(to bottom, color-mix(in srgb, var(--brand) 10%, transparent) 0 6px, transparent 6px 20px),
		linear-gradient(150deg, var(--brand-soft), var(--bg));
	display: grid;
	place-items: center;
	color: var(--ink-soft);
	font-size: .85rem;
	text-align: center;
	padding: 12px;
}
.galerie-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.galerie-item:hover img { transform: scale(1.04); }

.galerie-hinweis { margin-top: 22px; color: var(--ink-soft); font-size: .9rem; }

/* ═══════════════════════════════════════════════════════
   KONTAKT
   ═══════════════════════════════════════════════════════ */
.kontakt-grid {
	display: grid;
	grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.2fr);
	gap: clamp(32px, 5vw, 64px);
	align-items: start;
}

.kontakt-info-card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 30px 28px;
	box-shadow: var(--shadow-soft);
}
.kontakt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.kontakt-list li { display: flex; gap: 14px; align-items: flex-start; }
.kontakt-list .k-icon {
	flex: 0 0 42px;
	height: 42px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: var(--brand-soft);
	color: var(--brand);
}
.kontakt-list .k-label {
	display: block;
	font-size: .75rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-soft);
}
.kontakt-list a, .kontakt-list .k-value { font-weight: 700; color: var(--ink); font-family: var(--font-display); }
.kontakt-list a:hover { color: var(--brand); }

/* CF7 */
.wpcf7 { margin-top: 0; }
.wpcf7 form { display: grid; gap: 16px; }
.wpcf7 label { font-weight: 700; font-size: .9rem; font-family: var(--font-display); display: block; }
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	width: 100%;
	margin-top: 6px;
	padding: 13px 16px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.wpcf7 input:focus, .wpcf7 textarea:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}
.wpcf7 input[type="submit"] {
	background: var(--brand);
	color: #fff;
	border: 0;
	border-radius: var(--radius);
	padding: 15px 32px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1rem;
	cursor: pointer;
	transition: background-color .2s ease;
	justify-self: start;
}
.wpcf7 input[type="submit"]:hover { background: var(--brand-strong); }
html[data-theme="dark"] .wpcf7 input[type="submit"] { color: #0F1B20; }
.wpcf7 .wpcf7-not-valid-tip { color: #C0392B; font-size: .85rem; }
.wpcf7 .wpcf7-response-output { border-radius: 10px; padding: 12px 16px; margin: 0; }

/* Fallback-Formular (mailto), falls CF7 fehlt */
.fallback-form { display: grid; gap: 16px; }
.fallback-form input, .fallback-form textarea {
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--surface);
	color: var(--ink);
	font: inherit;
}

/* ═══════════════════════════════════════════════════════
   KARTE
   ═══════════════════════════════════════════════════════ */
#karte { padding: 0; }
.map-wrap {
	position: relative;
	height: clamp(320px, 45vw, 480px);
	border-top: 1px solid var(--line);
}
#os-map { position: absolute; inset: 0; z-index: 1; }
.map-placeholder {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	background: var(--brand-soft);
	color: var(--ink-soft);
	z-index: 0;
}
html[data-theme="dark"] .leaflet-layer,
html[data-theme="dark"] .leaflet-control-zoom,
html[data-theme="dark"] .leaflet-control-attribution {
	filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.92);
}

/* ═══════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════ */
.site-footer {
	background: var(--brand-strong);
	color: #DCEAF1;
	padding: 48px 0 28px;
}
html[data-theme="dark"] .site-footer { background: #0B161B; }

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	justify-content: space-between;
	align-items: flex-start;
}
.footer-brand strong {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 1.1rem;
	letter-spacing: .1em;
	color: #fff;
	display: block;
}
.footer-brand span { font-size: .85rem; opacity: .8; }

.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer-nav a { color: #DCEAF1; font-size: .9rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }

.footer-bottom {
	margin-top: 36px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	justify-content: space-between;
	font-size: .82rem;
	opacity: .85;
}
.footer-bottom a { color: #fff; }
.footer-bottom a:hover { text-decoration: underline; }

/* Back to top */
.back-to-top {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 900;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: 0;
	background: var(--brand);
	color: #fff;
	font-size: 1.2rem;
	cursor: pointer;
	box-shadow: var(--shadow);
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity .25s ease, transform .25s ease, background-color .2s ease;
}
html[data-theme="dark"] .back-to-top { color: #0F1B20; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--brand-strong); }

/* ═══════════════════════════════════════════════════════
   REVEAL ON SCROLL
   ═══════════════════════════════════════════════════════ */
.reveal {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
	*, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
	.main-nav { display: none; }
	.burger { display: block; }
	.header-cta { display: none; }
}

@media (max-width: 720px) {
	:root { --header-h: 72px; }
	.site-logo img { height: 46px; }
	.site-logo .logo-text { display: none; }
	.ueber-mich-inner { grid-template-columns: 1fr; }
	.ueber-mich-image { max-width: 420px; }
	.img-badge { right: 10px; }
	.kontakt-grid { grid-template-columns: 1fr; }
	.hero::after { opacity: .5; right: -180px; }
	.footer-inner, .footer-bottom { flex-direction: column; }
}

/* Elementor: volle Breite ohne Theme-Padding in Elementor-Seiten */
.elementor-page section { padding: 0; }
