/* Elektro Schneider – Design-Tokens (siehe Skill frontend-design) */
:root {
  --c-blue: #005aab; --c-blue-dark: #004280; --c-red: #c81f30; --c-red-dark: #a31826;
  --c-text: #1b1f24; --c-muted: #4d5560; --c-bg: #fff; --c-surface: #f3f6f9; --c-border: #d5dbe2;
  --c-success-bg: #e8f5ec; --c-success: #1a6b34; --c-error-bg: #fdecee; --c-error: #b3141f;
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-6: 1.5rem; --s-8: 2rem; --s-12: 3rem; --s-16: 4rem;
  --fs-sm: .9rem; --fs-body: clamp(1rem, .96rem + .2vw, 1.125rem);
  --fs-h4: 1.1rem; --fs-h3: clamp(1.2rem, 1.1rem + .5vw, 1.4rem);
  --fs-h2: clamp(1.5rem, 1.25rem + 1vw, 2rem); --fs-h1: clamp(2rem, 1.5rem + 2.4vw, 3.2rem);
  --radius: 10px; --shadow: 0 1px 3px rgb(0 0 0 / .08), 0 6px 18px rgb(0 0 0 / .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-body); line-height: 1.6; color: var(--c-text); background: var(--c-bg); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 var(--s-4); overflow-wrap: break-word; hyphens: manual; }
h1 { font-size: var(--fs-h1); } h2, .h2 { font-size: var(--fs-h2); } h3, .h3 { font-size: var(--fs-h3); } .h4 { font-size: var(--fs-h4); }
p, ul, ol, dl { margin: 0 0 var(--s-4); }
a { color: var(--c-blue); text-underline-offset: .2em; }
a:hover { color: var(--c-blue-dark); }
:focus-visible { outline: 3px solid var(--c-red); outline-offset: 3px; border-radius: 3px; }
main:focus { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s-4); top: -100px; z-index: 100; background: var(--c-blue); color: #fff; padding: var(--s-2) var(--s-4); border-radius: var(--radius); }
.skip-link:focus { top: var(--s-4); color: #fff; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-4); }
.center { text-align: center; }
.todo { background: #fff3cd; color: #5c4400; padding: 0 .25em; }
.note, .meta { color: var(--c-muted); font-size: var(--fs-sm); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: var(--s-3) var(--s-6); border-radius: var(--radius); border: 2px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .2s ease-out, color .2s ease-out; }
.btn-primary { background: var(--c-red); color: #fff; }
.btn-primary:hover { background: var(--c-red-dark); color: #fff; }
.btn-ghost { border-color: #fff; color: #fff; background: rgb(0 0 0 / .25); }
.btn-ghost:hover { background: #fff; color: var(--c-blue-dark); }
.btn-light { background: #fff; color: var(--c-blue-dark); }
.btn-light:hover { background: var(--c-surface); color: var(--c-blue-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* Header & Navigation */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--c-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--c-muted); }
.brand img { width: clamp(150px, 22vw, 210px); height: auto; }
.brand-claim { font-size: var(--fs-sm); display: none; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1); }
.main-nav a:not(.btn) { display: block; padding: var(--s-3); color: var(--c-text); text-decoration: none; font-weight: 600; border-radius: 6px; }
.main-nav a:not(.btn):hover { background: var(--c-surface); color: var(--c-blue); }
.main-nav a[aria-current="page"]:not(.btn) { color: var(--c-blue); box-shadow: inset 0 -3px 0 var(--c-red); }
.main-nav { display: flex; align-items: center; gap: var(--s-4); }
.nav-toggle { display: none; }

@media (max-width: 1199px) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: var(--s-2) var(--s-3); border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
  .nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 20px; height: 2px; background: var(--c-text); position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -6px; } .nav-toggle-bars::after { top: 6px; }
  .main-nav { flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: var(--s-4); }
  .main-nav ul { flex-direction: column; }
  .js .main-nav { display: none; }
  .js .main-nav.is-open { display: flex; }
}

/* Hero */
.hero { position: relative; color: #fff; background: var(--c-blue-dark); overflow: hidden; }
.hero-media, .page-hero-media { position: absolute; inset: 0; }
/* Startbild: Überblendung Elektro ↔ IT (4 Bilder, je 6 s) */
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; display: block; opacity: 0; animation: heroFade 24s infinite; }
.hero-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-slide:nth-child(1) { animation-name: heroFadeFirst; }
@keyframes heroFadeFirst { 0% { opacity: 1; } 25% { opacity: 1; } 30% { opacity: 0; } 95% { opacity: 0; } 100% { opacity: 1; } }
.hero-slide:nth-child(2) { animation-delay: 6s; }
.hero-slide:nth-child(3) { animation-delay: 12s; }
.hero-slide:nth-child(4) { animation-delay: 18s; }
@keyframes heroFade { 0% { opacity: 0; } 5% { opacity: 1; } 25% { opacity: 1; } 30% { opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none !important; opacity: 0; }
  .hero-slide:nth-child(1) { opacity: 1; }
}
.hero-media img, .page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { z-index: 0; } .hero::after, .page-hero:has(.page-hero-media)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 40 85 / .92) 0%, rgb(0 40 85 / .75) 55%, rgb(0 40 85 / .35) 100%); }
.hero-content { position: relative; z-index: 1; padding-block: clamp(3rem, 8vw, 7rem); max-width: var(--container); }
.hero-content > * { max-width: 40rem; }
.hero-company { font-size: clamp(1.25rem, 1rem + 1.2vw, 1.9rem); font-weight: 800; letter-spacing: .01em; margin-bottom: var(--s-2); color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: var(--fs-sm); color: #ffd9dd; }
.lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); max-width: 65ch; }
.page-hero { position: relative; background: var(--c-blue-dark); color: #fff; padding-block: clamp(2.5rem, 6vw, 5rem); overflow: hidden; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero-small { padding-block: var(--s-12) var(--s-8); }

/* Sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-alt { background: var(--c-surface); }
.section-intro { color: var(--c-muted); max-width: 65ch; margin-bottom: var(--s-8); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: var(--s-6); text-align: center; }
.fact strong { display: block; font-size: var(--fs-h2); color: var(--c-blue); }
.fact span { color: var(--c-muted); }

/* Cards */
.card-grid { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin-bottom: var(--s-8); }
.card { position: relative; background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card-body { padding: var(--s-6); min-width: 0; }
.card h2, .card h3 { overflow-wrap: break-word; hyphens: manual; }
.card-grid-5 .card h3 { font-size: clamp(1.05rem, .98rem + .3vw, 1.2rem); }
.card-body p:last-child { margin-bottom: 0; }
.card-link { color: var(--c-text); text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card:has(.card-link):hover { border-color: var(--c-blue); }
.card:has(.card-link:focus-visible) { outline: 3px solid var(--c-red); outline-offset: 3px; }
.card-link:focus-visible { outline: none; }
.card-grid-text .card { border-top: 4px solid var(--c-blue); scroll-margin-top: 100px; }

/* Steps */
.steps { list-style: none; padding: 0; counter-reset: s; display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.steps li { counter-increment: s; padding: var(--s-6); border-radius: var(--radius); background: var(--c-surface); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--c-blue); color: #fff; font-weight: 700; margin-bottom: var(--s-3); }

.cta-band { background: var(--c-blue); color: #fff; text-align: center; }
.cta-inner > * { margin-inline: auto; }

/* Inhalt */
.prose { max-width: 70ch; }
.prose section { margin-bottom: var(--s-12); scroll-margin-top: 90px; }
.prose picture { margin-bottom: var(--s-4); }
.prose picture img { border-radius: var(--radius); }
.narrow { margin-inline: auto; }
.prose.narrow h2 { font-size: var(--fs-h3); margin-top: var(--s-8); }
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.75rem; margin-bottom: var(--s-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: .45em; width: .9rem; height: .5rem; border-left: 3px solid var(--c-red); border-bottom: 3px solid var(--c-red); transform: rotate(-45deg); }
.content-grid { display: grid; gap: var(--s-8); padding-block: var(--s-12); }
.content-split { display: grid; gap: var(--s-8); }
@media (min-width: 900px) {
  .content-grid { grid-template-columns: 240px 1fr; }
  .content-split { grid-template-columns: 1fr 340px; align-items: start; }
  .toc { position: sticky; top: 100px; align-self: start; }
}
.toc ul { list-style: none; padding: 0; }
.toc a { display: block; padding: var(--s-2) 0; }
.toc-title { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--c-muted); }
.panel { background: var(--c-surface); border-radius: var(--radius); padding: var(--s-6); }
.panel address { font-style: normal; margin-bottom: var(--s-4); }
.downloads, .link-list { padding-left: 1.2rem; }

/* Formular */
.form { display: grid; gap: var(--s-4); }
.field { display: grid; gap: var(--s-1); }
.field-row { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
label { font-weight: 600; }
.optional { font-weight: 400; color: var(--c-muted); }
input[type="text"], input[type="email"], input[type="tel"], select, textarea { width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3); font: inherit; color: var(--c-text); background: #fff; border: 1px solid #7a8794; border-radius: 6px; }
textarea { resize: vertical; }
[aria-invalid="true"] { border-color: var(--c-error) !important; border-width: 2px !important; }
.field-error { color: var(--c-error); font-weight: 600; margin: 0; }
.field-error::before { content: "⚠ "; }
.field-help, .form-hint { font-size: var(--fs-sm); color: var(--c-muted); margin: 0; }
.field-check { grid-template-columns: auto 1fr; align-items: start; column-gap: var(--s-3); }
.field-check input { width: 24px; height: 24px; margin-top: .2em; }
.field-check label { font-weight: 400; }
.field-check .field-error { grid-column: 1 / -1; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { border-radius: var(--radius); padding: var(--s-4) var(--s-6); margin-bottom: var(--s-6); border-left: 6px solid; }
.alert-success { background: var(--c-success-bg); border-color: var(--c-success); }
.alert-error { background: var(--c-error-bg); border-color: var(--c-error); }
.alert ul { margin-bottom: 0; }

/* Karte & Route */
.map-wrap { aspect-ratio: 16 / 9; max-height: 480px; width: 100%; border-radius: var(--radius); overflow: hidden; background: #dfe6ee; border: 1px solid var(--c-border); margin-bottom: var(--s-6); }
.map-consent { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--s-6); background: repeating-linear-gradient(45deg, #e7edf3 0 14px, #edf2f7 14px 28px); }
.map-consent p { max-width: 60ch; }
.map-consent-title { font-size: var(--fs-h4); }
.map-frame { width: 100%; height: 100%; border: 0; display: block; }
.btn-ghost-dark { border-color: var(--c-blue); color: var(--c-blue); background: #fff; }
.btn-ghost-dark:hover { background: var(--c-blue); color: #fff; }
@media (max-width: 639px) { .map-wrap { aspect-ratio: 3 / 4; } }
.field-bot input { max-width: 10rem; }

/* Fernwartung – ein Knopf oben rechts */
.btn-remote { background: var(--c-blue); color: #fff; gap: var(--s-2); white-space: nowrap; }
.btn-remote:hover { background: var(--c-blue-dark); color: #fff; }
.main-nav .nav-cta { margin-left: var(--s-2); }
.site-header .btn-remote { order: 3; }
.site-header .main-nav { order: 2; margin-left: auto; }
@media (max-width: 1199px) {
  .site-header .btn-remote { order: 2; margin-left: auto; padding-inline: var(--s-3); }
  .site-header .nav-toggle { order: 3; }
  .site-header .main-nav { order: 4; margin-left: 0; }
  .main-nav .nav-cta { margin: var(--s-2) 0 0; }
}
@media (max-width: 420px) { .btn-remote-label { display: none; } .brand img { width: 140px; } }
@media (min-width: 1200px) { .header-inner { flex-wrap: nowrap; } .main-nav a:not(.btn) { padding: var(--s-3) var(--s-2); } .main-nav .btn { padding-inline: var(--s-4); } .site-header .btn-remote { padding-inline: var(--s-4); } .brand img { width: 190px; } }
.steps-vertical { grid-template-columns: 1fr; }

.card-grid-5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.prose section picture { display: block; }
.page-hero-photo { padding-block: clamp(5rem, 14vw, 11rem); }
.page-hero-photo h1, .page-hero-photo .lead { text-shadow: 0 2px 12px rgb(0 20 45 / .85); }
.page-hero-photo .page-hero-media img { object-position: center 45%; }
.page-hero.page-hero-photo::after { background: linear-gradient(90deg, rgb(0 40 85 / .85) 0%, rgb(0 40 85 / .45) 45%, rgb(0 40 85 / 0) 75%); }

/* Geschichte */
.timeline { list-style: none; padding: 0; margin: 0 0 var(--s-8); border-left: 3px solid var(--c-red); }
.timeline li { position: relative; padding: 0 0 var(--s-3) var(--s-6); }
.timeline li::before { content: ""; position: absolute; left: -8px; top: .45em; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--c-red); }
.tl-year { display: block; font-weight: 800; color: var(--c-blue); }
.sponsor-list { color: var(--c-muted); line-height: 1.9; }

/* Leistungen: drei Bereiche */
.pillars { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.pillar { background: #fff; border: 1px solid var(--c-border); border-top: 4px solid var(--c-blue); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.pillar:nth-child(2) { border-top-color: var(--c-red); }
.pillar:nth-child(3) { border-top-color: var(--c-blue-dark); }
.pillar img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.pillar-body { padding: var(--s-6); display: flex; flex-direction: column; flex: 1; }
.pillar-body h3 { font-size: var(--fs-h3); margin-bottom: var(--s-1); }
.pillar-body h3 a { color: var(--c-text); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.pillar-body h3 a:hover { color: var(--c-blue); }
.pillar-list { list-style: none; padding: 0; margin: 0 0 var(--s-4); }
.pillar-list li { border-bottom: 1px solid var(--c-border); }
.pillar-list a { display: block; padding: var(--s-2) 0; min-height: 44px; display: flex; align-items: center; color: var(--c-text); text-decoration: none; }
.pillar-list a:hover { color: var(--c-blue); text-decoration: underline; }
.pillar-note { font-size: var(--fs-sm); color: var(--c-muted); }
.pillar-more { margin-top: auto; font-weight: 700; text-decoration: none; padding-top: var(--s-2); }
.pillar-more:hover { text-decoration: underline; }

/* FAQ */
.faq { border-top: 1px solid var(--c-border); }
.narrow-wide { max-width: 860px; }
.faq-item { border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; margin-bottom: var(--s-3); }
.faq-item summary { cursor: pointer; list-style: none; padding: var(--s-4) var(--s-6); display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--c-blue); flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-q { font-size: var(--fs-h4); margin: 0; }
.faq-a { padding: 0 var(--s-6) var(--s-4); }
.faq-a p { margin: 0; max-width: 70ch; }

/* Partner */
.partners { background: #fff; }
.partner-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 128px), 1fr)); }
.partner-tile.wide { grid-column: span 2; }
.partner-tile.wide img { max-height: 90px; }
.partner-tile { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); min-height: 120px; padding: var(--s-4);
  border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; text-align: center; }
.partner-tile picture { display: flex; align-items: center; justify-content: center; width: 100%; }
.partner-tile img { max-height: 64px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.partner-caption { font-size: var(--fs-sm); font-weight: 600; color: #7b4b9a; }
.partner-text { font-weight: 700; font-size: 1.15rem; color: var(--c-blue-dark); letter-spacing: .01em; }

/* Stellen */
.jobs { margin-bottom: var(--s-8); }
.job h4 { font-size: 1rem; margin: var(--s-4) 0 var(--s-2); }
.job-apply { margin-top: var(--s-4); font-weight: 600; }
.apply-mail { font-size: 1.1rem; font-weight: 700; overflow-wrap: anywhere; }

.address-block { font-style: normal; margin-bottom: var(--s-4); line-height: 1.6; }

/* Social */
.social { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0; margin: var(--s-4) 0 0; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgb(255 255 255 / .1); color: #fff; }
.social a:hover { background: var(--c-red); color: #fff; }

/* Footer */
.site-footer { background: #10233a; color: #e6ecf2; padding-top: var(--s-12); }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: var(--s-8); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.footer-title { font-size: var(--fs-h4); color: #fff; }
.site-footer address { font-style: normal; }
.footer-links { list-style: none; padding: 0; }
.footer-links a { display: inline-block; padding: var(--s-1) 0; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .15); margin-top: var(--s-8); padding-block: var(--s-4); font-size: var(--fs-sm); }
.footer-bottom p { margin: 0; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: var(--s-1) var(--s-4); }
.hours dd { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print { .site-header, .site-footer, .btn, .hero-media, .page-hero-media { display: none !important; } .hero, .page-hero { background: none; color: #000; } }
