/*
 * Copyright (c) 2022 Code Inc. - All Rights Reserved
 * Unauthorized copying of this file, via any medium is strictly prohibited
 * Proprietary and confidential
 * Visit <https://www.codeinc.co> for more information
 */

* {
    --container-top-margin: 5rem;
    --container-bottom-margin: 7rem;
}

/**
 * Template
 */
#header {
    position: fixed;
    transition: all ease-in-out .5s;
}

body.scrolled #header {
    background-color: rgba(188, 186, 201, .95);
    box-shadow: 0 0 2rem rgba(0, 0, 0, .1);
}

#home div.container {
    max-width: var(--content-max-width);
    box-sizing: border-box;
    margin: var(--container-top-margin) auto var(--container-bottom-margin);
    padding: 0 var(--content-side-padding);
}

#home div.container > h2 {
    margin-bottom: 2rem;
    font-size: 3rem;
}

#home > section {
    overflow: hidden;
}

@media screen and (max-width: 800px) {
    #home div.container {
        margin: 3rem auto 5rem;
    }

    #home div.container h2 {
        margin-bottom: 1.5rem;
        font-size: 2.5rem;
    }

    body:not(.scrolled) #header-content {
        padding: var(--content-side-padding);
    }
}

/**
 * Main visual
 */
#home section.family {
    background: url(images/family-home.webp) no-repeat right 0 bottom -450px;
    background-size: 1000px;
    position: relative;
    z-index: 1;
    height: 100vh;
}

#home section.family div.overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--img-hover-gradient);
}

#home section.family div.text {
    position: absolute;
    top: 20vh;
    left: 10vw;
    right: 10vw;
}

#home section.family div.catchphrase {
    font-size: 7rem;
    color: white;
    font-weight: 100;
    line-height: 1;
}

#home section.family div.baseline {
    font-size: 1.5rem;
    color: #cfcfdb;
    line-height: 1.5;
    font-weight: 300;
    font-family: var(--serif-font);
    max-width: 600px;
}

#home section.family div.baseline span.line {
    border-top: 1px solid #cfcfdb;
    display: inline-block;
    width: 5rem;
}

#home section.family div.languages {
    color: white;
    position: absolute;
    bottom: 2rem;
    left: 10vw;
    right: 10vw;
    display: flex;
    justify-content: space-around;
    opacity: .8;
}

#home section.family div.languages span {
    white-space: nowrap;
}

#home section.family div.chevron {
    position: absolute;
    bottom: -.75rem;
    left: 0;
    right: 0;
    text-align: center;
}

#home section.family div.chevron a {
    display: inline-block;
    font-size: 2rem;
    color: white;
    text-decoration: none;
    opacity: .5;
    transition: opacity ease-in-out .5s;
    animation: bounce 1.5s ease infinite;
}

#home section.family div.chevron a:hover {
    opacity: 1;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-.5rem);
    }
    60% {
        transform: translateY(-.25rem);
    }
}

@media screen and (max-width: 800px) {
    #home section.family div.text {
        top: 25vh;
        left: var(--content-side-padding);
        right: var(--content-side-padding);
    }

    #home section.family {
        background-size: contain;
        background-position: left 0 bottom -100px !important;
    }

    #home section.family div.catchphrase {
        white-space: nowrap;
        font-size: 3.5rem;
    }

    #home section.family div.baseline {
        font-size: 1rem;
        max-width: fit-content;
    }

    #home section.family div.languages {
        justify-content: flex-start;
        animation: slide 30s linear infinite;
        column-gap: 2rem;
    }

    #home section.family div.languages span {
        width: 50%;
        flex-shrink: 0;
    }

    @keyframes slide {
        0% {
            transform: translate3d(100%, 0, 0);
        }
        50% {
            transform: translate3d(calc(-50% * 8), 0, 0);
        }
        0% {
            transform: translate3d(100%, 0, 0);
        }
    }
}

/**
 * Publics
 */
#home section.publics {
    background-color: var(--color-light-purple);
}

#home section.publics, #home section.publics a {
    color: white;
}

#home section.publics div.entries {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 3rem;
    row-gap: 2rem;
}

#home section.publics section a {
    text-decoration: none;
    text-transform: uppercase;
}

#home section.publics section span.visual {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    height: 14rem;
    background: no-repeat center center;
    background-size: cover;
}

#home section.publics section span.visual-overlay {
    background: rgb(34, 35, 54);
    background: var(--img-hover-gradient);
    opacity: .5;
    width: 100%;
    height: 100%;
    display: inline-block;
    transition: opacity ease-in-out .3s;
}

#home section.publics section a:hover span.visual-overlay {
    opacity: 0;
}

#home section.publics section:nth-of-type(1) span.visual {
    background-image: url(images/occupation-1.webp);
}

#home section.publics section:nth-of-type(2) span.visual {
    background-image: url(images/occupation-2.webp);
}

#home section.publics section:nth-of-type(3) span.visual {
    background-image: url(images/occupation-3.webp);
}

#home section.publics section:nth-of-type(4) span.visual {
    background-image: url(images/occupation-4.webp);
}

#home section.publics section:nth-of-type(5) span.visual {
    background-image: url(images/occupation-5.webp);
}

#home section.publics section:nth-of-type(6) span.visual {
    background-image: url(images/occupation-6.webp);
}

@media screen and (max-width: 800px) {
    #home section.publics div.entries {
        grid-template-columns: repeat(1, 1fr);
    }
}


/**
 * Stats
 */
#home section.stats {
    background-color: var(--color-dark-purple);
}

#home section.stats, #home section.stats a {
    color: white;
}

#home section.stats div.entries {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    row-gap: 2rem;
    column-gap: 3rem;
    margin-bottom: 2.5rem;
}

#home section.stats div.entries section {
    text-align: center;
    background-color: rgba(255, 255, 255, .1);
    padding: 4vw 1rem;
}

#home section.stats div.entries span.counter {
    font-size: 4rem;
    font-family: var(--serif-font);
    line-height: 1.1;
}

#home section.stats > p {
    margin: 2rem 0;
}

@media screen and (max-width: 800px) {
    #home section.stats div.entries {
        grid-template-columns: repeat(1, 1fr);
    }

    #home section.stats div.entries section {
        padding: 2rem 1rem;
    }
}


/**
 * Partenaires
 */
#home section.partners {
    background-color: var(--color-light-purple-alt);
}

#home section.partners div.container {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    grid-gap: 2rem;
    line-height: 1.5;
    color: white;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

#home section.partners div.container > * {
    align-self: center;
}

#home section.partners p {
    margin: 0;
}

#home section.partners h2 {
    margin: 0;
    font-size: 2.5rem;
}

#home section.partners figure {
    text-align: center;
}

#home section.partners img {
    max-width: 8rem;
    max-height: 4rem;
}

@media screen and (max-width: 800px) {
    #home section.partners div.container {
        grid-template-columns: 1fr 1fr;
        row-gap: 2rem;
        margin-top: 3rem;
        margin-bottom: 4rem;
    }

    #home section.partners figure {
        text-align: left;
    }

    #home section.partners div.title {
        grid-column-start: 1;
        grid-column-end: span 2;
        margin-bottom: .5rem;
    }
}
