/* ============================================================
   太公相宅国学 · 易经开重新设计
   风格：古香古色（宣纸/墨色/朱砂/石青）又不失现代（留白/网格/无衬线正文）
   ============================================================ */

:root {
  --ink:        #211c16;   /* 墨色 */
  --ink-soft:   #4a4239;   /* 淡墨 */
  --paper:      #f6f0e2;   /* 宣纸米白 */
  --paper-2:    #efe6d2;   /* 次级纸色 */
  --paper-3:    #e7dcc4;   /* 深一级纸色 */
  --vermilion:  #9e2b25;   /* 朱砂红 */
  --vermilion-l:#b8453c;   /* 亮朱砂 */
  --celadon:    #2f5d57;   /* 石青/黛青 */
  --celadon-l:  #3f7a72;
  --gold:       #b0843a;   /* 赭金 */
  --line:       rgba(33,28,22,0.14);
  --line-strong:rgba(33,28,22,0.28);
  --shadow:    0 8px 30px rgba(33,28,22,0.10);
  --radius:     10px;
  --maxw:       1180px;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --kai:   "Ma Shan Zheng", "Noto Serif SC", serif;
  --sans:  "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(176,132,58,0.06), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(47,93,87,0.06), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 59h60M59 0v60' stroke='%23211c16' stroke-opacity='0.025'/%3E%3C/svg%3E");
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- 容器 ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,240,226,0.86);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }   /* 防止 logo 区域被挤压 */
.brand .seal { width: 44px; height: 44px; flex: none; }
.brand .name { font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: 2px; line-height: 1.1; white-space: nowrap; }
.brand .name small { display: block; font-family: var(--sans); font-weight: 400; font-size: 11px; letter-spacing: 3px; color: var(--ink-soft); margin-top: 3px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  position: relative; padding: 8px 14px; font-size: 15px; letter-spacing: 1px;
  color: var(--ink-soft); transition: color .25s;
  white-space: nowrap;          /* 防止导航文字被挤成两行 */
}
.nav-links a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px;
  background: var(--vermilion); transform: scaleX(0); transform-origin: left; transition: transform .28s;
}
.nav-links a:hover, .nav-links a.active { color: var(--vermilion); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 8px; width: 42px; height: 38px; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px auto; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: 290px; display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: .9; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(246,240,226,.30) 0%, rgba(246,240,226,.72) 60%, var(--paper) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; padding: 28px 0; }
.hero .eyebrow {
  font-family: var(--kai); font-size: 22px; color: var(--vermilion); letter-spacing: 4px; margin: 0 0 10px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 6vw, 72px);
  letter-spacing: 8px; margin: 0 0 18px; color: var(--ink); line-height: 1.15;
}
.hero p.lede { max-width: 620px; font-size: 17px; color: var(--ink-soft); margin: 0 0 30px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-size: 15px; letter-spacing: 2px;
  border: 1px solid var(--vermilion); transition: .25s; cursor: pointer;
}
.btn-primary { background: var(--vermilion); color: #fdf6e8; }
.btn-primary:hover { background: var(--vermilion-l); border-color: var(--vermilion-l); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--vermilion); }
.btn-ghost:hover { background: rgba(158,43,37,0.08); }

/* ---------- 区块通用 ---------- */
section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .tag { font-family: var(--kai); color: var(--celadon); letter-spacing: 4px; font-size: 18px; }
.section-head h2 { font-family: var(--serif); font-size: clamp(26px, 4vw, 38px); letter-spacing: 4px; margin: 8px 0 12px; }
.section-head .desc { color: var(--ink-soft); max-width: 640px; margin: 0 auto; }
.rule {
  width: 64px; height: 18px; margin: 14px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='18'%3E%3Cpath d='M0 9h24M40 9h24' stroke='%23b0843a' stroke-width='1.4'/%3E%3Ccircle cx='32' cy='9' r='4' fill='none' stroke='%239e2b25' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat center;
}

/* ---------- 栏目卡片网格 ---------- */
.grid-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.col-card {
  position: relative; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 26px 26px; overflow: hidden;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.col-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.col-card .ico { width: 56px; height: 56px; margin-bottom: 16px; }
.col-card h3 { font-family: var(--serif); font-size: 22px; letter-spacing: 3px; margin: 0 0 8px; }
.col-card .en { font-size: 12px; letter-spacing: 3px; color: var(--celadon); text-transform: uppercase; margin-bottom: 12px; }
.col-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 18px; }
.col-card .more { font-size: 14px; color: var(--vermilion); letter-spacing: 1px; }
.col-card .more::after { content: " →"; }

/* ---------- 文章列表 ---------- */
.grid-articles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.article-card {
  display: flex; gap: 18px; background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; transition: .28s;
}
.article-card:hover { box-shadow: var(--shadow); border-color: var(--line-strong); transform: translateY(-3px); }
.article-card .thumb {
  flex: none; width: 96px; height: 96px; border-radius: 8px; overflow: hidden;
  background: var(--celadon); display: grid; place-items: center; color: #f3ead4;
}
.article-card .thumb svg { width: 42px; height: 42px; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card .meta { font-size: 12.5px; color: var(--gold); letter-spacing: 1px; }
.article-card h4 { font-family: var(--serif); font-size: 17px; line-height: 1.5; margin: 6px 0 8px; letter-spacing: 1px; }
.article-card p { font-size: 13.5px; color: var(--ink-soft); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 大师简介 ---------- */
.master {
  display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: center;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 16px; padding: 46px;
}
.master .portrait {
  aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; position: relative;
  background: linear-gradient(160deg, var(--celadon), #1d3b37); display: grid; place-items: center;
}
.master .portrait img { width: 100%; height: 100%; object-fit: cover; }
.master .portrait .ph { color: #e9dcc0; text-align: center; }
.master .portrait .ph .big { font-family: var(--kai); font-size: 64px; }
.master h3 { font-family: var(--serif); font-size: 28px; letter-spacing: 3px; margin: 0 0 6px; }
.master .role { color: var(--celadon); letter-spacing: 2px; margin-bottom: 18px; }
.master p { color: var(--ink-soft); margin: 0 0 12px; }

/* ---------- 数据/特点 ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature {
  text-align: center; padding: 28px 18px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.feature .num { font-family: var(--serif); font-size: 34px; color: var(--vermilion); letter-spacing: 1px; }
.feature .lab { font-size: 14px; color: var(--ink-soft); letter-spacing: 1px; margin-top: 6px; }

/* ---------- 引用 ---------- */
.quote {
  text-align: center; max-width: 760px; margin: 0 auto;
  font-family: var(--serif); font-size: clamp(20px,3vw,28px); line-height: 1.9; letter-spacing: 2px; color: var(--ink);
}
.quote .mark { color: var(--vermilion); font-size: 40px; font-family: var(--kai); }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; letter-spacing: 1px; margin-bottom: 6px; color: var(--ink-soft); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--paper); font-family: var(--sans); font-size: 15px; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--celadon); }
/* 下拉选择框与输入框保持同款外观（去掉原生箭头，改用石青描边箭头） */
.field select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%232f5d57' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 12px;
}
.field select::-ms-expand { display: none; }
.contact-info li { list-style: none; padding: 12px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 12px; }
.contact-info .k { color: var(--celadon); flex: none; width: 70px; letter-spacing: 1px; }

/* ---------- 文章详情 ---------- */
.article-head { padding: 56px 0 24px; border-bottom: 1px solid var(--line); }
.article-head .crumb { font-size: 13px; color: var(--gold); letter-spacing: 1px; margin-bottom: 14px; }
.article-head h1 { font-family: var(--serif); font-size: clamp(26px,4vw,40px); letter-spacing: 2px; line-height: 1.4; margin: 0 0 14px; }
.article-head .meta { color: var(--ink-soft); font-size: 14px; letter-spacing: 1px; }
.article-body { max-width: 760px; margin: 0 auto; padding: 36px 0 60px; }
.article-body p { font-size: 17px; line-height: 2; margin: 0 0 22px; }
.article-body h3 { font-family: var(--serif); font-size: 22px; letter-spacing: 2px; margin: 34px 0 14px; }
.article-body blockquote { border-left: 3px solid var(--vermilion); padding: 6px 0 6px 20px; color: var(--ink-soft); font-family: var(--serif); }
.article-body .article-img { width: 100%; max-width: 100%; height: auto; border-radius: 10px; margin: 26px auto; box-shadow: 0 6px 22px rgba(0,0,0,.08); }
.article-cover { width: 100%; max-height: 440px; background-size: cover; background-position: center; aspect-ratio: 16/7; border-radius: 12px; margin: 0 0 30px; }

/* ---------- 文章底部标签（SEO 关键词，用 、 分隔） ---------- */
.article-tags {
  margin-top: 30px; padding-top: 18px;
  border-top: 1px dashed var(--line-strong);
  font-size: 14px; color: var(--ink-soft); line-height: 2.2;
}
.article-tags .tags-label {
  font-family: var(--kai); color: var(--celadon);
  letter-spacing: 2px; margin-right: 6px;
}
.article-tag {
  display: inline-block; margin: 0 3px; padding: 2px 12px;
  border-radius: 14px; border: 1px solid rgba(158,43,37,0.3);
  color: var(--vermilion); text-decoration: none; transition: .2s;
}
.article-tag:hover { background: var(--vermilion); color: #fdf6e8; }
/* 纯文本标签（标题未命中的品牌词等）：不可点击、无悬停、颜色更淡 */
.article-tag.static { cursor: default; color: var(--ink-soft); border-color: rgba(90,80,66,0.28); }
.article-tag.static:hover { background: transparent; color: var(--ink-soft); }
.cms-empty { color: var(--ink-soft); padding: 34px 0; text-align: center; font-size: 15px; }

/* ---------- 文章页底部相关文章 ---------- */
.related { margin-top: 52px; padding-top: 30px; border-top: 1px solid var(--line); }
.related-title {
  font-family: var(--serif); font-size: 1.45rem; letter-spacing: 2px;
  color: var(--ink); margin: 0 0 20px; position: relative; padding-left: 14px;
}
.related-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 1.1em; background: var(--vermilion); border-radius: 2px;
}
.related .grid-articles { grid-template-columns: repeat(3, 1fr); gap: 22px; }
/* 覆盖基础 .article-card 的 flex 横排，改为纵向：图在上、文在下 */
.related .article-card {
  display: block; padding: 0; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 10px; transition: .28s;
}
.related .article-card:hover {
  transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow);
}
.related .article-card .thumb {
  display: block; width: 100%; aspect-ratio: 16/9; overflow: hidden;
  border-radius: 0; background: #f0ece4;
}
.related .article-card .thumb img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease;
}
.related .article-card:hover .thumb img { transform: scale(1.06); }
.related .article-card > div { padding: 14px 16px 18px; }
.related .article-card .meta { font-size: 12px; color: var(--ink-soft); letter-spacing: .5px; }
.related .article-card h4 {
  font-family: var(--serif); font-size: 16px; line-height: 1.6; letter-spacing: .5px;
  margin: 8px 0 0; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related .article-card p { display: none; }
@media (max-width: 760px) {
  .related .grid-articles { grid-template-columns: 1fr; }
  .related .article-card .thumb { aspect-ratio: 21/9; }
}

/* ---------- 页脚 ---------- */
.site-footer { background: #1e1a15; color: #cdbfa6; padding: 56px 0 30px; margin-top: 30px; }
.site-footer a { color: #cdbfa6; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h4 { color: #f3e7cd; font-family: var(--serif); letter-spacing: 2px; font-size: 17px; margin: 0 0 16px; }
.site-footer p, .site-footer li { font-size: 14px; line-height: 1.9; color: #b6a888; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a:hover { color: #f3e7cd; }
.footer-bottom { text-align: center; border-top: 1px solid rgba(205,191,166,0.16); margin-top: 40px; padding-top: 22px; font-size: 13px; color: #8c8068; letter-spacing: 1px; }

/* ---------- 滚动渐显 ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .grid-cols { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .master { grid-template-columns: 1fr; gap: 28px; }
  .contact-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0; background: var(--paper);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px;
    border-bottom: 1px solid var(--line); transform: translateY(-140%); transition: transform .35s; box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-toggle { display: block; }
  .grid-cols, .grid-articles, .features { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  section { padding: 52px 0; }
}
/* 二维码列居中 */
.site-footer .qr-col { text-align: center; }
.site-footer .qr-col .qr-img { width: 120px; max-width: 100%; height: auto; border-radius: 6px; margin: 0 auto; }
.site-footer .qr-col .qr-cap { display: block; margin-top: 8px; font-size: 13px; letter-spacing: 2px; color: #b6a888; }
