/* FOOTER */
.footer a {
    opacity: 0.8;
}

.footer a:hover,
.footer a:focus-visible {
    opacity: 1;
}

.footer__reveal {
    position: relative;
}

.footer__top {
    min-height: 100vh;
    display: flex;
}

.footer__top-text {
    flex: 0 1 50%;
    background-color: var(--bone);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-m);
}

.footer__top-text h2 {
    max-width: 14ch;
}

.footer__top-text p {
    max-width: 45ch;
}

.footer__top-form {
    flex: 0 1 50%;
    background-color: var(--white);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer__bottom {
    background-color: var(--black);
    color: var(--white);
    padding: var(--space-l);
}

.footer__bottom-top {
    display: flex;
    justify-content: space-between;
    gap: var(--space-m);
    width: 50%;
    margin-left: auto;
    margin-bottom: var(--space-xxl);
}

.footer__bottom-top__item {
    flex: 0 1 33.33%;
    display: flex;
    flex-direction: column;
}

.footer__bottom-top__item h3 {
    margin-bottom: var(--space-m);
}

.footer__bottom-top__item a {
    margin-bottom: var(--space-xxs);
}

.footer__bottom-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-block: var(--space-m);
}

.footer__bottom-img {
    flex: 0 1 50%;
}

.footer__bottom-text {
    flex: 0 1 50%;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.footer__bottom-copyright {
    flex: 0 1 33.333%;
}

.footer__bottom-legal {
    flex: 0 1 66.666%;
    display: flex;
    gap: var(--space-s);
}

.footer__disclaimer {
    background-color: var(--grey-dark);
    padding: var(--space-m) var(--space-l);
    display: flex;
    gap: 0;
    color: var(--white);
}

.footer__disclaimer p {
    margin-bottom: 0;
    margin-right: var(--space-m);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'General Sans', sans-serif;
}


.footer__bottom-top__item a.active {
    display: inline-block;
}

.footer__bottom-top__item a.active::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid rgba(255,255,255,.75);
    border-radius: 50%;
    margin-right: .15rem;
    vertical-align: middle;
    box-sizing: border-box;
    margin-bottom: 3px;
    transition: var(--transition);
}

@media (max-width: 1200px) {
    .footer__bottom-top {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        gap: var(--space-l);
    }
    
    .footer__bottom-bottom {
       flex-direction: column;
       align-items: flex-start;
       gap: var(--space-m);
    }

    .footer__bottom-top__item {
        flex: 0 1 auto;
    }
    .footer__bottom-text {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: var(--space-xs);
    }
}

@media (max-width: 991px) {
    .footer__top {
        flex-direction: column;
    }
    .footer__top-text {
        flex: 0 1 100%;
        padding: var(--space-l) var(--space-s) var(--space-l) var(--space-s);
    }
    .footer__top-form {
        flex: 0 1 100%;
        padding: var(--space-s);
    }
    .footer__bottom {
        padding: var(--space-s);
    }
    .footer__bottom-top {
        flex-direction: column;
        gap: var(--space-m);
        margin-bottom: var(--space-m);
    }
    .footer__bottom-bottom {
        gap: var(--space-s);
        flex-direction: column-reverse;
    }
    .footer__bottom-legal {
        flex-direction: column;
        gap: var(--space-xs);
    }
    .footer__bottom-img {
        margin-top: var(--space-l);
    }
    .footer__bottom-top__item h3 {
        margin-bottom: var(--space-s);
    }
    .footer__disclaimer p {
        margin-right: 0;
    }
    .footer__disclaimer {
        flex-direction: column;
        gap: var(--space-s);
        padding: var(--space-s);
    }
}

/* DESKTOP — footer dentro de la escena pinneada */
@media (min-width: 992px) {
    section.index-scene .index-scene__stage > .footer,
    section.residences-scene .residences-scene__stage > .footer,
    section.living-here-scene .living-here-scene__stage > .footer {
        position: absolute;
        inset: 0;
        z-index: 5;
        min-height: 100vh;
        padding: 0;
        overflow: hidden;
        visibility: hidden;
    }

    section.index-scene .index-scene__stage > .footer .footer__reveal,
    section.residences-scene .residences-scene__stage > .footer .footer__reveal,
    section.living-here-scene .living-here-scene__stage > .footer .footer__reveal {
        position: relative;
        height: 100vh;
        overflow: hidden;
    }

    section.index-scene .index-scene__stage > .footer .footer__rest,
    section.residences-scene .residences-scene__stage > .footer .footer__rest,
    section.living-here-scene .living-here-scene__stage > .footer .footer__rest {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
    }

    section.index-scene .index-scene__stage > .footer .footer__top,
    section.residences-scene .residences-scene__stage > .footer .footer__top,
    section.living-here-scene .living-here-scene__stage > .footer .footer__top {
        position: relative;
        z-index: 2;
        will-change: transform;
    }
}

@media (max-width: 991px) {
    .footer__top {
        min-height: auto;
    }

    .footer__reveal {
        display: contents;
    }

    .footer__rest {
        display: contents;
    }

    section.index-scene .index-scene__stage > .footer,
    section.residences-scene .residences-scene__stage > .footer,
    section.living-here-scene .living-here-scene__stage > .footer,
    .footer {
        position: relative;
        z-index: 10;
        inset: auto;
        min-height: 0;
        overflow: visible;
        padding: 0;
        visibility: visible;
        opacity: 1;
        background-color: var(--bone);
        isolation: isolate;
    }
}