/* ============================================================
   律师个人网站 — 全站样式
   设计基调：暖纸（paper）与墨（ink），编辑式排版，
   衬线标题（宋体系）＋无衬线界面字，单一暗金强调色。
   ============================================================ */

:root {
  --paper: #f2ecdc;
  --paper-2: #eae3d1;
  --paper-3: #d9d2c2;
  --ink: #0e2a22;
  --ink-80: rgba(14, 42, 34, .8);
  --ink-60: rgba(14, 42, 34, .6);
  --ink-45: rgba(14, 42, 34, .45);
  --line: rgba(14, 42, 34, .16);
  --line-faint: rgba(14, 42, 34, .08);
  --accent: #f3c13a;
  --accent-soft: rgba(243, 193, 58, .5);
  --paper-on-ink: #f2ecdc;
  --paper-60-on-ink: rgba(242, 236, 220, .62);
  --line-on-ink: rgba(242, 236, 220, .18);

  --serif: "Songti SC", "STSong", "STZhongsong", "Noto Serif CJK SC", "Noto Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;

  --wrap: 1360px;
  --gutter: 32px;
  --baseline: 24px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --radius-pill: 999px;
}

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

html { scroll-behavior: smooth; }

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

::selection { background: var(--accent); color: var(--ink); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

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

/* ---------- 通用文字工具 ---------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-60);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.eyebrow .cn {
  letter-spacing: .35em;
  font-size: 12px;
  color: var(--ink-45);
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--ink-45);
  align-self: center;
}

.serif { font-family: var(--serif); }

.muted { color: var(--ink-60); }

/* 高亮标记（标题内强调词） */
mark {
  background: linear-gradient(transparent 58%, var(--accent-soft) 58%, var(--accent-soft) 92%, transparent 92%);
  color: inherit;
  padding: 0 .06em;
}

/* ---------- 链接下划线（渐变技法，亚像素控制） ---------- */

.u-link {
  background: linear-gradient(to right, var(--ink-45), var(--ink-45)) 0 96% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background .2s ease-out, color .2s ease-out;
}
.u-link:hover {
  color: var(--ink);
  background: linear-gradient(to right, var(--accent), var(--accent)) 0 96% / 100% 2px no-repeat;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: .12em;
  padding: 13px 30px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  color: var(--ink);
  transition: background .2s ease-out, box-shadow .2s ease-out, transform .2s ease-out;
}
.btn:hover { box-shadow: 0 10px 30px -12px rgba(14, 42, 34, .55); transform: translateY(-1px); }

.btn-solid { background: var(--accent); border-color: var(--accent); font-weight: 600; }
.btn-solid:hover { background: var(--accent); }

.btn-ghost-light {
  border-color: var(--line-on-ink);
  color: var(--paper-on-ink);
}
.btn-ghost-light:hover { border-color: var(--paper-on-ink); }

.btn .arrow { font-family: var(--sans); transition: transform .2s ease-out; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- 页头 ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}
.brand { display: flex; flex-direction: column; line-height: 1.3; }
.brand .name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .04em;
}
.brand .firm {
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--ink-60);
}

.nav { display: flex; gap: 34px; }
.nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
  letter-spacing: .14em;
  padding: 6px 0;
  position: relative;
  color: var(--ink-80);
  transition: color .18s ease-out;
}
.nav a .en {
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-45);
  margin-bottom: 1px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width .2s ease-out, left .2s ease-out;
}
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { width: 100%; left: 0; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13px;
  letter-spacing: .2em;
  padding: 8px 18px;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
}

/* ---------- 首页 Hero ---------- */

.hero { padding: calc(var(--baseline) * 4.5) 0 calc(var(--baseline) * 3.5); }
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.22;
  letter-spacing: .02em;
  margin: calc(var(--baseline) * 1.2) 0 calc(var(--baseline) * 1.2);
  max-width: 16em;
}
.hero .lead {
  font-size: 17px;
  color: var(--ink-80);
  max-width: 44em;
  line-height: 2;
}
.hero .lead strong { font-weight: 600; color: var(--ink); }
.hero .hero-actions { margin-top: calc(var(--baseline) * 1.6); display: flex; gap: 16px; flex-wrap: wrap; }

/* 印章标记 */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  border: 2px solid var(--accent);
  color: var(--ink);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  letter-spacing: .3em;
  text-indent: .3em;
  line-height: 1.4;
  transform: rotate(-2deg);
  background: rgba(243, 193, 58, .12);
  white-space: nowrap;
}

/* ---------- 三栏编辑网格（首页） ---------- */

.ed-grid {
  display: grid;
  grid-template-columns: 240px 240px 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ed-col { padding: calc(var(--baseline) * 1.8) 36px calc(var(--baseline) * 2); }
.ed-col + .ed-col { border-left: 1px solid var(--line); }
.ed-col:first-child { padding-left: 0; }

.ed-col h2.col-title {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-45);
  font-weight: 600;
  margin-bottom: calc(var(--baseline) * 1.1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ed-col h2.col-title::after { content: ""; flex: 1; height: 1px; background: var(--line-faint); }

.bio-text { font-size: 14px; line-height: 2; color: var(--ink-80); }
.bio-text + .bio-text { margin-top: 14px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag {
  font-size: 12px;
  letter-spacing: .1em;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  color: var(--ink-80);
  transition: border-color .18s ease-out, background .18s ease-out;
}
.tag:hover { border-color: var(--ink); background: var(--paper-2); }

.index-nav { display: flex; flex-direction: column; }
.index-nav a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-faint);
  font-size: 15px;
  letter-spacing: .06em;
  transition: padding-left .2s var(--ease), color .18s ease-out;
}
.index-nav a .no {
  font-size: 11px;
  color: var(--ink-45);
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
}
.index-nav a:hover { padding-left: 8px; color: var(--ink); }
.index-nav a:hover .no { color: var(--accent); }

.ed-featured .feature-block {
  background: var(--paper-2);
  border: 1px solid var(--line-faint);
  border-radius: 8px;
  padding: 30px 32px;
  margin-bottom: 26px;
}
.feature-block .kicker {
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--ink-45);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}
.feature-block h3 {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.5;
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-block p { font-size: 14px; color: var(--ink-60); line-height: 1.9; }
.feature-block .more {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  letter-spacing: .12em;
}

/* ---------- 文章行列表 ---------- */

.rows { border-top: 1px solid var(--line); }
.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left .2s var(--ease);
}
.row:hover { padding-left: 10px; }
.row .row-main { min-width: 0; }
.row .row-cat {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--ink-45);
  display: block;
  margin-bottom: 5px;
}
.row .row-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.55;
}
.row:hover .row-title {
  background: linear-gradient(to right, var(--accent), var(--accent)) 0 96% / 100% 2px no-repeat;
}
.row .row-date {
  font-size: 13px;
  color: var(--ink-45);
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  white-space: nowrap;
}

/* ---------- 板块标题 ---------- */

.section { padding: calc(var(--baseline) * 4) 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: calc(var(--baseline) * 2.2);
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 700;
  line-height: 1.35;
  margin-top: 16px;
}
.section-head .side-link { font-size: 13px; letter-spacing: .14em; white-space: nowrap; }

/* ---------- Bento 业务网格 ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cell {
  background: var(--paper);
  padding: 36px 34px 40px;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  transition: background .2s ease-out;
}
.cell:hover { background: var(--paper-2); }
.cell .cell-no {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--ink-45);
  font-variant-numeric: tabular-nums;
}
.cell h3 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  margin: 14px 0 12px;
  line-height: 1.4;
}
.cell p { font-size: 14px; color: var(--ink-60); line-height: 1.9; flex: 1; }
.cell .cell-tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.cell .cell-tags span {
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-60);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius-pill);
  padding: 3px 11px;
}

.cell-wide { grid-column: span 2; }

.cell-featured {
  grid-column: span 2;
  background: var(--ink);
  color: var(--paper-on-ink);
}
.cell-featured:hover { background: #123229; }
.cell-featured .cell-no { color: var(--paper-60-on-ink); }
.cell-featured p { color: var(--paper-60-on-ink); }
.cell-featured .cell-tags span { color: var(--paper-60-on-ink); border-color: var(--line-on-ink); }
.cell-featured .cell-cta {
  margin-top: 22px;
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--accent);
}

/* ---------- 深色 CTA 板块 ---------- */

.cta-band {
  background: var(--ink);
  color: var(--paper-on-ink);
  padding: calc(var(--baseline) * 4) 0;
}
.cta-band .eyebrow { color: var(--paper-60-on-ink); }
.cta-band .eyebrow .cn { color: var(--paper-60-on-ink); }
.cta-band .eyebrow::before { background: var(--paper-60-on-ink); }
.cta-band h2 {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.4;
  margin: 20px 0 18px;
  max-width: 18em;
}
.cta-band p { color: var(--paper-60-on-ink); max-width: 40em; line-height: 2; font-size: 15px; }
.cta-band .hero-actions { margin-top: 34px; }

/* ---------- 页脚 ---------- */

.site-foot {
  background: var(--ink);
  color: var(--paper-60-on-ink);
  border-top: 1px solid var(--line-on-ink);
  padding: calc(var(--baseline) * 2.6) 0 calc(var(--baseline) * 1.4);
  font-size: 13px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-on-ink);
}
.foot-grid h4 {
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--paper-60-on-ink);
  margin-bottom: 18px;
  font-weight: 600;
}
.foot-grid .foot-brand {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--paper-on-ink);
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: .04em;
}
.foot-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-grid a { transition: color .18s ease-out; }
.foot-grid a:hover { color: var(--accent); }
.foot-grid p { line-height: 2; }
.foot-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  font-size: 12px;
  color: rgba(242, 236, 220, .4);
  letter-spacing: .06em;
}

/* ---------- 内页页头 ---------- */

.page-head {
  padding: calc(var(--baseline) * 3.6) 0 calc(var(--baseline) * 2.2);
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 700;
  line-height: 1.3;
  margin: 18px 0 16px;
}
.page-head .page-desc { max-width: 44em; color: var(--ink-80); line-height: 2; font-size: 16px; }

/* ---------- 文章列表页筛选 ---------- */

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 26px 0;
}
.filter-btn {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .12em;
  border: 1px solid var(--line);
  background: none;
  border-radius: var(--radius-pill);
  padding: 8px 20px;
  cursor: pointer;
  color: var(--ink-80);
  transition: all .18s ease-out;
}
.filter-btn:hover { border-color: var(--ink); }
.filter-btn.on { background: var(--ink); color: var(--paper-on-ink); border-color: var(--ink); }

/* ---------- 文章正文 ---------- */

.article-head { padding: calc(var(--baseline) * 3) 0 calc(var(--baseline) * 1.8); }
.article-meta {
  display: flex;
  gap: 22px;
  align-items: baseline;
  font-size: 13px;
  color: var(--ink-45);
  letter-spacing: .08em;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.article-meta .cat { color: var(--ink-60); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 14px; font-size: 12px; }
.article-head h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 700;
  line-height: 1.42;
  max-width: 22em;
}
.article-head .sub {
  margin-top: 20px;
  font-size: 16px;
  color: var(--ink-60);
  line-height: 2;
  max-width: 42em;
}

.prose {
  max-width: 46rem;
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 2.05;
  color: var(--ink);
  padding: calc(var(--baseline) * 1.6) 0 calc(var(--baseline) * 2);
}
.prose p { margin-bottom: 1.4em; text-align: justify; }
.prose h2 {
  font-size: 25px;
  font-weight: 700;
  margin: 2.2em 0 1em;
  line-height: 1.5;
}
.prose h3 { font-size: 20px; font-weight: 700; margin: 1.8em 0 .8em; }
.prose ul, .prose ol { margin: 0 0 1.4em 1.4em; }
.prose li { margin-bottom: .6em; }
.prose strong { font-weight: 700; }
.prose blockquote {
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  padding: 18px 26px;
  margin: 1.8em 0;
  color: var(--ink-80);
  font-size: 16.5px;
}
.prose .faq-item { border-top: 1px solid var(--line); padding: 22px 0; }
.prose .faq-item h3 { margin: 0 0 10px; font-size: 18.5px; }
.prose .faq-item p { margin-bottom: 0; color: var(--ink-80); font-size: 16.5px; }

.article-foot {
  max-width: 46rem;
  border-top: 1px solid var(--line);
  padding: 30px 0 calc(var(--baseline) * 2);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
}
.article-note {
  max-width: 46rem;
  font-size: 13px;
  color: var(--ink-45);
  line-height: 2;
  margin-bottom: calc(var(--baseline) * 1.5);
  font-family: var(--sans);
}

/* ---------- 关于页 / 联系页 ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding: calc(var(--baseline) * 2.5) 0;
}
.two-col .col-block h2 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.5;
}
.two-col .col-block p { color: var(--ink-80); line-height: 2.05; margin-bottom: 1.2em; font-size: 15.5px; }

.info-list { list-style: none; border-top: 1px solid var(--line); }
.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.info-list .k { color: var(--ink-45); letter-spacing: .1em; font-size: 13px; white-space: nowrap; padding-top: 2px; }
.info-list .v { text-align: right; line-height: 1.9; }

.divider-section { border-top: 1px solid var(--line); }

/* ---------- 动效 ---------- */

/* 只有 JS 可用时才启用隐藏-渐入，保证无 JS 环境（含部分爬虫）内容完整可见 */
html.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .ed-grid { grid-template-columns: 220px 1fr; }
  .ed-featured { grid-column: 1 / -1; border-left: none; border-top: 1px solid var(--line); }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell-featured { grid-column: span 2; }
}

@media (max-width: 760px) {
  :root { --gutter: 22px; --baseline: 20px; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 22px 16px;
  }
  .nav.open { display: flex; }
  .nav a { flex-direction: row; align-items: baseline; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-faint); }
  .nav a::after { display: none; }
  .nav-toggle { display: block; }
  .ed-grid { grid-template-columns: 1fr; }
  .ed-col { padding-left: 0; padding-right: 0; }
  .ed-col + .ed-col { border-left: none; border-top: 1px solid var(--line); }
  .bento { grid-template-columns: 1fr; }
  .cell-featured, .cell-wide { grid-column: span 1; }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .row { flex-direction: column; gap: 6px; }
  .row:hover { padding-left: 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero { padding-top: calc(var(--baseline) * 3); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* ===== 关于页 · 证件照 ===== */
.about-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.about-head-text { flex: 1; }
.about-photo { flex-shrink: 0; margin: 0; text-align: center; }
.about-photo img { display: block; width: 170px; height: auto; border: 1px solid var(--line); padding: 6px; background: #fff; }
.about-photo figcaption { margin-top: 10px; font-size: 12px; letter-spacing: .02em; color: var(--ink-60); }

@media (max-width: 640px) {
  .about-head { flex-direction: column-reverse; align-items: flex-start; gap: 28px; }
}
