/* ==========================================================================
   乐享主页 · 共享样式表 /assets/site.css
   纸张叠层 + 经幡分层 + 档案卡的信息系统
   ========================================================================== */

/* ---------- 0. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd, ul, ol { margin: 0; }

ul, ol { padding: 0; list-style: none; }

img, svg { max-width: 100%; }

button { font: inherit; color: inherit; }

/* ---------- 1. 设计变量 ---------- */
:root {
  --ink: #122033;
  --ink-deep: #0B1420;
  --red: #A63D2F;
  --red-deep: #7A2A22;
  --turq: #2F7F74;
  --turq-deep: #1F5B54;
  --gold: #D9A441;
  --gold-deep: #8A6413;
  --paper: #FBF7EF;
  --sand: #F3E7D3;
  --grey: #5E6B7A;

  --line: rgba(18, 32, 51, .16);
  --line-strong: rgba(18, 32, 51, .42);
  --line-paper: rgba(251, 247, 239, .22);

  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;

  --width: 1200px;
  --gutter: clamp(18px, 4vw, 28px);
  --gap: 24px;
  --ease: cubic-bezier(.22, .68, .32, 1);
  --shadow-paper: 0 1px 0 rgba(18, 32, 51, .06), 0 16px 32px -22px rgba(18, 32, 51, .55);
}

/* ---------- 2. 基础排版 ---------- */
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.06; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 800; line-height: 1.3; }
h4 { font-size: 1.05rem; font-weight: 700; line-height: 1.4; }

p { line-height: 1.8; }

a {
  color: var(--red-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

:focus-visible {
  outline: 3px solid var(--turq);
  outline-offset: 3px;
}

.site-footer :focus-visible { outline-color: var(--gold); }

/* ---------- 3. 通用容器与工具 ---------- */
.container {
  width: 100%;
  max-width: calc(var(--width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 300;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  border: 2px solid var(--gold);
  transition: top .18s var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  text-decoration: none;
}

.section { padding-block: clamp(48px, 7vw, 88px); }
.section--tight { padding-block: clamp(28px, 4vw, 44px); }

.rule {
  height: 1px;
  border: 0;
  background: var(--line-strong);
}

/* ---------- 4. 刊头 ---------- */
.site-header {
  position: relative;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  background: rgba(18, 32, 51, .07);
}

.scroll-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold) 48%, var(--turq) 100%);
}

.header-ribbon { display: flex; height: 6px; }
.header-ribbon span { display: block; height: 100%; }
.header-ribbon span:nth-child(1) { flex: 1; background: var(--red); }
.header-ribbon span:nth-child(2) { flex: .45; background: var(--gold); }
.header-ribbon span:nth-child(3) { flex: .8; background: var(--turq); }
.header-ribbon span:nth-child(4) { flex: .3; background: var(--ink); }

.header-inner { padding-block: 0; }

.header-utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.header-edition {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grey);
  line-height: 1.5;
}

.utility-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.utility-links a {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--grey);
}

.utility-links a:hover {
  color: var(--red-deep);
  text-decoration: none;
}

.masthead {
  text-align: center;
  padding: 24px 0 18px;
}

.masthead-brand {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 6.2vw, 3.5rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: .05em;
  color: var(--ink);
}

.masthead-brand:hover {
  color: var(--red-deep);
  text-decoration: none;
}

.masthead-brand::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin: 12px auto 0;
  background: var(--red);
}

.masthead-tagline {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .22em;
  color: var(--grey);
  line-height: 1.6;
}

/* 移动端栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 0 auto 14px;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .18em;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}

.nav-toggle:hover {
  background: var(--red);
  border-color: var(--red);
}

.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  width: 16px;
  height: 14px;
}

.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .22s var(--ease), opacity .18s var(--ease);
}

.site-header[data-open] .nav-toggle-bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 主导航 */
.primary-nav { padding: 0 0 6px; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 2.4vw, 34px);
}

.nav-item { min-width: 0; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 2px 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ink);
  border-bottom: 3px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.nav-link::before {
  content: "";
  width: 14px;
  height: 2px;
  background: var(--line-strong);
  transition: width .2s var(--ease), background .2s var(--ease);
}

.nav-link:hover {
  color: var(--red-deep);
  text-decoration: none;
  border-bottom-color: var(--gold);
}

.nav-link:hover::before { width: 22px; background: var(--red); }

.nav-link[aria-current="page"] { color: var(--red-deep); }
.nav-link[aria-current="page"]::before { width: 22px; background: var(--red); }

.nav-link[aria-current="page"]::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--red);
}

/* ---------- 5. 页脚 ---------- */
.site-footer {
  background: var(--ink-deep);
  color: var(--paper);
  border-top: 3px solid var(--red);
}

.footer-flags { display: flex; height: 10px; }
.footer-flags span { display: block; height: 100%; }
.footer-flags span:nth-child(1) { flex: .6; background: var(--red); }
.footer-flags span:nth-child(2) { flex: .3; background: var(--gold); }
.footer-flags span:nth-child(3) { flex: .85; background: var(--turq); }
.footer-flags span:nth-child(4) { flex: .2; background: var(--paper); }
.footer-flags span:nth-child(5) { flex: .45; background: var(--red-deep); }

.footer-inner {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.5fr;
  gap: 40px 44px;
  padding-block: 56px 44px;
}

.footer-brand { min-width: 0; }

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: .08em;
  color: var(--paper);
}

.footer-summary {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(251, 247, 239, .72);
}

.footer-stamp {
  display: inline-block;
  margin-top: 18px;
  padding: 5px 12px;
  border: 1px solid rgba(217, 164, 65, .55);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  line-height: 1.6;
}

.footer-col { min-width: 0; }

.footer-col-title {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .24em;
  color: var(--gold);
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line-paper);
  line-height: 1.6;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
  color: rgba(251, 247, 239, .8);
  border-bottom: 1px dashed rgba(251, 247, 239, .13);
  transition: color .18s var(--ease);
}

.footer-links li:last-child a { border-bottom: 0; }

.footer-links a::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--turq);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}

.footer-links a:hover {
  color: var(--gold);
  text-decoration: none;
}

.footer-links a:hover::before { opacity: 1; transform: none; }

.footer-contact-list li {
  padding-bottom: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.85;
  color: rgba(251, 247, 239, .78);
  border-bottom: 1px dashed rgba(251, 247, 239, .13);
  overflow-wrap: anywhere;
}

.footer-contact-list li:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.footer-contact-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--gold);
  text-transform: uppercase;
}

.footer-contact-note {
  border-left: 2px solid var(--red);
  padding-left: 12px;
  font-size: 12px;
  line-height: 1.8;
  color: rgba(251, 247, 239, .62);
}

.footer-base { border-top: 1px solid var(--line-paper); }

.footer-base-inner {
  width: 100%;
  max-width: calc(var(--width) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: rgba(251, 247, 239, .55);
  line-height: 1.7;
}

.footer-icp,
.footer-copy { line-height: 1.7; }

/* ---------- 6. 通用组件 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--turq-deep);
  line-height: 1.6;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--red);
}

.seal {
  display: inline-block;
  padding: 3px 9px;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.5;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.7;
  border: 1px solid currentColor;
}

.tag--red { color: var(--red-deep); background: rgba(166, 61, 47, .07); }
.tag--turq { color: var(--turq-deep); background: rgba(47, 127, 116, .09); }
.tag--gold { color: var(--gold-deep); background: rgba(217, 164, 65, .18); }
.tag--ink { color: var(--paper); background: var(--ink); border-color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.5;
  color: var(--paper);
  background: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease),
              color .18s var(--ease), border-color .18s var(--ease);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn--solid {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}

.btn--solid:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

.btn--outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn--outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.card {
  position: relative;
  padding: 26px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-paper);
}

.card--sand { background: var(--sand); }

.card--ink {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.card--ink h2,
.card--ink h3,
.card--ink h4 { color: var(--paper); }

.card--ink p,
.card--ink li { color: rgba(251, 247, 239, .82); }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--grey);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb li + li::before {
  content: "／";
  color: var(--line-strong);
}

.breadcrumb a { color: var(--grey); }
.breadcrumb a:hover { color: var(--red-deep); }
.breadcrumb [aria-current="page"] { color: var(--ink); }

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.85;
}

.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul,
.prose ol { margin-top: .8em; padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose strong { font-weight: 700; color: var(--ink); }

.prose blockquote {
  border-left: 3px solid var(--red);
  padding-left: 18px;
  color: var(--grey);
}

/* ---------- 7. 图片容器（页面阶段复用） ---------- */
.img-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--sand);
  border: 1px solid var(--line-strong);
}

.img-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 6px solid rgba(251, 247, 239, .16);
  pointer-events: none;
}

.img-frame--3x2 { aspect-ratio: 3 / 2; }
.img-frame--4x3 { aspect-ratio: 4 / 3; }
.img-frame--1x1 { aspect-ratio: 1 / 1; }
.img-frame--16x9 { aspect-ratio: 16 / 9; }

.img-frame__label {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.6;
}

.img-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  line-height: 1.8;
  background:
    repeating-linear-gradient(135deg, rgba(18, 32, 51, .05) 0 12px, transparent 12px 24px),
    var(--sand);
}

/* ---------- 8. 栅格与显现 ---------- */
.grid { display: grid; gap: var(--gap); }

.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

html.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}

html.has-js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 9. 平板 ---------- */
@media (max-width: 1000px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px 32px;
    padding-block: 44px 32px;
  }

  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------- 10. 手机 / 移动导航 ---------- */
@media (max-width: 900px) {
  .header-utility { padding: 8px 0; }
  .masthead { padding: 18px 0 14px; }
  .nav-toggle { display: flex; }

  .primary-nav {
    display: none;
    padding: 6px 0 18px;
    border-top: 1px solid var(--line-strong);
  }

  .site-header[data-open] .primary-nav { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item { width: 100%; }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 12px;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid transparent;
  }

  .nav-link::before { width: 12px; }

  .nav-link:hover { border-bottom-color: var(--line); }

  .nav-link[aria-current="page"] {
    background: var(--sand);
    border-left-color: var(--red);
  }

  .nav-link[aria-current="page"]::after { margin-left: auto; }
}

@media (max-width: 600px) {
  .header-utility { flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
  .utility-links { gap: 16px; }
  .masthead-tagline { letter-spacing: .16em; font-size: 12px; }
  .card { padding: 20px; }
  .grid--12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding-block: 36px 28px; }
  .footer-base-inner { justify-content: flex-start; }
  .btn { width: 100%; }
}

/* ---------- 11. 动效收敛 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
  }

  html.has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
