/*
 * Mehrmakler — subtle layout refresh
 *
 * Hero / Solutions / Process / Compare: Mode A polish.
 * Global: circular image frames → rounded squares (buttons stay round).
 * Do not shift layout__part x/w inside the theatre — causes stacked overlaps.
 */

/* -------------------------------------------------------------------------- */
/* Hairlines — remove all decorative section/theatre lines                    */
/* Keep modal/content borders (details-modal, buttons) intact.                */
/* -------------------------------------------------------------------------- */
.intro__background__line,
.intro__background__line--inner,
.layout__border-top,
.layout__part__border {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    border: none !important;
    height: 0 !important;
    width: 0 !important;
    pointer-events: none !important;
}

/* Mobile layout-part hairlines (::before) + leftover <hr> dividers */
.layout__part:before,
.layout__part:after {
    border: none !important;
}

.intro__bottom > hr,
.intro hr.my-s-1,
#architecture hr {
    display: none !important;
    border: none !important;
}

/* -------------------------------------------------------------------------- */
/* Hero                                                                       */
/* Desktop split: 50% / 50%                                                   */
/* Left = people image · Right = building video                               */
/* Default open: LEFT (people). RIGHT (video) starts as peek until hover.     */
/* -------------------------------------------------------------------------- */
@media only screen and (min-width: 980px) {
    .intro__background__left {
        flex: 0 0 50% !important;
        max-width: 50%;
    }

    .intro__background__right {
        flex: 0 0 50% !important;
        max-width: 50%;
    }

    /* Load animation: expand the right peek (video) when default is --1 */
    .animation--landing-animation .intro__background--1 .intro__background__right {
        --transition-duration: 1.6s;
        --transition-easing: cubic-bezier(0.25, 0.74, 0.22, 0.99);
        transition-property: clip-path, -webkit-clip-path;
        transition-duration: var(--transition-duration);
        transition-timing-function: var(--transition-easing);
    }

    .animation--landing-animation--inactive .intro__background--1 .intro__background__right {
        --clip-path-h: 0;
        --clip-path-w: 0;
    }

    /*
     * MEHRMAKLER wordmark: shared scale for hero + preloader.
     * On short MacBook viewports: smaller + less downward shift so faces
     * can sit above the letter band.
     */
    .intro__background,
    .preloader--intro {
        --kb-wordmark-scale: 1.032;
        --kb-wordmark-shift-y: calc((var(--viewport-height, 100vh) - var(--header-height)) * 0.05);
        --kb-wordmark-top: calc(var(--header-height) + var(--spacing-s) + var(--kb-wordmark-shift-y));
    }

    @media (max-height: 900px) {
        .intro__background,
        .preloader--intro {
            --kb-wordmark-scale: 0.78;
            --kb-wordmark-shift-y: calc((var(--viewport-height, 100vh) - var(--header-height)) * 0.02);
        }
    }

    @media (max-height: 780px) {
        .intro__background,
        .preloader--intro {
            --kb-wordmark-scale: 0.7;
            --kb-wordmark-shift-y: 0px;
        }
    }

    .intro__background__logo {
        top: var(--kb-wordmark-top);
        transform: scale(var(--kb-wordmark-scale));
        transform-origin: center top;
    }

    /* Right pane logo offset — original Ever math (full viewport width) */
    .intro__background__right .intro__background__logo {
        left: calc(var(--spacing-l) - 50vw);
    }

    /* Next control: right of hero copy (“keine Klicks.”), left pane */
    .intro__cta-row {
        position: absolute;
        z-index: 1;
        left: var(--spacing-l);
        bottom: var(--spacing-l);
        display: flex;
        align-items: flex-end;
        gap: var(--spacing-s);
        width: max-content;
        max-width: calc(50% - var(--spacing-l) * 2);
    }

    .intro__cta-row .intro__text {
        position: static;
        left: auto;
        bottom: auto;
        flex: 0 1 auto;
        min-width: 0;
    }

    .intro__cta-row .intro__next {
        /* relative (not static): btn::before must stay clipped to the 40px control */
        position: relative;
        left: auto;
        bottom: auto;
        flex: 0 0 auto;
        width: 40px;
    }

    .intro__background__content {
        --intro-radius: 1.35rem;
        -webkit-clip-path: inset(
            calc(var(--clip-path-y) - var(--clip-path-h))
            calc(50% - var(--clip-path-w))
            calc(100% - var(--clip-path-y) - var(--clip-path-h))
            calc(50% - var(--clip-path-w))
            round var(--intro-radius)
        );
        clip-path: inset(
            calc(var(--clip-path-y) - var(--clip-path-h))
            calc(50% - var(--clip-path-w))
            calc(100% - var(--clip-path-y) - var(--clip-path-h))
            calc(50% - var(--clip-path-w))
            round var(--intro-radius)
        );
    }

    /* Peek circle: video (right) for scene 1, people (left) for scene 2 */
    .intro__background--1 .intro__background__right,
    .intro__background--2 .intro__background__left {
        --clip-path-w: min(17vw, 26vh);
        --clip-path-h: min(17vw, 26vh);
        --intro-radius: 1.15rem;
    }

    @media (min-aspect-ratio: 450 / 259) {
        .intro__background--1 .intro__background__right,
        .intro__background--2 .intro__background__left {
            --clip-path-w: min(15vw, 24vh);
            --clip-path-h: min(15vw, 24vh);
        }
    }

    .intro__background--1 .intro__background__left .intro__background__content,
    .intro__background--2 .intro__background__right .intro__background__content {
        --intro-radius: 1.65rem;
    }

    .has-hover .intro__background__right:hover .intro__background__content,
    .has-hover .intro__background__left:hover .intro__background__content {
        --intro-radius: 1.85rem;
    }

    /*
     * People photo (left): higher object-position = faces sit higher
     * in the hero (clears MEHRMAKLER). Lower % pushed them down.
     */
    .intro__background__left .intro__background__content img {
        object-position: center 46% !important;
        transform: scale(1) !important;
    }

    @media (max-height: 920px) {
        .intro__background__left .intro__background__content img {
            object-position: center 42% !important;
        }
    }

    @media (max-height: 800px) {
        .intro__background__left .intro__background__content img {
            object-position: center 38% !important;
        }
    }

    @media (min-height: 1000px) {
        .intro__background__left .intro__background__content img {
            object-position: center 50% !important;
        }
    }
}

/* MEHRMAKLER wordmark on intro preloader — same size/position as hero */
@media only screen and (min-width: 980px) {
    .preloader--intro {
        --kb-wordmark-scale: 1.032;
        --kb-wordmark-shift-y: calc((var(--viewport-height, 100vh) - var(--header-height)) * 0.05);
        --kb-wordmark-top: calc(var(--header-height) + var(--spacing-s) + var(--kb-wordmark-shift-y));
    }

    @media (max-height: 900px) {
        .preloader--intro {
            --kb-wordmark-scale: 0.78;
            --kb-wordmark-shift-y: calc((var(--viewport-height, 100vh) - var(--header-height)) * 0.02);
        }
    }

    @media (max-height: 780px) {
        .preloader--intro {
            --kb-wordmark-scale: 0.7;
            --kb-wordmark-shift-y: 0px;
        }
    }

    .preloader--intro .preloader__content svg {
        left: var(--spacing-l);
        right: auto;
        width: calc(100vw - var(--spacing-l) * 2);
        top: var(--kb-wordmark-top);
        bottom: auto;
        transform: scale(var(--kb-wordmark-scale));
        transform-origin: center top;
        overflow: visible;
    }
}

@media only screen and (max-width: 979px) {
    /* Mobile: keep G visible — old 144 viewBox clipped the last letter */
    .preloader--intro .preloader__content {
        overflow: visible;
    }

    .preloader--intro .preloader__content svg {
        width: calc(100% - var(--spacing-l) * 2 - 4px);
        max-width: calc(100vw - var(--spacing-l) * 2 - 4px);
        left: var(--spacing-l);
        right: auto;
        top: auto;
        overflow: visible;
        padding-right: 2.5%;
        box-sizing: border-box;
        transform: none;
    }

    .intro__top__logo,
    .intro__top__logo .icon,
    .header__logo .icon-logo {
        overflow: visible !important;
    }

    .intro__top__logo .icon {
        width: 96%;
        max-width: 100%;
    }
}



@media only screen and (max-width: 979px) {
    /*
     * Mobile hero — keep background + deco on the same tab content.
     * Hide the desktop right video pane (it was painting over / desyncing the deco).
     * Left pane switches people ↔ video; deco mirrors it via shared tab ids.
     */
    .intro__background__left {
        position: relative;
        z-index: 1;
        width: 100%;
        height: 100%;
        overflow: hidden;
        overflow: clip;
    }

    .intro__background__left .intro__background__content {
        position: absolute;
        inset: 0;
    }

    .intro__background__left video {
        position: absolute;
        inset: 0;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .intro__background__right {
        display: none !important;
    }

    /* Mobile: all .h3 (was 4rem) — same size as tuned hero subtitle */
    .h3,
    h3,
    .text--h3-plan {
        font-size: 3.15rem;
        line-height: 1.1;
        --lh: 1.1em;
    }

    /* Mobile hero: no down-arrow CTA */
    .intro__middle > a.btn[href="#architecture"] {
        display: none !important;
    }

    .intro__middle__deco {
        --intro-mobile-radius: 1.15rem;
        z-index: 5;
        width: calc(var(--spacing-s) * 7);
        height: calc(var(--spacing-s) * 7);
        border-radius: var(--intro-mobile-radius);
        overflow: hidden;
        overflow: clip;
    }

    .intro__middle__deco .tabs-contents__content {
        width: 100%;
        height: 100%;
        overflow: hidden !important;
        overflow: clip !important;
        border-radius: var(--intro-mobile-radius);
    }

    .intro__middle__deco video,
    .intro__middle__deco picture,
    .intro__middle__deco picture img {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: var(--intro-mobile-radius) !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    .intro__middle__deco__button {
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        margin: 0;
        transform: translate(-50%, -50%);
        z-index: 6;
    }
}

/* -------------------------------------------------------------------------- */
/* Solutions — Mode A only (scroll-safe)                                      */
/* Circle / disc → rounded. Do not move layout__part x/w.                     */
/* -------------------------------------------------------------------------- */
#architecture {
    --sol-radius: 1.25rem;
}

/*
 * Cursor / hover follower: transparent MEHR pill (header-burger language)
 * instead of the filled + circle. Close-cursors keep the X.
 */
.kb-mehr-cursor {
    width: auto !important;
    min-width: 0 !important;
    height: 40px !important;
    --button-height: 40px;
    padding: 0 1.15rem !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--t-primary) !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.kb-mehr-cursor:before {
    display: none !important;
}

.kb-mehr-cursor:after {
    border-radius: inherit !important;
    background: transparent !important;
    box-shadow: inset 0 0 0 1px var(--t-primary) !important;
    transform: none !important;
}

.kb-mehr-cursor > .btn__content {
    height: 40px !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.kb-mehr-cursor__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Outline news buttons also use the pill */
.kb-mehr-cursor.btn--outline {
    color: var(--t-primary) !important;
}

@media only screen and (min-width: 980px) {
    .architecture__circle {
        border-radius: var(--sol-radius);
        overflow: hidden;
        overflow: clip;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    /* Side frame — 9:16 portrait, full column width (= large), top-aligned */
    #architecture .architecture__circle .layout__background--rounded {
        position: relative !important;
        inset: auto !important;
        top: 0 !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        height: auto !important;
        max-height: 100%;
        aspect-ratio: 9 / 16;
        margin: 0 auto;
        border-radius: var(--sol-radius) !important;
        overflow: hidden;
        overflow: clip;
    }

    .architecture__circle .layout__background--rounded,
    .architecture__circle .layout__background--rounded img {
        border-radius: var(--sol-radius) !important;
    }

    #architecture .architecture__circle .layout__background--rounded img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Center main frame — 16:9 landscape, top-aligned with side image */
    #architecture
        .architecture__background-wrapper:not(.layout__part--fullscreen):not(.layout__part--w4) {
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    #architecture
        .architecture__background-wrapper:not(.layout__part--fullscreen):not(.layout__part--w4)
        .architecture__slides {
        position: relative;
        top: 0;
        align-self: flex-start;
        width: 100% !important;
        height: auto !important;
        max-height: 100%;
        aspect-ratio: 16 / 9;
        margin: 0 auto;
        border-radius: var(--sol-radius);
        overflow: hidden;
        overflow: clip;
    }

    #architecture
        .architecture__background-wrapper:not(.layout__part--fullscreen):not(.layout__part--w4)
        .architecture__background,
    #architecture
        .architecture__background-wrapper:not(.layout__part--fullscreen):not(.layout__part--w4)
        .architecture__background img {
        border-radius: var(--sol-radius);
        overflow: hidden;
        overflow: clip;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .architecture-quote__image {
        border-radius: var(--sol-radius) !important;
    }

    .architecture__background-wrapper.layout__part--fullscreen .architecture__background,
    .architecture__background-wrapper.layout__part--fullscreen .architecture__background img,
    .architecture__background-wrapper.layout__part--w4 .architecture__background,
    .architecture__background-wrapper.layout__part--w4 .architecture__background img {
        border-radius: 0;
    }
}

@media only screen and (max-width: 979px) {
    #architecture {
        overflow-x: clip;
    }

    /* Ever uses margin-left:-55vw on small phones — crops to “…tions” */
    #architecture .architecture__title.is-hidden--lg-up {
        position: absolute !important;
        left: var(--spacing-s) !important;
        right: var(--spacing-s) !important;
        bottom: calc(var(--spacing-s) * 2) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        transform: none !important;
        max-width: calc(100% - var(--spacing-s) * 2) !important;
        width: auto !important;
        font-size: clamp(2.6rem, 14vw, 4.5rem) !important;
        line-height: 0.95 !important;
        letter-spacing: -0.03em;
        word-break: normal;
        overflow: visible;
        z-index: 2;
        pointer-events: none; /* title must not steal taps from arrows */
    }

    /*
     * Mobile gallery is hidden; the fullscreen photo overlay still sits on
     * top of the carousel and blocks the prev/next arrows — kill its hits.
     */
    #architecture .architecture__image-overlay,
    #architecture .architecture__background-overlay {
        pointer-events: none !important;
    }

    #architecture .architecture__slider-nav {
        z-index: 30 !important;
        pointer-events: auto !important;
    }

    #architecture .architecture__slider-nav .btn,
    #architecture .architecture__slider-nav a {
        pointer-events: auto !important;
        position: relative;
        z-index: 31;
    }

    .architecture__circle .layout__background--rounded,
    .architecture__circle .layout__background--rounded img,
    .architecture__background,
    .architecture__background img,
    .architecture-quote__image {
        border-radius: var(--sol-radius) !important;
    }
}

/* -------------------------------------------------------------------------- */
/* Process — Mode A only (scroll-safe)                                        */
/* Comfort disc → rounded. Do not move layout__part x/w.                      */
/* -------------------------------------------------------------------------- */
#interior {
    --proc-radius: 1.25rem;
    /* Still + comfort card share one radius so corners match exactly */
    --proc-still-radius: calc(var(--proc-radius) * 0.85);
}

/* Blue comfort card: identical corners to the process still it overlays */
#interior .interior-comfort,
#interior [data-custom-scroll-id="interior-comfort"] {
    border-radius: var(--proc-still-radius);
    overflow: hidden;
    overflow: clip;
}

@media only screen and (min-width: 980px) {
    .interior-comfort__image {
        border-radius: var(--proc-radius) !important;
        overflow: hidden;
        overflow: clip;
    }

    .interior-comfort__image picture,
    .interior-comfort__image img {
        border-radius: var(--proc-radius);
    }

    /* Soft corners on stills — keep on wrapper so overlays stay intact */
    .interior__image {
        border-radius: var(--proc-still-radius);
        overflow: hidden;
        overflow: clip;
    }

    .interior__image picture,
    .interior__image img {
        border-radius: 0;
    }

    /*
     * Title: same locked size as LÖSUNGEN (#architecture), also after --large is removed.
     */
    #interior .interior__title:not(.interior__title--large) {
        font-size: calc(var(--layout-width) * 0.11552) !important;
        line-height: 0.9 !important;
        letter-spacing: -0.04em;
        max-width: 100%;
        margin-left: 0 !important;
    }

    @media only screen and (min-width: 1440px) and (min-height: 750px) {
        #interior .interior__title:not(.interior__title--large) {
            font-size: calc(var(--layout-width) * 0.12312) !important;
        }
    }

    /* MEHR in the O — title above the still so PROZESS isn’t covered */
    #interior .layout__part:has(.interior__title-wrapper) {
        z-index: 5 !important;
    }

    #interior .interior__title-wrapper {
        z-index: 40;
        position: relative;
    }

    /* Lead copy directly under DREI SCHRITTE */
    #interior .interior__lead {
        margin: calc(var(--spacing-s) * 1.25) 0 0;
        max-width: 100%;
        padding-right: var(--spacing-s);
    }

    /*
     * Single process still: from screen center to Beratung-button right edge
     * (var(--spacing-l)). Bottom aligns with PROZESS unterkante (layout bottom).
     * Image 2/3 stay in DOM for mobile carousel + gallery — hide without
     * display:none so --full / gallery expand still works.
     * Comfort card shares the same x/width so it sits exactly over the still.
     */
    #interior [data-custom-scroll-id="interior-images"],
    #interior [data-custom-scroll-id="interior-comfort"] {
        left: 50% !important;
        width: calc(50% - var(--spacing-l)) !important;
        right: auto !important;
    }

    #interior [data-custom-scroll-id="interior-images"] {
        z-index: 1 !important;
    }

    /* Gallery open: restore original x2/w2 slot so --full offset stays correct */
    #interior [data-custom-scroll-id="interior-images"]:has(.interior__image--full) {
        left: calc(
            (100vw - var(--spacing-l) * 2 - var(--spacing-s) * 10) / 6 * 2 + 2 * var(--spacing-s) * 2
        ) !important;
        width: var(--layout-width-2) !important;
        z-index: 4 !important;
    }

    #interior .interior__image--1:not(.interior__image--full) {
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        transform: none !important;
    }

    #interior .interior__image--1:not(.interior__image--full) picture,
    #interior .interior__image--1:not(.interior__image--full) img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    #interior .interior__image--2:not(.interior__image--full),
    #interior .interior__image--3:not(.interior__image--full) {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    #interior .interior__image--2.interior__image--full,
    #interior .interior__image--3.interior__image--full {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Enquiry copy centered under the comfort photo; logo removed */
    #interior .interior-comfort__logo {
        display: none !important;
    }

    /* Leave a clear band under the photo so caption never overlaps */
    #interior .interior-comfort__image {
        bottom: calc(var(--spacing-l) * 1.5 + 5.5rem) !important;
    }

    #interior .interior-comfort__title {
        position: absolute !important;
        left: 50% !important;
        right: auto !important;
        top: auto !important;
        bottom: calc(var(--spacing-l) * 0.75) !important;
        transform: translateX(-50%);
        z-index: 2;
        margin: 0;
        /* Wider so it doesn't wrap to 4 lines */
        width: calc(100% - var(--spacing-l) * 2) !important;
        max-width: calc(100% - var(--spacing-l) * 2) !important;
        padding: 0 var(--spacing-s);
        box-sizing: border-box;
        text-align: center;
        /* h5 −19% (was −10%, then −10% again) */
        font-size: 2.187rem !important;
        line-height: 1.2 !important;
    }

    /* Force fewer line breaks on desktop spans */
    #interior .interior-comfort__title .is-hidden--md-down br {
        display: none;
    }

    /* Gallery copy: only the active phase panel */
    #interior .architecture__gallery__content .tabs-contents__content[aria-hidden="true"] {
        display: none !important;
    }
}

@media only screen and (min-width: 980px) and (max-width: 1439px) {
    #interior .interior-comfort__title {
        font-size: calc((1.8375rem + 8.625 * ((100vw - 980px) / 460)) * 0.81) !important;
    }

    #interior .interior-comfort__image {
        bottom: calc(var(--spacing-l) * 1.5 + 5rem) !important;
    }
}

@media only screen and (min-width: 1440px) {
    #interior .interior-comfort__title {
        font-size: 3.24rem !important; /* 4rem × 0.81 */
        line-height: 1.15 !important;
    }

    #interior .interior-comfort__image {
        bottom: calc(var(--spacing-l) * 1.5 + 5.75rem) !important;
    }
}

@media only screen and (max-width: 979px) {
    #interior {
        overflow-x: clip;
    }

    #interior .interior__title-mobile {
        transform: none !important;
        left: var(--spacing-s) !important;
        max-width: calc(100% - var(--spacing-s) * 2);
        font-size: clamp(2.4rem, 12vw, 4.5rem) !important;
        pointer-events: none;
    }

    /* Same overlay-blocks-arrows issue as Solutions mobile */
    #interior .interior__image__overlay {
        pointer-events: auto;
    }

    #interior .carousel-owl__nav,
    #interior .js-carousel-owl-nav {
        position: relative;
        z-index: 30;
        pointer-events: auto !important;
    }

    #interior .carousel-owl__nav .btn,
    #interior .js-carousel-owl-nav .btn {
        pointer-events: auto !important;
    }

    .interior-comfort__image,
    .interior-comfort__image picture,
    .interior-comfort__image img {
        border-radius: var(--proc-radius) !important;
    }

    .interior__image {
        border-radius: var(--proc-still-radius) !important;
        overflow: hidden;
        overflow: clip;
    }

    #interior .interior-comfort__logo {
        display: none !important;
    }

    #interior .interior-comfort__title {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        margin-top: var(--spacing-s);
        padding: 0 var(--spacing-s) var(--spacing-s);
        text-align: center;
        font-size: 1.62rem !important; /* 2rem × 0.81 */
        line-height: 1.25 !important;
    }

    /* Gallery copy: only the active phase panel */
    #interior .architecture__gallery__content .tabs-contents__content[aria-hidden="true"] {
        display: none !important;
    }
}

/* -------------------------------------------------------------------------- */
/* Compare — VERGLEICH matches REICHWEITE (size + mid position), white        */
/* -------------------------------------------------------------------------- */
#apartments {
    --cmp-radius: 1.25rem;
}

/* Hide slide-up portrait card (image + Bewertung anfragen) — keep comparison only */
#apartments [data-custom-scroll-id="apartments-more"] {
    display: none !important;
}

/*
 * Normal footer under Vergleich: apartments scrolls internally
 * (data-custom-scroll-scrollable) — no fullscreen news/footer stage.
 */
#apartments .kb-apartments-scroll {
    display: block;
    width: 100%;
}

#apartments .kb-apartments-scroll > [data-custom-scroll-id="apartments-content-inner"] {
    min-height: var(--viewport-height, 100vh);
}

#apartments .kb-page-footer.footer-landing,
#apartments .footer-landing {
    transform: none !important;
    position: relative !important;
    width: 100%;
    margin: 0;
}

/* -------------------------------------------------------------------------- */
/* Band-Footer — full-bleed, site type scale, header button radius (12px)     */
/* -------------------------------------------------------------------------- */
.kb-footer-band {
    --kb-footer-pad-x: var(--spacing-l, 1.5rem);
    --kb-footer-pad-y: calc(var(--spacing-s, 1.25rem) * 2.5);
    color: var(--c-cold-1, #ddeffd);
}

.kb-footer-band__inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: var(--kb-footer-pad-y) var(--kb-footer-pad-x);
    display: flex;
    flex-direction: column;
    gap: calc(var(--spacing-s, 1.25rem) * 2);
    box-sizing: border-box;
}

.kb-footer-band__brand {
    display: flex;
    align-items: center;
}

.kb-footer-band__logo {
    display: block;
    height: auto;
    width: min(100%, 28rem);
    max-height: 5.5rem;
    object-fit: contain;
    object-position: left center;
    mix-blend-mode: screen;
}

@media only screen and (min-width: 980px) {
    .kb-footer-band__logo {
        width: min(100%, 36rem);
        max-height: 6.5rem;
    }
}

.kb-footer-band__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-s, 1.25rem) * 1.75);
    width: 100%;
}

@media only screen and (min-width: 768px) {
    .kb-footer-band__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: calc(var(--spacing-s, 1.25rem) * 2.5);
    }
}

.kb-footer-band__label {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(221, 239, 253, 0.6);
}

.kb-footer-band__text {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.4;
    color: rgba(221, 239, 253, 0.95);
}

@media only screen and (min-width: 980px) {
    .kb-footer-band__text {
        font-size: 1.6rem;
        line-height: 1.35;
    }
}

.kb-footer-band__text--small {
    font-size: 1.05rem;
    line-height: 1.45;
    color: rgba(221, 239, 253, 0.78);
    max-width: none;
}

@media only screen and (min-width: 980px) {
    .kb-footer-band__text--small {
        font-size: 1.2rem;
    }
}

.kb-footer-band__text a {
    color: inherit;
    text-decoration: none;
}

.kb-footer-band__text a:hover,
.kb-footer-band__text a:focus-visible {
    text-decoration: underline;
}

.kb-footer-band__link {
    display: inline-block;
    margin-top: 0.85rem;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: rgba(221, 239, 253, 0.9);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.kb-footer-band__link:hover,
.kb-footer-band__link:focus-visible {
    color: #fff;
}

.kb-footer-band__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.5rem;
    margin: 1rem 0 0;
    font-size: 1.05rem;
    color: rgba(221, 239, 253, 0.7);
}

.kb-footer-band__meta a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.kb-footer-band__cta {
    display: flex;
    justify-content: flex-start;
    padding-top: calc(var(--spacing-s, 1.25rem) * 0.75);
    border-top: 1px solid rgba(221, 239, 253, 0.18);
}

@media only screen and (min-width: 768px) {
    .kb-footer-band__cta {
        justify-content: flex-end;
    }
}

/* Match header CTA radius (brand.css: 12px), not Ever’s pill 20px */
.kb-footer-band__cta .btn,
.kb-footer-band__cta .btn:after,
.kb-footer-band__cta .btn:before {
    border-radius: 12px !important;
}

.kb-footer-band__cta .btn {
    min-width: 14rem;
    height: 44px;
    --button-height: 44px;
}

/* -------------------------------------------------------------------------- */
/* Compare desktop overrides                                                  */
/* -------------------------------------------------------------------------- */

@media only screen and (min-width: 980px) {
    /*
     * Image left · copy right · VERGLEICH stays at previous screen X.
     * Comparison slider stays on .image-comparison (unchanged plugin).
     */
    #apartments .apartments__image {
        left: calc(var(--spacing-l) * -1) !important;
        z-index: 1;
    }

    /* Subtitle + body → right (former image columns x4) */
    #apartments .layout__part--x0.layout__part--y0,
    #apartments .layout__part--x0.layout__part--y1 {
        left: calc(
            (100vw - var(--spacing-l) * 2 - var(--spacing-s) * 10) / 6 * 4
                + 4 * var(--spacing-s) * 2
        ) !important;
        overflow: visible !important;
        z-index: 3;
    }

    #apartments .layout__part--x0.layout__part--y1 {
        z-index: 4;
    }

    #apartments [data-custom-scroll-id="apartments-title"],
    #apartments .apartments__title:not(.apartments__title-mobile) {
        color: #fff !important;
        /* Same fluid .h1 size as #location .location__title (REICHWEITE) */
        font-size: calc(10.88889rem + 51.11111 * ((100vw - 980px) / 460)) !important;
        line-height: 1em !important;
        letter-spacing: -0.04em !important;
        text-transform: uppercase;
        white-space: nowrap;
        overflow: visible;
        /* Keep previous screen position (parent moved x0 → x4) */
        position: absolute !important;
        left: calc(
            var(--spacing-l) * -1
                - ((100vw - var(--spacing-l) * 2 - var(--spacing-s) * 10) / 6 * 4
                    + 4 * var(--spacing-s) * 2)
        ) !important;
        top: 0 !important;
        transform: translateY(-50%) !important;
        z-index: 2;
        pointer-events: none;
    }

    #apartments [data-custom-scroll-id="apartments-text"] {
        position: relative;
        z-index: 1;
        max-width: 100%;
        padding-right: 0.5rem;
    }

    #apartments .layout__part--x0.layout__part--w2 {
        overflow: visible;
        z-index: 3;
    }

    /* MEHR: bottom-left on the (now left) comparison image */
    #apartments .apartments__modal-button {
        position: absolute !important;
        left: calc(var(--spacing-s) * 1.25) !important;
        bottom: calc(var(--spacing-s) * 1.25) !important;
        right: auto !important;
        top: auto !important;
        z-index: 6;
        pointer-events: auto;
    }

    .apartments__more {
        border-radius: var(--cmp-radius) !important;
        overflow: hidden;
        overflow: clip;
    }

    .apartments__more picture,
    .apartments__more img {
        border-radius: var(--cmp-radius);
    }
}

@media only screen and (min-width: 1440px) and (min-height: 750px) {
    #apartments [data-custom-scroll-id="apartments-title"],
    #apartments .apartments__title:not(.apartments__title-mobile) {
        font-size: 16rem !important;
    }
}

@media only screen and (min-width: 1920px) and (min-height: 750px) {
    #apartments [data-custom-scroll-id="apartments-title"],
    #apartments .apartments__title:not(.apartments__title-mobile) {
        font-size: min(calc(var(--layout-width-4) * 0.2), 27rem) !important;
    }
}

@media (min-width: 1200px) and (min-height: 600px) and (max-height: 760px),
    (min-width: 1440px) and (min-height: 750px) and (max-height: 920px) {
    #apartments [data-custom-scroll-id="apartments-title"],
    #apartments .apartments__title:not(.apartments__title-mobile) {
        font-size: 10.8rem !important;
        line-height: 1.01852em !important;
        letter-spacing: -0.02em !important;
    }
}

/* Extra-large Ever spike — keep in sync with REICHWEITE caps above */
@media only screen and (min-width: 1920px) and (min-height: 750px) and (max-height: 1050px) {
    #apartments [data-custom-scroll-id="apartments-title"],
    #apartments .apartments__title:not(.apartments__title-mobile) {
        font-size: min(calc(var(--layout-width-4) * 0.2), 27rem) !important;
    }
}

@media only screen and (max-width: 979px) {
    #apartments {
        overflow-x: clip;
    }

    /* Allow parallax translateX on VERGLEICH (was transform:none !important) */
    #apartments .apartments__title-mobile {
        overflow: visible;
        white-space: nowrap;
    }

    .apartments__more,
    .apartments__more picture,
    .apartments__more img {
        border-radius: var(--cmp-radius) !important;
    }
}

/*
 * Gray MEHR on first Ö of LÖSUNGEN
 * - Button keeps original btn--lg / btn--square size (no shrink)
 * - Grid stacks letter + button; letter alone sizes the cell;
 *   button centers on that cell (true middle of the O box)
 */
#architecture .architecture__title-o {
    display: inline-grid;
    grid-template: 1fr / 1fr;
    place-items: center;
    line-height: 1;
    vertical-align: baseline;
}

#architecture .architecture__title-o__letter {
    grid-area: 1 / 1;
}

/* MEHR in the O of PROZESS — same stacking pattern as LÖSUNGEN */
#interior .interior__title-o {
    display: inline-grid;
    grid-template: 1fr / 1fr;
    place-items: center;
    line-height: 1;
    vertical-align: baseline;
}

#interior .interior__title-o__letter {
    grid-area: 1 / 1;
}

#interior .interior__title-o > .interior__modal-button {
    grid-area: 1 / 1;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 60;
    line-height: 0;
    pointer-events: none;
    translate: none;
}

#interior .interior__title-o > .interior__modal-button .btn.kb-mehr-btn {
    pointer-events: auto !important;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 61;
    /* Optical center in the O — slight down + tiny right */
    top: calc(var(--spacing-s) * 0.3);
    left: calc(var(--spacing-s) * 0.1);
    --kb-mehr-size: calc(var(--spacing-s) * 3.15);
}

@media only screen and (min-width: 980px) {
    #interior .interior__title-o > .interior__modal-button .btn.kb-mehr-btn {
        --kb-mehr-size: calc(var(--spacing-s) * 4);
        top: calc(var(--spacing-s) * 0.36);
        left: calc(var(--spacing-s) * 0.12);
    }

    .has-hover #interior .interior__title-o > .interior__modal-button .btn.kb-mehr-btn:hover,
    .has-hover #interior .interior__title-o > .interior__modal-button .btn.kb-mehr-btn:active:hover,
    #interior .interior__title-o > .interior__modal-button .btn.kb-mehr-btn:focus-visible {
        --kb-mehr-size: calc(var(--spacing-s) * 3.45);
    }

    .js #interior .interior__title-o > .interior__modal-button.is-invisible--lg-up-js,
    .js #interior .interior__title-o > .interior__modal-button.animation--button-in--inactive {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .js #interior .interior__title-o > .interior__modal-button.is-invisible--lg-up-js .btn,
    .js #interior .interior__title-o > .interior__modal-button.animation--button-in--inactive .btn {
        pointer-events: none !important;
    }

    .js #interior .interior__title-o > .interior__modal-button.is-invisible--lg-up-js .btn:after,
    .js #interior .interior__title-o > .interior__modal-button.animation--button-in--inactive .btn:after {
        transform: scale(0) !important;
    }
}

#interior .interior__title-o > .interior__modal-button .kb-mehr-btn__label {
    font-size: 1.35rem;
}

@media only screen and (min-width: 1440px) {
    #interior .interior__title-o > .interior__modal-button .kb-mehr-btn__label {
        font-size: 1.55rem;
    }
}

#architecture .architecture__title-o > .architecture__modal-button {
    grid-area: 1 / 1;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    /* 0×0 so the O letter alone defines the grid size; button overflows centered */
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: 60;
    line-height: 0;
    pointer-events: none;
    /* Don’t kill button-in scale on :after — only clear layout translate */
    translate: none;
}

/*
 * Shared MEHR circle (replaces + on section modal buttons).
 * Architecture Ö keeps extra position/size overrides below.
 */
.kb-mehr-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1rem;
    line-height: 1;
    --kb-mehr-size: calc(var(--spacing-s) * 3);
    --button-height: var(--kb-mehr-size);
    --button-background-size: calc(var(--kb-mehr-size) / 2);
    width: var(--kb-mehr-size) !important;
    height: var(--kb-mehr-size) !important;
    transition:
        width var(--transition-duration, 0.4s) var(--transition-easing, cubic-bezier(0.25, 0.74, 0.22, 0.99)),
        height var(--transition-duration, 0.4s) var(--transition-easing, cubic-bezier(0.25, 0.74, 0.22, 0.99));
}

@media only screen and (min-width: 980px) {
    .kb-mehr-btn {
        --kb-mehr-size: calc(var(--spacing-s) * 4);
    }
}

.kb-mehr-btn > .btn__content {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1;
}

.kb-mehr-btn__label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(0.04em);
    transform-origin: center center;
    transition: transform var(--transition-duration, 0.4s) var(--transition-easing, cubic-bezier(0.25, 0.74, 0.22, 0.99));
}

@media only screen and (min-width: 1440px) {
    .kb-mehr-btn__label {
        font-size: 1.1rem;
    }
}

/* Hover: disc shrinks, MEHR swells; keep dark label (default secondary hover washes it out) */
.has-hover .kb-mehr-btn:hover,
.has-hover .kb-mehr-btn:active:hover,
.kb-mehr-btn:focus-visible {
    color: var(--t-background) !important;
    --kb-mehr-size: calc(var(--spacing-s) * 2.6);
    --button-background-size: calc(var(--kb-mehr-size) / 2) !important;
}

@media only screen and (min-width: 980px) {
    .has-hover .kb-mehr-btn:hover,
    .has-hover .kb-mehr-btn:active:hover,
    .kb-mehr-btn:focus-visible {
        --kb-mehr-size: calc(var(--spacing-s) * 3.45);
    }
}

.has-hover .kb-mehr-btn:hover:after,
.has-hover .kb-mehr-btn:active:hover:after,
.kb-mehr-btn:focus-visible:after {
    transform: scale(1) !important;
}

.has-hover .kb-mehr-btn:hover .kb-mehr-btn__label,
.has-hover .kb-mehr-btn:active:hover .kb-mehr-btn__label,
.kb-mehr-btn:focus-visible .kb-mehr-btn__label {
    transform: translateY(0.04em) scale(1.18);
}

#architecture .architecture__title-o > .architecture__modal-button .btn.kb-mehr-btn {
    /* Slightly larger so it fills the Ö counter */
    pointer-events: auto !important;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 61;
    /* Optical center in the Ö counter — slight left bias */
    top: calc(var(--spacing-s) * 0.35);
    left: calc(var(--spacing-s) * 0.12);
    --kb-mehr-size: calc(var(--spacing-s) * 3.15);
    transition:
        width var(--transition-duration, 0.4s) var(--transition-easing, cubic-bezier(0.25, 0.74, 0.22, 0.99)),
        height var(--transition-duration, 0.4s) var(--transition-easing, cubic-bezier(0.25, 0.74, 0.22, 0.99)),
        top var(--transition-duration, 0.4s) var(--transition-easing, cubic-bezier(0.25, 0.74, 0.22, 0.99)),
        left var(--transition-duration, 0.4s) var(--transition-easing, cubic-bezier(0.25, 0.74, 0.22, 0.99));
}

@media only screen and (min-width: 980px) {
    #architecture .architecture__title-o > .architecture__modal-button .btn.kb-mehr-btn {
        --kb-mehr-size: calc(var(--spacing-s) * 4);
        top: calc(var(--spacing-s) * 0.4);
        left: calc(var(--spacing-s) * 0.18);
    }

    .has-hover #architecture .architecture__title-o > .architecture__modal-button .btn.kb-mehr-btn:hover,
    .has-hover #architecture .architecture__title-o > .architecture__modal-button .btn.kb-mehr-btn:active:hover,
    #architecture .architecture__title-o > .architecture__modal-button .btn.kb-mehr-btn:focus-visible {
        --kb-mehr-size: calc(var(--spacing-s) * 3.45);
    }
}

@media only screen and (max-width: 979px) {
    .has-hover #architecture .architecture__title-o > .architecture__modal-button .btn.kb-mehr-btn:hover,
    .has-hover #architecture .architecture__title-o > .architecture__modal-button .btn.kb-mehr-btn:active:hover,
    #architecture .architecture__title-o > .architecture__modal-button .btn.kb-mehr-btn:focus-visible {
        --kb-mehr-size: calc(var(--spacing-s) * 2.75);
    }
}

#architecture .architecture__title-o > .architecture__modal-button .kb-mehr-btn__label {
    font-size: 1.35rem;
}

@media only screen and (min-width: 1440px) {
    #architecture .architecture__title-o > .architecture__modal-button .kb-mehr-btn__label {
        font-size: 1.55rem;
    }
}

/* Start hidden until scroll timeline runs button-in */
@media only screen and (min-width: 980px) {
    .js #architecture .architecture__title-o > .architecture__modal-button.is-invisible--lg-up-js,
    .js #architecture .architecture__title-o > .architecture__modal-button.animation--button-in--inactive {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .js #architecture .architecture__title-o > .architecture__modal-button.is-invisible--lg-up-js .btn,
    .js #architecture .architecture__title-o > .architecture__modal-button.animation--button-in--inactive .btn {
        pointer-events: none !important;
    }

    .js #architecture .architecture__title-o > .architecture__modal-button.is-invisible--lg-up-js .btn:after,
    .js #architecture .architecture__title-o > .architecture__modal-button.animation--button-in--inactive .btn:after {
        transform: scale(0) !important;
    }
}

/* Scroll timeline still targets architecture-next — keep in DOM, hide UI */
#architecture .architecture__next {
    display: none !important;
}

@media only screen and (min-width: 980px) {
    #architecture .architecture__circle {
        padding-left: calc(var(--spacing-l) * 0.25);
        padding-right: calc(var(--spacing-l) * 0.25);
    }

    /* Title + button above left copy cell so + stays clickable */
    #architecture [data-custom-scroll-id="architecture-title-wrapper"] {
        z-index: 40;
    }

    /*
     * LÖSUNGEN: bottom-align with the right portrait (circle) cell.
     * Same pattern as PROZESS (layout__title-lb) — title sat at the top of
     * the y1 row, so its baseline floated above the circle’s Unterkante.
     */
    #architecture .architecture__title-wrap.layout__title-lb {
        width: var(--layout-width);
        transform-origin: left bottom;
    }

    #architecture .architecture__title-wrap.layout__title-lb .architecture__next {
        bottom: 100%;
        padding-bottom: calc(var(--spacing-s) * 2);
    }

    #architecture [data-custom-scroll-id="architecture-sub-title-wrapper"],
    #architecture [data-custom-scroll-id="architecture-text-wrapper"] {
        z-index: 2;
        pointer-events: none;
    }

    #architecture [data-custom-scroll-id="architecture-text-wrapper"] a {
        pointer-events: auto;
    }
}

/* Body under THREE PATHS — same type as hero intro__text (text--lead) */
#architecture [data-custom-scroll-id="architecture-sub-title-wrapper"] {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

#architecture [data-custom-scroll-id="architecture-text"] {
    margin: calc(0.65rem + 20px) 0 0;
    padding-left: 0;
    padding-right: calc(var(--spacing-s) * 1.75);
    max-width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    /* 30% smaller than hero text--lead (~2rem) */
    font-size: calc(2rem * 0.7) !important;
    line-height: 1.35;
    letter-spacing: 0.01em;
}

@media only screen and (min-width: 980px) {
    #architecture [data-custom-scroll-id="architecture-text"] {
        margin-top: calc(0.75rem + 20px);
        padding-right: calc(var(--spacing-l) * 1.5);
        font-size: calc((1.36111rem + 6.38889 * ((100vw - 980px) / 460)) * 0.7) !important;
    }

    #architecture [data-custom-scroll-id="architecture-text-wrapper"] {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding-top: 0.5rem;
    }
}

@media only screen and (min-width: 1440px) {
    #architecture [data-custom-scroll-id="architecture-text"] {
        font-size: calc(2.8rem * 0.7) !important;
    }
}

:root {
    --kb-img-radius: 1.25rem;
}

.layout__background--rounded,
.layout__background--rounded img,
.layout__background--contact,
.layout__background--contact img,
.architecture__circle,
.architecture__circle .layout__background--rounded,
.architecture__circle .layout__background--rounded img,
.architecture-quote__image,
.architecture-quote__image img,
.architecture-quote__image picture,
.interior-comfort__image,
.interior-comfort__image img,
.interior-comfort__image picture,
.apartments__more,
.apartments__more img,
.apartments__more picture,
.intro__middle__deco,
.intro__middle__deco video,
.intro__middle__deco picture,
.intro__middle__deco picture img,
.image-comparison,
.image-comparison__content,
.details-modal__image img,
.details-modal__image picture,
#territory [data-custom-scroll-id="territory-image"],
#territory [data-custom-scroll-id="territory-image"] .layout__background,
#territory [data-custom-scroll-id="territory-image"] .layout__background img,
#territory [data-custom-scroll-id="territory-image"] picture {
    border-radius: var(--kb-img-radius) !important;
}

.architecture__circle,
.architecture-quote__image,
.interior-comfort__image,
.apartments__more,
.image-comparison,
.image-comparison__content,
.intro__middle__deco,
#territory [data-custom-scroll-id="territory-image"] {
    overflow: hidden;
    overflow: clip;
}

#architecture .architecture-quote__image {
    overflow: visible !important;
}

/* Keep full-bleed theatre backgrounds sharp-edged when expanded */
.architecture__background-wrapper.layout__part--fullscreen .architecture__background,
.architecture__background-wrapper.layout__part--fullscreen .architecture__background img,
.architecture__background-wrapper.layout__part--w4 .architecture__background,
.architecture__background-wrapper.layout__part--w4 .architecture__background img {
    border-radius: 0 !important;
}

/* Quote panel: top corners match image radius */
#architecture [data-custom-scroll-id="architecture-quote"] .architecture-quote {
    border-radius: var(--sol-radius, 1.25rem) var(--sol-radius, 1.25rem) 0 0;
}

/* Quote: text under the image, black */
#architecture .architecture-quote__text {
    color: #000 !important;
}

/*
 * Quote panel is h2-large (taller than layout-height). Ever's default
 * hidden-bottom offset can leave the top of the photo peeking under
 * SOLUTIONS — push it fully off-screen by its own height.
 */
@media only screen and (min-width: 980px) {
    #architecture [data-custom-scroll-id="architecture-quote"].layout__part--hidden-bottom {
        transform: translateY(calc(100% + var(--spacing-l) * 2)) !important;
        pointer-events: none;
    }

    #architecture.section--no-overflow,
    #architecture.section--no-overflow > .section__content {
        overflow: hidden !important;
    }
}

@media only screen and (min-width: 980px) {
    #architecture .architecture-quote__image {
        top: calc(var(--spacing-l) * 0.75) !important;
        bottom: calc(var(--spacing-l) * 3.25) !important;
        width: min(42vw, 520px) !important;
        max-width: 90% !important;
        overflow: visible !important;
    }

    #architecture .architecture-quote__image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: var(--sol-radius, 1.25rem);
    }

    #architecture .architecture-quote__image picture {
        display: block;
        width: 100%;
        height: 100%;
        border-radius: var(--sol-radius, 1.25rem);
        overflow: hidden;
    }

    #architecture .architecture-quote__text {
        position: absolute !important;
        left: calc(var(--spacing-l) * 1.5) !important;
        right: calc(var(--spacing-l) * 1.5) !important;
        top: auto !important;
        bottom: calc(var(--spacing-l) * 1.1) !important;
        margin: 0 !important;
        transform: none !important;
        text-align: center;
        color: #000 !important;
    }
}

/* Author badge — bottom-right on the photo, blue marker */
#architecture .architecture-quote__author {
    position: absolute !important;
    left: auto !important;
    right: 0.75rem !important;
    bottom: 0.75rem !important;
    z-index: 3;
    margin: 0 !important;
    padding: 0.55rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    background: #1a4a5c;
    color: #fff !important;
    border-radius: 0.5rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    text-align: left;
    max-width: calc(100% - 1.5rem);
}

#architecture .architecture-quote__author-name {
    display: block;
    font-weight: 500;
    color: #fff !important;
    font-size: 0.95em;
    line-height: 1.2;
}

#architecture .architecture-quote__author-role {
    display: block;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 0.8em;
    line-height: 1.25;
}

@media only screen and (max-width: 979px) {
    #architecture .architecture-quote__image {
        position: relative;
        overflow: visible !important;
    }

    #architecture .architecture-quote__author {
        right: 0.5rem !important;
        bottom: 0.5rem !important;
    }
}

@media only screen and (max-width: 979px) {
    #architecture .architecture-quote__text {
        position: relative !important;
        margin-top: calc(var(--spacing-s) * 1.25) !important;
        transform: none !important;
        color: #000 !important;
    }
}

/* Solutions gallery: counter + arrows on top, description text at bottom */
@media only screen and (min-width: 980px) {
    /*
     * Content must stay full-height — counter is position:absolute;top
     * inside it. Collapsing to bottom-only hid the giant step number.
     */
    #architecture .architecture__gallery__content {
        top: 0 !important;
        bottom: 0 !important;
        width: 100%;
        overflow: visible;
    }

    #architecture .architecture__gallery__counter {
        position: absolute !important;
        top: calc(var(--header-height, 4.5rem) + var(--spacing-s)) !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translateX(-50%);
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        text-align: center;
        z-index: 1;
        line-height: 0.85;
        pointer-events: none;
        width: max-content;
        max-width: 100%;
        anchor-name: --kb-gal-num;
    }
    #architecture .architecture__gallery__nav {
        top: calc(var(--header-height, 4.5rem) + var(--spacing-l) * 1.25) !important;
        bottom: auto !important;
        z-index: 50;
        pointer-events: auto !important;
        transform: none;
    }

    @supports (top: anchor(--kb-gal-num bottom)) {
        #architecture .architecture__gallery__nav {
            top: anchor(--kb-gal-num bottom) !important;
            transform: translateY(-50%);
            pointer-events: auto !important;
            z-index: 50;
        }
    }

    #architecture .architecture__gallery__content .tabs-contents,
    #architecture .architecture__gallery__content .tabs-contents--bottom {
        position: static !important;
    }

    #architecture .architecture__gallery__content .tabs-contents__content {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100% !important;
    }
}

/* Process gallery: counter + arrows on top, phase description at bottom */
@media only screen and (min-width: 980px) {
    /*
     * Gallery image slot is x0 w4 (left). Cascade thumbs still live in
     * x2 — when they expand (--full), shift left by one x2 offset so they
     * land on the left slot instead of stacking a second copy on the right.
     */
    #interior .interior__image--full {
        left: calc(
            -1 * ((100vw - var(--spacing-l) * 2 - var(--spacing-s) * 10) / 6 * 2 + 2 * var(--spacing-s) * 2)
        ) !important;
        right: auto !important;
        width: var(--layout-width-4) !important;
        transform: none !important;
    }

    /* Right rail: solid panel so copy/counter aren't over the photo */
    #interior [data-custom-scroll-id="interior-gallery-description"] {
        z-index: 3;
        background: var(--t-background, #e8e8e8);
    }

    #interior .architecture__gallery__content {
        top: 0 !important;
        bottom: 0 !important;
        width: 100%;
        overflow: visible;
    }

    #interior .architecture__gallery__counter {
        position: absolute !important;
        top: calc(var(--spacing-l) * 1.15) !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translateX(-50%);
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        text-align: center;
        z-index: 1;
        line-height: 0.85;
        pointer-events: none;
        width: max-content;
        max-width: 100%;
        anchor-name: --kb-int-gal-num;
    }

    #interior .architecture__gallery__nav {
        top: calc(var(--spacing-l) * 1.15 + clamp(6rem, 14vw, 18rem)) !important;
        bottom: auto !important;
        z-index: 2;
        transform: translateY(-50%);
    }

    @supports (top: anchor(--kb-int-gal-num bottom)) {
        #interior .architecture__gallery__nav {
            top: anchor(--kb-int-gal-num bottom) !important;
            transform: translateY(-50%);
        }
    }

    #interior .architecture__gallery__content .tabs-contents,
    #interior .architecture__gallery__content .tabs-contents--bottom {
        position: static !important;
    }

    #interior .architecture__gallery__content .tabs-contents__content {
        position: absolute !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100% !important;
    }
}

/* Modal titles: handled by .details-modal__banner__title (square banner overlay) */

#architecture-info .details-modal__image > p.architecture-info__lede,
#architecture-info .architecture-info__lede {
    color: #000 !important;
    text-align: center;
    margin-top: calc(var(--spacing-s) * 1.25) !important;
    margin-left: auto;
    margin-right: auto;
    max-width: 42rem;
    /* 20% smaller than .h5 */
    font-size: calc(2rem * 0.8) !important;
    line-height: 1.4;
}

@media only screen and (min-width: 980px) {
    #architecture-info .architecture-info__lede {
        font-size: calc((1.8375rem + 8.625 * ((100vw - 980px) / 460)) * 0.8) !important;
    }
}

@media only screen and (min-width: 1440px) {
    #architecture-info .architecture-info__lede {
        font-size: calc(4rem * 0.8) !important;
    }
}

/* Process modal (#interior-info): lede under photo, no overlap, −12% vs h5 */
#interior-info .details-modal__image > p.interior-info__lede,
#interior-info .interior-info__lede {
    text-align: center;
    margin-top: calc(var(--spacing-s) * 1.25) !important;
    margin-left: auto;
    margin-right: auto;
    max-width: 42rem;
    /* was −20%; +10% from that = 0.88 of .h5 */
    font-size: calc(2rem * 0.88) !important;
    line-height: 1.4;
}

@media only screen and (min-width: 980px) {
    #interior-info .interior-info__lede {
        font-size: calc((1.8375rem + 8.625 * ((100vw - 980px) / 460)) * 0.88) !important;
    }
}

@media only screen and (min-width: 1440px) {
    #interior-info .interior-info__lede {
        font-size: calc(4rem * 0.88) !important;
    }
}

/* Why Us modal (#territory-info): lede under photo, black, ~full size */
#territory-info .details-modal__image > p.territory-info__lede,
#territory-info .territory-info__lede {
    color: #000 !important;
    text-align: center;
    margin-top: calc(var(--spacing-s) * 1.25) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    /* Wider so it wraps to ~2 lines, not 4 */
    max-width: min(92%, 52rem) !important;
    width: 100%;
    padding: 0 var(--spacing-s);
    box-sizing: border-box;
    font-size: calc(2rem * 0.99) !important;
    line-height: 1.35;
}

@media only screen and (min-width: 980px) {
    #territory-info .territory-info__lede {
        font-size: calc((1.8375rem + 8.625 * ((100vw - 980px) / 460)) * 0.99) !important;
        max-width: min(96%, 56rem) !important;
    }

    /* Override Ever narrow-modal p constraint */
    #territory-info .details-modal__image--narrow p.territory-info__lede {
        max-width: min(96%, 56rem) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

@media only screen and (min-width: 1440px) {
    #territory-info .territory-info__lede {
        font-size: calc(4rem * 0.99) !important;
        max-width: min(96%, 60rem) !important;
    }
}

/* Why Us slider: Honest / Insiders / Trusted / Proven titles + body → black */
#territory .territory-slider-title,
#territory .territory-slider-text {
    color: #000 !important;
}

/*
 * MEHR disc on WARUM WIR: ui-green maps --t-secondary to warm-2 (#8c98a4) → pale on photo.
 * Match PROZESS (ui-warm-2): dark warm-3 fill + lighter label.
 */
#territory .kb-mehr-btn {
    --t-secondary: var(--c-warm-3);
    --t-background: var(--c-warm-2);
    color: var(--c-warm-2) !important;
}

#territory .kb-mehr-btn:after {
    box-shadow: inset 0 0 0 var(--button-background-size) var(--c-warm-3) !important;
}

#territory .kb-mehr-btn:before {
    background: var(--c-warm-3) !important;
}

.has-hover #territory .kb-mehr-btn:hover,
.has-hover #territory .kb-mehr-btn:active:hover,
#territory .kb-mehr-btn:focus-visible {
    color: var(--c-warm-2) !important;
}

/*
 * Why Us slider (Ehrlich etc.): left warm rail = full-bleed photo.
 * Clear nav / “Built on trust”, move slide image into the gray column,
 * leave title + body on the teal right side.
 */
@media only screen and (min-width: 980px) {
    #territory .territory-nav,
    #territory .territory-nav-title {
        display: none !important;
    }

    #territory .territory-slider-top {
        left: calc(var(--spacing-l) * -1) !important;
        width: calc(var(--layout-width-2) + var(--spacing-l) * 2) !important;
        top: calc(var(--header-height) * -1 - var(--spacing-s)) !important;
        height: var(--viewport-height) !important;
        z-index: 2;
        overflow: hidden;
    }

    #territory .territory-slider-top,
    #territory .territory-slider-top .tabs-contents__content {
        height: var(--viewport-height) !important;
    }

    #territory .territory-slider-top .layout__background,
    #territory .territory-slider-top .layout__background picture,
    #territory .territory-slider-top .layout__background img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    #territory .territory-slider-top .layout__part__border {
        display: none !important;
    }
}

/*
 * Why Us (#territory) desktop — Variante B:
 * Image right · WARUM WIR top-left (image top edge) · sub + body left under title
 */
@media only screen and (min-width: 980px) {
    #territory [data-custom-scroll-id="territory-title-block"] {
        z-index: 4;
        pointer-events: none;
        overflow: visible;
    }

    #territory .territory__title {
        margin-left: 0 !important;
        margin-right: 0 !important;
        white-space: nowrap;
        pointer-events: none;
        /* Midnight — lesbar auf hellem Bildüberlapp; leichter Halo auf Teal */
        color: #10192b !important;
        text-shadow: 0 1px 0 rgba(248, 243, 233, 0.35);
    }

    /* Scroll target still exists; arrow sat above bottom title — hide at top */
    #territory .territory__next {
        display: none !important;
    }

    /* Subheadline under the large title, left column */
    #territory [data-custom-scroll-id="territory-sub-title-block"] {
        z-index: 5;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: flex-start;
        padding-top: calc(var(--lh, 1em) * 0.15 + 4.5rem);
        box-sizing: border-box;
    }

    #territory [data-custom-scroll-id="territory-sub-title"] {
        text-align: left;
        max-width: 100%;
    }

    /* MEHR — bottom-right inside the photo (keep inset so no-overflow clips cleanly) */
    #territory [data-custom-scroll-id="territory-image"] {
        z-index: 1;
    }

    /*
     * Same peek bug as architecture-quote: hidden-bottom offset can leave the
     * top of the photo visible under the fullscreen background. Push fully off.
     */
    #territory [data-custom-scroll-id="territory-image"].layout__part--hidden-bottom {
        transform: translateY(calc(100% + var(--spacing-l) * 2)) !important;
        pointer-events: none;
    }

    #territory.section--no-overflow,
    #territory.section--no-overflow > .section__content {
        overflow: hidden !important;
    }

    #territory .territory__modal-button {
        position: absolute;
        right: calc(var(--spacing-s) * 1.25);
        bottom: calc(var(--spacing-s) * 1.25);
        left: auto;
        top: auto;
        z-index: 6;
        pointer-events: auto;
    }

    #territory [data-custom-scroll-id="territory-text"] {
        z-index: 5;
        align-items: flex-start;
        text-align: left;
    }

    #territory [data-custom-scroll-id="territory-text"] .layout__text {
        text-align: left;
        max-width: 100%;
    }
}

/* Surroundings modal (#location-info): lede under photo, no overlap */
#location-info .details-modal__image > p.location-info__lede,
#location-info .location-info__lede {
    text-align: center;
    margin-top: calc(var(--spacing-s) * 1.75) !important;
    margin-bottom: calc(var(--spacing-s) * 0.5) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    /* Wider so it wraps to ~2 lines, not 3 */
    max-width: min(100%, 64rem) !important;
    width: 100%;
    padding-top: calc(var(--spacing-s) * 0.5);
    padding-bottom: calc(var(--spacing-s) * 0.75);
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
    line-height: 1.3;
}

@media only screen and (min-width: 980px) {
    #location-info .details-modal__image--narrow p.location-info__lede {
        max-width: min(100%, 68rem) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        margin-top: calc(var(--spacing-s) * 2) !important;
        padding-top: calc(var(--spacing-s) * 0.65);
        padding-bottom: var(--spacing-s);
    }
}

@media only screen and (min-width: 1440px) {
    #location-info .location-info__lede {
        max-width: min(100%, 72rem) !important;
    }
}

/* Second location-info caption: −10%, ~2 lines, more padding */
#location-info .location-info__lede--wide {
    text-align: center;
    margin-top: calc(var(--spacing-s) * 2) !important;
    margin-bottom: calc(var(--spacing-s) * 1.25) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: min(100%, 68rem) !important;
    width: 100%;
    padding: calc(var(--spacing-s) * 0.85) calc(var(--spacing-s) * 0.5);
    box-sizing: border-box;
    line-height: 1.3;
    font-size: calc(2rem * 0.9) !important;
}

@media only screen and (min-width: 980px) {
    #location-info .location-info__lede--wide {
        font-size: calc((1.8375rem + 8.625 * ((100vw - 980px) / 460)) * 0.9) !important;
        max-width: min(100%, 72rem) !important;
        padding: var(--spacing-s) var(--spacing-s);
        margin-top: calc(var(--spacing-s) * 2.25) !important;
        margin-bottom: calc(var(--spacing-s) * 1.5) !important;
    }
}

@media only screen and (min-width: 1440px) {
    #location-info .location-info__lede--wide {
        font-size: calc(4rem * 0.9) !important;
        max-width: min(100%, 76rem) !important;
        padding: calc(var(--spacing-s) * 1.15) var(--spacing-l);
    }
}

/* Footer marquee: PNG has black bg — knock it out on the cold footer */
.footer--cold:not(.kb-footer-band) .footer__top__images img {
    mix-blend-mode: screen;
    height: auto;
    max-height: 250px;
    width: auto;
}

/* Menu: CTA banners removed — links use the full width */
.menu__left {
    width: 100% !important;
    flex: 1 1 100% !important;
    max-width: 100%;
    padding-right: 0 !important;
}

/* ==========================================================================
   Info-modals: square banner head + text list (no icon grid)
   architecture / interior / territory / location / apartments
   ========================================================================== */

#architecture-info .modal__close,
#interior-info .modal__close,
#territory-info .modal__close,
#location-info .modal__close,
#apartments-modal .modal__close {
    left: var(--spacing-l);
    right: auto;
    top: var(--spacing-l);
    z-index: 3;
}

.details-modal__banner {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    overflow: clip;
    background: #111;
}

.details-modal__banner__media,
.details-modal__banner__media picture,
.details-modal__banner__media img {
    position: absolute !important;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    object-fit: cover;
}

.details-modal__banner__media picture {
    z-index: 0;
}

.details-modal__banner::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.35) 38%,
        rgba(0, 0, 0, 0.08) 62%,
        transparent 78%
    );
}

.details-modal__banner__title,
#architecture-info .details-modal__banner__title,
#interior-info .details-modal__banner__title,
#territory-info .details-modal__banner__title,
#location-info .details-modal__banner__title,
#apartments-modal .details-modal__banner__title {
    position: absolute !important;
    z-index: 2;
    left: auto !important;
    right: var(--spacing-l) !important;
    bottom: var(--spacing-l) !important;
    top: auto !important;
    margin: 0 !important;
    width: 80% !important;
    max-width: 80% !important;
    padding: 0 !important;
    text-align: right !important;
    white-space: normal !important;
    color: #fff !important;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4);
    font-size: clamp(1.85rem, 3.2vw, 3.2rem) !important;
    line-height: 1.12 !important;
    letter-spacing: 0.02em;
}

@media only screen and (min-width: 980px) {
    .details-modal__banner__title,
    #architecture-info .details-modal__banner__title,
    #interior-info .details-modal__banner__title,
    #territory-info .details-modal__banner__title,
    #location-info .details-modal__banner__title,
    #apartments-modal .details-modal__banner__title {
        width: 80% !important;
        max-width: 80% !important;
        font-size: clamp(2.2rem, 2.1vw, 3.6rem) !important;
        right: calc(var(--spacing-l) * 1.15) !important;
        bottom: calc(var(--spacing-l) * 1.15) !important;
    }
}

/* Text-only feature rows (replaces 2×2 icon grid) */
.details-modal__list {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    margin-top: calc(var(--spacing-s) * 1.5);
    margin-bottom: calc(var(--spacing-s) * 1.5);
    border-top: 1px solid var(--t-line);
}

.details-modal__list:before {
    content: none !important;
    display: none !important;
}

.details-modal__list__item {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    flex: 0 0 auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: calc(var(--spacing-s) * 1.15) 0 !important;
    border-bottom: 1px solid var(--t-line);
    color: var(--t-heading);
}

.details-modal__list__item:before,
.details-modal__list__item:after {
    content: none !important;
    display: none !important;
    border: 0 !important;
}

.details-modal__list__item .icon {
    display: none !important;
}

.details-modal__list__item__text {
    position: static !important;
    left: auto !important;
    bottom: auto !important;
    display: block !important;
    padding: 0 !important;
}

.details-modal__list__item__text br {
    display: none;
}

#architecture-info .details-modal__list + .details-modal__big-text,
#interior-info .details-modal__list + .details-modal__big-text,
#apartments-modal .details-modal__list + .details-modal__article,
.details-modal__list + .details-modal__article {
    margin-top: calc(var(--spacing-s) * 2);
}
