@layer base, modifiers;

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,200..900;1,8..60,200..900&amp;display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&amp;display=swap');

@layer base {

    /*
    Josh's Custom CSS Reset
    https://www.joshwcomeau.com/css/custom-css-reset/
    */

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

    * {
        margin: 0;
    }

    @media (prefers-reduced-motion: no-preference) {
        html {
            interpolate-size: allow-keywords;
        }
    }

    body {
        line-height: 1.5;
        -webkit-font-smoothing: antialiased;
    }

    img, picture, video, canvas, svg {
        display: block;
        max-width: 100%;
    }

    input, button, textarea, select {
        font: inherit;
    }

    p, h1, h2, h3, h4, h5, h6 {
        overflow-wrap: break-word;
    }

    p {
        text-wrap: pretty;
    }

    h1, h2, h3, h4, h5, h6 {
        text-wrap: balance;
    }

    #root, #__next {
        isolation: isolate;
    }

    h1, h2, h3, h4, h5, h6 {
        font-weight: normal;
    }

    h1 {
        font-family: "Source Serif 4", serif;
    }

    /* this is kinda magic */
    @view-transition {
        navigation: auto;
    }

    body {
        /* Body/primary */
        font-family: 'Inter', sans-serif;
        font-style: normal;
        font-weight: 400;
        font-size: 16px;
        line-height: 26px;
        /* or 162% */
        letter-spacing: -0.4px;

        h1 {
            color: #020618;
        }
        
        background-color: #F8FAFC;
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center;

        > header {
            height: 68px;
            padding-top: 20px;
            padding-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-right: 280px;

            svg {
                width: 112px;
            }

            menu {
                list-style-type: none;
                margin: 0;
                padding: 0;

                a, :visited {
                    text-decoration: none;
                    color: #020618;
                }
            }
        }

        > header, > main {
            background: transparent;
            margin-left: auto;
            margin-right: 280px;
            padding-left: 16px;
            padding-right: 16px;
            margin-left: 280px;
        }

        footer {

            border-top: 1px solid #E2E8F0;

            padding-top: 64px;
            padding-bottom: 64px;
            padding-left: 280px;

            font-weight: 400;
            font-style: normal;
            font-size: 12px;
            line-height: 20px;
            letter-spacing: -0.4px;
            display: grid;

            grid-template-rows: 28px auto;
            grid-template-columns: [logo] 3fr [menu] 1fr;

            nav ul {
                margin-left: 0;
                list-style-type: none;
                padding: 0;
                grid-column: menu;

                display: grid;
                grid-template-columns: 128px 40px 40px;

                a:is(:any-link, :vlink) {
                    text-decoration: none;
                    color: #020618;
                }

                li {
                    padding: none;
                }

                li:has(svg) {
                    svg {
                        height: 20px;
                        width: 20px;
                    }
                }
            }

            p {
                grid-column-start: logo;
                grid-column-end: menu;
                margin-top: 1rem;

                width: 563px;
            }
        }
    }

    /* Tablet styles (768px - 1023px) */
    @media (max-width: 1023px) {
        body {
            > header, > main {
                margin-left: 80px;
                margin-right: 80px;
                padding-left: 24px;
                padding-right: 24px;
            }

            footer {
                padding-left: 80px;
                padding-right: 24px;
                grid-template-columns: [logo] 2fr [menu] 1fr;

                p {
                    width: 100%;
                    max-width: 563px;
                }
            }
        }
    }

    /* Phone styles (up to 767px) */
    @media (max-width: 767px) {
        body {
            > header {
                height: auto;
                padding-top: 16px;
                padding-bottom: 16px;
            }

            > header, > main {
                margin-left: 0;
                margin-right: 0;
                padding-left: 20px;
                padding-right: 20px;
            }

            footer {
                padding-left: 20px;
                padding-right: 20px;
                padding-top: 48px;
                padding-bottom: 48px;
                grid-template-rows: auto auto auto;
                grid-template-columns: 1fr;

                nav ul {
                    grid-column: 1;
                    margin-top: 24px;
                    grid-template-columns: auto 40px 40px;
                    gap: 16px;
                }

                p {
                    grid-column: 1;
                    width: 100%;
                    margin-top: 24px;
                }
            }
        }
    }

}
