/* ==========================================================================
   Repairtek – Globales Design-System (Header, Footer, Basis, Utilities)

   Sektions-Styles (Hero, Services, FAQ …) folgen in Phase 5.
   Farben/Schriften kommen als :root-Variablen aus dem Customizer
   (RT_Assets::css_variables); die Werte hier sind nur Fallbacks.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
	--bg: #ffffff;
	--bg-soft: #f4f9fd;
	--bg-tint: #eaf4fb;
	--ink: #07203a;
	--ink-2: #3c5268;
	--muted: #68809a;
	--brand: #0ea5e9;
	--brand-2: #06b6d4;
	--brand-deep: #0369a1;
	--navy: #06263f;
	--line: #dfeaf3;
	--line-2: #c6dbeb;

	--brand-rgb: 14, 165, 233;
	--brand-2-rgb: 6, 182, 212;
	--brand-deep-rgb: 3, 105, 161;
	--ink-rgb: 7, 32, 58;

	--grad: linear-gradient(115deg, var(--brand) 0%, var(--brand-2) 100%);
	--grad-soft: linear-gradient(135deg, rgba(var(--brand-rgb), .10), rgba(var(--brand-2-rgb), .06));
	--shadow-s: 0 2px 10px rgba(var(--ink-rgb), .05);
	--shadow-m: 0 18px 44px -18px rgba(var(--brand-deep-rgb), .20);
	--shadow-l: 0 34px 80px -30px rgba(var(--brand-deep-rgb), .28);

	--r-s: 12px;
	--r-m: 18px;
	--r-l: 26px;
	--r-xl: 34px;
	--r-full: 999px;
	--ease: cubic-bezier(.22, .68, .24, 1);

	--font-heading: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
	--font-body: "Inter", system-ui, sans-serif;
	--fs-base: 16px;

	--container: 1280px;
	--gutter: 28px;
	--header-offset: 96px;
	--admin-bar: 0px;
}

.admin-bar { --admin-bar: 32px; }
@media (max-width: 782px) { .admin-bar { --admin-bar: 46px; } }

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-offset) + var(--admin-bar));
}

body {
	font-family: var(--font-body);
	font-size: var(--fs-base);
	background: var(--bg);
	color: var(--ink);
	line-height: 1.65;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

body.rt-menu-open { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	line-height: 1.12;
	letter-spacing: -.025em;
	color: var(--ink);
}
h1 { font-size: clamp(2.7rem, 6.2vw, 5.1rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); font-weight: 800; }
h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 700; }

p { color: var(--ink-2); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(var(--brand-rgb), .22); }

:focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---------- WordPress-Basis ---------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.skip-link:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	left: 12px;
	top: 12px;
	z-index: 100000;
	padding: 12px 20px;
	background: var(--bg);
	color: var(--ink);
	border-radius: var(--r-s);
	box-shadow: var(--shadow-m);
}
.site-main:focus { outline: none; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); margin-top: .5em; }

/* ---------- Layout-Utilities ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 118px 0; position: relative; }
.grad-text {
	background: var(--grad);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--brand-deep);
	background: rgba(var(--brand-rgb), .08);
	border: 1px solid rgba(var(--brand-rgb), .22);
	padding: 8px 16px;
	border-radius: var(--r-full);
	margin-bottom: 22px;
}
.eyebrow .dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--brand);
	animation: rt-pulse 2.2s infinite;
}
@keyframes rt-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), .45); }
	55% { box-shadow: 0 0 0 7px rgba(var(--brand-rgb), 0); }
}
.lead { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--ink-2); max-width: 620px; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 15px 30px;
	border-radius: var(--r-full);
	border: none;
	cursor: pointer;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.65; /* wie im Mockup (erbt dort die Body-Zeilenhöhe) */
	transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s, border-color .3s, opacity .3s;
	position: relative;
	overflow: hidden;
	white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 26px -8px rgba(var(--brand-rgb), .55); }
.btn-primary::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(115deg, rgba(255, 255, 255, .35), transparent 45%);
	transform: translateX(-110%);
	transition: transform .6s var(--ease);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -10px rgba(var(--brand-rgb), .6); }
.btn-primary:hover::after { transform: translateX(110%); }
.btn-primary:disabled { transform: none; cursor: default; opacity: .9; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--shadow-s); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--brand); color: var(--brand-deep); box-shadow: var(--shadow-m); }
.btn-light { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(8px); }
.btn-light:hover { background: rgba(255, 255, 255, .22); transform: translateY(-3px); }

/* ---------- Loader ---------- */
#loader {
	position: fixed;
	inset: 0;
	background: var(--bg);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .6s, visibility .6s;
}
#loader.done, .no-js #loader { opacity: 0; visibility: hidden; }
.load-wrap { text-align: center; }
.load-logo { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; letter-spacing: -.03em; color: var(--ink); }
.load-logo img { height: 44px; width: auto; margin: 0 auto; }
.load-bar { width: 150px; height: 3px; background: var(--bg-tint); border-radius: 99px; margin: 18px auto 0; overflow: hidden; }
.load-bar i { display: block; height: 100%; width: 40%; background: var(--grad); border-radius: 99px; animation: rt-load 1.1s var(--ease) infinite; }
@keyframes rt-load { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }

/* ---------- Header / Navigation ---------- */
.nav {
	position: fixed;
	top: var(--admin-bar);
	left: 0;
	right: 0;
	z-index: 900;
	padding: 18px 0;
	transition: padding .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
	border-bottom: 1px solid transparent;
}
.nav.scrolled,
.rt-header-offset .nav {
	background: rgba(255, 255, 255, .82);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	border-bottom-color: var(--line);
	box-shadow: 0 8px 30px -18px rgba(var(--ink-rgb), .18);
}
.nav.scrolled { padding: 11px 0; }
.rt-header-static .nav { position: absolute; }

/* Admin-Bar ist auf Mobil nicht fixiert → Header an den Viewport-Rand. */
@media (max-width: 600px) {
	.admin-bar .nav.scrolled { top: 0; }
}

.nav-in {
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.logo {
	display: flex;
	align-items: center;
	gap: 11px;
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: 1.32rem;
	letter-spacing: -.03em;
	color: var(--ink);
	flex-shrink: 0;
}
.logo-img { height: 38px; width: auto; max-width: none; }
.site-footer .logo-img { height: 38px; }
.logo-mark {
	width: 38px;
	height: 38px;
	border-radius: 11px;
	background: var(--grad);
	display: grid;
	place-items: center;
	box-shadow: 0 8px 18px -6px rgba(var(--brand-rgb), .55);
	transition: transform .4s var(--ease);
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-mark svg { width: 19px; height: 19px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { font-size: .92rem; font-weight: 500; color: var(--ink-2); position: relative; padding: 6px 0; transition: color .3s; }
.nav-links a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	height: 2px;
	width: 100%;
	background: var(--grad);
	border-radius: 2px;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--brand-deep); font-weight: 600; }

.nav-cta { display: flex; align-items: center; gap: 22px; }
.nav-tel { font-size: .9rem; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.nav-tel svg { width: 15px; height: 15px; stroke: var(--brand); fill: none; stroke-width: 2; }
.nav-tel:hover { color: var(--brand-deep); }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; position: relative; z-index: 910; }
.burger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .35s var(--ease); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
	position: fixed;
	inset: 0;
	background: rgba(255, 255, 255, .97);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	z-index: 890;
	padding: calc(110px + var(--admin-bar)) var(--gutter) 40px;
	transform: translateY(-102%);
	visibility: hidden;
	transition: transform .5s var(--ease), visibility 0s linear .5s;
	display: flex;
	flex-direction: column;
	gap: 6px;
	overflow-y: auto;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
.mobile-menu-list { list-style: none; }
.mobile-menu-list a { display: block; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line); }
.mobile-menu-list a.active { color: var(--brand-deep); }
.mobile-menu .mm-cta { margin-top: 20px; }
.mm-tel { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-weight: 600; color: var(--ink-2); }
.mm-tel svg { width: 16px; height: 16px; stroke: var(--brand); fill: none; stroke-width: 2; }

/* Seiten ohne Hero: Inhalt unter dem fixierten Header beginnen lassen. */
.rt-header-offset .site-main { padding-top: calc(var(--header-offset) + var(--admin-bar)); }

/* ---------- Standard-Inhalte (ohne Elementor) ---------- */
.rt-page { padding: 72px 0 110px; }
.rt-header-overlay .rt-page { padding-top: calc(150px + var(--admin-bar)); }
.rt-narrow { max-width: 860px; }
.rt-page-head { margin-bottom: 36px; }
.rt-page-title { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.rt-content > * + * { margin-top: 1.1em; }
.rt-content h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.8em; }
.rt-content h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-top: 1.5em; }
.rt-content ul, .rt-content ol { padding-left: 1.4em; color: var(--ink-2); }
.rt-content a { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 3px; }
.rt-post-item { padding: 28px 0; border-bottom: 1px solid var(--line); }
.rt-post-item h2 { font-size: 1.5rem; margin-bottom: 8px; }
.rt-404 .btn { margin-top: 28px; }

/* ---------- Elementor: Abstände, die der globale Reset (* {margin:0}) entfernt ---------- */
.elementor-widget-text-editor p:not(:last-child) { margin-bottom: .9em; }
.elementor-widget-text-editor ul,
.elementor-widget-text-editor ol { padding-left: 1.4em; margin-bottom: .9em; }

/* ---------- Rechtstexte (Demo-Seiten mit Klasse .rt-legal) ---------- */
.rt-legal .elementor-widget-heading h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); }
.rt-legal .elementor-widget-heading h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 700; margin-top: 1.2em; }
.rt-legal .elementor-widget-text-editor { color: var(--ink-2); }
.rt-legal .elementor-widget-text-editor a { color: var(--brand-deep); text-decoration: underline; }

/* ---------- Hinweis in Rechtstexten (Demo-Platzhalter) ---------- */
.rt-legal-notice .elementor-widget-container,
.rt-legal-notice:not(:has(.elementor-widget-container)) {
	padding: 18px 22px;
	background: #fff8e5;
	border: 1px solid #f0c33c;
	border-left: 4px solid #dba617;
	border-radius: var(--r-s);
	font-size: .92rem;
}
.rt-legal-notice p { color: #5c4400; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255, 255, 255, .72); padding: 80px 0 36px; }
.f-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 52px; margin-bottom: 56px; }
.f-brand .logo { color: #fff; }
.f-brand p { margin-top: 18px; font-size: .92rem; color: rgba(255, 255, 255, .65); max-width: 300px; }
.f-title { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 22px; }
.f-links { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.f-col a { font-size: .92rem; color: rgba(255, 255, 255, .65); transition: color .3s, padding .3s; }
.f-col a:hover { color: #7dd3fc; padding-left: 5px; }
.f-col li.plain { font-size: .92rem; color: rgba(255, 255, 255, .65); }
.f-bottom {
	border-top: 1px solid rgba(255, 255, 255, .12);
	padding-top: 30px;
	display: flex;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	font-size: .85rem;
	color: rgba(255, 255, 255, .5);
}
.f-bottom-links { display: inline-flex; gap: 20px; flex-wrap: wrap; }
.f-bottom a { color: rgba(255, 255, 255, .7); }
.f-bottom a:hover { color: #fff; }

/* ---------- Nach oben ---------- */
#toTop {
	position: fixed;
	right: 30px;
	bottom: 30px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--grad);
	border: none;
	cursor: pointer;
	display: grid;
	place-items: center;
	box-shadow: 0 12px 30px -8px rgba(var(--brand-rgb), .6);
	opacity: 0;
	visibility: hidden;
	transform: translateY(18px);
	transition: .4s var(--ease);
	z-index: 800;
}
#toTop.show { opacity: 1; visibility: visible; transform: none; }
#toTop:hover { transform: translateY(-4px); }
#toTop svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.4; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	.f-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
	:root { --header-offset: 80px; }
	.nav-primary, .nav-cta .btn, .nav-tel { display: none; }
	.burger { display: flex; }
	.section { padding: 84px 0; }
}
@media (max-width: 560px) {
	:root { --gutter: 20px; }
	.f-grid { grid-template-columns: 1fr; }
	#toTop { right: 18px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
	html { scroll-behavior: auto; }
}
