/* =========================================================
   RWLacktechnik GmbH — Industrial Precision Garage
   ========================================================= */

:root {
	--primary: oklch(23% 0.012 255);
	--primary-contrast: oklch(96% 0.012 90);
	--steel: oklch(42% 0.045 240);
	--accent: oklch(55% 0.13 50);
	--accent-dark: oklch(46% 0.12 48);
	--accent-text: oklch(23% 0.012 255);
	--bg: oklch(96% 0.012 90);
	--surface: oklch(99% 0.002 90);
	--border: oklch(85% 0.02 80);
	--ink: oklch(20% 0.01 255);
	--ink-soft: oklch(38% 0.012 255);
	--radius: 4px;
	--radius-lg: 8px;
	--font-display: 'Barlow Condensed', system-ui, sans-serif;
	--font-body: 'Inter', system-ui, sans-serif;
	--header-h: 84px;
	--section-pad-s: 64px;
	--section-pad-m: 104px;
	--section-pad-l: 160px;
}

/* ---- Reset & Grundlagen ---- */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: auto; }
body {
	margin: 0;
	overflow-x: hidden;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.6;
}
img, svg, video, iframe { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4 {
	font-family: var(--font-display);
	color: var(--primary);
	line-height: 1.1;
	margin: 0 0 0.5em;
	text-wrap: pretty;
	font-weight: 700;
}
p { text-wrap: pretty; max-width: 68ch; }
a { color: var(--steel); text-decoration: none; }
ul { padding-left: 1.2em; }
.screen-reader-text {
	position: absolute; left: -9999px;
}
.skip-link:focus {
	left: 1rem; top: 1rem; position: fixed; background: var(--accent);
	color: var(--accent-text); padding: .6rem 1rem; z-index: 2000; border-radius: var(--radius);
}

/* Fokus sichtbar halten */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
}

/* Icon-Guardrail: jedes .icon bleibt klein, egal was der Call-Site vergisst */
.icon {
	width: 1.4em;
	height: 1.4em;
	flex: 0 0 auto;
	vertical-align: middle;
	max-width: 32px;
	max-height: 32px;
}

h1 { font-size: clamp(2.6rem, 5.6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }

.container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.eyebrow {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: .14em;
	color: var(--accent-dark);
	font-weight: 700;
	font-size: .95rem;
	margin-bottom: .6rem;
	display: inline-block;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	padding: .9rem 1.6rem;
	border-radius: var(--radius);
	font-weight: 600;
	font-family: var(--font-body);
	border: 1px solid transparent;
	transition: transform .2s ease-out, box-shadow .2s ease-out, background-color .2s ease-out;
	min-height: 44px;
}
.btn--accent {
	background: var(--accent);
	color: var(--primary-contrast);
}
.btn--accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 24px oklch(0% 0 0 / 0.18); }
.btn--accent:active { transform: scale(.98); }
.btn--ghost {
	background: transparent;
	border-color: var(--border);
	color: var(--primary);
}
.btn--ghost:hover { border-color: var(--accent); transform: translateY(-2px); }
.btn--ghost:active { transform: scale(.98); }
.btn--on-dark { border-color: oklch(96% 0.012 90 / 0.35); color: var(--primary-contrast); }
.btn--on-dark:hover { border-color: var(--accent); }

/* =========================================================
   Header
   ========================================================= */
.site-header {
	position: sticky;
	top: 0;
	z-index: 500;
	background: var(--primary-contrast);
	border-bottom: 1px solid var(--border);
	transition: box-shadow .25s ease-out, padding .25s ease-out;
}
.site-header__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 1.1rem 1.5rem;
	display: flex;
	align-items: center;
	gap: 2rem;
	transition: padding .25s ease-out;
}
.site-header.is-compact .site-header__inner { padding-top: .6rem; padding-bottom: .6rem; }
.site-header.is-compact { box-shadow: 0 4px 18px oklch(0% 0 0 / 0.08); }
.site-header.is-compact .site-brand__logo { height: 36px; }

.site-brand {
	display: flex;
	align-items: center;
	gap: .75rem;
	flex-shrink: 0;
	color: var(--primary);
}
.site-brand__logo { height: 48px; width: auto; max-width: 200px; object-fit: contain; flex-shrink: 0; transition: height .25s ease-out; }
.site-brand .logo-bg { fill: var(--accent); }
.site-brand__name {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 1.15rem;
	line-height: 1.1;
	letter-spacing: .01em;
}

.site-nav { flex: 1; display: flex; justify-content: center; }
.site-nav__list {
	display: flex;
	align-items: center;
	gap: 2.2rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-nav__list a {
	color: var(--primary);
	font-weight: 600;
	font-size: .98rem;
	position: relative;
	padding: .3rem 0;
	transition: color .2s ease-out;
}
.site-nav__list a::after {
	content: '';
	position: absolute;
	left: 0; right: 100%; bottom: 0;
	height: 2px;
	background: var(--accent);
	transition: right .2s ease-out;
}
.site-nav__list a:hover { color: var(--accent-dark); }
.site-nav__list a:hover::after { right: 0; }

.site-header__cta { flex-shrink: 0; }

.burger {
	display: none;
	flex-shrink: 0;
	background: none;
	border: none;
	cursor: pointer;
	padding: .5rem;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
}
.burger__box {
	display: inline-block;
	position: relative;
	width: 26px;
	height: 18px;
}
.burger__line {
	display: block;
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: var(--primary);
	border-radius: 1px;
	transition: transform .25s ease-out, opacity .2s ease-out, top .25s ease-out;
}
.burger__line:nth-child(1) { top: 0; }
.burger__line:nth-child(2) { top: 8px; }
.burger__line:nth-child(3) { top: 16px; }
.burger.is-active .burger__line:nth-child(1) { top: 8px; transform: rotate(45deg); }
.burger.is-active .burger__line:nth-child(2) { opacity: 0; }
.burger.is-active .burger__line:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* Mobile Drawer: direktes Kind von <body>, startet UNTER dem Header */
.mobile-drawer {
	position: fixed;
	top: var(--header-h);
	right: 0;
	width: min(360px, 86vw);
	height: calc(100vh - var(--header-h));
	background: var(--primary);
	color: var(--primary-contrast);
	z-index: 600;
	padding: 2rem 1.75rem;
	transform: translateX(100%);
	transition: transform .3s ease-out;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}
.mobile-drawer.is-open { transform: translateX(0); }
.mobile-drawer__list {
	list-style: none;
	margin: 0; padding: 0;
	display: flex;
	flex-direction: column;
	gap: 1.1rem;
}
.mobile-drawer__list a {
	color: var(--primary-contrast);
	font-family: var(--font-display);
	font-size: 1.4rem;
	font-weight: 600;
	display: block;
	padding: .4rem 0;
}
.mobile-drawer__contact {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	border-top: 1px solid oklch(96% 0.012 90 / 0.18);
	padding-top: 1.5rem;
}
.mobile-drawer__contact a:not(.btn) {
	color: var(--primary-contrast);
	display: flex;
	align-items: center;
	gap: .6rem;
	font-weight: 600;
}
.drawer-overlay {
	position: fixed;
	top: var(--header-h);
	left: 0; right: 0; bottom: 0;
	background: oklch(10% 0 0 / 0.45);
	z-index: 590;
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease-out;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
body.drawer-open { overflow: hidden; }

/* =========================================================
   Scroll-Reveal — ausschliesslich transform, nie opacity
   ========================================================= */
.reveal {
	transform: translateY(28px);
	transition: transform .5s ease-out;
	will-change: transform;
}
.reveal.is-visible { transform: translateY(0); }
.reveal--left { transform: translateX(-32px); }
.reveal--left.is-visible { transform: translateX(0); }
.reveal--right { transform: translateX(32px); }
.reveal--right.is-visible { transform: translateX(0); }
.reveal--scale { transform: scale(.94); }
.reveal--scale.is-visible { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
	.reveal, .reveal--left, .reveal--right, .reveal--scale { transition: none; transform: none; }
	.btn, .card, .site-nav__list a::after { transition: none; }
}

/* =========================================================
   Hero (Split: Text links, Bild rechts randabfallend)
   ========================================================= */
.hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	align-items: stretch;
	min-height: 640px;
	background: var(--primary);
}
.hero__content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: var(--section-pad-m) clamp(1.5rem, 5vw, 5rem);
	color: var(--primary-contrast);
}
.hero__content h1 { color: var(--primary-contrast); }
.hero__content p {
	color: oklch(96% 0.012 90 / 0.82);
	font-size: 1.15rem;
	max-width: 46ch;
	margin-bottom: 2rem;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__visual { position: relative; overflow: hidden; }
.hero-slider { position: relative; width: 100%; height: 100%; min-height: 360px; }
.hero-slider__slide {
	position: absolute; inset: 0;
	opacity: 0;
	transition: opacity .8s ease-out;
}
.hero-slider__slide.is-active { opacity: 1; z-index: 1; }
.hero-slider__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slider__caption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 2rem clamp(1.25rem, 3vw, 2.5rem) 2.75rem;
	background: linear-gradient(to top, oklch(10% 0 0 / 0.75), transparent);
	color: #fff;
}
.hero-slider__caption .eyebrow { color: var(--accent); }
.hero-slider__caption h2 { color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: .2rem; }
.hero-slider__dots {
	position: absolute; right: clamp(1.25rem, 3vw, 2.5rem); bottom: 1.1rem;
	display: flex; gap: .5rem; z-index: 2;
}
.hero-slider__dot {
	width: 10px; height: 10px; border-radius: 50%;
	background: oklch(100% 0 0 / 0.4);
	border: none; padding: 0; cursor: pointer;
	transition: background-color .2s ease-out, transform .2s ease-out;
}
.hero-slider__dot.is-active { background: var(--accent); transform: scale(1.2); }

/* =========================================================
   Sektionen allgemein — variierende Abstaende
   ========================================================= */
.section { padding: var(--section-pad-m) 0; }
.section--tight { padding: var(--section-pad-s) 0; }
.section--loose { padding: var(--section-pad-l) 0; }
.section--surface { background: var(--surface); }
.section--dark { background: var(--primary); color: var(--primary-contrast); }
.section--dark h2, .section--dark h3 { color: var(--primary-contrast); }
.section--dark p { color: oklch(96% 0.012 90 / 0.8); }
.section-head { max-width: 62ch; margin-bottom: 3rem; }
.section-head--right { margin-left: auto; text-align: right; }

/* ---- Leistungen: asymmetrisches Grid, keine gleichfoermigen Karten ---- */
.services-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 2.5rem;
}
.service-card {
	border-radius: var(--radius);
	background: var(--surface);
	border: 1px solid var(--border);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform .25s ease-out, box-shadow .25s ease-out;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 8px 24px oklch(0% 0 0 / 0.18); }
.service-card:nth-child(1) { grid-column: span 3; }
.service-card:nth-child(2) { grid-column: span 3; }
.service-card:nth-child(3) { grid-column: span 2; }
.service-card:nth-child(4) { grid-column: span 4; }
.service-card__media { aspect-ratio: 16/10; overflow: hidden; }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease-out; }
.service-card:hover .service-card__media img { transform: scale(1.05); }
.service-card__body { padding: 1.75rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.service-card__body h3 { margin-bottom: 0; }
.service-card__body p { font-size: .98rem; color: var(--ink-soft); flex: 1; }
.service-card__link { font-weight: 700; color: var(--accent-dark); display: inline-flex; align-items: center; gap: .4rem; }
.service-card__link .icon { width: 1.1em; height: 1.1em; }
.service-card__link:hover .icon { transform: translateX(3px); }
.service-card__link .icon { transition: transform .2s ease-out; }

/* ---- Breite Einzelreihen statt Karten-Raster (Signatur dieser Site) ---- */
.feature-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
	padding: var(--section-pad-m) 0;
	border-top: 1px solid var(--border);
}
.feature-row:first-of-type { border-top: none; }
.feature-row--reverse { direction: rtl; }
.feature-row--reverse > * { direction: ltr; }
.feature-row__media { aspect-ratio: 16/10; overflow: hidden; border-radius: var(--radius); }
.feature-row__media img { width: 100%; height: 100%; object-fit: cover; }
.feature-row__list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-direction: column; gap: .85rem; }
.feature-row__list li { display: flex; align-items: flex-start; gap: .65rem; }
.feature-row__list .icon { color: var(--accent-dark); margin-top: .15em; }

/* ---- Zaehler ---- */
.counters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2.5rem;
	text-align: center;
}
.counter-item .counter {
	font-family: var(--font-display);
	font-size: clamp(2.6rem, 5vw, 4rem);
	font-weight: 800;
	color: var(--accent);
	display: block;
}
.counter-item__label {
	font-size: .95rem;
	letter-spacing: .04em;
	color: oklch(96% 0.012 90 / 0.75);
}

/* ---- Vollflaechiger Bruch im Seitenfluss ---- */
.full-bleed-break {
	position: relative;
	min-height: 440px;
	display: flex;
	align-items: center;
	overflow: hidden;
}
.full-bleed-break img {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.full-bleed-break::before {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(100deg, oklch(15% 0.01 255 / 0.88) 0%, oklch(15% 0.01 255 / 0.55) 55%, oklch(15% 0.01 255 / 0.15) 100%);
	z-index: 1;
}
.full-bleed-break__content { position: relative; z-index: 2; color: var(--primary-contrast); max-width: 640px; padding: 3rem clamp(1.5rem, 5vw, 5rem); }
.full-bleed-break__content p { color: oklch(96% 0.012 90 / 0.85); }

/* ---- Kontakt / Anfahrt ---- */
.contact-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
	gap: clamp(2rem, 5vw, 4rem);
}
.contact-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list li { display: flex; align-items: center; gap: .8rem; }
.contact-list .icon { color: var(--accent-dark); flex-shrink: 0; }
.contact-list a { color: var(--ink); font-weight: 600; }
.contact-list a:hover { color: var(--accent-dark); }
.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4/3; }
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.contact-form-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }

/* =========================================================
   Seiten / Gutenberg-Inhalte (Unterseiten)
   ========================================================= */
.page-hero {
	background: var(--primary);
	color: var(--primary-contrast);
	padding: var(--section-pad-m) 0 var(--section-pad-s);
}
.page-hero h1 { color: var(--primary-contrast); margin-bottom: .5rem; }
.page-hero p { color: oklch(96% 0.012 90 / 0.8); max-width: 60ch; }
.entry-content { padding: var(--section-pad-m) 0; }
.entry-content .container { max-width: 760px; }
.entry-content h2 { margin-top: 2.2em; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.entry-content h3 { margin-top: 1.6em; }
.entry-content p, .entry-content li { color: var(--ink-soft); }
.entry-content ul li, .entry-content ol li { margin-bottom: .4em; }
.entry-content .wp-block-columns { gap: 2.5rem; }
.entry-content .wp-block-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.entry-content .wp-block-separator { border-color: var(--border); margin: 3rem 0; }
.entry-content figure img { border-radius: var(--radius); }

.leistungen-list { display: flex; flex-direction: column; }

.related-services {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.5rem;
	margin-top: 1rem;
}
.related-services a {
	display: block;
	padding: 1.2rem 1.4rem;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	font-weight: 700;
	color: var(--primary);
	background: var(--surface);
	transition: border-color .2s ease-out, transform .2s ease-out;
}
.related-services a:hover { border-color: var(--accent); transform: translateY(-3px); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
	background: var(--primary);
	color: oklch(96% 0.012 90 / 0.85);
	padding-top: var(--section-pad-m);
}
.site-footer__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 1.5rem var(--section-pad-s);
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 2.5rem;
}
.site-footer__brand { display: flex; flex-direction: column; gap: 1rem; }
.site-footer__logo { height: 36px; width: auto; }
.site-footer .logo-bg { fill: var(--accent); }
.site-footer__brand p { color: oklch(96% 0.012 90 / 0.7); font-size: .95rem; }
.site-footer h3 { color: var(--primary-contrast); font-size: 1.05rem; margin-bottom: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.site-footer a { color: oklch(96% 0.012 90 / 0.78); }
.site-footer a:hover { color: var(--accent); }
.footer-line { display: flex; align-items: center; gap: .6rem; margin: 0 0 .7rem; color: oklch(96% 0.012 90 / 0.78); }
.footer-line .icon { color: var(--accent); flex-shrink: 0; }
.site-footer__bottom {
	border-top: 1px solid oklch(96% 0.012 90 / 0.14);
	padding: 1.5rem;
	text-align: center;
	font-size: .85rem;
	color: oklch(96% 0.012 90 / 0.55);
}

/* =========================================================
   Breakpoints
   ========================================================= */
@media (max-width: 900px) {
	.site-nav, .site-header__cta { display: none; }
	.burger { display: flex; }
	.hero { grid-template-columns: 1fr; min-height: auto; }
	.hero__visual { min-height: 320px; order: -1; }
	.hero__content { padding: 2.5rem clamp(1.25rem, 5vw, 2.5rem) 3rem; }
	.contact-grid, .feature-row, .feature-row--reverse { grid-template-columns: 1fr; direction: ltr; }
	.site-footer__inner { grid-template-columns: 1fr 1fr; }
	.services-grid { grid-template-columns: repeat(2, 1fr); }
	.service-card:nth-child(1), .service-card:nth-child(2), .service-card:nth-child(3), .service-card:nth-child(4) { grid-column: span 1; }
}

@media (max-width: 600px) {
	body { font-size: 16px; }
	.section { padding: var(--section-pad-s) 0; }
	.section--loose { padding: calc(var(--section-pad-s) * 1.3) 0; }
	.services-grid { grid-template-columns: 1fr; }
	.site-footer__inner { grid-template-columns: 1fr; padding-bottom: var(--section-pad-s); }
	.site-brand__name { font-size: 1rem; max-width: 150px; }
	.site-brand__logo { height: 38px; max-width: 150px; }
	.full-bleed-break { min-height: 360px; }
	.hero-slider__dots { right: 1rem; bottom: .8rem; }
	.counters { grid-template-columns: repeat(2, 1fr); }
}
