@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@100..900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: inherit;
  transition: all 0.3s ease;
}

:root {
    --White: hsl(0, 100%, 100%);
    --Grey-500: hsl(0, 0%, 63%);
    --Grey-800: hsl(0, 0%, 27%);
    --Black: hsl(0, 0%, 0%);
}

body {
  height: 100vh;
  font-family: 'League Spartan', sans-serif;
  font-size: 1rem;
  color: var(--Grey-800);
  background-color: var(--White);
  font-weight: 500;

  p {
    line-height: 1.5;
    color: var(--Grey-500);
  }

  h1, h2, button, a {
    color: var(--Black);
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3rem;
  }

  nav {
    display: flex;
    align-items: center;
  }

  ul {
    list-style: none;
    display: flex;
    gap: 1rem;
  }

  a, button {
    cursor: pointer;
  }

  a {
    text-decoration: none;
    font-weight: 700;
  }

  button {
    background-color: transparent;
    border: none;
    color: var(--Black);
    font-weight: 600;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 5px;
    font-size: inherit;
    gap: 0.5rem;

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

header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 2rem 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    z-index: 6;

    .logo {
        position: absolute;
        left: 50%;
        translate: -50%;
    }

    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 0;
        display: none;
        z-index: 7;
    }

    nav {
        position: fixed;
        width: 100%;
        top: 0;
        left: 0;
        justify-content: space-between;
        translate: 0 -100%;
        background-color: var(--White);
        padding: 2.5rem 1rem;
        z-index: 8;
    }
}

header.open {
    nav {
        translate: 0 0;
    }

    .overlay {
        display: block;
        opacity: 1;
    }
}

main {

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

    section {
        display: flex;
        flex-direction: column;
    }

    section.primary {

        .main_images {
            z-index: 5;
            width: 100%;
            height: auto;
            position: relative;

            .image_layout {
                width: 100%;
                overflow: hidden;

                .images_container {
                    width: fit-content;
                    display: flex;

                    .image {
                        width: 100vw;
                    }
                }
            }
        }

        .main_info {
            z-index: 4;
            width: 100%;
            overflow: hidden;
            background-color: var(--White);

            .info_layout {
                display: flex;;
                width: 300%;


                .info_container {
                    width: 100%;
                    padding: 3rem 2rem;
                    display: flex;
                    flex-direction: column;
                    gap: 1rem;

                    button {
                        margin-top: 2rem;

                        img {
                            width: 2rem;
                            height: auto;
                        }
                    }
                }
            }

        }

        .change_content_nav {
            position: absolute;
            bottom: 0;
            right: 0;
            display: flex;

            button {
                background-color: var(--Black);
                padding: 1rem 1.25rem;
                border: none;
                color: var(--Black);
                font-size: 2rem;

                img {
                    width: 0.75rem;
                    height: auto;
                }

                &:hover {
                    background-color: var(--Grey-800);
                }
            }
        }
    }

    section.secondary {
        .dark_image {
            z-index: 3;
        }
        article {
            background-color: var(--White);
            padding: 3rem 1rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            z-index: 2;
        }
        .light_image {
            z-index: 1;
        }
    }
}

@keyframes slideFromLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
    
}

@keyframes slideFromTop {
    from {
        transform: translateY(-400%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideFromRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@media screen and (min-width: 375px) {
    header {
        > button {
            display: none;
        }

        .logo {
            position: static;
            translate: 0;
        }

        nav {
            position: static;
            width: auto;
            padding: 0;
            translate: 0;
            background-color: transparent;
            gap: 2rem;

            .toggle-icon {
                display: none;
            }

            a {
                font-weight: 500;
                color: var(--White);
                position: relative;
            }

            a::after {
                content: '';
                position: absolute;
                bottom: -0.5rem;
                left: 0;
                width: 100%;
                height: 2px;
                background-color: var(--White);
                transform: scaleX(0);
                transition: transform 0.3s ease;
            }

            a:hover::after {
                transform: scaleX(1);
            }
        }
    }
}

@media screen and (min-width: 1024px) {
    body {
        overflow: hidden;
    }

    header {
        padding: 4rem 4rem;
    }

    main {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: flex-start;

        section {
            flex-direction: row;
            width: 100%;
        }

        section.primary {
            .main_images {
                transform: translateX(-100%);
                width: 54%;
                animation: slideFromLeft 0.3s ease forwards;
                .image_layout {
                    .images_container {
                        .image {
                            width: 54vw;
                        }
                    }
                }
            }

            .main_info {
                transform: translateX(-200%);
                animation: slideFromLeft 0.3s 0.2s ease forwards;
                .info_layout {
                    .info_container {
                        padding: 2rem;

                        button {
                            margin-top: 0;
                        }
                    }
                }
            }

            .change_content_nav {
                position: absolute;
                bottom: 0;
                right: -104px;
            }
        }

        section.secondary {
            img {
                object-fit: cover;
                width: 25%;
            }

            .light_image {
                animation: slideFromTop 0.3s ease 0.4s forwards;
                transform: translateY(-400%);
            }

            article {
                transform: translateX(200%);
                padding: 3rem 2rem;
                animation: slideFromRight 0.3s ease 0.7s forwards;
                width: 50%;
            }

            .dark_image {
                animation: slideFromRight 0.3s ease 1s forwards;
                transform: translateX(-300%);
            }
        }
    }
}
    


