/**
 * 知恩会·表心意 站点样式
 * 设计稿基准宽度 1920px（切图资源为 2900px 二倍图，等比缩放还原）
 */

:root {
    --c-bg: #0d0415;
    --c-gold: #d9c5a2;
    --c-nav: #7a6f75;
    --header-h: 4.72vw;
    --side-left: calc(8.03% - 1.14vw);
    --side-right: 8.05%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--c-bg);
    color: #ece3d8;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
}

/* 仅屏幕阅读器可见 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------- 顶部导航 ---------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--c-bg);
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: var(--header-h);
    padding: 0 var(--side-right) 0 var(--side-left);
}

.brand {
    display: block;
    flex: none;
    line-height: 0;
}

.brand img {
    display: block;
    width: auto;
    height: 4.21vw;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.4vw, 46px);
}

.site-nav__link {
    font-size: clamp(13px, 1.06vw, 21px);
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: var(--c-nav);
    text-decoration: none;
    transition: color 0.25s ease;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
    color: var(--c-gold);
}

/* ---------------- 内容切片 ---------------- */

.page {
    display: block;
    font-size: 0;
}

.page__slice {
    display: block;
}

.page__slice img {
    display: block;
    width: 100%;
    height: auto;
}

/* 滚动入场 */

.js .page__slice img {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.js .page__slice.is-in img {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .js .page__slice img {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------------- 公共底部 ---------------- */

.site-footer {
    background: #000;
    font-size: 0;
}

.site-footer img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------------- 移动端 ---------------- */

@media (max-width: 820px) {
    .site-header__bar {
        flex-direction: column;
        height: auto;
        padding: 10px 14px 0;
        gap: 6px;
    }

    .brand img {
        height: 34px;
    }

    .site-nav {
        width: 100%;
        justify-content: center;
        gap: 20px;
        margin-top: 4px;
        padding: 10px 0 11px;
        border-top: 1px solid rgba(217, 197, 162, 0.14);
    }

    .site-nav__link {
        font-size: 13px;
    }
}
