/* ==========================================================================
01. Schriftarten
========================================================================== */

@font-face {
    font-family: Poppins;
    src: url('assets/fonts/poppins-400.ttf');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: Poppins;
    src: url('assets/fonts/poppins-500.ttf');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: Poppins;
    src: url('assets/fonts/poppins-600.ttf');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: Poppins;
    src: url('assets/fonts/poppins-700.ttf');
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: Poppins;
    src: url('assets/fonts/poppins-800.ttf');
    font-weight: 800;
    font-display: swap;
}

/* Fluid desktop layout: section widths follow the viewport with proportional gutters. */

/* ==========================================================================
02. Farben, Abstände und Grundlagen
========================================================================== */

:root {
    --navy: #1e3354;
    --green: #86b547;
    --paper: #fafafa;
    --gutter: clamp(22px,4.86vw,140px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    font-family: Poppins,Arial,sans-serif;
    color: #111;
    background: var(--paper);
    line-height: 1.45;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--navy);
    outline-offset: 5px;
}

.footer a:focus-visible,
.footer button:focus-visible {
    outline-color: white;
}

.skip-link {
    position: absolute;
    top: 8px;
    left: 16px;
    z-index: 200;
    padding: 12px;
    background: white;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: none;
}

/* ==========================================================================
03. Gemeinsame Seitencontainer
========================================================================== */

.header-container,
.hero-container,
.benefits-container,
.services-container,
.projects-container,
.cta-container,
.footer-container {
    width: calc(100% - 2 * var(--gutter));
    max-width: none;
    margin-inline: auto;
}

/* ==========================================================================
04. Header, Logo, Navigation und Buttons
========================================================================== */

.header {
    border-top: 50px solid var(--navy);
    position: relative;
    z-index: 10;
}

.header-container {
    height: 100px;
    display: flex;
    align-items: center;
    gap: 32px;
    max-width: none;
    width: calc(100% - 80px);
}

.logo {
    width: 180px;
    flex-shrink: 0;
}

.logo img {
    width: 100%;
    max-height: 92px;
    object-fit: contain;
}

.navigation {
    display: flex;
    align-items: center;
    gap: 58px;
    margin-left: auto;
}

.nav-link {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.nav-link.active,
.nav-link:hover {
    color: var(--green);
}

.header-button,
.projects-button,
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 15px;
    background: var(--green);
    color: white;
    border-radius: 13px;
    font-size: 16px;
    font-weight: 500;
    transition: background .2s,transform .2s;
}

.header-button {
    margin-left: auto;
    white-space: nowrap;
}

.header-button:hover,
.projects-button:hover {
    background: #638e2f;
}

.menu-toggle {
    display: none;
}

/* ==========================================================================
05. Startseite: Titelbild und Einleitung
========================================================================== */

.hero {
    height: 610px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.hero-image,
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-image {
    /* Keep the zoomed image inside the area covered by the gradient. */
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-overlay {
    background: linear-gradient(90deg,#fafafa 3%,#fafafaf7 17%,#fafafad4 31%,#fafafa59 49%,transparent 69%);
}

.hero-container {
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    width: 670px;
    margin-top: 18px;
}

.hero-subtitle {
    color: var(--green);
    font-size: 26px;
    font-weight: 500;
    line-height: 1.4;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.5;
    color: var(--navy);
    letter-spacing: -.6px;
}

.hero h1 span {
    color: var(--green);
}

.hero-text {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    margin-top: 28px;
    max-width: 660px;
}

/* ==========================================================================
06. Startseite: Vorteile
========================================================================== */

.benefits {
    padding: 50px 0 36px;
    min-height: 262px;
}

.benefits-container {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 35px;
}

.benefit {
    text-align: center;
}

.benefit-icon img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin: 0 auto 16px;
}

.benefit h3 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.benefit p {
    font-size: 17px;
    line-height: 1.4;
}

/* ==========================================================================
07. Startseite: Über uns
========================================================================== */

.about-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    margin-inline: auto;
    display: flex;
    align-items: flex-start;
}

.about-content {
    position: relative;
    z-index: 1;
    width: 57%;
    padding: 18px 0 20px 8.6%;
}

.section-label {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--green);
}

h2 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.6px;
}

.about h2 {
    margin: 8px 0 12px;
}

.about-text {
    max-width: 535px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.4;
}

.about-list {
    list-style: none;
    margin-top: 56px;
    display: grid;
    gap: 6px;
    font-size: 17px;
    font-weight: 500;
}

.about-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.check {
    color: var(--green);
    font-size: 25px;
    line-height: 1;
}

.about-image {
    position: absolute;
    right: 0;
    top: 0;
    width: 58.333%;
    height: 400px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

/* ==========================================================================
08. Startseite: Leistungen
========================================================================== */

.services {
    padding: 30px 0 40px;
}

.section-heading {
    text-align: center;
    margin-bottom: 40px;
}

.services-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.service-card {
    flex: 0 0 calc((100% - 90px)/4);
    min-width: 0;
    background: #fff;
    border-radius: 24px 0 24px 0;
    overflow: hidden;
    box-shadow: 3px 4px 3px #0004;
}

.service-card>img {
    width: 100%;
    aspect-ratio: 6/5;
    object-fit: cover;
}

.service-content {
    padding: 8px 7px 10px;
}

.service-content h3 {
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -.3px;
}

.service-content p {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.42;
}

/* ==========================================================================
09. Startseite: Projektvorschau
========================================================================== */

.projects {
    padding: 0 0 50px;
}

.projects-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.projects .section-heading {
    margin-bottom: 72px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 50px;
    width: 100%;
}

.project-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/1;
    border-radius: 22px;
    display: block;
    color: #fff;
    background: var(--navy);
    width: 100%;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.project-card:first-child img {
    object-position: center 43%;
}

.project-card:last-child img {
    object-position: center 57%;
}

.project-card:hover img {
    transform: scale(1.035);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg,#0005,transparent 45%);
}

.project-card h3 {
    position: absolute;
    bottom: 10px;
    left: 12px;
    right: 12px;
    font-size: 16px;
    font-weight: 400;
}

.projects-button {
    margin-top: 34px;
}

/* ==========================================================================
10. Kontaktbanner
========================================================================== */

.cta {
    background: var(--green);
    color: white;
    padding: 27px 0;
}

.cta-container {
    display: flex;
    align-items: center;
    gap: 22px;
}

.cta-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.cta-content h2 {
    font-size: 36px;
    line-height: 1.3;
}

.cta-content p {
    font-size: 20px;
}

.cta-button {
    margin-left: auto;
    margin-right: 190px;
    background: var(--paper);
    color: #111;
    min-height: 50px;
    padding: 12px 16px;
    white-space: nowrap;
}

.cta-button:hover {
    background: white;
    transform: translateY(-2px);
}

/* ==========================================================================
11. Footer
========================================================================== */

.footer {
    background: var(--navy);
    color: #dce2ed;
    padding: 25px 0 22px;
}

.footer-container {
    display: grid;
    grid-template-columns: 190px 1.55fr 1fr .65fr;
    gap: 55px;
}

.footer-brand {
    align-self: center;
}

.footer-brand img {
    width: 160px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 15px;
    line-height: 1.5;
    min-width: 0;
}

.footer-column h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 2px;
}

.footer-column a,
.footer-column p {
    display: flex;
    gap: 4px;
    align-items: center;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.footer-column img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-column a:hover {
    color: white;
    text-decoration: underline;
}

.pending-page {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    border: 0;
    background: none;
    text-align: left;
}

.pending-page:hover {
    text-decoration: underline;
}

/* ==========================================================================
12. Dialoge und vergrößerte Projektbilder
========================================================================== */

dialog {
    border: 0;
    border-radius: 16px;
    padding: 32px;
    max-width: calc(100% - 40px);
    width: 460px;
    margin: auto;
    background: var(--paper);
    color: var(--navy);
}

dialog::backdrop {
    background: #14233bc4;
}

dialog h2 {
    font-size: 25px;
    margin-bottom: 14px;
}

dialog p {
    margin-bottom: 24px;
}

dialog button {
    border: 0;
    padding: 10px 20px;
    border-radius: 8px;
    background: var(--green);
    color: #fff;
}

.photo-dialog {
    width: 1000px;
    padding: 16px;
}

.photo-dialog img {
    max-height: 75vh;
    margin: auto;
    object-fit: contain;
}

.photo-dialog form {
    margin-top: 12px;
    text-align: right;
}

/* ==========================================================================
13. Responsive Anpassungen: Desktop, Tablet und Smartphone
========================================================================== */

@media (min-width:1441px) {
    .about-container {
        min-height: 27.7778vw;
    }

    .about-image {
        height: auto;
        aspect-ratio: 21/10;
    }

}

@media (min-width:1600px) {
    .hero {
        height: 680px;
    }

}

@media (max-width:1200px) {
    .navigation {
        gap: 25px;
    }

    .header-container {
        gap: 22px;
    }

    .logo {
        width: 155px;
    }

    .hero-content {
        width: 620px;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-subtitle {
        font-size: 23px;
    }

    .hero-text {
        max-width: 590px;
        font-size: 19px;
    }

    .about-content {
        padding-left: var(--gutter);
        width: 59%;
    }

    .about h2 {
        font-size: 30px;
    }

    .about-text {
        max-width: 450px;
    }

    .about-list {
        font-size: 15px;
    }

    .service-content h3 {
        font-size: 16px;
    }

    .service-content p {
        font-size: 14px;
    }

    .benefit h3 {
        font-size: 16px;
    }

    .benefit p {
        font-size: 15px;
    }

    .cta-button {
        margin-right: 0;
    }

    .cta-content h2 {
        font-size: 30px;
    }

    .footer-container {
        gap: 25px;
        grid-template-columns: 150px 1.7fr .8fr .8fr;
    }

    .footer-column {
        font-size: 13px;
    }

}

@media (max-width:960px) {
    .header {
        border-top-width: 24px;
    }

    .header-container {
        height: 90px;
        width: calc(100% - 48px);
    }

    .header-button {
        margin-left: auto;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        border: 1px solid #1e335430;
        border-radius: 9px;
        background: transparent;
        color: var(--navy);
        font-size: 25px;
    }

    .navigation {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--paper);
        padding: 20px 24px;
        box-shadow: 0 10px 15px #0002;
        flex-wrap: wrap;
        gap: 12px 24px;
        margin: 0;
    }

    .js .navigation {
        display: none;
    }

    .js .navigation.is-open {
        display: flex;
    }

    .nav-link {
        padding: 10px;
    }

    .hero {
        height: 600px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-text {
        max-width: 560px;
    }

    .hero-overlay {
        background: linear-gradient(90deg,#fafafa 0%,#fafafae6 35%,#fafafa44 80%);
    }

    .about-container {
        min-height: 380px;
    }

    .about-content {
        width: 64%;
    }

    .about h2 {
        max-width: 420px;
    }

    .about-text {
        max-width: 400px;
    }

    .about-image {
        width: 55%;
        height: 380px;
    }

    .about-image img {
        object-fit: cover;
        object-position: right;
    }

    .about-list {
        max-width: 400px;
        margin-top: 32px;
    }

    .services-grid {
        gap: 28px;
    }

    .service-card {
        flex-basis: calc((100% - 28px)/2);
    }

    .service-content {
        padding: 12px 14px 16px;
    }

    .service-content h3 {
        font-size: 18px;
    }

    .service-content p {
        font-size: 16px;
    }

    .projects-grid {
        gap: 22px;
    }

    .project-card {
        aspect-ratio: 1.4;
    }

    .projects .section-heading {
        margin-bottom: 35px;
    }

    .cta-icon {
        width: 60px;
        height: 60px;
    }

    .cta-container {
        flex-wrap: wrap;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    .cta-content p {
        font-size: 16px;
    }

    .footer-container {
        grid-template-columns: 150px 1fr;
        gap: 28px 50px;
    }

    .footer-column {
        font-size: 15px;
    }

}

@media (max-width:640px) {
    :root {
        --gutter: 22px;
    }

    .header-container {
        width: calc(100% - 32px);
        gap: 10px;
        height: 80px;
    }

    .logo {
        width: 120px;
    }

    .header-button {
        font-size: 11px;
        padding: 8px;
        min-height: 42px;
        border-radius: 9px;
    }

    .menu-toggle {
        width: 40px;
        height: 42px;
        flex-shrink: 0;
    }

    .navigation {
        align-items: stretch;
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        width: 100%;
        font-size: 17px;
    }

    .hero {
        height: auto;
        min-height: 720px;
    }

    .hero-container {
        align-items: flex-start;
        padding-top: 44px;
        padding-bottom: 360px;
    }

    .hero-content {
        width: 100%;
        margin: 0;
    }

    .hero-subtitle {
        font-size: 18px;
        max-width: 330px;
        margin-bottom: 10px;
    }

    .hero h1 {
        font-size: clamp(27px,7.7vw,42px);
        line-height: 1.4;
        letter-spacing: -.6px;
    }

    .hero h1 span {
        display: block;
        margin-top: 6px;
    }

    .hero-text {
        font-size: 16px;
        line-height: 1.55;
        margin-top: 24px;
    }

    .hero-image {
        top: auto;
        /* Extend 160px behind the copy while keeping the visible area below it. */
        height: 520px;
    }

    .hero .hero-image img {
        /* Focus on the excavator in the upper-right part of the original photo. */
        object-position: 75% top;
        transform-origin: 80% top;
        scale: 1.6;
    }

    .hero-overlay {
        top: auto;
        height: 520px;
        /* Same soft fade as the contact page, using the existing white palette. */
        background: linear-gradient(
            180deg,
            var(--paper) 0%,
            #fafafaed 16%,
            #fafafa99 35%,
            #fafafa44 55%,
            #fafafa14 78%,
            transparent 100%
        );
    }

    .benefits {
        padding: 40px 0;
    }

    .benefits-container {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 32px 16px;
    }

    .benefit-icon img {
        width: 58px;
        height: 58px;
        margin-bottom: 12px;
    }

    .benefit h3 {
        font-size: 14px;
    }

    .benefit p {
        font-size: 13px;
        margin-top: 4px;
    }

    .benefit br {
        display: none;
    }

    .about-container {
        flex-direction: column;
    }

    .about-content {
        width: 100%;
        padding: 16px var(--gutter) 28px;
    }

    .section-label {
        font-size: 21px;
    }

    h2,
    .about h2 {
        font-size: 28px;
        letter-spacing: -.4px;
    }

    .about-text {
        font-size: 16px;
        max-width: none;
    }

    .about-list {
        font-size: 15px;
        margin-top: 28px;
        gap: 12px;
        max-width: none;
    }

    .about-image {
        position: relative;
        width: 100%;
        height: auto;
    }

    .about-image img {
        height: auto;
        object-fit: contain;
    }

    .services {
        padding: 36px 0 42px;
    }

    .section-heading {
        margin-bottom: 28px;
    }

    .services-grid {
        gap: 20px 12px;
    }

    .service-card {
        flex-basis: calc((100% - 12px) / 2);
        max-width: none;
        border-radius: 16px 0 16px 0;
    }

    .service-content {
        padding: 10px 8px 14px;
    }

    .service-content h3 {
        font-size: 14px;
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    .service-content p {
        font-size: 13px;
        margin-top: 4px;
        overflow-wrap: anywhere;
        hyphens: auto;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 22px;
        max-width: 440px;
    }

    .project-card {
        aspect-ratio: 2/1;
    }

    .projects {
        padding-bottom: 40px;
    }

    .projects-button {
        margin-top: 26px;
    }

    .cta {
        padding: 28px 0;
    }

    .cta-container {
        gap: 14px;
    }

    .cta-icon {
        width: 48px;
        height: 48px;
    }

    .cta-content {
        flex: 1;
    }

    .cta-content h2 {
        font-size: 25px;
    }

    .cta-content p {
        font-size: 15px;
        margin-top: 6px;
    }

    .cta-button {
        margin: 8px 0 0;
        width: 100%;
    }

    .footer {
        padding: 32px 0;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 28px 20px;
    }

    .footer-brand,
    .footer-column:nth-child(2) {
        grid-column: 1/-1;
    }

    .footer-brand img {
        width: 150px;
    }

    .footer-column {
        font-size: 14px;
    }

    .footer-column a,
    .pending-page {
        min-height: 30px;
    }

    .footer-column h3 {
        font-size: 16px;
    }

    .photo-dialog {
        padding: 10px;
    }

}

/* ==========================================================================
14. Abschließende Logo-Anpassungen
========================================================================== */

/* Tablet: keep the original image proportions and separate it from the text. */
@media (min-width: 641px) and (max-width: 1200px) {
    .about-container {
        flex-direction: column;
        min-height: 0;
    }

    .about-content {
        width: 100%;
        padding: 24px var(--gutter) 32px;
    }

    .about h2,
    .about-list {
        max-width: none;
    }

    .about-text {
        max-width: 760px;
    }

    .about-image {
        position: relative;
        width: min(100%, 840px);
        height: auto;
        align-self: flex-end;
    }

    .about-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}

/* The supplied logo files include transparent margins; compensate without altering originals. */

.logo {
    height: 92px;
    width: 160px;
    overflow: hidden;
    position: relative;
    display: block;
}

/* Original 1536 x 1024 asset; its visible artwork occupies (336,230)-(1202,720). */

.logo img {
    position: absolute;
    left: 0;
    top: 50%;
    width: 177.367206%;
    height: auto;
    max-width: none;
    max-height: none;
    transform: translate(-21.875%,-46.386719%);
}

.footer-brand {
    height: 95px;
    width: 165px;
    overflow: hidden;
}

.footer-brand img {
    width: 278px;
    max-width: none;
    transform: translate(-58px,-30px);
}

@media (max-width:960px) {
    .logo {
        height: 80px;
        width: 140px;
    }

}

@media (max-width:640px) {
    .logo {
        height: 74px;
        width: 110px;
    }

}

/* ==========================================================================
15. Desktop-Ausrichtung und Bildausschnitt
========================================================================== */

/* Align the visible logo with the hero copy and nudge desktop navigation right. */

@media (min-width:961px) {
    .header-container {
        width: calc(100% - 2 * var(--gutter));
    }

    .navigation {
        position: relative;
        left: 20px;
    }

    .hero-image img {
        object-position: center 12%;
    }

}

@media (min-width:1600px) {
    .hero {
        height: clamp(680px,35.4167vw,1000px);
    }

}

/* ==========================================================================
16. Karten-Hover und Footer-Icons
========================================================================== */

.service-card {
    transition: transform .22s ease,box-shadow .22s ease;
}

@media (hover:hover) and (pointer:fine) {
    .service-card:hover {
        transform: translateY(-7px);
    }

}

.footer-column img[src="assets/icon-instagram.svg"] {
    padding: 2px;
}

/* ==========================================================================
17. Projektseite
========================================================================== */

/* Project page: shared navigation, logo, footer and dialog styles above. */

.references-hero {
    position: relative;
    isolation: isolate;
    min-height: 620px;
    height: clamp(620px,43.0556vw,860px);
    overflow: hidden;
    background: var(--navy);
    color: white;
}

.references-background,
.references-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.references-background {
    object-fit: cover;
    object-position: center 75%;
}

.references-shade {
    background: linear-gradient(90deg,var(--navy) 13%,#1e3354f0 23%,#1e3354a6 39%,#1e335433 61%,transparent 78%);
}

.references-hero-content {
    width: calc(100% - 2 * var(--gutter));
    margin-inline: auto;
    padding-top: 86px;
}

.references-hero .section-label {
    font-weight: 500;
}

.references-hero h1 {
    font-size: 48px;
    line-height: 1.5;
    font-weight: 700;
    margin-top: 10px;
}

.references-hero h1 span {
    color: var(--green);
}

.references-intro {
    font-size: 21px;
    font-weight: 500;
    line-height: 1.45;
    max-width: 435px;
    margin-top: 26px;
}

.references-gallery {
    width: calc(100% - 2 * var(--gutter));
    margin-inline: auto;
    padding: 24px 0 60px;
}

.references-gallery>h2 {
    margin: 6px 0 22px;
}

.references-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 32px;
}

.reference-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
    border-radius: 24px 0 24px 0;
    box-shadow: 3px 4px 3px #0004;
    transition: transform .22s ease;
}

.reference-card>img {
    width: 100%;
    height: auto;
    aspect-ratio: 15/17;
    object-fit: cover;
}

.reference-card h3 {
    min-height: 60px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    font-size: 18px;
    line-height: 1.35;
    text-align: center;
    font-weight: 700;
}

.references-gallery>.more-projects {
    margin: 36px 0;
}

.references-grid-more .reference-card>img {
    aspect-ratio: 1;
}

@media (hover:hover) and (pointer:fine) {
    .reference-card:hover {
        transform: translateY(-7px);
    }

}

@media (max-width:1200px) {
    .references-grid {
        gap: 24px;
    }

    .reference-card h3 {
        font-size: 16px;
    }

}

@media (max-width:960px) {
    .references-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .references-hero {
        height: 580px;
        min-height: 580px;
    }

    .references-hero-content {
        padding-top: 64px;
    }

    .references-intro {
        max-width: 380px;
        font-size: 19px;
    }

    .references-shade {
        background: linear-gradient(90deg,#1e3354f5 0%,#1e3354c9 38%,#1e335426 85%);
    }

    .reference-card h3 {
        font-size: 18px;
    }

}

@media (max-width:640px) {
    .references-hero {
        height: 650px;
        min-height: 650px;
    }

    .references-hero-content {
        padding-top: 40px;
    }

    .references-hero h1 {
        font-size: 40px;
        line-height: 1.35;
    }

    .references-intro {
        font-size: 17px;
        max-width: 350px;
        margin-top: 20px;
    }

    .references-background {
        object-position: 60% 80%;
    }

    .references-shade {
        background: linear-gradient(180deg,#1e3354f7 0%,#1e3354e6 33%,#1e335455 65%,#1e335400 100%);
    }

    .references-gallery {
        padding: 30px 0 44px;
    }

    .references-gallery>h2 {
        font-size: 28px;
        margin-bottom: 24px;
    }

    .references-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 12px;
        max-width: none;
        margin-inline: auto;
    }

    .reference-card>img {
        aspect-ratio: 1;
    }

    .references-gallery>.more-projects {
        margin: 36px 0 24px;
    }

    .reference-card h3 {
        font-size: 14px;
        padding: 10px 7px;
        overflow-wrap: anywhere;
        hyphens: auto;
    }

}

/* ==========================================================================
18. Impressum und Datenschutz
========================================================================== */

/* Legal pages follow the supplied spacious heading and white content panels. */

.legal-page .navigation {
    margin-inline: auto;
}

.legal-page .menu-toggle {
    margin-left: auto;
}

.legal-main {
    width: calc(100% - 2 * var(--gutter));
    margin-inline: auto;
    padding: 88px 0 48px;
}

.legal-heading {
    margin-bottom: 40px;
}

.legal-heading h1 {
    font-size: 36px;
    line-height: 1.35;
    font-weight: 700;
    letter-spacing: -.5px;
    margin: 5px 0;
}

.legal-heading>p:last-child:not(.section-label) {
    font-size: 21px;
    line-height: 1.45;
    max-width: 450px;
}

.legal-panel {
    background: white;
    border-radius: 24px;
    box-shadow: 3px 4px 3px #0004;
    padding: 36px clamp(28px,7.5vw,110px);
    overflow-wrap: anywhere;
}

.legal-panel h2 {
    font-size: 18px;
    line-height: 1.5;
    font-weight: 600;
    letter-spacing: 0;
}

.legal-panel p,
.legal-panel li {
    font-size: 16px;
    line-height: 1.5;
}

.legal-panel section+section {
    margin-top: 28px;
}

.legal-panel a:hover,
.legal-panel a:focus-visible {
    text-decoration: underline;
}

.imprint-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px,12vw,175px);
    min-height: 450px;
}

.privacy-panel {
    width: 92%;
    margin-inline: auto;
    padding: 42px 46px;
}

.privacy-panel section+section {
    margin-top: 28px;
}

.privacy-panel ul {
    padding-left: 24px;
    margin: 20px 0 0;
}

.privacy-panel #ki-bilder {
    scroll-margin-top: 30px;
}

.footer-column a[aria-current="page"] {
    color: var(--green);
}

.ai-image-note {
    font-size: 13px;
    line-height: 1.5;
    color: #525252;
    text-align: center;
    margin: -18px auto 26px;
    max-width: 850px;
}

.ai-image-note a {
    color: var(--navy);
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width:960px) {
    .legal-page .navigation {
        margin: 0;
    }

    .legal-main {
        padding-top: 50px;
    }

    .legal-panel {
        padding: 30px;
    }

    .imprint-grid {
        gap: 40px;
    }

    .privacy-panel {
        width: 100%;
    }

}

@media (max-width:640px) {
    .legal-main {
        padding: 38px 0 36px;
    }

    .legal-heading {
        margin-bottom: 28px;
    }

    .legal-heading h1 {
        font-size: clamp(23px,6.5vw,28px);
        overflow-wrap: anywhere;
    }

    .legal-heading>p:last-child:not(.section-label) {
        font-size: 17px;
    }

    .legal-panel {
        padding: 25px 20px;
        border-radius: 20px;
    }

    .imprint-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: 0;
    }

    .legal-panel h2 {
        font-size: 17px;
    }

    .legal-panel p,
    .legal-panel li {
        font-size: 15px;
        line-height: 1.6;
    }

    .privacy-panel ul {
        padding-left: 19px;
    }

    .ai-image-note {
        font-size: 12px;
        margin: -8px auto 24px;
    }

}

/* ==========================================================================
19. Kontaktseite
========================================================================== */

/* Contact page keeps the same full-width hero and shared navigation. */

.contact-page .navigation {
    margin-inline: auto;
}

.contact-page .menu-toggle {
    margin-left: auto;
}

.contact-background {
    object-position: center 45%;
}

.contact-hero .references-shade {
    background: linear-gradient(90deg,var(--navy) 12%,#1e3354ed 24%,#1e335499 43%,#1e335426 78%);
}

.contact-hero .references-intro {
    max-width: 445px;
}

.contact-details {
    width: calc(100% - 2 * var(--gutter));
    margin-inline: auto;
    padding: 28px 0 50px;
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: clamp(35px,5vw,78px);
    align-items: center;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 20px 24px;
}

.contact-card {
    min-width: 0;
    min-height: 180px;
    border-radius: 24px;
    padding: 24px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    box-shadow: 3px 4px 3px #0004;
    transition: transform .22s ease;
}

.contact-card>div {
    min-width: 0;
}

.contact-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(66%) sepia(42%) saturate(578%) hue-rotate(43deg) brightness(96%) contrast(88%);
}

.contact-instagram .contact-icon {
    padding: 5px;
}

.contact-card h2 {
    font-size: 18px;
    line-height: 1.4;
    color: var(--green);
    font-weight: 600;
    letter-spacing: 0;
    margin-bottom: 8px;
}

.contact-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.contact-note {
    font-size: 14px;
    margin-top: 7px;
    line-height: 1.5;
}

.contact-instagram .contact-value {
    font-size: 15px;
}

.contact-instagram .contact-note {
    font-size: 13px;
}

.opening-hours h2 {
    font-size: 38px;
    margin-bottom: 30px;
}

.opening-hours dl {
    display: grid;
    gap: 30px;
}

.opening-hours dl>div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.opening-hours dt {
    display: flex;
    align-items: center;
    gap: 8px;
}

.opening-hours dt,
.opening-hours dd {
    font-size: 20px;
    line-height: 1.5;
}

.opening-hours dd {
    text-align: right;
}

.opening-hours img {
    width: 36px;
    height: 37px;
    flex-shrink: 0;
}

.contact-cta .cta-content {
    min-width: 0;
}

@media (hover:hover) and (pointer:fine) {
    .contact-card:hover {
        transform: translateY(-5px);
    }

}

@media (max-width:1200px) {
    .contact-details {
        gap: 30px;
        grid-template-columns: 1.35fr 1fr;
    }

    .contact-card {
        padding: 20px 14px;
        gap: 10px;
    }

    .contact-icon {
        width: 42px;
        height: 42px;
    }

    .contact-value {
        font-size: 16px;
    }

    .contact-card h2 {
        font-size: 17px;
    }

    .opening-hours h2 {
        font-size: 32px;
    }

    .opening-hours dt,
    .opening-hours dd {
        font-size: 17px;
    }

    .opening-hours img {
        width: 28px;
        height: 29px;
    }

}

@media (max-width:960px) {
    .contact-details {
        grid-template-columns: 1fr;
        gap: 38px;
        padding-bottom: 40px;
    }

    .contact-icon {
        width: 56px;
        height: 56px;
    }

    .contact-card {
        padding: 24px;
    }

    .contact-value {
        font-size: 18px;
    }

    .opening-hours {
        max-width: 640px;
        width: 100%;
    }

    .opening-hours dt,
    .opening-hours dd {
        font-size: 19px;
    }

    .opening-hours dl {
        gap: 22px;
    }

    .contact-page .navigation {
        margin: 0;
    }

}

@media (max-width:640px) {
    .contact-hero {
        height: 710px;
        min-height: 710px;
    }

    .contact-hero .references-intro {
        max-width: 350px;
    }

    .contact-background {
        top: auto;
        height: 430px;
        object-position: 72% 45%;
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 100%);
        mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 100%);
    }

    .contact-hero .references-shade {
        background: linear-gradient(180deg,var(--navy) 0%,var(--navy) 35%,#1e3354ed 49%,#1e335444 73%,transparent 100%);
    }

    .contact-cards {
        grid-template-columns: minmax(0,1fr);
        gap: 20px;
    }

    .contact-card {
        min-height: 150px;
        padding: 22px 18px;
        gap: 16px;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
    }

    .contact-value {
        font-size: 16px;
    }

    .contact-instagram .contact-value {
        font-size: 14px;
    }

    .opening-hours h2 {
        font-size: 28px;
        margin-bottom: 24px;
    }

    .opening-hours dt,
    .opening-hours dd {
        font-size: 15px;
    }

    .opening-hours dl>div {
        gap: 10px;
    }

    .opening-hours img {
        width: 25px;
        height: 26px;
    }

    .opening-hours dd {
        max-width: 46%;
    }

    .contact-cta .cta-container {
        align-items: flex-start;
    }

    .contact-cta .cta-content h2 {
        font-size: 25px;
    }

    .contact-cta .cta-content p {
        font-size: 15px;
    }

}

/* ==========================================================================
20. Hintergrundanimation und reduzierte Bewegung
========================================================================== */

/* Subtle entrance zoom for the three page backgrounds; removable as one block. */

@keyframes background-zoom-in {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.035);
    }

}

@media (prefers-reduced-motion:no-preference) {
    .hero-image img,
    .references-background {
        transform-origin: 70% 60%;
        animation: background-zoom-in 14s ease-out both;
    }

}

@media (prefers-reduced-motion:reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none!important;
        animation: none!important;
    }

    .service-card:hover,
    .reference-card:hover,
    .contact-card:hover {
        transform: none;
    }

}
