/* =========================================================================
   KD Elektrotechnik - Stylesheet
   Systemschriften (kein externer Font-Load → DSGVO-konform, schnell).
   ========================================================================= */

:root {
    --navy: #0e2438;
    --navy-2: #143253;
    --accent: #00aeef; /* Markenfarbe KD Elektrotechnik */
    --accent-dark: #0090c7;
    --ink: #1c2733;
    --muted: #5c6b7a;
    --line: #e2e8f0;
    --bg: #ffffff;
    --bg-soft: #f5f7fa;
    --radius: 12px;
    --maxw: 1120px;
    --shadow: 0 8px 30px rgba(14, 36, 56, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--accent-dark);
}

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--navy);
    color: #fff;
    padding: 10px 16px;
    z-index: 100;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
}

/* --- Header / Navigation --------------------------------------------- */
.site-header {
    background: #fff;
    color: var(--ink);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 10px rgba(14, 36, 56, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo {
    display: block;
    height: 48px;
    width: auto;
    /* Logo hebt sich auf dunklem Header ab; anpassen falls Logo bereits hell ist */
}

.site-nav ul {
    display: flex;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    display: block;
    color: var(--ink);
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.site-nav a:hover {
    background: var(--bg-soft);
    color: var(--accent-dark);
}

.site-nav a[aria-current="page"] {
    color: var(--accent-dark);
    font-weight: 600;
}

/* Mobile-Toggle */
.nav-toggle-label {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle-label span {
    width: 26px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
}

/* --- Buttons ---------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    transition: transform .05s, background .15s, color .15s;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    color: var(--navy);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
}

.btn-ghost:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .08);
}

/* --- Hero ------------------------------------------------------------- */
.hero {
    position: relative;
    color: #fff;
    padding: 96px 0 104px;
    overflow: hidden;
    background: var(--navy);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(100deg, rgba(14, 36, 56, .92) 0%, rgba(14, 36, 56, .72) 45%, rgba(14, 36, 56, .45) 100%),
    url('/assets/img/unternehmensphilosophie.jpg');
    background-size: cover;
    background-position: center 40%;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .8rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.hero h1 {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    line-height: 1.15;
    margin: 0 0 18px;
}

.hero-lead {
    color: #c7d3df;
    font-size: 1.15rem;
    max-width: 620px;
    margin: 0 0 28px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero .btn-ghost {
    color: #fff;
}

/* --- Sections --------------------------------------------------------- */
.section {
    padding: 72px 0;
}

.section-alt {
    background: var(--navy);
    color: #fff;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0 0 12px;
    text-align: center;
}

.section-intro {
    text-align: center;
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto 44px;
    font-size: 1.08rem;
}

/* --- Cards ------------------------------------------------------------ */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(14, 36, 56, .12);
}

.card-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-soft);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.card:hover .card-media img {
    transform: scale(1.05);
}

.card-body {
    padding: 22px 24px 26px;
}

.card h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.card p {
    margin: 0;
    color: var(--muted);
}

/* --- CTA-Band --------------------------------------------------------- */
.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    flex-wrap: wrap;
}

.cta-band h2 {
    margin: 0 0 6px;
}

.cta-band p {
    margin: 0;
    color: #c7d3df;
}

.cta-band-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* --- Kontaktseite ----------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    align-items: start;
}

.contact-info {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}

.contact-info h2 {
    margin-top: 0;
    font-size: 1.25rem;
}

.contact-info dl {
    margin: 0;
}

.contact-info dt {
    font-weight: 700;
    margin-top: 16px;
    color: var(--navy);
}

.contact-info dt:first-child {
    margin-top: 0;
}

.contact-info dd {
    margin: 4px 0 0;
}

/* --- Formular --------------------------------------------------------- */
.contact-form {
    max-width: 560px;
}

.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.field input,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font: inherit;
    color: var(--ink);
    background: #fff;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 174, 239, .25);
}

.field [aria-invalid="true"] {
    border-color: #c0392b;
}

.field textarea {
    resize: vertical;
}

.req {
    color: #c0392b;
}

.field-error {
    display: block;
    color: #c0392b;
    font-size: .9rem;
    margin-top: 6px;
}

.field-check .check-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 400;
    cursor: pointer;
}

.field-check input {
    width: auto;
    margin-top: 4px;
    flex: none;
}

.form-note {
    color: var(--muted);
    font-size: .9rem;
}

/* Honeypot verstecken */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Alerts ----------------------------------------------------------- */
.alert {
    padding: 16px 18px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid transparent;
}

.alert p {
    margin: 4px 0;
}

.alert-success {
    background: #e7f6ec;
    border-color: #b6e0c4;
    color: #1e6b3a;
}

.alert-error {
    background: #fdecea;
    border-color: #f5c2bd;
    color: #9b2c22;
}

/* --- Prose (Impressum / Datenschutz) ---------------------------------- */
.prose {
    max-width: 800px;
}

.prose h1 {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    margin-top: 0;
}

.prose h2 {
    margin-top: 34px;
    font-size: 1.3rem;
    color: var(--navy);
}

.prose ul {
    padding-left: 22px;
}

.prose li {
    margin-bottom: 6px;
}

.prose-meta {
    color: var(--muted);
    font-size: .9rem;
    margin-top: 30px;
}

/* --- Footer ----------------------------------------------------------- */
.site-footer {
    background: var(--navy);
    color: #c7d3df;
    padding: 44px 0 24px;
    margin-top: 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.site-footer a {
    color: #dbe4ee;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.footer-col strong {
    color: #fff;
    display: block;
    margin-bottom: 10px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    transition: background .15s, border-color .15s;
}

.social-link:hover {
    background: rgba(0, 174, 239, .15);
    border-color: var(--accent);
    text-decoration: none;
}

.social-icon {
    color: var(--accent);
    flex: none;
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .88rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    justify-content: space-between;
    align-items: center;
}

.footer-credit {
    color: #9fb0c1;
}

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 820px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .nav-toggle-label {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        box-shadow: 0 8px 20px rgba(14, 36, 56, .08);
        padding: 10px 20px 18px;
    }

    .site-nav ul {
        flex-direction: column;
        gap: 2px;
    }

    .site-nav a {
        padding: 12px 10px;
    }

    .nav-toggle:checked ~ .site-nav {
        display: block;
    }

    .header-inner {
        position: relative;
    }

    .hero {
        padding: 60px 0 66px;
    }

    .section {
        padding: 54px 0;
    }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}
