@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700;800&display=swap");

:root {
    --rgb-light-500: 245, 245, 245;
    --rgb-dark-100: 218, 216, 216;
    --rgb-dark-500: 68, 66, 66;
    --rgb-dark-900: 42, 41, 41;
    --rgb-primary-500: 179, 54, 86;
    --rgb-secondary-300: 59, 97, 155;
    --rgb-secondary-500: 54, 76, 108;
    --rgb-primary-500-neg: 214, 65, 118;

    --color-light-500: rgb(var(--rgb-light-500));
    --color-dark-100: rgb(var(--rgb-dark-100));
    --color-dark-500: rgb(var(--rgb-dark-500));
    --color-dark-900: rgb(var(--rgb-dark-900));
    --color-primary-500: rgb(var(--rgb-primary-500));
    --color-secondary-300: rgb(var(--rgb-secondary-300));
    --color-secondary-500: rgb(var(--rgb-secondary-500));
    --color-primary-500-neg: rgb(var(--rgb-primary-500-neg));

    --col-3-min-width: 18.75rem;
}

/* reseters */
html {
    box-sizing: border-box;
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

*,
*::before,
*::after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

h2 {
    font-weight: 600;
    font-size: 1.25rem;
}

/* main style */
body {
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    background-color: var(--color-light-500);
    color: var(--color-dark-500);
}

header {
    background-color: #fff;
    box-shadow: 0px 6px 3px 0px rgba(0, 0, 0, 0.15);
    width: 100%;
    height: 5rem;
    position: fixed; /* or sticky */
    top: 0;
    left: 0;
    z-index: 9;

    .header-content {
        display: flex;
        height: 100%;
        padding: 0 1rem;
    }

    .header-brand {
        margin: auto;
        margin-left: 0;
        height: 3rem;
        display: flex;
        align-items: center;

        img {
            width: auto;
            height: 100%;
        }
    }

    .header-navbar {
        margin-left: auto;
        display: none;

        .navbar-menu {
            list-style: none;
            height: 100%;
            display: flex;

            > li {
                display: flex;

                > a {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    min-width: 5.5rem;
                    padding: .75rem;
                    font-weight: 600;
                    font-size: 1em;
                    text-decoration: none;
                    text-align: center;
                    color: var(--color-dark-500);
                    background-color: transparent;
                    border: none;
                }

                &:hover > a {
                    color: #000;
                }
            }
        }
    }

    .header-mobile-menu-toggle {
        width: 32px;
        height: 26px;
        margin: auto;
        margin-right: 0;
        position: relative;
        cursor: pointer;

        span {
            background: #6b6868;
            border: none;
            height: 4px;
            width: 100%;
            position: absolute;
            top: 0;
            left: 0;
            transition: all .35s ease;

            &:nth-child(1) {
                top: 0;
            }

            &:nth-child(2) {
                top: 11px;
            }

            &:nth-child(3) {
                top: 22px;
            }
        }

        &.active span{
            &:nth-child(1) {
                transform: translateY(11px) translateX(0) rotate(45deg);
            }
            &:nth-child(2) {
                opacity: 0;;
            }
            &:nth-child(3) {
                transform: translateY(-11px) translateX(0) rotate(-45deg);
            }
        }
    }
    
}

main {
    padding-top: 5rem;

    .section-title {
        text-align: center;
        margin-bottom: 3rem;
    
        span {
            font-size: 1.25rem;
            font-weight: 600;
            display: inline-block;
            padding: .625rem 1.25rem;
            color: #fff;
            background-color: #2a2929;
        }
    }    

    #hero {
        min-height: calc(100vh - 5rem);
        position: relative;
        display: flex;
        overflow: hidden;
        box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.1);

        .hero-logo {
            position: absolute;
            top: calc(50vh - 3rem);
            left: 50%;
            transform: translate(-50%, -50%) scale(1);
            z-index: 3;
            display: flex;
            animation: expanse 1s ease-in forwards;
            animation-delay: 1.5s;

            svg {
                margin: auto;
                width: calc(100vw - 2rem);
                max-width: 25rem;

                path {
                    stroke-width: 2;
                    fill: transparent;
                    filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.7));
                }

                #e-letter {
                    stroke: #fff;
                    stroke-dasharray: 1900;
                    stroke-dashoffset: -1900;
                    animation: path-dash 1s linear forwards, path-fill-e 0.5s linear forwards;
                    animation-delay: 0s, 1s;
                    
                }

                #m-shadow {
                    stroke: #C34471;
                    stroke-dasharray: 1500;
                    stroke-dashoffset: 1500;
                    animation: path-dash 1s linear forwards, path-fill-m .5s linear forwards;
                    animation-delay: 0s, 1s;
                }
            }
        }

        .hero-content {
            display: flex;
            flex-direction: column;
            margin: auto;
            z-index: 2;
            text-align: center;
            padding: 1rem;
            color: #fff;
            opacity: 0;
            animation: fade-in 1s ease-in forwards;
            animation-delay: 2s;

            h1 {
                align-self: center;
                text-transform: uppercase;
                font-weight: 800;
                font-size: 1.125rem;
                letter-spacing: .0625em;
                background-color: rgb(var(--rgb-primary-500), 0.8);
                padding: .5rem 1rem;
                line-height: 1.25;
            }
            
            h3 {
                align-self: center;
                text-transform: uppercase;
                font-weight: 800;
                font-size: .875rem;
                letter-spacing: .0625em;
                background-color: rgb(var(--rgb-secondary-500), 0.8);
                padding: .5rem 1rem;
                line-height: 1.25;
            }
            
            .about {
                margin-top: 3rem;
                margin-left: -1rem;
                margin-right: -1rem;
                font-size: .875rem;
                font-weight: 300;
                padding: 2rem;
                color: white;
                background-color: rgba(0, 0, 0, 0.375);
                width: 100vw;
                display: flex;
                flex-direction: column;

                p {
                    margin: auto;
                    max-width: 55rem;
                    text-align: justify;
                    text-justify: auto;
                }
            }
            
            .owner {
                margin-top: 3rem;

                a {
                    color: #fff;
                    text-decoration: none;
                    border-bottom: 1px solid var(--color-primary-500);
                    padding-bottom: .125rem;
                }
            }
        }

        .hero-img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;

            img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }
    }

    #services {
        margin-top: 7.5rem;
        width: 100%;
        min-height: calc(100vh - 5rem);
        
        .services-content {
            padding: 2rem 1rem;
        }
        
        .services-list {
            list-style: none;

            display: flex;
            flex-wrap: wrap;
            gap: 1rem;

            li {
                flex: 1;
                min-width: min(100%, var(--col-3-min-width));

                display: grid;
                align-content: flex-start;
                justify-items: center;
                gap: 1rem;
                
                text-align: center;
                padding: 2rem;

                .img-wrapper {
                    width: 6rem;
                    height: 6rem;
                    display: flex;

                    border-radius: 50%;
                    background-color: var(--color-primary-500);
                    transition: background-color 0.35s ease-out;
                    box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.25);
    
                    img {
                        margin: auto;
                    }

                    &:hover {
                        background-color: var(--color-secondary-500);
                    }
                }

                
            }
        }
        
    }

    #gallery {
        margin-top: 7.5rem;
        min-height: calc(100vh - 5rem);

        .gallery-content {
            padding: 2rem 1rem;
        }
        
        .flex-gallery {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 1rem;

            figure {
                flex: 1;
                min-width: min(100%, var(--col-3-min-width));
                max-width: 25rem;
                
                background-color: #fff;
                box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.15);
                cursor: pointer;
                position: relative;
                overflow: hidden;
    
                img {
                    max-width: 100%;
                    height: auto;
                    vertical-align: middle;
                    transition: transform 0.35s;
                }
    
                figcaption {
                    position: absolute;
                    top: auto;
                    bottom: 0;
                    width: 100%;
                    padding: .5rem;
                    background-color: rgb(var(--rgb-primary-500), 0.95);
                    color: #fff;
                    transition: transform 0.35s;

                    display: flex;
                    justify-content: center;
                    align-items: center;
    
                    h4 {
                        font-size: 0.825em;
                        text-transform: uppercase;
                    }
    
                    p {
                        display: none;
                    }
                }
    
                &:hover img {
                    transform: scale(1.1);
                }
    
                &:hover figcaption {
                    transform: translate3d(0, 0, 0);
                }
            }
        }
        
        
    }

    #contact {
        --col-width: 22rem;

        margin-top: 7.5rem;
        height: auto;
        min-height: calc(100vh - 9rem);

        .contact-content {
            padding-top: 2rem;
            display: flex;
            flex-wrap: wrap;
            position: relative;
        }

        .contact-form {
            flex: 1 1 calc(100% - var(--col-width));
            min-width: var(--col-width);
            background-color: #fff;
            padding: 2rem;

            .form-wrapper {
                margin-top: 2rem;

                form {
                    --gap: 1.5rem;
                    display: flex;
                    flex-wrap: wrap;
                    margin-left: calc(-1 * var(--gap));
                    max-width: 47.75rem;

                    .form-control {
                        margin-bottom: var(--gap);
                        margin-left: var(--gap);
                    }

                    input.form-control {
                        flex: 1 1 calc(50% - var(--gap));
                        min-width: 12.5rem;
                    }

                    textarea.form-control {
                        resize: none;
                    }

                    .spinner {
                        display: none;
                        margin-right: 0.25rem;
                    }
                
                    &.loading {
                        .spinner {
                            display: inline-block;
                        }
                    }
                }
            }
        }

        .contact-social-media {
            flex: 1 1 var(--col-width);
            color: #fff;
            background-color: var(--color-dark-900);
            text-align: center;
            padding: 2rem;

            ul {
                display: inline-block;
                margin-top: 1rem;
                padding: 1rem;
                text-align: left;
                list-style: none;

                li {
                    margin-bottom: 1rem;
                    display: flex;
                    align-items: center;

                    .icon {
                        width: 1.75rem;
                        height: 1.75rem;
                        min-width: 2rem;
                    }

                    span {
                        margin-left: .75rem;
                        font-size: .875rem;
                        overflow-x: hidden;
                        text-overflow: ellipsis;
                    }
                }
            }

            .brand {
                margin: auto;
                max-width: 16rem;

                img {
                    display: block;
                    width: 100%;
                    height: auto;
                }
            }

            .developed-by {
                margin-top: 4rem;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 0.75rem;

                h5 {
                    font-weight: 500;
                    font-size: 10px;
                    color: hsl(240, 5%, 57.5%);
                }

                img {
                    opacity: 0.85;
                    transition: opacity 0.35s ease;
                    
                    &:hover {
                        opacity: 1;
                    }
                }
            }
        }
    }
}

/* component */
.container {
    max-width: 75rem;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem;
}

.text-underlined {
    position: relative;
    will-change: color;
    transition: color .25s ease-out;  

    &::after {
        content: '';
        width: 0;
        height: .375rem;
        background-color: var(--color-primary-500);
        will-change: width;
        transition: width .1s ease-out;
        position: absolute;
        bottom: 0;
    }
      
    &::after{
        right: 50%;
        transform: translateX(50%);
    }

    &:hover {
        &::after {
            width: 100%;
            transition-duration: .2s;
        }
    }
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    span {
        font-size: 1.25rem;
        font-weight: 600;
        display: inline-block;
        padding: .625rem 1.25rem;
        color: #fff;
        background-color: var(--color-dark-900);
    }
}

.btn {
    border: none;
    padding: .75rem 1.25rem;
    font-family: inherit;
}

.btn-submit {
    margin: 1rem 0 1rem auto;
    font-size: .875rem;
    font-weight: 800;
    color: var(--rgb-dark-500);
    background-color: var(--color-dark-100);
    letter-spacing: .025em;
    border-radius: 0;
    transition: all 0.25s ease;

    &:hover {
        color: #fff;
        background-color: var(--color-secondary-300);
        
    }
}

.form-control {
    display: block;
    width: 100%;
    font-size: 1rem;
    font-family: inherit;
    padding: .375rem .75rem;
    border: 1px solid #858181;
    outline: 1px solid transparent;
}

.form-control:active,
.form-control:focus {
    outline: 1px solid var(--color-secondary-300);
    border-color: transparent;
    box-shadow: 0 0 2px 1px var(--color-secondary-300);
}

input.form-control {
    height: calc(1.5em + .75rem + 2px);
}

textarea.form-control {
    height: calc(8.25em + .75rem + 2px);
}

.icon {
    display: inline-block;
    background-repeat: no-repeat;
    background-position: center;
}

.icon.icon-facebook {
    background-image: url("/assets/gui/contact/facebook.svg");
}

.icon.icon-instagram {
    background-image: url("/assets/gui/contact/instagram.svg");
}

.icon.icon-whatsapp {
    background-image: url("/assets/gui/contact/whatsapp.svg");
}

.icon.icon-email {
    background-image: url("/assets/gui/contact/envelope.svg");
}

.overlay-mobile-menu {
    position: fixed;
    top: 5rem;
    left: 0;
    width: 100%;
    height: calc(100vh - 5rem);
    z-index: 10;
    background-color: var(--color-primary-500);
    transform: translateX(100%);
    transition: transform .35s;
    text-align: center;
    display: flex;
    overflow: hidden;

    &.open {
        transform: translateX(0);

        .mobile-menu-item {
            animation: fade-in-right .5s ease forwards;
            animation-delay: calc(var(--animation-order) * .15s);
        }
    }

    .mobile-menu {
        margin: auto;
        list-style: none;

        .mobile-menu-item {
            margin-bottom: 1rem;
            position: relative;
            opacity: 0;

            a {
                font-family: inherit;
                font-size: 1.75rem;
                font-weight: 300;
                text-decoration: none;
                border: none;
                color: #fff;
                background: transparent;
            }
        }
    }
}

.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    vertical-align: text-bottom;
    border: .25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.modal-show {
    animation: modal-fade-up 0.35s ease-out;
}

.modal-hide {
    animation: modal-fade-down 0.25s ease-out;
}

.modal-title {
    font-size: 1.25rem;
}

.form-errors {
    font-size: 0.875rem;
    display: grid;
    place-content: center;
    text-align: left;
    margin-inline: auto;
}

.grecaptcha-badge { 
    visibility: hidden; 
}

/* Media query */
@media (min-width: 768px) {
    header {
        .header-brand {
            height: 3.5rem;
        }
        .header-navbar {
            display: block;
        }
    }

    main {
        #hero {
            .hero-content {
                h1 {
                    font-size: 1.625rem;
                }
                
                h3 {
                    font-size: 1.125rem;
                }

                .about,
                .owner {
                    font-size: 1.125rem;
                }
            }
        }

        #gallery {
            figcaption {
                background-color: rgba(var(--rgb-primary-500), 0.9);
                transform: translate3d(0, 100%, 0);
            }
        }
    }

    header .header-mobile-menu-toggle {
        display: none;
    }

    .overlay-mobile-menu {
        display: none;
    }
}

/* Animations */
@keyframes path-dash {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes path-fill-e {
    to {
        fill: #ffffff;
        stroke: transparent;
    }
}

@keyframes path-fill-m {
    to {
        fill: #C34471;
        stroke: transparent;
    }
}

@keyframes expanse {
    to {
        -webkit-transform: translate(-50%, -50%) scale(7);
        transform: translate(-50%, -50%) scale(7);
        opacity: 0;
    }
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

@keyframes fade-in-right {
    0% {
        opacity: 0;
        left: 20%;
    }

    100% {
        opacity: .9;
        left: 0;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes modal-fade-up {
    from {
        opacity: 0;
        transform: translate3d(0, 15%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes modal-fade-down {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(0, 10%, 0);
    }
}