﻿
/* ==========================================
   SAINT ANNE'S RUN
   Header, Navigation and Footer
   Option B
   ========================================== */

:root {
    --header-height: 86px;
    --header-compact-height: 64px;
    --brand-navy: #43485B;
    --brand-salmon: #E7A69A;
    --brand-paper: #FFFDFA;
}

/* STICKY HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: var(--brand-paper);
    border-bottom: 1px solid rgba(52, 67, 84, 0.10);
    transition: background-color .25s ease, box-shadow .25s ease;
}

    .site-header.is-scrolled {
        background: rgba(255, 253, 250, .98);
        box-shadow: 0 5px 20px rgba(35, 51, 67, .10);
    }

    /* HEADER CONTAINER */

    .site-header .header-inner {
        width: 100%;
        max-width: 1600px;
        min-height: var(--header-height);
        margin: 0 auto;
        padding: 10px 4%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 28px;
        transition: min-height .25s ease, padding .25s ease;
    }

    .site-header.is-scrolled .header-inner {
        min-height: var(--header-compact-height);
        padding-top: 5px;
        padding-bottom: 5px;
    }

    /* TEXT WORDMARK */

    .site-header .brand {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        text-decoration: none;
    }

.brand-identity {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

    .brand-identity .brand-name {
        font-family: Georgia, "Times New Roman", serif;
        font-size: clamp(22px, 2vw, 29px);
        font-weight: normal;
        letter-spacing: .025em;
        color: var(--brand-navy);
        white-space: nowrap;
        transition: font-size .25s ease;
    }

    .brand-identity small {
        margin-top: 8px;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 9px;
        letter-spacing: 2.1px;
        color: #697581;
    }

.is-scrolled .brand-identity .brand-name {
    font-size: clamp(20px, 1.8vw, 25px);
}

.is-scrolled .brand-identity small {
    margin-top: 5px;
}

/* DESKTOP NAVIGATION */

.site-header .main-nav {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.2vw, 34px);
}

    .site-header .main-nav a {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .7px;
        text-decoration: none;
        white-space: nowrap;
        color: var(--brand-navy);
        transition: color .2s ease;
    }

        .site-header .main-nav a:hover,
        .site-header .main-nav a:focus-visible {
            color: #BE776B;
        }

    .site-header .main-nav .nav-contact {
        background: var(--brand-salmon);
        border: 1px solid #D89387;
        padding: 13px 27px;
        color: #233343;
        transition: background-color .2s ease, padding .25s ease;
    }

.site-header.is-scrolled .nav-contact {
    padding-top: 10px;
    padding-bottom: 10px;
}

.site-header .main-nav .nav-contact:hover {
    background: #F0B8AD;
    color: #233343;
}

/* MOBILE MENU CONTROL */

.site-header .menu-toggle {
    display: none;
}

/* STICKY HEADER SCROLL OFFSETS */

html {
    scroll-padding-top: 105px;
}

section[id] {
    scroll-margin-top: 105px;
}

/* ==========================================
   NAVY FOOTER WITH ORIGINAL CREST
   ========================================== */

.site-footer {
    background: var(--brand-navy);
    color: #FFFDF7;
    padding: 55px 4% 22px;
}

    .site-footer .footer-inner {
        max-width: 1450px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 50px;
    }

.footer-brand {
    display: flex;
    align-items: center;
    gap: 28px;
}

.footer-crest {
    display: block;
    width: 160px;
    height: 160px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-brand-details h2 {
    margin: 0 0 10px;
    font-family: Georgia, serif;
    font-weight: normal;
    font-size: 26px;
    letter-spacing: .04em;
    color: #FFFDF7;
}

.footer-brand-details p {
    margin: 0 0 9px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 1px;
    color: #E9E5E1;
}

.footer-brand-details span {
    font-family: Georgia, serif;
    font-size: 14px;
    font-style: italic;
    color: #E7A69A;
}

/* FOOTER NAVIGATION */

.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 23px;
}

    .site-footer .footer-links a {
        color: #FFFDF7;
        font-family: Arial, sans-serif;
        font-size: 11px;
        text-decoration: none;
        transition: color .2s ease;
    }

        .site-footer .footer-links a:hover {
            color: var(--brand-salmon);
        }

/* FOOTER BOTTOM */

.site-footer .footer-bottom {
    max-width: 1450px;
    margin: 45px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.16);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #D7D8DC;
    font-family: Arial, sans-serif;
    font-size: 11px;
}

    .site-footer .footer-bottom a {
        color: #D7D8DC;
        text-decoration: none;
    }

        .site-footer .footer-bottom a:hover {
            color: var(--brand-salmon);
        }

/* ==========================================
   TABLET
   ========================================== */

@media (max-width: 1100px) {

    .site-header .header-inner {
        gap: 16px;
        padding-left: 3%;
        padding-right: 3%;
    }

    .brand-identity .brand-name {
        font-size: 22px;
    }

    .site-header .main-nav {
        gap: 14px;
    }

        .site-header .main-nav a {
            font-size: 10px;
        }

        .site-header .main-nav .nav-contact {
            padding: 12px 16px;
        }

    .footer-crest {
        width: 130px;
        height: 130px;
    }

    .site-footer .footer-inner {
        gap: 30px;
    }
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 800px) {

    :root {
        --header-height: 74px;
        --header-compact-height: 62px;
    }

    .site-header .header-inner,
    .site-header.is-scrolled .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 8px 5%;
    }

    .brand-identity .brand-name {
        font-size: clamp(18px, 4vw, 24px);
    }

    .is-scrolled .brand-identity .brand-name {
        font-size: clamp(18px, 4vw, 22px);
    }

    .brand-identity small {
        font-size: 8px;
        letter-spacing: 1.1px;
    }

    .site-header .menu-toggle {
        display: block;
        background: var(--brand-paper);
        color: var(--brand-navy);
        border: 1px solid #DEDAD6;
        padding: 10px 12px;
        font-family: Arial, sans-serif;
        font-weight: 700;
        font-size: 11px;
        letter-spacing: .8px;
    }

    .site-header .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 5% 20px;
        background: var(--brand-paper);
        border-bottom: 1px solid #DEDAD6;
        box-shadow: 0 15px 25px rgba(35,51,67,.10);
    }

        .site-header .main-nav.open {
            display: flex;
        }

        .site-header .main-nav a {
            padding: 15px 10px;
            font-size: 12px;
        }

        .site-header .main-nav .nav-contact {
            margin-top: 10px;
            padding: 15px;
            text-align: center;
        }

    html {
        scroll-padding-top: 85px;
    }

    section[id] {
        scroll-margin-top: 85px;
    }

    .site-footer {
        padding: 45px 5% 20px;
    }

        .site-footer .footer-inner {
            flex-direction: column;
            align-items: flex-start;
            gap: 30px;
        }

    .footer-brand {
        gap: 18px;
    }

    .footer-crest {
        width: 105px;
        height: 105px;
    }

    .footer-brand-details h2 {
        font-size: 22px;
    }
}

/* SMALL PHONES */

@media (max-width: 390px) {

    .brand-identity .brand-name {
        font-size: 17px;
    }

    .brand-identity small {
        font-size: 7px;
    }

    .footer-crest {
        width: 90px;
        height: 90px;
    }

    .footer-brand-details h2 {
        font-size: 19px;
    }

    .site-footer .footer-bottom {
        flex-direction: column;
    }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    .site-header,
    .site-header .header-inner,
    .brand-identity .brand-name,
    .site-header .nav-contact {
        transition: none;
    }
}
