/* ==========================================================================
   百年之约 · base.css —— 设计令牌 / 重置 / 印章 / 按钮 / 通用
   设计语言：碑拓金石。玄墨拓片底、米白刻痕、鎏金、朱砂印。
   ========================================================================== */

:root {
    /* 拓片暗调（默认） */
    --ink: #171410;          /* 玄墨底 */
    --ink-2: #201c16;        /* 拓片深灰 */
    --paper: #eae2cf;        /* 米白刻痕 */
    --paper-dim: #b7ae99;    /* 褪色刻痕 */
    --gold: #c9a227;         /* 鎏金 */
    --gold-deep: #9d7d1c;
    --seal: #b23a2e;         /* 朱砂 */
    --seal-deep: #8e2b21;
    --line: rgba(234, 226, 207, 0.14);
    --line-strong: rgba(201, 162, 39, 0.45);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    --radius: 2px;
    --font-serif: "Songti SC", "SimSun", "Noto Serif SC", serif;
    --font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    --font-num: "geist-mono-latin", "JetBrains Mono", Consolas, monospace;
}

html[data-theme="light"] {
    --ink: #f6f2e7;          /* 宣纸底 */
    --ink-2: #efe8d8;
    --paper: #1c1915;        /* 墨字 */
    --paper-dim: #6b6455;
    --gold: #9d7d1c;
    --gold-deep: #7c6113;
    --seal: #a63a2b;
    --seal-deep: #8e2b21;
    --line: rgba(28, 25, 21, 0.12);
    --line-strong: rgba(157, 125, 28, 0.5);
    --shadow: 0 20px 60px rgba(60, 50, 30, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background: var(--ink);
    color: var(--paper);
    line-height: 1.75;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* 拓片麻点纹理 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    background-image:
        radial-gradient(rgba(234, 226, 207, 0.035) 1px, transparent 1px),
        radial-gradient(rgba(201, 162, 39, 0.02) 1px, transparent 1px);
    background-size: 3px 3px, 7px 7px;
    mix-blend-mode: screen;
}

html[data-theme="light"] body::before {
    background-image:
        radial-gradient(rgba(28, 25, 21, 0.03) 1px, transparent 1px);
    mix-blend-mode: multiply;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; }
em { font-style: normal; }
::selection { background: var(--seal); color: var(--ink); }

.l-wide { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--seal); color: var(--ink);
    padding: 8px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- 印章 ---------- */
.seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    background: var(--seal);
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 15px;
    line-height: 1.15;
    letter-spacing: 0;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.25), 0 2px 8px rgba(142, 43, 33, 0.4);
    position: relative;
    flex-shrink: 0;
}
.seal::after {
    content: "";
    position: absolute; inset: 3px;
    border: 1px solid rgba(0, 0, 0, 0.22);
    border-radius: 1px;
    pointer-events: none;
}
.seal--sm { width: 38px; height: 38px; font-size: 12px; }
.seal--lg { width: 68px; height: 68px; font-size: 20px; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 14px;
    letter-spacing: 0.08em;
    border: 1px solid var(--line-strong);
    color: var(--paper);
    background: transparent;
    border-radius: var(--radius);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn--seal {
    background: var(--seal);
    border-color: var(--seal);
    color: var(--ink);
    font-weight: 600;
}
.btn--seal:hover { background: var(--seal-deep); border-color: var(--seal-deep); color: var(--ink); }
.btn--gold {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--ink);
    font-weight: 600;
}
.btn--gold:hover { background: var(--gold-deep); border-color: var(--gold-deep); color: var(--ink); }
.btn--sm { padding: 8px 16px; font-size: 13px; }

/* ---------- 区块标题 ---------- */
.sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 36px;
}
.sec-head__title {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 14px;
}
.sec-head__title .seal { transform: rotate(-3deg); }
.sec-head__title em {
    color: var(--gold);
    font-style: normal;
}
.sec-head__desc { color: var(--paper-dim); font-size: 13px; letter-spacing: 0.12em; }
.sec-head__acts { display: flex; align-items: center; gap: 10px; }

.link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: var(--gold);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}
.link:hover { border-color: var(--gold); }

/* ---------- 动效 ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- 占位浮层 ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 20px);
    background: var(--paper);
    color: var(--ink);
    padding: 12px 22px;
    font-size: 14px;
    letter-spacing: 0.06em;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 90;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
    .sec-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .sec-head__title { font-size: 26px; }
}
