:root {
    --red: #d40000;
    --red-dark: #a80000;
    --black: #14171b;
    --ink: #22272e;
    --muted: #5f6873;
    --line: #e2e6ea;
    --bg-soft: #f5f6f8;
    --white: #ffffff;
    --max: 1180px;
    --radius: 6px;
    --shadow: 0 2px 8px rgba(20, 23, 27, .07);
    --shadow-lg: 0 14px 40px rgba(20, 23, 27, .14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/* height:auto ist zwingend: sonst gewinnt das height-Attribut des <img> als
   Presentational Hint und das Bild wird bei width:100% verzerrt. */
img { max-width: 100%; height: auto; display: block; }
picture { display: block; }

h1, h2, h3 { line-height: 1.2; color: var(--black); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -.015em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--red);
    color: var(--white);
    padding: 14px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--red);
    cursor: pointer;
    transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover {
    background: var(--red-dark);
    border-color: var(--red-dark);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 0, 0, .28);
}
.btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, .5);
    color: var(--white);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: var(--white); box-shadow: none; }
.btn-light { background: var(--white); border-color: var(--white); color: var(--red); }
.btn-light:hover { background: #f2f2f2; border-color: #f2f2f2; color: var(--red-dark); box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }

/* ---------- Header ---------- */
.topbar {
    background: #0d0f12;
    color: #9aa3ad;
    font-size: .85rem;
}
.topbar-inner {
    display: flex;
    justify-content: flex-end;
    gap: 26px;
    padding: 9px 24px;
}
.topbar a { color: #c8cfd6; }
.topbar a:hover { color: var(--white); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--black);
    transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(0, 0, 0, .28); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 24px;
}
.logo { display: flex; align-items: center; gap: 14px; color: var(--white); }
.logo:hover { text-decoration: none; }
.logo img { height: 54px; width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-weight: 700; font-size: 1.02rem; letter-spacing: .01em; }
.logo-claim { font-size: .76rem; color: #99a2ac; text-transform: uppercase; letter-spacing: .14em; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
}
.main-nav a {
    display: block;
    color: #e6e9ec;
    padding: 10px 14px;
    font-weight: 500;
    font-size: .98rem;
    border-radius: var(--radius);
    border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--white); background: rgba(255, 255, 255, .07); text-decoration: none; }
.main-nav a.active { color: var(--white); border-bottom-color: var(--red); }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 1.4rem;
    line-height: 1;
    padding: 8px 12px;
    cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background-color: #14171b;
    background-image: url("/assets/img/hero-tieflader-1920.jpg");
    background-image: image-set(url("/assets/img/hero-tieflader-1920.webp") type("image/webp"),
                                url("/assets/img/hero-tieflader-1920.jpg") type("image/jpeg"));
    background-position: center 30%;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 104px 0 88px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(11, 13, 16, .93) 0%, rgba(11, 13, 16, .8) 46%, rgba(11, 13, 16, .34) 100%),
        linear-gradient(0deg, rgba(11, 13, 16, .6) 0%, transparent 45%);
}

@media (min-width: 1921px) {
    .hero {
        background-image: url("/assets/img/hero-tieflader-2560.jpg");
        background-image: image-set(url("/assets/img/hero-tieflader-2560.webp") type("image/webp"),
                                    url("/assets/img/hero-tieflader-2560.jpg") type("image/jpeg"));
    }
}
@media (max-width: 800px) {
    .hero {
        background-image: url("/assets/img/hero-tieflader-1280.jpg");
        background-image: image-set(url("/assets/img/hero-tieflader-1280.webp") type("image/webp"),
                                    url("/assets/img/hero-tieflader-1280.jpg") type("image/jpeg"));
    }
}
.hero .container { position: relative; }
.hero-content { max-width: 680px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #ff5c5c;
    margin-bottom: 18px;
}
.eyebrow::before {
    content: "";
    width: 36px;
    height: 3px;
    background: var(--red);
}
.hero h1 { color: var(--white); margin-bottom: .4em; }
.hero-lead { font-size: 1.15rem; color: #ccd3da; margin-bottom: 32px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-facts {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 40px;
    margin-top: 52px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .16);
}
.hero-facts span {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d5dbe1;
    font-weight: 500;
    font-size: .97rem;
}
.hero-facts span::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 9px solid var(--red);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 680px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { color: var(--red); }
.section-head p { color: var(--muted); font-size: 1.06rem; margin-bottom: 0; }

/* ---------- Leistungskarten ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #d8dde2; }
.card-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(212, 0, 0, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.card-icon img { width: 32px; height: 32px; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin-bottom: 0; font-size: .97rem; }

/* ---------- Split / Bild + Text ---------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.split-media { position: relative; }
.split-media img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    height: auto;
}
.split-media::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 84px;
    height: 5px;
    background: var(--red);
    border-radius: 0 0 0 var(--radius);
}

.checklist { list-style: none; margin: 0 0 28px; padding: 0; }
.checklist li {
    position: relative;
    padding-left: 34px;
    margin-bottom: 13px;
    color: var(--ink);
}
.checklist li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 18px;
    height: 10px;
    border-left: 3px solid var(--red);
    border-bottom: 3px solid var(--red);
    transform: rotate(-45deg);
}

/* ---------- Vertrauensband ---------- */
.trust-band {
    background: var(--black);
    background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .022) 0 12px, transparent 12px 24px);
    color: var(--white);
    padding: 56px 0;
}
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 34px;
}
.trust-item { border-left: 3px solid var(--red); padding-left: 20px; }
.trust-item strong { display: block; font-size: 1.12rem; margin-bottom: 4px; color: var(--white); }
.trust-item span { color: #a7b0b9; font-size: .95rem; }

/* ---------- Projekte ---------- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 26px;
}
.project-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.project-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.project-card .project-body { padding: 20px 22px 24px; }
.project-card h3 { font-size: 1.08rem; margin-bottom: .3em; }
.project-card p { color: var(--muted); font-size: .93rem; margin-bottom: 0; }

/* ---------- CTA ---------- */
.cta-band {
    background: var(--red);
    color: var(--white);
    padding: 62px 0;
}
.cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}
.cta-band h2 { color: var(--white); margin-bottom: .25em; }
.cta-band p { color: rgba(255, 255, 255, .9); margin-bottom: 0; font-size: 1.05rem; }
.cta-phone {
    display: block;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 6px;
}
.cta-phone:hover { text-decoration: underline; }

/* ---------- Unterseiten ---------- */
.page-header {
    background-color: var(--black);
    background-image: url("/assets/img/hero-tieflader-1920.jpg");
    background-image: image-set(url("/assets/img/hero-tieflader-1920.webp") type("image/webp"),
                                url("/assets/img/hero-tieflader-1920.jpg") type("image/jpeg"));
    background-position: center 42%;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 66px 0 58px;
    position: relative;
}
.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(11, 13, 16, .94), rgba(11, 13, 16, .74));
}
.page-header .container { position: relative; }
.page-header h1 { color: var(--white); margin-bottom: 0; }
.page-header p { color: #c5ccd3; margin: 10px 0 0; max-width: 620px; }

.content { padding: 72px 0; }
.content h2 { margin-top: 2em; }
.content h2:first-child { margin-top: 0; }
.content p, .content li { color: #3a424b; }
.prose { max-width: 760px; }

.leistung-detail {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 24px;
    padding: 30px 0;
    border-bottom: 1px solid var(--line);
}
.leistung-detail:last-of-type { border-bottom: 0; }
.leistung-detail h2 { margin: 0 0 .3em; font-size: 1.4rem; }
.leistung-detail p { margin-bottom: 0; color: var(--muted); }

/* ---------- Kontakt ---------- */
.kontakt-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 52px;
    align-items: start;
}
.kontakt-info {
    background: var(--bg-soft);
    border-radius: var(--radius);
    padding: 32px 30px;
    border-top: 3px solid var(--red);
}
.kontakt-info h2 { font-size: 1.25rem; }
.kontakt-info p { color: #3a424b; }

.kontakt-form { background: var(--white); }
.kontakt-form form { display: flex; flex-direction: column; }
.kontakt-form label { font-weight: 600; margin: 16px 0 6px; font-size: .94rem; }
.kontakt-form input,
.kontakt-form textarea {
    padding: 12px 14px;
    border: 1px solid #ccd2d8;
    border-radius: var(--radius);
    font: inherit;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.kontakt-form input:focus,
.kontakt-form textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(212, 0, 0, .12);
}
.kontakt-form button { margin-top: 26px; align-self: flex-start; }
.honeypot { position: absolute; left: -9999px; }

.captcha-input { max-width: 140px; }

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 22px;
    font-weight: 400;
    font-size: .94rem;
    line-height: 1.5;
    cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--red);
    cursor: pointer;
}

.form-hint {
    margin-top: 16px;
    margin-bottom: 0;
    font-size: .85rem;
    color: var(--muted);
}

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; }
.alert-success { background: #e8f6ea; border: 1px solid #9ed3a7; color: #1d5127; }
.alert-error { background: #fdecec; border: 1px solid #e8a8a8; color: #7c1d1d; list-style: none; padding-left: 20px; }
.alert-error li { margin: 4px 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: #9ba4ae; margin-top: 0; }
.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 58px 24px 44px;
}
.site-footer h4 {
    color: var(--white);
    font-size: .82rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin: 0 0 16px;
}
.site-footer a { color: #b7c0c9; }
.site-footer a:hover { color: var(--white); }
.footer-logo { height: 62px; width: auto; margin-bottom: 16px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 9px; }
.footer-bottom {
    border-top: 1px solid #262b31;
    padding: 18px 24px;
    font-size: .86rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    justify-content: space-between;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; gap: 40px; }
    .kontakt-grid { grid-template-columns: 1fr; gap: 34px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
    .page-header {
        background-image: url("/assets/img/hero-tieflader-1280.jpg");
        background-image: image-set(url("/assets/img/hero-tieflader-1280.webp") type("image/webp"),
                                    url("/assets/img/hero-tieflader-1280.jpg") type("image/jpeg"));
    }
}

@media (max-width: 760px) {
    .topbar-inner { justify-content: center; gap: 18px; flex-wrap: wrap; }
    .nav-toggle { display: block; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1b1f24;
        padding: 12px;
        gap: 2px;
        border-top: 1px solid #2a2f36;
    }
    .main-nav ul.open { display: flex; }
    .site-header { position: relative; }
    .header-inner { position: relative; }
    .hero { padding: 68px 0 64px; }
    .section { padding: 58px 0; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .footer-inner { grid-template-columns: 1fr; gap: 30px; }
    .leistung-detail { grid-template-columns: 1fr; gap: 14px; }
}
