/* HEADER AND FOOTER */
.logo-mark {
    display: grid;
    align-items: center;
    justify-content: center;
    /* grid-template-columns: max-content auto; */
    grid-template-columns: auto auto;
    gap: 0.5rem;
    font-size: 1.25rem;
    height: fit-content;
    width: fit-content;
}
.logo-mark img {
    /* height: 100%;
    min-height: 2rem; */
    font-size: inherit;
    height: 2.5em;
    width: 100%;
}
.site-title {
    font-family: "Oswald", "DM Sans", "Helvetica", sans-serif;
    font-weight: 300;
    font-size: 1em;
    line-height: 1.25;
    text-wrap-style: balance;
    vertical-align: middle;
}

/* HEADER ONLY */
header {
    background: var(--color-bg-header-nav);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 0 1rem 0.75rem var(--color-shadow-header-nav);
}
header a {
    color: var(--color-text-header-nav);
    text-decoration: none;
}
header .site-title {
    max-width: 6.25em;
}
header nav {
    justify-self: end;
}
header nav, header nav ul {
    max-width: 100%;
}
header nav ul, header nav ul li, header nav ul li a {
    height: 100%;
}

header nav ul {
    display: grid;
    width: max-content;
    grid-auto-flow: column;
    gap: 0.5rem 1.25rem;
}
header nav ul li {
    display: grid;
    justify-content: start;
}
header nav ul li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
header nav ul li {
    height: 2.5rem;
    position: relative;
}
header nav ul li.current-link a {
    color: var(--color-text-link);
    font-weight: 700;
    text-decoration: 0.1875em underline;
    text-underline-offset: 0.8125em;
}
header nav ul li a {
    transition: scale 250ms, color 250ms;
    transition-timing-function: ease-in-out;
}
header nav ul li a:hover, header nav ul li a:focus-visible {
    scale: 1.05;
    color: var(--color-text-header-nav-hover);
}
header nav ul li.current-link a:hover, header nav ul li.current-link a:focus-visible {
    color: var(--color-text-link-hover);
}

header .dropdown-menu-outer, header button {
    display: none;
}

/* collapsing menu */
@media (max-width: 850px) {
    header button {
        display: block;
    }
    header button::after {
        content: "";
        display: block;
        width: 1.5rem;
        height: 1.5rem;
        margin: 0.5rem;
        background: linear-gradient(transparent 0%, transparent 8%, 
                                    var(--color-text-link) 8%, var(--color-text-link) 20%,
                                    transparent 20%, transparent 44%,
                                    var(--color-text-link) 44%, var(--color-text-link) 56%,
                                    transparent 56%, transparent 80%,
                                    var(--color-text-link) 80%, var(--color-text-link) 92%,
                                    transparent 92%, transparent 100%);
    }
    header nav:not(.closed) .dropdown-menu-outer {
        position: fixed;
        display: block;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 100;
    }
    header nav ul {
        position: absolute;
        z-index: 500;
        width: fit-content;
        height: auto;
        grid-auto-flow: row;
        gap: 0;
        background: var(--color-bg-header-nav);
        padding-inline: 1rem;
        padding-block: 1rem;
        min-width: min(15rem, 50%);
        top: 100%;
        right: 0;
        box-shadow: 0 0 0.5rem 0.375rem var(--color-shadow-header-nav);
        transition: padding-block 400ms, opacity 400ms;
        transition-timing-function: ease-in-out;
    }
    header nav.closed ul {
        padding-block: 0;
        opacity: 0;
    }
    header nav ul li {
        height: auto;
        width: 100%;
        grid-template-rows: 1fr;
        transition: grid-template-rows 400ms;
        transition-timing-function: ease-in-out;
    }
    header nav.closed ul li {
        grid-template-rows: 0fr;
    }
    header nav ul li a {
        padding-inline: 0.75rem;
        padding-block: 0.75rem;
        height: 2.5rem;
        transition: padding-block 400ms, opacity 400ms, height 400ms, display 400ms, scale 250ms, color 250ms;
        transition-timing-function: ease-in-out;
        transition-behavior: allow-discrete;
    }
    header nav.closed ul li a {
        padding-block: 0;
        opacity: 0;
        height: 0;
        display: none;
    }
    @starting-style {
        header nav ul li a {
            padding-inline: 0;
            padding-block: 0;
            height: 0;
        }
    }
    header nav ul li.current-link a {
        text-decoration: 0.125em underline;
        text-underline-offset: 0.3125em;
    }
}

/* FOOTER ONLY (some overlap with contact info) */
footer {
    background: var(--color-bg-footer);
    padding: 2rem;
}
footer * {
    color: var(--color-text-footer);
    text-decoration: none;
}
footer *:focus-visible {
    outline-color: var(--color-focus-footer);
}
footer hr {
    width: 100%;
    height: 0.075em;
    margin-block: 1rem 2rem;
    background: currentColor;
}
footer .copyright {
    color: var(--color-text-footer-secondary);
    font-size: 0.75rem;
    margin-top: 2rem;
}
.footer-content {
    display: flex;
    flex-direction: row;
}
.footer-content, .contact-info, footer nav > ul {
    gap: clamp(3rem, 6vw, 6rem);
}
.footer-content a, .contact-info a {
    transition: scale 250ms;
    transition-timing-function: ease-in-out;
}
.footer-content a:hover, .footer-content a:focus-visible {
    scale: 1.1;
}
.contact-info a:hover, .contact-info a:focus-visible {
    scale: 1.05;
}
.social-link a:hover, .social-link a:focus-visible {
    scale: 1.15;
}
.contact-info ul {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.contact-info ul *, .contact-heading {
    line-height: 1.25;
    text-wrap: balance;
}
.contact-info ul li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.contact-heading {
    font-family: "Oswald", "DM Sans", "Helvetica", sans-serif;
    font-weight: 300;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.25em;
    margin-bottom: 0.5rem;
    text-decoration: 0.075em underline;
    text-underline-offset: 0.125em;
}

.contact-info, footer nav > ul {
    display: flex;
    flex-direction: row;
}
footer nav > ul > li {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
footer nav > ul > li > ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
footer nav a {
    display: inline-block;
    line-height: 1.25;
    text-decoration: none;
}

@media (max-width: 975px) {
    footer nav > ul {
        flex-direction: column;
        gap: 2rem;
    }
}
@media (max-width: 800px) {
    footer .contact-info {
        flex-direction: column;
        gap: 2rem;
    }
}
@media (max-width: 525px) {
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
}