:root {
    --primary-accent-color: hsl(5, 85%, 63%);
    --heading-article-two-color: hsl(35, 77%, 62%);
    --article-bg-color: hsl(240, 100%, 5%);
    --main-paragraph-color: hsl(236, 13%, 42%);
    --article-paragraph-color: hsl(233, 8%, 79%);
    --horizontal-rule-color: hsl(236, 13%, 42%);
    --footer-anchor-color: hsl(231, 100%, 73%);
}

*, *::before, *::after {
    box-sizing: border-box;
}

*:not(dialog) {
    margin: 0;
}

body {
    font-family: "Inter", sans-serif;
    min-height: 100dvh;
    width: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;

    button {
        border: none;
        background-color: white;
    }

    h1 {
        font-size: clamp(1rem, 8vw, 3rem);
    }
    h2 {
        font-size: clamp(.8rem, 6vw, 2.5rem);
    }
    h3 {
        font-size: clamp(.6rem, 4vw, 2rem);
    }
    p {
        color: var(--main-paragraph-color);
        font-size: clamp(.5rem, 3vw, 1.5rem);
    }

    h2, h3, p {
        line-height: 1.6;
    }
}

header {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;

    .heading-section-one {
        display: flex;
        justify-content: space-between;

        button {
            display: block;
        }

        .desktop-navigation {
            display: none;
        }
    }

    dialog {
        width: clamp(200px, 70%, 2000px);
        min-height: 100dvh;
        border: none;
        margin: 0 0 0 auto;

        button {
            width: fit-content;
            align-self: flex-end;
        }

        nav {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            font-size: clamp(1rem, 5vw, 2rem);

            a {
                color: black;
                text-decoration: none;
            }
        }
    }

    dialog:modal {
        display: flex;
        flex-direction: column;
        gap: 5rem;
    }
}

main {
    display: flex;
    flex-direction: column;
    gap: 2rem;

    .desktop-box-one {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .heading-content {
        display: flex;
        flex-direction: column;
        gap: 1rem;

        div {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
    }

    .img-container {
        .desktop-heading-image {
            display: none;
        }

        img {
            width: 100%;
        }
    }

    section {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;

        button {
            font-weight: bold;
            letter-spacing: .1rem;
            text-transform: uppercase;
            font-size: clamp(.5rem, 3vw, 1.5rem);
            background-color: var(--primary-accent-color);
            padding: .8rem 1.2rem .8rem 1.2rem;
        }
    }

    h1 {
        font-weight: 800;
        width: clamp(1rem, 70%, 15rem);
    }

    .section-one {
        color: white;
        background-color: var(--article-bg-color);
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem;

        h2 {
            color: var(--heading-article-two-color);
        }

        p {
            color: var(--article-paragraph-color);
        }

        hr {
            border: 1px solid var(--horizontal-rule-color);
            width: 100%;
        }
    }

    .section-two {
        margin-bottom: 10rem;

        div {
            height: fit-content;
        }

        h2 {
            color: var(--primary-accent-color);
        }

        img {
            height: clamp(50px, 20vw, 200px);
        }

        .article-two {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
    }
}

footer {
    text-align: center;
    background-color: black;
    position: absolute;
    width: 100%;
    padding: 1rem;
    bottom: 0;

    p {
        color: white;
    }

    a {
        color: var(--footer-anchor-color);
        font-weight: bold;
        text-decoration: none;
    }
}

@media (min-width: 75rem) {
    header {
        .heading-section-one {
            button {
                display: none;
            }

            .desktop-navigation {
                display: flex;
                gap: 4rem;

                a {
                    color: black;
                    text-decoration: none;
                }
            }
        }
    }

    main {
        .desktop-box-one {
            display: flex;
            flex-direction: row;
            gap: 2rem;

            .img-container {
                width: 100%;

                .mobile-heading-image {
                    display: none;
                }

                .desktop-heading-image {
                    display: block;
                }
            }

            .section-one {
                height: fit-content;
            }
        }
    }

    .section-heading {

        .heading-content {
            display: grid;
            grid-template-columns: 350px 1fr;
            
            div {
                display: flex;
                flex-direction: column;
                gap: 1rem;
            }
        }
    }

    .section-two {
        display: flex;
        flex-direction: row;
    }
}