/* ===========================================================
   Elektro Jatho – Haupt-Stylesheet
   Apple-artige, ruhige Optik (viel Weißraum, große Typografie,
   dezente Scroll-Animationen) mit Handwerksbetrieb-Inhalten.

   Breakpoints (mobile-first): 480px / 768px / 1024px / 1440px
   =========================================================== */

/* ---------------------------------------------------
   1. Design-Tokens (CSS-Variablen)
--------------------------------------------------- */
:root {
	/* TODO: Firmenfarbe eintragen, sobald der finale Hex-Wert vom Logo
	   feststeht – an dieser einen Stelle zentral austauschen. Bis dahin
	   dient ein neutraler, seriöser Blauton als Platzhalter. Wichtig:
	   der Wert muss ein gültiger CSS-Farbwert sein (nicht "#TODO"),
	   sonst wird die Farbe im gesamten Theme unsichtbar/transparent. */
	--brand-color: #1d4ed8;

	--color-text: #1d1d1f;
	--color-text-muted: #6e6e73;
	--color-bg: #ffffff;
	--color-bg-subtle: #f5f5f7;
	--color-border: #d2d2d7;
	--color-error-bg: #fdecea;
	--color-error-text: #86251b;
	--color-success-bg: #eafaf0;
	--color-success-text: #10693f;

	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;

	--container-width: 1200px;
	--section-padding-y: 96px;
	--radius-md: 14px;
	--radius-lg: 24px;

	--transition-base: 0.3s ease;
}

/* ---------------------------------------------------
   2. Grundlayout & Typografie
--------------------------------------------------- */
body {
	font-family: var(--font-body);
	color: var(--color-text);
	background-color: var(--color-bg);
	line-height: 1.6;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
}

.container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: 24px;
}

.section {
	padding-block: var(--section-padding-y);
}

.section__title {
	font-size: clamp(1.8rem, 3vw, 2.6rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin-bottom: 2.5rem;
	text-align: center;
}

h1,
h2,
h3 {
	font-weight: 700;
	letter-spacing: -0.02em;
}

h2 {
	font-size: clamp(1.6rem, 2.6vw, 2.2rem);
	margin-bottom: 1rem;
}

p {
	color: var(--color-text-muted);
}

a {
	transition: color var(--transition-base);
}

/* Sichtbarer Fokus-Zustand für Barrierefreiheit */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 3px solid var(--brand-color);
	outline-offset: 2px;
	border-radius: 4px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	top: -60px;
	left: 16px;
	background: var(--color-text);
	color: #fff;
	padding: 12px 20px;
	border-radius: 8px;
	z-index: 10000;
	transition: top var(--transition-base);
}

.skip-link:focus {
	top: 16px;
}

/* ---------------------------------------------------
   3. Buttons
--------------------------------------------------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 1rem;
	transition: transform var(--transition-base), background-color var(--transition-base), box-shadow var(--transition-base);
}

.btn--primary {
	background-color: var(--brand-color);
	color: #fff;
}

.btn--primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.btn--secondary {
	background-color: var(--color-bg-subtle);
	color: var(--color-text);
	border: 1px solid var(--color-border);
}

.btn--secondary:hover {
	background-color: var(--color-border);
}

.btn--large {
	padding: 16px 34px;
	font-size: 1.05rem;
}

/* ---------------------------------------------------
   4. Header / Navigation (sticky)
--------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: saturate(180%) blur(16px);
	-webkit-backdrop-filter: saturate(180%) blur(16px);
	border-bottom: 1px solid transparent;
	transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.site-header.is-scrolled {
	border-bottom-color: var(--color-border);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.site-branding img,
.custom-logo {
	max-height: 40px;
	width: auto;
}

.primary-menu {
	display: flex;
	gap: 32px;
}

.primary-menu a {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--color-text);
	position: relative;
	padding-block: 4px;
}

.primary-menu a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 0;
	height: 2px;
	background: var(--brand-color);
	transition: width var(--transition-base);
}

.primary-menu a:hover::after,
.primary-menu li.current-menu-item a::after {
	width: 100%;
}

.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
}

.menu-toggle__bar {
	width: 100%;
	height: 2px;
	background: var(--color-text);
	transition: transform var(--transition-base), opacity var(--transition-base);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
	opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ---------------------------------------------------
   5. Hero
--------------------------------------------------- */
.hero {
	position: relative;
	min-height: 88vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	color: #fff;
	text-align: center;
}

.hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-color: #111114; /* Fallback solange hero-bg.jpg fehlt */
}

.hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0.6) 100%);
}

.hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	padding-block: 40px;
}

.hero__logo {
	filter: brightness(0) invert(1);
	opacity: 0.9;
	margin-bottom: 0.5rem;
}

.hero__headline {
	font-size: clamp(2.2rem, 5vw, 4rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	max-width: 16ch;
}

.hero__subline {
	font-size: clamp(1.05rem, 1.6vw, 1.3rem);
	color: rgba(255, 255, 255, 0.85);
	max-width: 46ch;
	margin-bottom: 1rem;
}

.hero__scroll-hint {
	position: absolute;
	bottom: 28px;
	left: 50%;
	transform: translateX(-50%);
	width: 22px;
	height: 36px;
	border: 2px solid rgba(255, 255, 255, 0.6);
	border-radius: 999px;
}

.hero__scroll-hint::before {
	content: "";
	position: absolute;
	top: 6px;
	left: 50%;
	transform: translateX(-50%);
	width: 4px;
	height: 8px;
	background: #fff;
	border-radius: 999px;
	animation: hero-scroll-bounce 1.8s infinite;
}

@keyframes hero-scroll-bounce {
	0%, 100% { transform: translate(-50%, 0); opacity: 1; }
	50% { transform: translate(-50%, 10px); opacity: 0.4; }
}

/* ---------------------------------------------------
   6. Leistungs-Kacheln (Teaser)
--------------------------------------------------- */
.services-teaser__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
}

.service-tile {
	display: block;
	padding: 40px 28px;
	background: var(--color-bg-subtle);
	border-radius: var(--radius-lg);
	transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
}

.service-tile:hover {
	transform: translateY(-6px);
	background: #fff;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.service-tile__icon {
	width: 56px;
	height: 56px;
	margin-bottom: 20px;
	color: var(--brand-color);
}

.service-tile__icon svg {
	width: 100%;
	height: 100%;
}

.service-tile__title {
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
}

.service-tile__text {
	font-size: 0.95rem;
	margin: 0;
}

/* ---------------------------------------------------
   7. Vertrauens-/Trust-Section
--------------------------------------------------- */
.trust-section__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
	align-items: center;
}

.trust-section__text p {
	margin-bottom: 1.5rem;
}

.trust-list {
	display: grid;
	gap: 0.75rem;
}

.trust-list li {
	position: relative;
	padding-left: 28px;
	color: var(--color-text);
	font-weight: 500;
}

.trust-list li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--brand-color);
	font-weight: 700;
}

/* ---------------------------------------------------
   8. Kontakt-CTA (kompakt, Startseite)
--------------------------------------------------- */
.contact-cta {
	background: var(--color-bg-subtle);
	border-radius: var(--radius-lg);
	margin-inline: 24px;
}

.contact-cta__inner {
	text-align: center;
	max-width: 640px;
}

.contact-cta__text {
	margin-bottom: 1.5rem;
}

.contact-cta__details {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	margin-bottom: 2rem;
}

.contact-cta__item {
	font-weight: 600;
}

/* ---------------------------------------------------
   9. Seiten-Header (Unterseiten)
--------------------------------------------------- */
.page-header {
	padding-block: 72px 40px;
	text-align: center;
	background: var(--color-bg-subtle);
}

.page-header__title {
	font-size: clamp(2rem, 4vw, 3rem);
}

.page-header__subtitle {
	font-size: 1.1rem;
	max-width: 46ch;
	margin-inline: auto;
	margin-top: 0.75rem;
}

/* ---------------------------------------------------
   10. Leistungen – Blöcke
--------------------------------------------------- */
.service-block__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	align-items: center;
}

.service-block--reverse .service-block__media {
	order: 2;
}

.service-block__badge {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--brand-color);
	background: var(--color-bg-subtle);
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 0.75rem;
}

.services-more__card {
	text-align: center;
	background: var(--color-bg-subtle);
	border-radius: var(--radius-lg);
	padding: 56px 32px;
}

.services-more__card p {
	max-width: 50ch;
	margin-inline: auto;
	margin-bottom: 1.5rem;
}

/* ---------------------------------------------------
   11. Bild-Platzhalter
--------------------------------------------------- */
.img-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	background: repeating-linear-gradient(
		45deg,
		#e5e5ea,
		#e5e5ea 12px,
		#efeff2 12px,
		#efeff2 24px
	);
	border-radius: var(--radius-md);
	color: var(--color-text-muted);
	font-size: 0.9rem;
	font-weight: 600;
	text-align: center;
	padding: 16px;
}

.img-placeholder--tall {
	aspect-ratio: 3 / 4;
}

/* ---------------------------------------------------
   12. Projekte – Vorher/Nachher
--------------------------------------------------- */
.projects-gallery__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 56px;
}

.project-pair__images {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.project-pair__image {
	position: relative;
	margin: 0;
}

.project-pair__image img,
.project-pair__image .img-placeholder {
	width: 100%;
	border-radius: var(--radius-md);
}

.project-pair__label {
	position: absolute;
	bottom: 12px;
	left: 12px;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 4px 10px;
	border-radius: 999px;
}

.project-pair__caption {
	margin-top: 16px;
}

.project-pair__title {
	font-size: 1.1rem;
	margin-bottom: 0.25rem;
}

.project-pair__description {
	margin: 0;
	font-size: 0.9rem;
}

/* ---------------------------------------------------
   13. Über uns – Intro & Team
--------------------------------------------------- */
.about-intro__inner {
	max-width: 70ch;
	margin-inline: auto;
	text-align: center;
	font-size: 1.15rem;
}

.about-intro__inner p {
	color: var(--color-text);
}

.team-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}

.team-card {
	text-align: center;
}

.team-card__photo {
	margin-bottom: 1.25rem;
}

.team-card__photo img,
.team-card__photo .img-placeholder {
	border-radius: 999px;
	aspect-ratio: 1 / 1;
	width: 160px;
	height: 160px;
	margin-inline: auto;
	object-fit: cover;
}

.team-card__name {
	font-size: 1.15rem;
	margin-bottom: 0.15rem;
}

.team-card__role {
	color: var(--brand-color);
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.5rem;
}

.team-card__bio {
	font-size: 0.9rem;
}

/* ---------------------------------------------------
   14. Kontaktseite
--------------------------------------------------- */
.contact-page__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 48px;
}

.contact-page__address {
	font-style: normal;
	margin-block: 1rem 1.5rem;
	color: var(--color-text-muted);
}

.contact-page__list {
	display: grid;
	gap: 0.9rem;
	margin-bottom: 1.5rem;
}

.contact-page__list li {
	display: flex;
	gap: 10px;
	align-items: baseline;
}

.contact-page__label {
	font-weight: 600;
	min-width: 120px;
}

.contact-page__map iframe {
	border-radius: var(--radius-md);
	display: block;
}

/* ---------------------------------------------------
   15. Formulare
--------------------------------------------------- */
.form-row {
	margin-bottom: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.form-row label {
	font-weight: 600;
	font-size: 0.9rem;
}

.form-row input,
.form-row textarea {
	padding: 12px 16px;
	border: 1px solid var(--color-border);
	border-radius: 10px;
	font-size: 1rem;
	background: #fff;
	color: var(--color-text);
}

.form-row input:focus,
.form-row textarea:focus {
	border-color: var(--brand-color);
}

.form-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-notice {
	padding: 16px 20px;
	border-radius: 10px;
	margin-bottom: 1.5rem;
	font-size: 0.95rem;
}

.form-notice--success {
	background: var(--color-success-bg);
	color: var(--color-success-text);
}

.form-notice--error {
	background: var(--color-error-bg);
	color: var(--color-error-text);
}

.form-notice--error ul {
	padding-left: 1.2rem;
	list-style: disc;
}

/* ---------------------------------------------------
   16. Rechtstexte (Impressum/Datenschutz)
--------------------------------------------------- */
.legal-page__inner {
	max-width: 76ch;
	margin-inline: auto;
}

.legal-page__inner h2 {
	margin-top: 2rem;
}

.legal-page__inner p {
	color: var(--color-text);
}

.legal-disclaimer {
	background: var(--color-bg-subtle);
	border-left: 4px solid var(--brand-color);
	padding: 14px 18px;
	border-radius: 0 10px 10px 0;
	font-size: 0.9rem;
	margin-bottom: 2rem;
}

/* Deutlich sichtbare TODO-Markierung im Rechtstext, damit offene Punkte
   vor dem Livegang nicht übersehen werden. */
.legal-todo {
	background: transparent;
	color: #c0392b;
	font-weight: 700;
	font-style: italic;
}

/* ---------------------------------------------------
   17. Footer
--------------------------------------------------- */
.site-footer {
	background: var(--color-text);
	color: #f5f5f7;
	margin-top: var(--section-padding-y);
}

.site-footer__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
	padding-block: 64px 40px;
}

.site-footer__logo {
	font-weight: 700;
	font-size: 1.15rem;
	margin-bottom: 12px;
}

.site-footer__address a,
.site-footer__links a {
	color: rgba(255, 255, 255, 0.75);
}

.site-footer__address a:hover,
.site-footer__links a:hover {
	color: #fff;
}

.site-footer__heading {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(255, 255, 255, 0.5);
	margin-bottom: 12px;
}

.site-footer__links {
	display: grid;
	gap: 8px;
}

.site-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.site-footer__bottom-inner {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding-block: 20px;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.6);
}

.site-footer__legal-links {
	display: flex;
	gap: 20px;
}

.site-footer__legal-links a:hover {
	color: #fff;
}

/* ---------------------------------------------------
   18. Blog-Fallback (index.php)
--------------------------------------------------- */
.post-list {
	display: grid;
	gap: 32px;
}

.post-list__title a:hover {
	color: var(--brand-color);
}

/* ---------------------------------------------------
   19. Scroll-Reveal-Animation
--------------------------------------------------- */
.reveal {
	opacity: 0;
	transform: translateY(32px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ---------------------------------------------------
   20. Responsive Breakpoints
--------------------------------------------------- */

/* Tablet und größer (≥768px) */
@media (min-width: 768px) {
	.services-teaser__grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.trust-section__inner {
		grid-template-columns: 1fr 1fr;
	}

	.service-block__inner {
		grid-template-columns: 1fr 1fr;
	}

	.projects-gallery__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.team-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.contact-page__inner {
		grid-template-columns: 1fr 1fr;
	}
}

/* Desktop (≥1024px) */
@media (min-width: 1024px) {
	.primary-navigation {
		display: block;
	}

	.menu-toggle {
		display: none;
	}

	.team-grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Mobile (<1024px): Navigation als Off-Canvas-Menü */
@media (max-width: 1023px) {
	.menu-toggle {
		display: flex;
	}

	.primary-navigation {
		position: fixed;
		top: 64px;
		left: 0;
		right: 0;
		bottom: 0;
		background: #fff;
		padding: 32px 24px;
		transform: translateX(100%);
		transition: transform var(--transition-base);
		overflow-y: auto;
	}

	.primary-navigation.is-open {
		transform: translateX(0);
	}

	.primary-menu {
		flex-direction: column;
		gap: 24px;
	}

	.primary-menu a {
		font-size: 1.2rem;
	}
}

/* Große Screens (≥1440px): etwas mehr Luft */
@media (min-width: 1440px) {
	:root {
		--section-padding-y: 128px;
	}

	.container {
		padding-inline: 32px;
	}
}

/* Kleine Screens (<480px): kompaktere Abstände */
@media (max-width: 480px) {
	:root {
		--section-padding-y: 64px;
	}

	.hero__headline {
		max-width: 100%;
	}

	.project-pair__images {
		grid-template-columns: 1fr;
	}

	.contact-page__label {
		min-width: auto;
	}

	.contact-page__list li {
		flex-direction: column;
		gap: 2px;
	}
}
