/* Shared foundation */

@font-face {
    font-family: "青柳隶书";
    src: url("../../type/青柳隶书.ttf") format("truetype");
    font-style: normal;
    font-weight: normal;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

/* Shared static header */

.site-header--static {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 5%;
    color: #1a1a1a;
    font-family: "Noto Sans SC", sans-serif;
    line-height: 1.6;
    background-color: #fafaf8;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.site-header__brand {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--site-header-brand-color, var(--secondary-green));
    font-family: "青柳隶书", "Noto Serif SC", "STKaiti", "KaiTi", serif;
    font-size: 2rem;
    font-weight: 0;
    letter-spacing: 2px;
}

.site-header--static .site-header__brand {
    color: #2a5f2e;
    font-family: "青柳隶书", "Noto Sans SC", sans-serif;
    line-height: 1.6;
}

.site-header__seal {
    width: 30px;
    height: 30px;
}

.site-header__menu {
    display: flex;
    gap: 40px;
    list-style: none;
}

.site-header--static .site-header__nav {
    margin-left: auto;
    line-height: 1.6;
}

.site-header__link {
    position: relative;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 500;
}

.site-header--static .site-header__link {
    color: #1a1a1a;
    font-weight: 400;
    line-height: 1.6;
}

.site-header__link::after {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--site-header-accent-color, var(--primary-gold));
    content: "";
    transition: var(--transition);
}

.site-header--static .site-header__link::after {
    background-color: #f5c745;
}

.site-header__link:hover::after,
.site-header__link.is-active::after {
    width: 100%;
}

.site-header__link.is-active {
    color: var(--site-header-active-color, var(--secondary-green));
    font-weight: 700;
}

.site-header--static .site-header__link.is-active {
    color: #2a5f2e;
}

.page-body--tourism {
    --site-header-accent-color: var(--primary-golden);
    --site-header-active-color: var(--golden-deep);
    --site-header-brand-color: var(--dark-forest);
}

@media (max-width: 860px) {
    .site-header--static {
        gap: 0;
        min-height: auto;
    }

    .site-header--static .site-header__brand {
        font-size: 1.5rem;
    }

    .site-header--static .site-header__seal {
        width: 25px;
        height: 25px;
    }

    .site-header--static .site-header__menu {
        gap: 14px;
    }

    .site-header--static .site-header__link {
        font-size: 0.88rem;
    }
}

/* Shared standard footer */

.site-footer--standard {
    margin-top: 0;
    padding: 1.75rem 5% 40px;
    color: #f4f7e8;
    font-size: 0.82rem;
    line-height: 1.8;
    text-align: center;
    background-color: #2a5f2e;
}

.site-footer--standard .site-footer__secondary {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.76rem;
    opacity: 0.78;
}

/* Mobile reading layout */

@media (max-width: 768px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .page-body:not(.page-body--home) {
        padding-top: 118px;
    }

    .site-header--static,
    .site-header--home,
    .site-header--home.is-scrolled {
        flex-wrap: wrap;
        row-gap: 8px;
        align-items: center;
        padding: 10px 4%;
    }

    .site-header--static .site-header__brand,
    .site-header--home .site-header__brand,
    .site-header--home.is-scrolled .site-header__brand {
        flex: 0 0 auto;
        font-size: 1.45rem;
        line-height: 1.35;
        letter-spacing: 1px;
    }

    .site-header--static .site-header__seal,
    .site-header--home .site-header__seal,
    .site-header--home.is-scrolled .site-header__seal {
        width: 24px;
        height: 24px;
    }

    .site-header__nav,
    .site-header--static .site-header__nav {
        flex: 0 0 100%;
        width: 100%;
        margin-left: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .site-header__nav::-webkit-scrollbar {
        display: none;
    }

    .site-header__menu,
    .site-header--static .site-header__menu {
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 16px;
        min-width: max-content;
        padding: 0 2px 2px;
    }

    .site-header__link,
    .site-header--static .site-header__link {
        font-size: 0.86rem;
        line-height: 1.4;
        white-space: nowrap;
    }

    .site-footer--standard {
        padding: 1.35rem 5% 26px;
        font-size: 0.76rem;
    }
}

@media (max-width: 480px) {
    .page-body:not(.page-body--home) {
        padding-top: 112px;
    }

    .site-header--static,
    .site-header--home,
    .site-header--home.is-scrolled {
        padding: 9px 4%;
    }

    .site-header--static .site-header__brand,
    .site-header--home .site-header__brand,
    .site-header--home.is-scrolled .site-header__brand {
        font-size: 1.3rem;
    }

    .site-header__menu,
    .site-header--static .site-header__menu {
        gap: 13px;
    }

    .site-header__link,
    .site-header--static .site-header__link {
        font-size: 0.8rem;
    }
}
