/* Colors */

:root {
    --des-rgb-lime: 207, 218, 128;
    --des-rgb-green: 108, 113, 95;
    --des-rgb-dark-green: 82, 85, 70;
    --des-rgb-dark: 20, 20, 20;
    --des-rgb-darker-green: 48, 51, 28;

    --des-rgb-black: 0, 0, 0;
    --des-rgb-white: 255, 255, 255;
}

/* Fonts */

@font-face {
    font-family: 'Autography';
    src: url("/assets/fonts/Autography.otf") format('opentype');
}

/* General styles */

:root {
    font-size: 20px;
}

body {
    background-color: rgb(var(--des-rgb-green));
    font-family: 'Crimson Text', serif;

    color: rgb(var(--des-rgb-white));
}

/* main {
    position: relative;
}

main>section {
    position: relative;
}
 */

.background-overlay:before {
    content: '';
    background-color: rgba(var(--des-rgb-black), 0.15);
    position: absolute;
    top: 0%;
    left: 0%;
    height: 100%;
    width: 100%;
}

.background-overlay-green:before {
    content: '';
    background-color: rgba(var(--des-rgb-green), 0.85);
    position: absolute;
    top: 0%;
    left: 0%;
    height: 100%;
    width: 100%;
}

/* .framed {
    position: relative;
}

.framed::before,
.framed::after {
    content: "";
    position: absolute;
    background-color: rgb(var(--des-rgb-lime));
    z-index: 1;
}

.framed::before {
    width: min(2.5vw, 14px);
    height: clamp(80px, 27vw, 220px);
    left: 90%;
    top: 0%;
}

.framed::after {
    width: min(200px, 40vw);
    height: min(2.5vw, 14px);
    left: 0%;
    top: 87%;
} */

.mask {
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: 50% 0;
    background-color: rgb(var(--des-rgb-dark));
    z-index: 9999;
}

.mask.hidden {
    transform: scaleY(0%);
}

.material-symbols-outlined {
    font-size: 2.1rem;
}

/* Main Navbar */

.navbar {
    display: block;
    overflow: visible;

    .inline-navbar {
        align-items: center;
        display: flex;
        justify-content: space-between;
        padding: 24px 5vw 0;
        height: 74px;
        transition:
            backdrop-filter .6s ease 0s,
            background-color .6s ease .3s,
            padding .6s ease .9s;
        transition-delay: 0s;

        @media (min-width: 992px) {
            height: 100px;
            padding: 44px 40px 0;
        }

        .inline-col {
            display: inline-flex;
            vertical-align: middle;
        }

        .navbar-logo {
            justify-content: center;
            text-align: center;
            transition: all .6s ease .3s;
        }

        .logo-link {
            display: inline-flex;
            margin: auto;
            pointer-events: auto;
            text-decoration: none;
            transition: all .6s ease .3s;
        }

        .logo-img {
            max-height: 50px;
            width: 100%;

            @media (min-width: 992px) {
                max-height: 55px;
            }
        }

        .nav-item {
            font-weight: 600;
            text-transform: uppercase;
        }
    }

    /* Reveal logo on scroll */
    &.-logo-on-scroll {
        .logo-link {
            opacity: 0;
        }

        &.has-scrolled .logo-link {
            opacity: 1;
            transition-delay: 1.2s;
        }
    }

    /* Scrolled */
    &.has-scrolled .inline-navbar {
        background-color: rgba(var(--des-rgb-green), .7);
        backdrop-filter: blur(20px);
        padding-top: 0 !important;
        pointer-events: auto;
        transition:
            padding .6s ease 0s,
            background-color .6s ease .6s,
            backdrop-filter .6s ease .9s;
    }
}

/* .navbar .offcanvas {
    width: 200px;
} */

/*.navbar-collapse {
    text-align: center;
}

.nav-item {
    flex-grow: 1;
}

.nav-item:hover {
    background-color: #000;
    color: #f70 !important;
}

.nav-item a:hover {
    color: #f70 !important;
}*/

/* Hero */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;

    .hero-background {
        position: absolute;
        top: 0%;
        left: 0%;
        height: 100%;
        width: 100%;
    }

    video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .hero-content {
        position: relative;
        height: 100%;
        width: 100%;
    }

    .hero-main {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-evenly;
        height: 100%;
        width: 100%;
        padding: 10vh 5vw;
        background: linear-gradient(rgba(var(--des-rgb-green), 0.66) 60%, rgba(var(--des-rgb-green), 1) 99%);
    }

    .hero-logo {
        width: min(1200px, 80vw, 80vh);
        margin: 0;
    }

    ul {
        display: flex;
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: center;
        margin: 0;
        padding: 0;
        font-size: 1.5rem;
        font-variant-caps: small-caps;
        text-align: center;
    }

    li {
        padding: 0 15px;

        &::marker {
            content: "";
        }
    }

    @media (min-width: 576px) {
        ul {
            flex-direction: row;
        }

        ul :not(:last-child) {
            border-right: rgb(var(--des-rgb-white)) solid 2px;
        }
    }

    @media (orientation: landscape) and (max-height: 399.98px) {
        .hero-main {
            padding-top: 5vh;
            padding-bottom: 5vh;
        }

        ul {
            font-size: 1rem;
        }
    }
}

/* Hero arrow */

/* .hero-arrow {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 30px;
    width: 20px;
    margin: 0 auto;
    text-align: center;
}

.hero-arrow a {
    font-size: 1.5rem;
    color: rgb(var(--des-rgb-white));
}

@-webkit-keyframes home-arrow-down {
    from {
        transform: translate3d(0, 0px, 0);
        -webkit-transform: translate3d(0, 0px, 0);
        opacity: 0;
    }

    10% {
        transform: translate3d(0, 5px, 0);
        -webkit-transform: translate3d(0, 5px, 0);
        opacity: 1;
    }

    to {
        transform: translate3d(0, 30px, 0);
        -webkit-transform: translate3d(0, 30px, 0);
        opacity: 0;
    }
}

@keyframes home-arrow-down {
    from {
        transform: translate3d(0, 0px, 0);
        -webkit-transform: translate3d(0, 0px, 0);
        opacity: 0;
    }

    10% {
        transform: translate3d(0, 5px, 0);
        -webkit-transform: translate3d(0, 5px, 0);
        opacity: 1;
    }

    to {
        transform: translate3d(0, 30px, 0);
        -webkit-transform: translate3d(0, 30px, 0);
        opacity: 0;
    }
}

.home-arrow-down {
    animation: home-arrow-down 2s infinite;
    -webkit-animation: home-arrow-down 2s infinite;
    animation-play-state: running;
    -webkit-animation-play-state: running;
}

.home-arrow-down:hover {
    animation-play-state: paused;
    -webkit-animation-play-state: paused;
} */

/* Sections */

.site-section {
    position: relative;
    width: 100%;
    padding: 50px 0;
    /* text-shadow: rgb(0,0,0) -2px -2px 2px; */

    &:first-child {
        padding-top: 100px;
    }

    &:last-child {
        padding-bottom: 0;
    }

    .section-container {
        display: flex;
        flex-direction: column;
        row-gap: 1.25rem;
        column-gap: 1.25rem;
        width: 100%;
        max-width: 1488px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    h1,
    h2 {
        font-family: 'Autography', 'Crimson Text', serif;
        font-size: calc(1.5rem + 5vw);
        margin: 0;

        span.smaller {
            font-size: calc(1.5rem + 2.5vw);
        }
    }

    p {
        margin: 0.5rem 0;

        span {
            font-weight: 700;
            font-variant-caps: small-caps;
        }
    }

    .section-img {
        overflow: hidden;
        aspect-ratio: 1 / 1;
        border-radius: 0.75rem;
    }

    .section-img img,
    .section-img video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    @media (min-width:1200px) {

        h1,
        h2 {
            font-size: 4.5rem;

            span.smaller {
                font-size: 3rem;
            }
        }
    }
}

section:last-child .site-section:last-child {
    padding-bottom: 50px;
}

/* Grid */

.grid {
    display: grid;
    grid-template-rows: auto;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-columns: 1fr;
    row-gap: 1.25rem;
    column-gap: 1.25rem;
    align-items: center;
    width: 100%;

    @media (min-width: 992px) {
        row-gap: 0;
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Features */

.grid.features {
    grid-row-gap: 1.4em;
    grid-template-columns: 1fr;

    @media screen and (min-width: 576px) {
        grid-row-gap: 2.667rem;
        grid-template-columns: 1fr 1fr;
    }
}

.icon-feature {
    display: flex;
    align-items: center;
    grid-column-gap: 1.4em;
}

.boxed-icon {
    display: flex;
    flex: none;
    justify-content: center;
    align-items: center;
    border-radius: .667em;
    padding: .5em;
    background-color: rgb(var(--des-rgb-white));
}

.boxed-icon.dark {
    background-color: rgba(227, 236, 226, .15);
}

/* Intro Section */

.site-section.intro {
    .section-title {
        grid-area: 1 / 1 / span 1 / -1;
    }

    .text-1 {
        grid-area: 2 / 1 / span 1 / -1;
    }

    .img-1 img {
        object-position: 28% 65%;
    }

    .text-2 {
        grid-area: 1 / 1 / span 1 / -1;
    }

    .img-2 {
        grid-area: 2 / 1 / span 1 / -1;
    }

    .img-2 img {
        object-position: 50% 50%;
    }

    @media (min-width: 768px) {
        .text-1 {
            grid-column-start: 2;
            text-align: right;
        }

        .img-1 {
            aspect-ratio: 18 / 7;
        }

        .img-2 {
            aspect-ratio: 15 / 9;
        }

        .text-2 {
            grid-column-end: span 3;
        }
    }

    @media (min-width: 992px) {
        .text-1 {
            grid-column-start: 4;
        }

        .text-2 {
            grid-row-start: 2;
            grid-column-end: span 2;
        }

        .img-2 {
            grid-row: 1 / span 3;
            grid-column-start: 3;
        }
    }
}

/* Nuestras Villas Section */

.site-section.villas {
    background: linear-gradient(rgba(var(--des-rgb-darker-green), 0) 50px, rgb(var(--des-rgb-darker-green)) 50px);

    .section-title {
        grid-area: 1 / 1 / span 1 / -1;
    }

    .section-text {
        grid-area: 2 / 1 / span 1 / -1;
    }

    .section-img {
        grid-area: 3 / 1 / span 1 / -1;
    }

    .section-img video {
        object-position: 35%;
    }

    @media (min-width: 768px) {
        .section-title {
            text-align: right;
        }

        .section-text {
            grid-column-end: span 3;
        }

        .section-img {
            aspect-ratio: 15 / 9;
        }
    }

    @media (min-width: 992px) {
        .section-title {
            grid-row-start: 2;
            grid-column: 5 / -1;
        }

        .section-text {
            grid-row-start: 3;
            grid-column: 5 / -1;
            text-align: right;
        }

        .section-img {
            grid-row: 1 / span 4;
            grid-column-end: span 4;
        }
    }
}

/* Interior Section */

.site-section.interior {
    background-color: rgb(var(--des-rgb-lime));
    color: rgb(var(--des-rgb-darker-green));

    .section-container {
        row-gap: 2.667rem;
    }

    .section-title {
        grid-area: 1 / 1 / span 1 / -1;
    }

    .section-text {
        grid-area: 2 / 1 / span 1 / -1;
    }

    .carousel {
        overflow: hidden;
        border-radius: 0.75rem;

        .carousel-item {
            aspect-ratio: 1 / 1;
    
            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
    
            &:nth-child(1) img {
                object-position: 50% 62%;
            }
    
            &:nth-child(2) img {
                object-position: 50% 85%;
            }
    
            &:nth-child(3) img {
                object-position: 60% 100%;
            }
    
            &:nth-child(4) img {
                object-position: 25% 60%;
            }
    
            &:nth-child(5) img {
                object-position: 57% 70%;
            }
    
            &:nth-child(6) img {
                object-position: 15% 57%;
            }
        } 
    }

    @media (min-width: 768px) {
        .section-text {
            grid-column-end: span 3;
        }
    }

    @media (min-width: 768px) or (orientation: landscape) {
        .carousel .carousel-item {
            aspect-ratio: 19 / 7;
        }
    }

    @media (min-width: 992px) {
        .section-text {
            grid-column-end: span 2;
        }
    }
}

/* Arquitectura Section */

.site-section.arquitectura {
    background: linear-gradient(rgb(var(--des-rgb-lime)) 50px, rgb(var(--des-rgb-green)) 50px);

    .section-title {
        grid-area: 1 / 1 / span 1 / -1;
    }

    .section-text {
        grid-area: 2 / 1 / span 1 / -1;
    }

    .section-img {
        grid-area: 3 / 1 / span 1 / -1;
    }

    .section-img img {
        object-position: 50% 0%;
    }

    @media (min-width: 768px) {
        .section-text {
            grid-column-start: 2;
            text-align: right;
        }

        .section-img {
            aspect-ratio: 13 / 9;
        }
    }

    @media (min-width: 992px) {
        .section-title {
            grid-row-start: 2;
            grid-column: 1 / span 2;
        }

        .section-text {
            grid-row-start: 3;
            grid-column: 1 / span 2;
            text-align: left;
        }

        .section-img {
            grid-row: 1 / span 4;
            grid-column-start: 3;
        }
    }
}

/* Sentidos Section */

.site-section.sentidos {
    background: linear-gradient(rgb(var(--des-rgb-green)) 50px, rgb(var(--des-rgb-lime)) 50px);
    color: rgb(var(--des-rgb-darker-green));

    .section-gallery {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 120vh;

        .gallery-item {
            transition: all 0.5s;
            height: 100%;
            overflow: hidden;
            flex: 1;
            background-size: cover;
            background-repeat: no-repeat;
            color: rgb(var(--des-rgb-white));
            align-content: center;
            text-align: center;
            padding: 2% 5%;
            position: relative;
            border: none;

            @media (hover: hover) {
                cursor: default;
            }

            &::before {
                transition: all 0.5s;
                content: '';
                background-color: rgba(var(--des-rgb-black), 0.15);
                position: absolute;
                top: 0%;
                left: 0%;
                height: 100%;
                width: 100%;
            }

            &.vista {
                background-image: url("/assets/images/despertares-vista.jpg");
                background-position: 45%;
            }

            &.tacto {
                background-image: url("/assets/images/despertares-tacto.jpg");
                background-position: 70%;
            }

            &.olfato {
                background-image: url("/assets/images/despertares-olfato.jpg");
                background-position: 50%;
            }

            &.oido {
                background-image: url("/assets/images/despertares-oido.jpg");
                background-position: 50%;
            }

            &.gusto {
                background-image: url("/assets/images/despertares-gusto.jpg");
                background-position: 31%;
            }

            .item-content {
                transition: all 0.5s;
                transform: translateY(-3.25rem);
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                height: 0;
            }

            .item-title {
                font-family: 'Autography';
                font-size: 4rem;
                display: flex;
                justify-content: center;
                position: relative;
            }

            .item-body {
                transition: all 0s 0s;
                opacity: 0;
                position: relative;
            }

            &.focused,
            &:hover {
                flex: 10;

                &::before {
                    background-color: rgba(var(--des-rgb-black), 0.35);
                }

                .item-content {
                    transform: translateY(0%);
                    height: 100%;
                }

                .item-body {
                    opacity: 1;
                    transition: all 0.5s 0.5s;
                }
            }
        }

        @media (min-width: 768px) {
            flex-direction: row;
            height: unset;
            aspect-ratio: 15 / 7;

            .gallery-item {
                .item-content {
                    transform: translateY(calc(50% - 2rem));
                }

                .item-title {
                    font-size: calc(5vw + 1rem);
                }

                &.focused,
                &:hover {
                    flex: 25;
                }
            }
        }

        @media (min-width: 1200px) {
            .gallery-item {
                .item-title {
                    font-size: 4rem;
                }
            }
        }
    }
}

/* Spa Section */

.site-section.spa {
    background: linear-gradient(rgb(var(--des-rgb-lime)) 50px, rgb(var(--des-rgb-dark-green)) 50px);

    .section-title {
        grid-area: 1 / 1 / span 1 / -1;
    }

    .section-text {
        grid-area: 2 / 1 / span 1 / -1;
    }

    .section-img {
        grid-area: 3 / 1 / span 1 / -1;
    }

    .section-img img {
        object-position: 5%;
    }

    @media (min-width: 768px) {
        .section-text {
            grid-column-start: 2;
            text-align: right;
        }

        .section-img {
            aspect-ratio: 15 / 9;
        }
    }

    @media (min-width: 992px) {
        .section-title {
            grid-row-start: 2;
            grid-column: 1 / span 2;
        }

        .section-text {
            grid-row-start: 3;
            grid-column: 1 / span 2;
            text-align: left;
        }

        .section-img {
            grid-row: 1 / span 4;
            grid-column-start: 3;
        }
    }
}

/* Temazcal Section */

.site-section.temazcal {
    background-color: rgb(var(--des-rgb-darker-green));

    .section-title {
        grid-area: 1 / 1 / span 1 / -1;
    }

    .section-text {
        grid-area: 2 / 1 / span 1 / -1;
    }

    .section-img {
        grid-area: 3 / 1 / span 1 / -1;
    }

    .section-img img {
        object-position: 41%;
    }

    @media (min-width: 768px) {
        .section-title {
            text-align: right;
        }

        .section-text {
            grid-column-end: span 3;
        }

        .section-img {
            aspect-ratio: 15 / 9;
        }
    }

    @media (min-width: 992px) {
        .section-title {
            grid-row-start: 2;
            grid-column: 5 / -1;
        }

        .section-text {
            grid-row-start: 3;
            grid-column: 5 / -1;
            text-align: right;
        }

        .section-img {
            grid-row: 1 / span 4;
            grid-column-end: span 4;
        }
    }
}

/* Colophon */

.colophon {
    background-color: #45484a;
    text-align: center;
    padding: 3rem 3.5vw;

    h5 {
        font-weight: 700;
        font-variant-caps: small-caps;
    }

    p {
        margin-bottom: 0;
    }

    .colophon-brand {
        grid-area: 1 / 1 / span 1 / -1;
    }

    .brand-logo {
        max-width: 250px;
    }

    .colophon-contact {
        grid-area: 2 / 1 / span 1 / -1;
    }

    .colophon-socials {
        grid-area: 3 / 1 / span 1 / -1;
    }

    .colophon-socials-group {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }

    .colophon-social-logo {
        max-height: 30px;
        margin: 0 10px;
    }

    .colophon-rights {
        grid-area: 4 / 1 / span 1 / -1;
    }

    @media (min-width: 768px) {
        .colophon-brand {
            grid-area: 1 / 1 / span 1 / 1;
        }

        .colophon-contact {
            grid-area: 1 / 2 / span 1 / span 1;
        }

        .colophon-socials {
            grid-area: 1 / 4 / span 1 / -1;
        }

        .colophon-rights {
            grid-area: 1 / 3 / span 1 / span 1;
        }
    }

    @media (min-width: 992px) {
        .grid {
            grid-template-columns: repeat(4, 1fr);
        }
    }
}

/* Youtube modal */

#videoModal {
    iframe {
        width: clamp(280px, 100%, calc((100vh - 188px) * 16 / 9));
        aspect-ratio: 16 / 9;
    }
}