/* index.css */


/* ------------------------------------------------------------- */
.hero {
    display: flex;
    padding: 38px 0px;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    flex-direction: column;
}

.hero-robot-image {
    position: absolute;
    right: 20px;
    top: 50px;
    z-index: -1;
    opacity: 0.85;
    transform: translateX(50%) translateY(0);
    user-select: none;
}

.social-proof {
    display: flex;
    flex-direction: column;
    margin-top: 30px;
    gap: 20px;
    align-items: center;
    width: var(--social-proof-width);
    min-width: var(--social-proof-width);
    transform: scale(0.85);
}

.hero-space-container {
    width: var(--social-proof-width);
    min-width: var(--social-proof-width);
    transform: scale(0.85);
}

.social-proof .separator {
    width: 70%;
}

.social-proof .item {
    display: flex;
    text-decoration: none;
    color: white;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    white-space: nowrap;
}

.social-proof a.item:hover {
    text-decoration: underline;
}

.social-proof-item-infos {
    display: flex;
    width:fit-content;
    gap: 10px;
    align-items: center;
}

.social-proof-item-numbers {
    font-size: 28px;
    font-weight: 700;
}

.social-proof-item-description {
    font-size: 16px;
    color: var(--gray-text-color);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.status-bubbles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.hero-content {
    margin-left: auto;
    margin-right: auto;

    .actions {
        display: flex;
        margin-top: 10px;
        gap: 20px;
        width:fit-content;
    }

    .item {
        display: flex;
        color: var(--gray-text-color);
        font-size: 15px;
        font-weight: 500;
        flex-direction: column;
        flex-grow: 1;
        flex-basis: 0;  /* Ignorer la taille du contenu initial */
        align-items: center;
        gap: 8px;
    }

    .item span {
        text-align: center;
    }

    .price {
        color: white;
        font-size: 22px;
        font-weight: 600;
    }
}


.perspective {
    display: flex;
    mix-blend-mode: screen;
    opacity: 0.75;
    position: relative;
    gap: 20px;
    top: 0%;
    left: 50%;
    width: 100vw;
    height: 600px;
    transform-origin: 50% 50%;
    transform: translate(-50%, -35%) perspective(800px) rotateX(60deg) scale(1.1);
    overflow: hidden;
    justify-content: center;
    margin-bottom: -200px;

    background-color: rgba(255, 255, 255, 0);

    .cache1 {
        position: absolute;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 20%, rgba(0, 0, 0, 0) 100%);
        left: 0;
        right: 0;
        top: 0;
        height: 350px;
    }

    .cache2 {
        position: absolute;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
        left: 0;
        right: 0;
        bottom: 0;
        height: 250px;
    }

    .col {
        display: flex;
        z-index: -2;
        flex-direction: column;
        gap: 20px;
    }
    .item {
        display: flex;
        width: var(--perspective-items-width);
        height: calc(var(--perspective-items-width) / (670 / 376));
        min-height: calc(var(--perspective-items-width) / (670 / 376));
        flex-basis: 0;
        border-radius: var(--perspective-items-radius);
        border: 2px solid var(--primary-color);
        align-items: center;
        justify-content: center;
        
    }

    .item img{
        width: 100%;
        /* aspect-ratio: 670/376; */
        object-fit: contain;
        border-radius: var(--perspective-items-radius);
    }

    .item img.logo{
        height: 80%;
    }

    .item span {
        font-size: 38px;
        font-weight: 700;
        letter-spacing: 1px;
    }
}

.perspective .col {
    position: relative;
    top: 0%;
    animation: crawl 60s linear 0s infinite;
    animation-duration: 40s;
}

@keyframes crawl {
    0% {
        top: 0%;
        opacity: 1;
    }
    5% {
        opacity: 1;
    }
    100% {
        top: -177%;
    }
}

.fade-in {
    animation: fadeInAnimation 1s;
}

@keyframes fadeInAnimation {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in-75 {
    animation: fadeInAnimation75 1s;
}

@keyframes fadeInAnimation75 {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.75;
    }
}

.top-courses {
    display: flex;
    flex-direction: column;
    gap: 35px;
    width: 100%;
    margin-bottom: 50px;

    .courses-container {
        width: 100%;
        position: relative;
        gap: 30px;
    }

    a.course {
        display: flex;
        text-decoration: none;
        flex-direction: column;
        background-color: var(--course-card-background);
        border: 1px solid #024287;
        border-radius: 8px;
        flex-grow: 1;
        flex-basis: 0;
        user-select: none;
        cursor: pointer;
        box-sizing: content-box;
        position: relative;
        height: 420px;
        /* transition: border-color .3s cubic-bezier(.165, .84, .44, 1), box-shadow .3s cubic-bezier(.165, .84, .44, 1); */
        

        .infos {
            display: flex;
            flex-direction: column;
            padding: 20px 20px;
            gap: 12px;
            z-index: 2;

            span {
                font-size: 16px;
                color: var(--gray-text-color);
            }

            .info-bubble {
                font-size: 14px;
                font-weight: 700;
                color: #77ACFC;
                text-align: center;
                background-color: rgba(20, 110, 245, 0.23);
                border-radius: 12px;
                padding: 4px 12px;
                width: fit-content;
            }
        }
    }

    a.course:hover {
        border: 1px solid var(--yellow-color);
        box-shadow: 0 0 37px 1px rgba(239,255,0,0.45);
    }

    a.course img.vignette {
        border-radius: 8px 8px 0 0;
        aspect-ratio: 670/376;
        width: 100%;
    }
}

.expert::before {
    content: "";
    background-image: url('/images/home-jonathan.jpg');
    background-position: right;
    background-repeat: no-repeat;
    background-size: auto 100%;
    position: absolute;
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
    z-index: -1;
    opacity: 0.7;
}

.expert::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: -1;
    pointer-events: none;
}

.expert {
    display: flex;
    position: relative;
    flex-direction: column;
    gap: 35px;

    h2 {
        margin-top: 60px;
        width:fit-content;
        align-self: center;
    }

    .subtitle {
        align-self: center;
    }

    .video-container {
        display: flex;
        margin-top: 25px;
        margin-bottom: 25px;
        width: 100%;
        max-width: 700px;
        height: auto;
        aspect-ratio: 21/9;
        justify-content: center;
        position: relative;
        align-self: center;
        box-shadow: 0 0 20px rgba(0, 0, 0, 1), 0 0 25px rgba(0, 0, 0, 0);

        video {
            height: auto;
            width: 100%;
            aspect-ratio: 21/9;
        }
    }

    /*.border {
        min-width: 5px;
        background-color: var(--accent-color);
        height: 60px;
    }*/

    .name-and-infos {
        display: flex;
        margin-bottom: 20px;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }

    .brand-icons {
        display: flex;
        align-items: center;
        gap: 30px;
    }

    .brand-icons img {
        display: block;
        height: 63px;
    }

    .infos {
        display: flex;
        padding-left: 15px;
        flex-direction: column;
        border-left: 5px solid var(--accent-color);

        .name {
            font-size: 35px;
            font-weight: 700;
            line-height: 1.1;
        }

        .details {
            color: var(--gray-text-color);
            font-size: 15px;
            white-space: pre;
        }
    }
}


.cards {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: center;
    gap: 35px;
    margin-top: 60px;
    padding-top: 80px;
    padding-bottom: 60px;

    .subtitle {
        margin-bottom: 20px;
    }

    .cards-header-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 35px;
        padding-top: 70px;
        padding-bottom: 40px;
    }

    .cards-container {
        display: flex;
        flex-wrap: wrap;
        gap: 18px;
        width: 100%;
    }

    .cards-container .card {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.07);
        border-radius: 16px;
        padding: 20px 25px;
        min-width: 275px;
    }

    .card-header {
        display: flex;
        gap: 20px;
        align-items: anchor-center;
    }

    
    .card-number {
        font-size: 100px;
        font-weight: 900;
        line-height: 1;
        margin-bottom: 20px;
        letter-spacing: -0.04em;
        background: linear-gradient(180deg, rgba(var(--accent-color-rgb), 1) 0%, rgba(var(--accent-color-rgb), 0) 100%);
        /*--gradient-green-to-white: linear-gradient(to right, var(--accent-color), white);*/
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .cards-container .card h3 {
        font-size: 20px;
        margin-bottom: 0;
        background: linear-gradient(180deg, rgba(var(--accent-color-rgb), 1) 0%, rgba(var(--accent-color-rgb), 0.5) 100%);
        /*--gradient-green-to-white: linear-gradient(to right, var(--accent-color), white);*/
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-top: 0;
    }
    
    .cards-container .card p {
        font-size: 15px;
        line-height: 1.7;
        color: var(--gray-text-color);
        margin: 0;
    }
    
    .cards-container .card p strong {
        color: #ddd;
        font-weight: 600;
    }

    > *:not(.grid-wrapper) {
        position: relative;
        z-index: 1;
    }

    .grid-wrapper {
        --grid-line: 1px;
        --grid-color: rgba(31, 117, 245, 0.5);
        --grid-spacing: 10%;
        position: absolute;
        top: 0px;
        left: 50%;
        width: 100vw;
        height: 900px;
        transform: translateX(-50%);
        perspective: 800px;
        overflow: hidden;
        z-index: 0;
        pointer-events: none;
    }

    .grid {
        position: absolute;
        inset: 0;
        transform: rotateX(-60deg);
        background:
            repeating-linear-gradient(to right, var(--grid-color) 0, var(--grid-color) var(--grid-line), transparent var(--grid-line), transparent var(--grid-spacing)),
            repeating-linear-gradient(to bottom, var(--grid-color) 0, var(--grid-color) var(--grid-line), transparent var(--grid-line), transparent var(--grid-spacing));
        -webkit-mask-image: linear-gradient(to bottom, white, transparent);
        mask-image: linear-gradient(to bottom, white, transparent);
        bottom: 150px;
        animation: gridCrawl 5s linear infinite;
    }

    .dot {
        position: absolute;
        background: rgba(255, 255, 255, 0.8);
        width: var(--grid-line);
        height: 50px;
        top: 0%;
        border-radius: var(--grid-line);
        box-shadow: 0 0 8px #fff;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }

    .dot:nth-child(2)  { left: 10%; animation: moveDot 18s infinite; animation-delay: -11s; }
    .dot:nth-child(4)  { left: 20%; animation: moveDot 25s infinite; animation-delay: -8s; }
    .dot:nth-child(6)  { left: 30%; animation: moveDot 15s infinite; animation-delay: -2s; }
    .dot:nth-child(8)  { left: 40%; animation: moveDot 6s infinite;  animation-delay: -4s; }
    .dot:nth-child(10) { left: 50%; animation: moveDot 11s infinite; animation-delay: -7s; }
    .dot:nth-child(12) { left: 60%; animation: moveDot 5s infinite;  animation-delay: -1s; }
    .dot:nth-child(14) { left: 70%; animation: moveDot 8s infinite;  animation-delay: -5s; }
    .dot:nth-child(16) { left: 80%; animation: moveDot 12s infinite; animation-delay: -3s; }
    .dot:nth-child(18) { left: 90%; animation: moveDot 6s infinite;  animation-delay: -2s; }
}

@keyframes moveDot {
    0%   { top: -50px;   height: 50px;  opacity: 1; }
    40%  { height: 50px; opacity: 0.6; }
    55%  { height: 0px; opacity: 0; }
    100% { top: 100%; height: 0px;  opacity: 0; }
}

@keyframes gridCrawl {
    from { background-position: 0 0, 0 0; }
    to   { background-position: 0 0, 0 75px; }
}


/* -------------------------------------------------------------------------------- */

/* if screen width is higher than 1300px */
@media only screen and (min-width: 1200px) {
    .hero-robot-image {
        right: calc(20px + (50% - 600px));
    }

    h1 {
        font-size: 83px;
    }
}


@media only screen and (max-width: 970px) {
    .hero-robot-image {
        right: calc(21.62vw - 181.006px);
    }

    .social-proof, .hero-space-container {
        display: none;
    }

    .top-courses .courses-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .top-courses a.course {
        max-width: 410px;
        width: 410px;
        flex-basis: auto;
        height: 450px;
    }
    .expert {
        .brand-icons {
            gap: 20px;
        }
        .brand-icons img {
            height: 42px;
        }
        .infos {
            .name {
                font-size: 25px;
            }

            .details {
                font-size: 12px;
            }
        }
    }
}

/* --- MOBILE --- */
.swap-order-mobile-1 {
    order: 1;
}

.swap-order-mobile-2 {
    order: 2;
}

@media only screen and (max-width: 670px) {
    .swap-order-mobile-2 {
        order: -1;
    }

    .hero {
        padding: 30px 0px;
    }

    section {
        padding-left: 20px;
        padding-right: 20px;
    }

    h1 {
        font-size: 55px;
    }

    .expert {
        h2 {
            margin-top: 20px;
        }
    }

    .hero-content .actions {
        flex-direction: column;
        gap: 40px;
    }

    .perspective {
        height: 350px;
        transform: translate(-50%, -40%) perspective(800px) rotateX(60deg) scale(1.0);

        .cache1 {
            height: 150px;
        }
    }

    .hero-robot-image {
        opacity: 0.6;
    }

    .subtitle {
        font-size: 20px;
    }

    .top-courses a.course {
        max-width: 350px;
        height: 420px;
    }
    
    .image-and-content {
        display: flex;
        flex-direction: column;
    }

    .become-dev div.image-and-content img {
        height: 200px;
    }

    .expert::before {
        opacity: 0.3;
        top: -20px;
        right: -120px;
    }

    .expert {
        .infos {
            .name {
                font-size: 30px;
            }

            .details {
                white-space: unset;
            }
        }

        .name-and-infos {
            row-gap: 30px;
            flex-direction: column;
        }
    }

    .cards {
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 30px;
        gap: 0;

        .cards-container {
            flex-wrap: nowrap;
            flex-direction: column;
            gap: 18px;
            width: 100%;
        }

        .grid-wrapper {
            width: 200vw;
            height: 900px;
            perspective: 320px;
        }

        .grid {
            transform: rotateX(-40deg);
            bottom: 100px;
        }
    }
}
