:root {
    /* Update these values to match the colourway in colourway.txt. */
    --colour-page: #fff7e4;
    --colour-text: #2f5351;
    --colour-accent: #499796;
    --colour-accent-hover: #499796;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--colour-page);
    color: var(--colour-text);
    font-family: 'Figtree', sans-serif;
}
.content {
    width: calc(100% - 20px);
    max-width: 1440px;
    margin: 10px auto;
    padding-inline: 20px;
}
.site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    min-height: 160px;
    padding: 16px clamp(20px, 5vw, 72px) 20px;
    border-bottom: 1px solid rgb(38 38 38 / 10%);
}
.brand {
    display: inline-flex;
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    align-self: end;
}
.brand img { display: block; width: auto; max-width: 220px; max-height: 160px; }
.menu-toggle { display: none; }
.social-links {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    align-items: center;
    gap: 50px;
}
.social-links img { display: block; width: 28px; height: 28px; object-fit: contain; }
.social-links a {
    color: var(--colour-text);
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease;
}
.social-links a:hover, .social-links a:focus-visible { color: var(--colour-accent-hover); }
.navigation {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    max-width: 800px;
    justify-self: center;
    align-self: center;
}
.navigation ul {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: center;
    width: 100%;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
.navigation a {
    display: block;
    color: var(--colour-text);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: color 160ms ease;
}
.navigation a:hover, .navigation a:focus-visible { color: var(--colour-accent-hover); }
.navigation a[aria-current="page"] { color: var(--colour-accent); }
.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    min-height: 160px;
    padding: 20px clamp(20px, 5vw, 72px) 20px;
    background: var(--colour-text);
    color: #fff;
}
.footer-brand { display: inline-flex; align-items: center; }
.footer-brand img { display: block; width: auto; max-width: 220px; max-height: 160px; }
.footer-navigation { align-self: end; justify-self: center; }
.footer-navigation ul {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.5vw, 36px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.footer-navigation a {
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease;
}
.footer-navigation a:hover, .footer-navigation a:focus-visible { color: var(--colour-page); }
.footer-social-links {
    display: flex;
    align-self: end;
    justify-self: end;
    align-items: center;
    gap: 50px;
}
.footer-social-links img { display: block; width: 28px; height: 28px; object-fit: contain; }
@media (max-width: 1100px) and (min-width: 801px) {
    .navigation { max-width: 640px; }
    .navigation ul { gap: 0; }
    .navigation a { font-size: 1rem; }
}
@media (max-width: 800px) {
    .site-header {
        position: relative;
        z-index: 1;
        grid-template-columns: minmax(0, 1fr) auto auto;
        min-height: 0;
        padding-inline: 18px;
        column-gap: 16px;
    }
    .brand { grid-column: 1; grid-row: 1; align-self: center; }
    .brand img { max-width: 140px; max-height: 56px; }
    .menu-toggle {
        display: flex;
        grid-column: 2;
        grid-row: 1;
        width: 44px;
        height: 44px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        border: 0;
        background: transparent;
        cursor: pointer;
    }
    .menu-toggle span { display: block; width: 24px; height: 2px; background: var(--colour-text); }
    .menu-toggle:focus-visible { outline: 2px solid var(--colour-accent); outline-offset: 2px; }
    .social-links { grid-column: 3; grid-row: 1; align-self: center; gap: 10px; }
    .social-links a { font-size: .7rem; }
    .social-links img { width: 24px; height: 24px; }
    .navigation {
        position: absolute;
        top: 100%;
        right: 18px;
        z-index: 2;
        display: none;
        width: min(280px, calc(100vw - 36px));
        padding: 8px 16px;
        background: var(--colour-page);
        box-shadow: 0 8px 20px rgb(47 83 81 / 18%);
    }
    .site-header.menu-open .navigation { display: block; }
    .navigation ul { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
    .navigation li { border-top: 1px solid rgb(38 38 38 / 10%); }
    .navigation a { display: block; padding: 12px 4px; font-size: 1rem; text-align: right; }
}
@media (min-width: 640px) and (max-width: 800px) {
    .navigation {
        width: min(640px, calc(100vw - 36px));
        max-width:640px;
    }
}
@media (max-width: 639px) {
    .site-footer {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        justify-items: stretch;
        row-gap: 18px;
        padding-inline: 18px;
    }
    .footer-brand { grid-column: 1; grid-row: 1; justify-self: start; }
    .footer-brand img { max-width: 120px; max-height: 88px; }
    .footer-navigation { grid-column: 1 / -1; grid-row: 2; align-self: center; justify-self: center; }
    .footer-navigation ul { flex-wrap: wrap; justify-content: center; gap: 12px 18px; }
    .footer-navigation a { font-size: .75rem; }
    .footer-social-links { grid-column: 2; grid-row: 1; align-self: center; justify-self: end; gap: 10px; }
    .footer-social-links img { width: 24px; height: 24px; }
}