/*
Theme Name: atnd
Theme URI: https://www.atnd.de
Author: atnd GmbH
Description: Schlankes, sicherheitsorientiertes Klassik-Theme für atnd.de. Keine Plugins erforderlich, keine externen Ressourcen (Schriften, CDNs, Tracker).
Version: 2.4.1
Requires at least: 6.4
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: atnd
*/

:root {
	--ink: #0e1b22;
	--ink-2: #17303a;
	--text: #42525a;
	--accent: #4fae6a;
	--accent-dark: #1f7a45;
	--accent-soft: #e8f6ed;
	--bg: #fff;
	--soft: #f4f7f6;
	--line: #e3e9eb;
	--radius: 16px;
	--shadow: 0 10px 30px rgba(14, 27, 34, .08);
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--wrap: 1160px;
	--header-h: 72px;
	--night: #0e1b22;
	--night-2: #17303a;
	--surface: #fff;
	--header-bg: rgba(255,255,255,.88);
	--btn: #0e1b22;
	--btn-hover: #1f7a45;
	--field: #f4f7f6;
	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--ink: #eaf2f4;
		--text: #b4c3c9;
		--accent-dark: #6fd08a;
		--accent-soft: rgba(79,174,106,.16);
		--bg: #0b141a;
		--soft: #0f1b22;
		--surface: #131f27;
		--line: #22343d;
		--shadow: 0 10px 30px rgba(0,0,0,.45);
		--header-bg: rgba(11,20,26,.88);
		--btn: #1f7a45;
		--btn-hover: #18603a;
		--field: #0b141a;
	}
	.notice--err { background: #3a1d1a; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; font: 400 16px/1.7 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover, a:focus { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -.02em; }

.screen-reader-text, .skip-link:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--surface); padding: 10px 16px; border-radius: 8px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }
.site-logo { display: block; line-height: 0; }
.site-logo img { height: 38px; width: auto; }
.nav-toggle { background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); font-size: 26px; line-height: 1; }
.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 8px 24px 16px; }
.main-nav a { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .is-active > a { color: var(--accent-dark); }
@media (min-width: 800px) {
	.nav-toggle { display: none; }
	.main-nav { display: block; position: static; border: 0; background: none; box-shadow: none; }
	.main-nav ul { display: flex; align-items: center; gap: 4px; padding: 0; }
	.main-nav a { padding: 8px 14px; border-radius: 999px; }
	.main-nav a:hover, .main-nav .is-active > a { background: var(--accent-soft); }
	.main-nav .menu-cta > a { background: var(--btn); color: #fff; margin-left: 8px; }
	.main-nav .menu-cta > a:hover, .main-nav .menu-cta.is-active > a { background: var(--btn-hover); color: #fff; }
}

/* Buttons */
.btn { display: inline-block; padding: 13px 26px; font: 600 15px/1.2 var(--font); text-decoration: none; text-align: center; color: #fff; background: var(--btn); border: 2px solid var(--btn); border-radius: 999px; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.btn:hover, .btn:focus-visible { background: var(--btn-hover); border-color: var(--btn-hover); color: #fff; transform: translateY(-1px); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #06210f; }
.btn--primary:hover, .btn--primary:focus-visible { background: #fff; border-color: #fff; color: var(--night); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.btn--ghost:hover, .btn--ghost:focus-visible { background: #fff; border-color: #fff; color: var(--night); }

/* Hero */
.hero { position: relative; display: flex; align-items: center; min-height: 82vh; padding: 96px 0 140px; color: #fff; overflow: hidden; background: var(--night); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(8,24,30,.92) 0%, rgba(8,24,30,.68) 50%, rgba(8,24,30,.3) 100%); }
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { display: inline-block; margin: 0 0 20px; padding: 6px 14px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: #bff0cf; background: rgba(79,174,106,.18); border: 1px solid rgba(79,174,106,.45); border-radius: 999px; }
.hero h1 { margin: 0; max-width: 18ch; color: #fff; font-weight: 800; font-size: clamp(34px, 6vw, 68px); letter-spacing: -.03em; }
.hero__text { max-width: 54ch; margin: 24px 0 0; font-size: clamp(17px, 2vw, 20px); color: #d5e1e5; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Kennzahlen */
.facts { position: relative; z-index: 2; margin-top: -64px; }
.facts__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin: 0; padding: 0; list-style: none; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.facts__grid li { padding: 24px; background: var(--surface); }
.facts__value { display: block; font-size: clamp(20px, 3vw, 28px); font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.2; }
.facts__label { display: block; margin-top: 4px; font-size: 14px; color: var(--text); }
@media (min-width: 800px) { .facts__grid { grid-template-columns: repeat(4, 1fr); } }

/* Sections */
.section, .page-content { padding: 88px 0; }
.section__head { max-width: 62ch; margin-bottom: 48px; }
.kicker { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-dark); }
.section h2, .page-content h1, .entry-title { margin: 0; font-weight: 800; font-size: clamp(28px, 4vw, 44px); }
.section--about, .section--leistungen { background: var(--bg); }
.section--about { background: var(--soft); }
.entry-content { max-width: 70ch; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2, .entry-content h3 { margin-top: 2em; }
.section__head + .entry-content, .section__head + .split { margin-top: 0; }

/* Leistungen */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { padding: 30px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; color: var(--accent-dark); background: var(--accent-soft); border-radius: 14px; }
.card__icon svg { width: 26px; height: 26px; }
.card h3 { margin: 0 0 8px; font-size: 20px; }
.card p { margin: 0; }

/* Über uns */
.split { display: grid; gap: 40px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1.4fr 1fr; gap: 64px; } }
.panel { padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel h3 { margin: 0 0 16px; font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { padding: 6px 14px; font-size: 14px; font-weight: 500; color: var(--accent-dark); background: var(--accent-soft); border-radius: 999px; }

/* Fernwartung */
.section--fernwartung { color: #c4d3d8; background: radial-gradient(1200px 500px at 85% 0, var(--night-2), var(--night)); }
.section--fernwartung h2, .section--fernwartung h3 { color: #fff; }
.section--fernwartung .kicker { color: #8fe0ab; }
.section--fernwartung a:not(.remote__link) { color: #8fe0ab; }
.remote { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .remote { grid-template-columns: 1.4fr 1fr; gap: 64px; } }
.remote__card { display: grid; justify-items: center; gap: 14px; padding: 32px; text-align: center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); }
.remote__link { display: inline-block; line-height: 0; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform .15s; }
.remote__link:hover, .remote__link:focus-visible { transform: translateY(-3px) scale(1.02); }
.remote__note { font-size: 13px; color: #9fb4bb; }

.steps { counter-reset: s; list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: center; color: #e3edf0; }
.steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #06210f; font-weight: 700; }

/* Leistungskarten: Stichworte, Partner, Kundenstimmen */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.tags li { padding: 3px 10px; font-size: 12px; color: var(--text); background: var(--soft); border: 1px solid var(--line); border-radius: 999px; }
.section--referenzen { padding-top: 0; }
.partners { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 0 0 40px; padding: 0; list-style: none; }
.partners li { font-size: 18px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.quotes { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.quote { margin: 0; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.quote p { margin: 0 0 16px; font-size: 17px; color: var(--ink); }
.quote footer { font-size: 14px; }

/* Kontakt */
.section--kontakt { background: var(--bg); }
.contact-details { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.contact-details li { display: flex; gap: 14px; align-items: flex-start; }
.contact-details svg { flex: none; width: 22px; height: 22px; margin-top: 3px; color: var(--accent-dark); }
.contact-details span { display: block; font-size: 13px; color: var(--text); }
.contact-details strong, .contact-details a { font-weight: 600; color: var(--ink); text-decoration: none; }
.contact-details a:hover { color: var(--accent-dark); text-decoration: underline; }
.contact-form { display: grid; gap: 16px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.contact-form input[type=text], .contact-form input[type=email], .contact-form textarea {
	width: 100%; padding: 12px 14px; font: 400 16px/1.4 var(--font); color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 10px; transition: border-color .15s, background .15s;
}
.contact-form input:focus, .contact-form textarea:focus { background: var(--surface); border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(79,174,106,.25); }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form .check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 400; }
.contact-form .check input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent-dark); }
.contact-form .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.contact-form .btn { justify-self: start; }
.notice { padding: 14px 18px; margin-bottom: 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid; font-weight: 500; }
.notice--ok { border-left-color: var(--accent); background: var(--accent-soft); }
.notice--err { border-left-color: #c0392b; background: #fdecea; }

/* Footer */
.site-footer { padding: 64px 0 28px; color: #9fb4bb; background: var(--night); font-size: 14px; }
.site-footer a { color: #d5e1e5; }
.site-footer a:hover { color: #8fe0ab; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 90px 1fr 1fr; gap: 48px; align-items: start; } }
.footer-grid img { width: 72px; height: auto; }
.footer-grid address { font-style: normal; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.to-top { position: fixed; right: 18px; bottom: 18px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--btn); color: #fff; text-decoration: none; border-radius: 50%; box-shadow: var(--shadow); transition: opacity .2s, visibility .2s; }
.has-js .to-top { opacity: 0; visibility: hidden; }
.has-js .to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover, .to-top:focus-visible { background: var(--btn-hover); color: #fff; }

/* Block-Editor-Inhalte */
.alignwide { max-width: var(--wrap); }
.wp-block-image img { height: auto; }

/* 404 */
.notfound { padding: 120px 0; text-align: center; }
.notfound__code { margin: 0; font-size: clamp(88px, 20vw, 200px); font-weight: 800; line-height: 1; letter-spacing: -.04em; color: var(--accent); }
.notfound h1 { margin: 8px 0 12px; font-size: clamp(24px, 4vw, 36px); }
.notfound p { margin: 0 0 28px; }

/* Sanftes Einblenden beim Scrollen (nur Browser mit Scroll-Animationen, nicht bei reduzierter Bewegung) */
@keyframes atnd-reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.card, .panel, .quote, .remote__card, .contact-form, .facts__grid, .steps li {
			animation: atnd-reveal linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 40%;
		}
	}
}

/* Druckansicht (v. a. Impressum und Datenschutzerklärung) */
@media print {
	:root { --ink: #000; --text: #000; --bg: #fff; --soft: #fff; --surface: #fff; --accent-dark: #000; }
	body { font-size: 11pt; line-height: 1.5; background: #fff; color: #000; }
	.site-header, .to-top, .hero, .facts, .hero__cta, .nav-toggle, .contact-form, .skip-link, .remote__card, .footer-nav, .section--fernwartung { display: none !important; }
	.section, .page-content { padding: 12pt 0; background: none !important; }
	.site-footer { color: #000; background: none; border-top: 1px solid #000; padding: 12pt 0 0; }
	.site-footer a { color: #000; }
	.entry-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
	h1, h2, h3 { break-after: avoid; }
	.card, .panel, .quote { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
}
