/* 极光描物 JIGUANG MIAOWU · 基础层（tokens / reset / 组件） */
:root {
  --paper: #F4F0E6;
  --paper-2: #ECE5D6;
  --paper-3: #E2DAC8;
  --ink: #14181D;
  --ink-2: #1E252D;
  --dim: #5C6672;
  --dim-2: #7B8592;
  --line: rgba(20, 24, 29, 0.14);
  --line-strong: rgba(20, 24, 29, 0.3);
  --accent: #C8402A;
  --accent-soft: rgba(200, 64, 42, 0.1);
  --accent-2: #17756C;
  --accent-3: #A9771A;
  --dark: #0B0F14;
  --dark-2: #111821;
  --dark-line: rgba(244, 240, 230, 0.13);
  --dark-dim: rgba(244, 240, 230, 0.62);
  --serif: "Noto Serif CJK SC", "Songti SC", "Source Han Serif SC", serif;
  --sans: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  --mono: "Noto Sans Mono", "JetBrains Mono", "SF Mono", Menlo, monospace;
  --max: 1240px;
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: 0.9em; }
::selection { background: rgba(200, 64, 42, 0.22); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* 纸面颗粒 */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* 品牌 */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-seal {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #FBF6EA;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  flex: 0 0 auto;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font-family: var(--serif); font-size: 19px; letter-spacing: 0.04em; }
.brand-text i {
  font-style: normal;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--dim);
  margin-top: 3px;
}

/* 导航 */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 36px;
  padding: 16px var(--pad);
  background: rgba(244, 240, 230, 0.82);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(244, 240, 230, 0.94); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  font-size: 14px; color: var(--dim); letter-spacing: 0.02em;
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-accent { background: var(--accent); color: #FBF6EA; }
.btn-accent:hover { background: #B13722; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }
.btn-outline { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn-outline:hover { background: rgba(20, 24, 29, 0.05); border-color: var(--ink); }
.btn-ghost { color: var(--dim); background: transparent; }
.btn-ghost:hover { color: var(--ink); }
.btn-lg { padding: 15px 24px; font-size: 15px; }
.btn-block { display: flex; justify-content: center; width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* 通用排版元素 */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.eyebrow .tick { width: 26px; height: 1px; background: currentColor; display: block; }
.eyebrow.light { color: #FF6B4A; }

h2 { font-family: var(--serif); font-size: clamp(32px, 3.6vw, 52px); line-height: 1.18; letter-spacing: -0.01em; }
.section-head { max-width: 820px; }
.section-head p { margin-top: 18px; color: var(--dim); font-size: 17px; max-width: 640px; }
.section-head.light { color: var(--paper); }
.section-head.light p { color: var(--dark-dim); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 500; font-size: 14.5px;
  border-bottom: 1px solid rgba(200, 64, 42, 0.35);
  padding-bottom: 2px;
}
.link-arrow span { transition: transform 0.2s ease; }
.link-arrow:hover span { transform: translateX(4px); }

/* 入场动画 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* 代码 */
pre.code-block {
  margin: 0;
  padding: 26px 28px;
  border-radius: 6px;
  background: #0A0E13;
  border: 1px solid rgba(244, 240, 230, 0.1);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.85;
  color: #C9D3DE;
  tab-size: 2;
}
pre.code-block .c-key { color: #FF8A70; }
pre.code-block .c-str { color: #8FD6B4; }
pre.code-block .c-dim { color: #5D6B7A; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(20, 24, 29, 0.22); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* 移动端导航 */
.nav-menu-btn {
  display: none; width: 40px; height: 40px; flex: none; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 3px; background: transparent;
  color: var(--ink); font-size: 18px; cursor: pointer;
}
.nav-mobile {
  position: fixed; left: 12px; right: 12px; top: 66px; z-index: 120;
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px; background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: 6px; box-shadow: 0 24px 60px -24px rgba(20,24,29,.45);
}
.nav-mobile[hidden] { display: none; }
.nav-mobile a { padding: 12px 14px; font-size: 14px; color: var(--ink); border-radius: 3px; }
.nav-mobile a:hover { background: var(--paper-2); }
@media (max-width: 1120px) {
  .nav-menu-btn { display: grid; margin-left: auto; }
  .nav-actions { margin-left: 0; }
}

/* 移动端导航：品牌不换行，按钮收紧 */
@media (max-width: 1120px) {
  .nav { padding: 12px 14px; gap: 10px; }
  .nav .brand { flex: none; }
  .nav .brand-text b, .nav .brand-text i { white-space: nowrap; }
  .nav-actions { margin-left: 0; }
  .nav-actions .btn { height: 34px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
  .nav-menu-btn { width: 36px; height: 36px; }
}

/* 站点公告：首页顶部横幅 + 访问弹窗 */
.ann-banner { background: #18201F; color: #F4F0E6; border-bottom: 1px solid rgba(255,255,255,.08); margin-top: 66px; position: relative; z-index: 90; }
.ann-banner-inner { max-width: 1240px; margin: 0 auto; min-height: 42px; padding: 8px 20px; display: flex; align-items: center; gap: 16px; }
.ann-banner-text { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1; flex-wrap: wrap; }
.ann-banner-text b { font-family: var(--serif); font-size: 14px; color: #F4F0E6; }
.ann-banner-text span { font-size: 12px; color: rgba(244,240,230,.72); }
.ann-banner-link { color: #F2B84B; font-size: 12px; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.ann-banner-close { border: 0; background: transparent; color: rgba(244,240,230,.6); font-size: 20px; line-height: 1; cursor: pointer; }
.ann-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 18px; }
.ann-modal-backdrop { position: absolute; inset: 0; background: rgba(12,14,16,.58); backdrop-filter: blur(3px); }
.ann-modal-panel { position: relative; width: min(520px, 100%); max-height: calc(100vh - 36px); overflow: auto; background: #FBF8F0; border: 1px solid var(--line-strong); border-radius: 8px; padding: 28px 26px 22px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.ann-modal-close { position: absolute; right: 12px; top: 10px; border: 0; background: transparent; font-size: 24px; color: var(--dim); cursor: pointer; }
.ann-eyebrow { font-family: var(--mono); font-size: 9.5px; letter-spacing: .18em; color: var(--accent); }
.ann-modal h2 { font-family: var(--serif); font-size: 25px; line-height: 1.35; margin: 8px 0 10px; }
.ann-modal-content { color: var(--dim); font-size: 13.5px; line-height: 1.85; white-space: pre-wrap; }
.ann-modal-link { margin-top: 18px; }
.ann-modal-ok { margin-top: 14px; }
@media(max-width:620px){ .ann-banner{margin-top:60px;} .ann-banner-inner{padding:8px 14px; gap:8px;} .ann-banner-text b{font-size:13px;} .ann-banner-text span{font-size:11px;} .ann-modal-panel{padding:24px 18px 18px;} }
.ann-banner[hidden], .ann-modal[hidden] { display: none !important; }
.contact-list { display:flex; flex-direction:column; gap:8px; margin-top:14px; }
.contact-row { display:block; padding:11px 13px; border:1px solid var(--line); border-radius:4px; background:#fff; color:var(--ink); font-size:13px; text-decoration:none; line-height:1.6; }
a.contact-row:hover { border-color:var(--accent); color:var(--accent); }
.contact-qr { width:160px; height:160px; object-fit:contain; border:1px solid var(--line); border-radius:4px; background:#fff; margin-top:4px; }
.contact-empty { font-size:12.5px; line-height:1.8; color:var(--dim); }
