:root {
    /* https://www.mmu.ac.uk/brand/colour/ */
    --palette-grey: #505759;
    --palette-grey-hover: #F9FAFB;
    --palette-blue: #002F6C;
    --palette-blue-hover: #00204b;
}

*,
::before,
::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
}

html {
    font-family: system-ui;
}

body {
    margin: 0;
}

a {
    text-decoration: none;
}

button {
    background-color: transparent;
    cursor: pointer;
}

header {
    background-color: white;
}

nav {
    margin-left: auto;
    margin-right: auto;

    display: flex;

    max-width: 80rem;

    padding: 2rem;

    align-items: center;
    justify-content: space-between;
}

#nav-logo-container {
    display: flex;
}

#nav-logo-container>a {
    display: flex;

    margin: -0.5rem;
    padding: 0.5rem;
}

#nav-logo-container>a>img {
    height: 3rem;
    width: auto;
}

#nav-buttons-container {
    display: none;
}

#nav-buttons-container>a {
    font-size: 0.875rem;
    font-weight: 600;

    line-height: 1.5rem;

    color: black;
}

#nav-open-mobile-container>button {
    display: flex;

    margin: -0.625rem;
    padding: 0.625rem;
    border-radius: 0.375rem;

    align-items: center;
    justify-content: center;

    color: black;
}

#nav-open-mobile-container>button>svg {
    height: 1.5rem;
    width: 1.5rem;
}

#mobile-nav-popover {
    margin-top: 6rem;

    border-radius: 1rem;
    padding: 1rem;

    background-color: white;
    color: black;

    font-size: 1.125rem;
    line-height: 1.75rem;

    width: 90%;

    box-sizing: border-box;
    border-width: 2px;
    border-style: solid;
    border-color: black;
}

#mobile-nav-popover>a {
    display: block;

    border-left-width: 4px;
    border-color: transparent;

    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-left: 1rem;
    padding-right: 1rem;

    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5rem;

    color: gray;
}

#mobile-nav-popover>a:hover {
    background-color: var(--palette-grey-hover);
}

/* large displays (desktop) */
@media (min-width: 1024px) {
    #nav-logo-container {
        /* Enable growing, shrinking and 0% initial space */
        flex: 1 1 0%;
    }

    /* Show desktop nav buttons on desktop */
    #nav-buttons-container {
        display: flex;
        column-gap: 3rem;
    }

    /* Hide mobile nav popover open button on desktop */
    #nav-open-mobile-container {
        display: none;
    }

    /* Hide mobile nav on desktop */
    #mobile-nav-popover {
        display: none;
    }
}