:root {
    --bg-body: #ede6de;
    --surface: #fffdfa;
    --surface-strong: #f1e8de;
    --hero-blue: #10325c;
    --ink: #292a32;
    --muted: #666069;
    --line: #d8cdc0;
    --accent: #bea791;
    --accent-2: #9b8e90;
    --ink-soft: #4a4b55;
    --ink-deep: #17181d;
    --shadow: 0 24px 60px rgba(41, 42, 50, 0.12);
    --font-ui: "Avenir Next", "Avenir", "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-ui);
    color: var(--ink);
    background: var(--bg-body);
    line-height: 1.6;
    letter-spacing: 0.002em;
}

.container {
    width: min(1080px, 92vw);
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    background: var(--ink-deep);
    color: var(--surface);
    padding: 0.5rem 0.75rem;
}

.hero {
    position: relative;
    padding: 5rem 0 5rem;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 100vw;
    height: 19rem;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--ink-deep) 0%, #4b5564 40%, #ede6de 100%);
    z-index: 0;
}

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

.hero-grid {
    display: block;
}

.kicker {
    font-family: var(--font-ui);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.76rem;
    color: #aa9996;
    margin-bottom: 0.7rem;
}

.hero-brand {
    font-family: var(--font-ui);
    margin: 0 0 0.35rem;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #aa9996;
}

.hero-copy::after {
    content: "";
    display: block;
    clear: both;
}

h1,
h2,
h3 {
    font-family: var(--font-ui);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    margin: 0 0 0.8rem;
}

.lead {
    max-width: 78ch;
    font-size: clamp(1.05rem, 2.1vw, 1.35rem);
    color: var(--ink-soft);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.hero-text,
.section-intro {
    max-width: 80ch;
    color: var(--muted);
}

.section-intro {
    font-weight: 500;
}

.hero-text {
    margin-bottom: 0.8rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1rem;
}

.hero-logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

.hero-logo-inline {
    float: right;
    width: min(36%, 340px);
    margin: 0.2rem 0 1rem 2rem;
}

.button {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.7rem 1.1rem;
    border: 1px solid rgba(101, 92, 94, 0.72);
    border-bottom-color: rgba(41, 42, 50, 0.92);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255, 253, 250, 0.28), transparent 45%),
        linear-gradient(120deg, var(--accent-2), var(--accent));
    color: var(--surface);
    text-decoration: none;
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.6;
    box-shadow:
        inset 0 1px 0 rgba(255, 253, 250, 0.32),
        inset 0 -2px 0 rgba(41, 42, 50, 0.16),
        0 4px 0 rgba(41, 42, 50, 0.84),
        0 12px 24px rgba(41, 42, 50, 0.2);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.button:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 253, 250, 0.35),
        inset 0 -2px 0 rgba(41, 42, 50, 0.16),
        0 5px 0 rgba(41, 42, 50, 0.84),
        0 14px 26px rgba(41, 42, 50, 0.22);
}

.button:active {
    transform: translateY(2px);
    box-shadow:
        inset 0 1px 0 rgba(255, 253, 250, 0.24),
        inset 0 -1px 0 rgba(41, 42, 50, 0.16),
        0 2px 0 rgba(41, 42, 50, 0.72),
        0 8px 16px rgba(41, 42, 50, 0.16);
}

.button-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: none;
}

.button-tertiary {
    background: var(--ink-deep);
    color: var(--surface);
}

.contact-popup {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
}

.contact-popup[hidden] {
    display: none;
}

.contact-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 24, 29, 0.62);
}

.contact-popup-panel {
    position: relative;
    width: min(640px, 92vw);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1.4rem;
    box-shadow: var(--shadow);
}

.contact-popup-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}

.countdown-target {
    margin-top: 1rem;
    margin-bottom: 0.7rem;
    color: var(--muted);
}

.countdown {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.countdown-item {
    padding: 0.7rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    text-align: center;
}

.countdown-item strong {
    font-family: var(--font-ui);
    display: block;
    font-size: 1.35rem;
}

.countdown-item span {
    color: var(--muted);
    font-size: 0.88rem;
}

body.popup-open,
body.lightbox-open {
    overflow: hidden;
}

.section {
    padding: 4.2rem 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.cards article {
    padding: 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(41, 42, 50, 0.06);
}

.designer-line-section {
    padding-top: 1rem;
    padding-bottom: 1.8rem;
}

.designer-line {
    max-width: 940px;
    margin: 0 auto;
    padding: 1.6rem 1.8rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
}

.designer-line-image {
    justify-self: center;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #495566, #252f3b);
}

.designer-line-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    background: transparent;
}

.designer-line-caption {
    margin: 0.8rem 0 0;
    font-size: 0.92rem;
    text-align: center;
    color: var(--surface-strong);
}

.designer-line-copy h2 {
    margin: 0 0 0.8rem;
}

.designer-line-copy p {
    margin: 0 0 0.85rem;
    color: var(--ink-soft);
}

.designer-line-copy p:last-child {
    margin-bottom: 0;
}

.designer-line-lead {
    font-size: 1.12rem;
    font-weight: 500;
}

.reference-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 2rem;
    align-items: start;
}

.reference-title {
    margin: 0 0 0.8rem;
    font-size: clamp(1.35rem, 2.4vw, 1.9rem);
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--ink-soft);
}

.reference-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.reference-gallery figure {
    margin: 0;
    padding: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(41, 42, 50, 0.08);
}

.reference-gallery figure:first-child {
    grid-column: 1 / -1;
}

.reference-gallery figure:not(:first-child) {
    display: flex;
    flex-direction: column;
}

.reference-image-button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: default;
}

.reference-gallery img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background: linear-gradient(180deg, #f1e8de, #e4d7c8);
}

.reference-gallery figure:not(:first-child) img {
    aspect-ratio: 4 / 5;
    object-fit: contain;
    padding: 1rem;
    background: linear-gradient(180deg, #495566, #252f3b);
}

.reference-gallery figcaption {
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.reference-lightbox {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
}

.reference-lightbox[hidden] {
    display: none;
}

.reference-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(23, 24, 29, 0.68);
}

.reference-lightbox-panel {
    position: relative;
    z-index: 1;
    width: min(94vw, 1280px);
    min-height: min(88vh, 820px);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
}

.reference-lightbox-figure {
    margin: 0;
    display: grid;
    gap: 0.9rem;
    justify-items: center;
}

.reference-lightbox-figure img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 18px;
}

.reference-lightbox-figure figcaption {
    color: var(--surface-strong);
    text-align: center;
}

.reference-lightbox-close,
.reference-lightbox-nav {
    border: 1px solid rgba(255, 253, 250, 0.24);
    background: rgba(23, 24, 29, 0.42);
    color: var(--surface);
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.reference-lightbox-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    font-size: 1.3rem;
}

.reference-lightbox-nav {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    font-size: 2rem;
    line-height: 1;
}

.site-footer {
    padding: 3rem 0 4rem;
    background: var(--ink-deep);
    color: var(--surface-strong);
}

.site-footer a {
    color: var(--accent);
}

.site-footer-button {
    margin-top: 1.2rem;
}

.site-footer-note {
    margin-top: 1.4rem;
    font-size: 0.76rem;
    color: var(--muted);
    text-align: right;
}

.site-footer-note a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

@media (min-width: 521px) and (max-width: 820px) {
    .container {
        width: min(920px, 94vw);
    }

    .hero {
        padding: 4.2rem 0 2.8rem;
    }

    .hero::before {
        height: 17.5rem;
    }

    .hero-logo-inline {
        width: min(30%, 220px);
        margin: -0.2rem 0 0.7rem 1rem;
    }

    .lead,
    .hero-text,
    .section-intro {
        max-width: none;
    }

    .cards {
        grid-template-columns: 1fr 1fr;
    }

    #leistungen.section {
        padding-top: 2.8rem;
    }

    .designer-line {
        grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
        gap: 1.2rem;
        padding: 1.4rem 1.4rem;
    }

    .designer-line-image {
        width: auto;
    }

    .reference-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .reference-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reference-gallery figure:first-child {
        max-width: 440px;
        margin: 0 auto;
    }

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

@media (max-width: 520px) {
    .hero-copy {
        position: relative;
    }

    .hero-actions {
        gap: 0.45rem;
    }

    .hero-actions .button {
        margin-top: 0.6rem;
        padding: 0.58rem 0.72rem;
        font-size: 0.84rem;
        line-height: 1.25;
        letter-spacing: 0;
    }

    .designer-line {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .designer-line-image {
        max-width: 145px;
        margin: 0 auto;
    }

    .reference-grid,
    .cards {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 3.7rem 0 3.2rem;
    }

    .hero::before {
        height: 15.5rem;
    }

    .hero-logo-inline {
        float: right;
        width: min(24%, 92px);
        margin: -3.5rem 0 0.35rem 0.8rem;
    }

    #leistungen.section {
        padding-top: 1.6rem;
    }

    .reference-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-items: center;
    }

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

    .reference-gallery figure:first-child {
        grid-column: 1 / -1;
        width: min(100%, 250px);
    }

    .reference-gallery figure:not(:first-child) {
        width: min(100%, 180px);
    }

    .reference-gallery figure:not(:first-child) img {
        padding: 1rem 1.35rem;
    }

    .reference-image-button {
        cursor: pointer;
    }

    .reference-lightbox-panel {
        width: min(96vw, 1280px);
        min-height: min(90vh, 820px);
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .reference-lightbox-close {
        top: 0.2rem;
        right: 0.2rem;
    }

    .reference-lightbox-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 2.6rem;
        height: 2.6rem;
    }

    .reference-lightbox-prev {
        left: 0.4rem;
    }

    .reference-lightbox-next {
        right: 0.4rem;
    }

    .reference-lightbox-figure img {
        max-height: 72vh;
    }

    .cards {
        counter-reset: mobile-leistungen;
    }

    .cards article h3::before {
        counter-increment: mobile-leistungen;
        content: counter(mobile-leistungen) ". ";
    }

    .site-footer-note {
        text-align: center;
    }
}

/* Scroll-to-top */
.scroll-top {
    position: fixed;
    right: 1.5rem;
    bottom: 30%;
    z-index: 200;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    color: var(--surface);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 16px rgba(41, 42, 50, 0.24);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
}
