/* ==========================================================================
   十年之约 · 布局层：页头 / 导航 / 抽屉 / 页脚
   ========================================================================== */

/* ==========================================================================
   页头：书脊式，左侧竖排签条
   ========================================================================== */
.masthead {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(244, 240, 230, 0.92);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--rule);
    transition: box-shadow .22s, border-color .22s;
}

.masthead.is-stuck {
    box-shadow: 0 6px 24px -18px rgba(27, 26, 23, 0.55);
    border-color: var(--rule-2);
}

.masthead__bar {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    height: 72px;
}

/* 品牌 */
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: 0 0 auto;
}

.brand__seal {
    width: 40px;
    height: 40px;
    font-size: 12px;
    border-width: 1.5px;
    border-radius: 4px;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand__name {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.brand__sub {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    color: var(--ink-4);
    text-transform: uppercase;
}

/* 主导航 */
.nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: var(--sp-3);
    flex: 1 1 auto;
    min-width: 0;
}

.nav__link {
    position: relative;
    padding: 8px 13px;
    font-size: var(--fs-sm);
    color: var(--ink-2);
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: color .18s;
}

.nav__link::after {
    content: "";
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 2px;
    height: 1.5px;
    background: var(--seal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .22s cubic-bezier(.2,.7,.3,1);
}

.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }

.nav__link.is-current { color: var(--seal); font-weight: 600; }
.nav__link.is-current::after { transform: scaleX(1); }

/* 页头工具区 */
.masthead__tools {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex: 0 0 auto;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--rule-2);
    border-radius: 2px;
    color: var(--ink-2);
    background: transparent;
    transition: color .18s, border-color .18s, background-color .18s;
}

.icon-btn:hover {
    color: var(--seal);
    border-color: var(--seal);
    background: rgba(255, 255, 255, 0.5);
}

.masthead__login { border-color: var(--rule-2); }

.masthead__compact { display: none; align-items: center; gap: var(--sp-2); }

/* 移动抽屉 */
.drawer {
    position: fixed;
    inset: 72px 0 0 0;
    z-index: 55;
    background: var(--paper);
    border-top: 1px solid var(--rule);
    padding: var(--sp-6);
    overflow-y: auto;
}

.drawer[hidden] { display: none; }

.drawer__nav {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--rule);
}

.drawer__nav a {
    padding: var(--sp-4) 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--serif);
    font-size: var(--fs-md);
    letter-spacing: 0.08em;
}

.drawer__nav a:hover { color: var(--seal); }

.drawer__foot {
    display: flex;
    gap: var(--sp-3);
    margin-top: var(--sp-6);
}

.drawer__foot .btn { flex: 1 1 auto; justify-content: center; }

/* ==========================================================================
   页脚
   ========================================================================== */
.footer {
    margin-top: var(--sp-9);
    border-top: 2px solid var(--ink);
    background: var(--paper-2);
}

/* --- 上：捐赠条 --- */
.footer__donate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-6);
    padding: var(--sp-6) 0;
    border-bottom: 1px solid var(--rule);
}

.footer__donate-main {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    min-width: 0;
}

.footer__donate-main strong {
    display: block;
    font-family: var(--serif);
    font-size: var(--fs-md);
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.footer__donate-main p {
    font-size: var(--fs-sm);
    color: var(--ink-3);
}

/* --- 中：主区 三栏 --- */
.footer__main {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--sp-7) var(--sp-6);
    padding: var(--sp-8) 0 var(--sp-7);
}

.footer__brand {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    min-width: 0;
}

.footer__brand-mark {
    display: flex;
    align-items: center;
    gap: 11px;
}

.footer__brand-mark .brand__name { font-size: 18px; }

.footer__brand p {
    font-size: var(--fs-sm);
    color: var(--ink-3);
    line-height: 1.85;
    max-width: 30em;
}

.footer__meta-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: var(--fs-xs);
    color: var(--ink-4);
}

.footer__meta-list span {
    display: flex;
    gap: 8px;
}

.footer__meta-list b {
    font-weight: 400;
    color: var(--ink-3);
    flex: 0 0 62px;
}

.footer__col { min-width: 0; }

.footer__col h3 {
    font-family: var(--sans);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--ink-4);
    text-transform: uppercase;
    margin-bottom: var(--sp-4);
}

.footer__col ul {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.footer__col a {
    font-size: var(--fs-sm);
    color: var(--ink-2);
    transition: color .18s, padding-left .18s;
}

.footer__col a:hover { color: var(--seal); }

/* --- 下：版权条 --- */
.footer__base {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-5);
    padding: var(--sp-5) 0 var(--sp-6);
    border-top: 1px solid var(--rule);
    font-size: var(--fs-xs);
    color: var(--ink-4);
}

.footer__base-links {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}

.footer__base-links a { color: var(--ink-3); }
.footer__base-links a:hover { color: var(--seal); }

/* --- 响应式 --- */
@media (max-width: 1024px) {
    .nav { display: none; }
    .masthead__tools { display: none; }
    .masthead__compact { display: flex; margin-left: auto; }
    .masthead__search-inline { display: none; }

    .footer__main {
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-6) var(--sp-6);
        padding: var(--sp-7) 0 var(--sp-6);
    }

    .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .masthead__bar { height: 64px; gap: var(--sp-4); }
    .brand__sub { display: none; }
    .drawer { inset: 64px 0 0 0; }

    .footer__donate {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sp-4);
        padding: var(--sp-5) 0;
    }

    .footer__donate .btn { width: 100%; justify-content: center; }

    .footer__main {
        grid-template-columns: 1fr;
        gap: var(--sp-6);
    }

    .footer__col {
        padding-bottom: var(--sp-4);
        border-bottom: 1px solid var(--rule);
    }

    .footer__col:last-child { border-bottom: 0; padding-bottom: 0; }

    .footer__base {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--sp-3);
    }
}
