/* =========================================================
   KFZ TECHNIK KARUL – Industrial Graphite & Signalorange
   ========================================================= */

:root {
	--primary: oklch(22% 0.01 250);
	--primary-2: oklch(28% 0.012 250);
	--accent: oklch(68% 0.19 45);
	--accent-dark: oklch(58% 0.18 45);
	--bg: oklch(96% 0.005 90);
	--surface: oklch(99% 0.002 90);
	--text: oklch(15% 0.01 250);
	--text-muted: oklch(42% 0.012 250);
	--border: oklch(87% 0.01 250);
	--on-accent: oklch(99% 0 0);
	--radius: 2px;
	--font-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	--font-body: 'Inter', system-ui, -apple-system, sans-serif;
	--container: 1240px;
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--dur-fast: 180ms;
	--dur-base: 260ms;
	--header-h: 92px;
	--header-h-shrunk: 68px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	text-wrap: pretty;
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; background: none; border: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; margin: 0 0 .5em; text-wrap: pretty; letter-spacing: 0.01em; }
p { margin: 0 0 1em; }
.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.section { padding-block: clamp(3rem, 7vw, 6rem); }

/* Icon guardrails — svg never exceeds its box */
svg { max-width: 100%; height: auto; }
.icon { width: 1.4em; height: 1.4em; max-width: 32px; max-height: 32px; flex: 0 0 auto; vertical-align: middle; }

.h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
.h3 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); }

.kicker {
	display: inline-block;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 0.82rem;
	letter-spacing: 0.14em;
	color: var(--accent);
	margin-bottom: 0.9rem;
}
.kicker--dark { color: var(--primary); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.6rem;
	border-radius: var(--radius);
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: 0.02em;
	transition: transform var(--dur-fast) var(--ease-out), background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
	min-height: 44px;
	border: 1px solid transparent;
}
.btn:active { transform: scale(0.98); }
.btn--accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px -8px oklch(68% 0.19 45 / 0.55); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--ghost { background: transparent; color: var(--surface); border-color: oklch(99% 0 0 / 0.35); }
.btn--ghost:hover { background: oklch(99% 0 0 / 0.1); border-color: oklch(99% 0 0 / 0.6); }
.btn--outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn--outline:hover { border-color: var(--primary); }
.btn--outline.btn--on-dark { color: var(--surface); border-color: oklch(99% 0 0 / 0.35); }
.btn--outline.btn--on-dark:hover { border-color: oklch(99% 0 0 / 0.7); }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn:focus-visible, a:focus-visible, button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

/* ---------- Header ---------- */
.skip-link {
	position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff;
	padding: 0.75rem 1.25rem; z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.site-header {
	position: sticky; top: 0; z-index: 100;
	background: var(--primary);
	height: var(--header-h);
	display: flex; align-items: center;
	transition: height var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
	border-bottom: 1px solid oklch(99% 0 0 / 0.06);
}
.site-header.is-shrunk {
	height: var(--header-h-shrunk);
	box-shadow: 0 8px 24px -12px oklch(15% 0.01 250 / 0.5);
}
.site-header__inner {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: clamp(1.25rem, 4vw, 2.5rem);
	display: flex; align-items: center; justify-content: space-between;
	gap: 1.5rem;
}
.site-brand { display: flex; align-items: center; gap: 0.75rem; color: var(--surface); }
.site-brand__mark {
	width: 34px; height: 34px; flex: 0 0 auto;
	background: var(--accent);
	clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}
.site-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.site-brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.03em; }
.site-brand__sub { font-size: 0.68rem; letter-spacing: 0.1em; color: oklch(80% 0.01 250); text-transform: uppercase; }
.site-brand__name--footer { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--surface); }

.main-nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.25rem); }
.nav-menu { display: flex; align-items: center; gap: clamp(1.25rem, 2.5vw, 2.25rem); }
.nav-menu li a {
	color: oklch(92% 0.005 90);
	font-weight: 500;
	font-size: 0.98rem;
	padding: 0.4rem 0;
	position: relative;
	transition: color var(--dur-fast) var(--ease-out);
}
.nav-menu li a::after {
	content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
	background: var(--accent);
	transition: right var(--dur-base) var(--ease-out);
}
.nav-menu li a:hover { color: #fff; }
.nav-menu li a:hover::after { right: 0; }
.nav-cta { margin-left: 0.5rem; padding: 0.6rem 1.2rem; font-size: 0.92rem; }

.burger {
	display: none;
	width: 44px; height: 44px;
	flex-direction: column; align-items: center; justify-content: center; gap: 5px;
	flex: 0 0 auto;
}
.burger__bar { width: 24px; height: 2px; background: var(--surface); transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-out); }
.burger[aria-expanded="true"] .burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bar:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-drawer {
	position: fixed; inset: 0; z-index: 200;
	background: var(--primary);
	display: flex; align-items: center; justify-content: center;
	opacity: 0; visibility: hidden; transform: translateY(-8px);
	transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base);
}
.mobile-drawer.is-open {
	opacity: 1; visibility: visible; transform: translateY(0);
	transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s linear 0s;
}
.mobile-drawer__nav { display: flex; flex-direction: column; align-items: center; gap: 2rem; text-align: center; }
.nav-menu--mobile { flex-direction: column; gap: 1.5rem; }
.nav-menu--mobile li a { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; color: var(--surface); }
.mobile-drawer__cta { margin-top: 1rem; }

/* ---------- Hero ---------- */
.hero {
	position: relative;
	background: var(--primary);
	color: var(--surface);
	padding-block: clamp(4.5rem, 12vw, 8rem) clamp(5rem, 13vw, 9rem);
	overflow: hidden;
	clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}
.hero__bg {
	position: absolute; inset: 0;
	background: linear-gradient(180deg, oklch(22% 0.01 250 / 0.55), oklch(15% 0.01 250 / 0.88)),
		repeating-linear-gradient(135deg, oklch(30% 0.012 250) 0 2px, oklch(24% 0.01 250) 2px 44px);
	background-size: cover, 62px 62px;
	background-position: center, center;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(12, 1fr); gap: 2rem; }
.hero__content { grid-column: 1 / span 8; }
@media (max-width: 900px) { .hero__content { grid-column: 1 / -1; } }
.hero__title { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: 0.55em; }
.hero__subtitle { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: oklch(88% 0.008 90); max-width: 42ch; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__stripe {
	position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
	background: repeating-linear-gradient(90deg, var(--accent) 0 40px, oklch(22% 0.01 250) 40px 80px);
}

/* ---------- Slider ---------- */
.slider-section { background: var(--primary-2); padding-block: 0; }
.slider { position: relative; overflow: hidden; }
.slider__track { display: flex; transition: transform var(--dur-base) var(--ease-out); will-change: transform; }
.slider__slide { position: relative; flex: 0 0 100%; aspect-ratio: 16 / 7; min-height: 320px; }
.slider__img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 7; }
.slider__caption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem);
	background: linear-gradient(0deg, oklch(15% 0.01 250 / 0.85), transparent);
	color: var(--surface);
}
.slider__title { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.3em; }
.slider__text { max-width: 60ch; color: oklch(85% 0.008 90); font-size: 0.98rem; }
.slider__arrow {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
	background: oklch(15% 0.01 250 / 0.5); color: #fff; font-size: 1.6rem;
	transition: background-color var(--dur-fast) var(--ease-out);
}
.slider__arrow:hover { background: var(--accent); }
.slider__arrow--prev { left: 1rem; }
.slider__arrow--next { right: 1rem; }
.slider__dots { position: absolute; bottom: 1rem; right: 1.5rem; display: flex; gap: 0.5rem; z-index: 2; }
.slider__dots button { width: 8px; height: 8px; border-radius: 50%; background: oklch(99% 0 0 / 0.4); transition: background-color var(--dur-fast) var(--ease-out), width var(--dur-fast) var(--ease-out); }
.slider__dots button.is-active { background: var(--accent); width: 22px; border-radius: 4px; }

/* ---------- Counters ---------- */
.counters { background: var(--surface); border-bottom: 1px solid var(--border); }
.counters__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
@media (max-width: 900px) { .counters__grid { grid-template-columns: repeat(2, 1fr); } }
.counter__value { display: block; font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; color: var(--primary); }
.counter__value::after { content: attr(data-suffix); }
.counter__label { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Services ---------- */
.section-head { max-width: 60ch; margin-bottom: 2.5rem; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; }
.services__grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 2rem;
}
.service-card { grid-column: span 4; }
@media (max-width: 900px) { .service-card { grid-column: span 6; } }
@media (max-width: 600px) { .service-card { grid-column: span 12; } }
.service-card__link {
	display: block; background: var(--surface); border: 1px solid var(--border);
	overflow: hidden; height: 100%;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 22px));
	transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.service-card__link:hover {
	transform: translateY(-6px) rotateX(2deg);
	box-shadow: 0 22px 40px -20px oklch(15% 0.01 250 / 0.35);
	border-color: var(--accent);
}
.service-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--primary); }
.service-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms var(--ease-out); }
.service-card__link:hover .service-card__img { transform: scale(1.05); }
.service-card__body { padding: 1.5rem 1.6rem 1.75rem; }
.service-card__title { font-size: 1.35rem; margin-bottom: 0.5rem; }
.service-card__text { color: var(--text-muted); font-size: 0.96rem; margin-bottom: 1rem; }
.service-card__cta {
	display: inline-flex; align-items: center; gap: 0.4rem;
	font-family: var(--font-display); font-weight: 600; color: var(--accent-dark);
	transition: gap var(--dur-fast) var(--ease-out);
}
.service-card__link:hover .service-card__cta { gap: 0.7rem; }

/* ---------- About teaser ---------- */
.about-teaser__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 900px) { .about-teaser__grid { grid-template-columns: 1fr; } }
.about-teaser__media { aspect-ratio: 4 / 3; overflow: hidden; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.about-teaser__media img { width: 100%; height: 100%; object-fit: cover; }
.about-teaser__content p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 1.5rem; }

/* ---------- Contact ---------- */
.contact { background: var(--primary); color: var(--surface); }
.contact .kicker { color: var(--accent); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: stretch; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }
.contact-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem; }
.contact-list li { display: flex; align-items: center; gap: 0.7rem; color: oklch(90% 0.006 90); }
.contact-list .icon { color: var(--accent); }
.contact__map { min-height: 280px; }
.contact__map iframe { width: 100%; height: 100%; min-height: 280px; border: 0; filter: grayscale(0.2) contrast(1.05); }

/* ---------- Page hero (subpages) ---------- */
.page-hero { position: relative; background: var(--primary); color: var(--surface); padding-block: clamp(3.5rem, 9vw, 5.5rem) clamp(3rem, 7vw, 4.5rem); clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
.page-hero__title { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0; }
.page-hero__stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--accent) 0 30px, oklch(22% 0.01 250) 30px 60px); }
.page-content .entry-content > * + * { margin-top: 1.2em; }
.page-content .entry-content h2 { margin-top: 1.6em; font-size: clamp(1.5rem, 3vw, 2rem); }
.page-content .entry-content h3 { margin-top: 1.3em; font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
.page-content .entry-content ul { list-style: disc; padding-left: 1.4em; }
.page-content .entry-content ul li { margin-bottom: 0.5em; }
.page-content .entry-content { max-width: 74ch; }

/* ---------- Kontakt page ---------- */
.kontakt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); margin-top: 3rem; }
@media (max-width: 900px) { .kontakt-grid { grid-template-columns: 1fr; } }
.kontakt-grid__map { margin-top: 1.5rem; aspect-ratio: 4 / 3; }
.kontakt-grid__map iframe { width: 100%; height: 100%; border: 0; }
.kontakt-grid__form .wpcf7-form p { margin-bottom: 1rem; }
.kontakt-grid__form input[type=text], .kontakt-grid__form input[type=email], .kontakt-grid__form input[type=tel], .kontakt-grid__form textarea {
	width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius);
	font-family: var(--font-body); background: var(--surface);
}
.kontakt-grid__form input:focus, .kontakt-grid__form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.kontakt-grid__form .wpcf7-submit {
	display: inline-flex; align-items: center; padding: 0.85rem 1.6rem; background: var(--accent); color: #fff;
	border-radius: var(--radius); font-family: var(--font-display); font-weight: 600; min-height: 44px;
	transition: background-color var(--dur-base) var(--ease-out);
}
.kontakt-grid__form .wpcf7-submit:hover { background: var(--accent-dark); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--primary-2); color: var(--surface); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-band__inner p { color: oklch(85% 0.008 90); margin: 0.4em 0 0; }
.cta-band__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: oklch(85% 0.008 90); padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem; }
.site-footer__grid { max-width: var(--container); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr; } }
.footer-tagline { color: oklch(70% 0.01 250); max-width: 32ch; margin-top: 0.75rem; }
.footer-heading { font-size: 1rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 1.1rem; color: var(--surface); }
.footer-contact { display: flex; flex-direction: column; gap: 0.85rem; }
.footer-contact li { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.footer-contact .icon { color: var(--accent); flex-shrink: 0; }
.footer-menu { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-menu a:hover { color: var(--accent); }
.site-footer__bottom { max-width: var(--container); margin: 2.5rem auto 0; padding-inline: clamp(1.25rem, 4vw, 2.5rem); padding-top: 1.5rem; border-top: 1px solid oklch(99% 0 0 / 0.08); font-size: 0.85rem; color: oklch(60% 0.01 250); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 1; transform: translateY(24px); transition: transform 620ms var(--ease-out); }
.reveal.is-visible { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { transform: none; transition: none; }
	.service-card__link, .service-card__img, .btn, .burger__bar, .mobile-drawer, .slider__track { transition: none !important; }
}

/* ---------- Mobile-first breakpoints ---------- */
@media (max-width: 900px) {
	.main-nav { display: none; }
	.burger { display: flex; }
	.site-header__inner { padding-block: 0.5rem; }
}
@media (min-width: 901px) {
	.mobile-drawer { display: none; }
}
@media (max-width: 600px) {
	.hero { clip-path: polygon(0 0, 100% 0, 100% 96%, 0 100%); }
	.page-hero { clip-path: polygon(0 0, 100% 0, 100% 94%, 0 100%); }
	.hero__actions .btn { width: 100%; justify-content: center; }
	.counters__grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}

body { overflow-x: hidden; }
