/* ========================================================================
   詹勇律师 · 站点全局样式
   设计系统：米白底 + 海军蓝主色 + 细分隔线 + 衬线大标题
   ======================================================================== */

/* ---------- 自托管中文衬线字体 (Noto Serif SC) -----------------------------
   解决 iOS Safari/微信 / Android 在没有 Songti SC 时 fallback 到无衬线的问题。
   仅大标题用 font-display 字体栈调用；正文继续走系统 PingFang/雅黑。
   字体放在 /assets/fonts/，浏览器首次加载后会强缓存。
*/
@font-face {
  font-family: "ZY Serif SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/noto-serif-sc-400.woff2") format("woff2");
}
@font-face {
  font-family: "ZY Serif SC";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("fonts/noto-serif-sc-600.woff2") format("woff2");
}

:root {
  --bg:           oklch(98% 0.004 240);
  --surface:      oklch(100% 0 0);
  --fg:           oklch(25% 0.02 250);
  --muted:        oklch(48% 0.012 250);
  --hairline:     oklch(88% 0.006 240);
  --navy:         oklch(32% 0.08 250);
  --navy-deep:    oklch(26% 0.07 250);
  --navy-tint:    oklch(96% 0.012 240);

  /* Display：自托管 ZY Serif SC 优先（强制全平台一致）；fallback 到系统宋体 */
  --font-display: "ZY Serif SC", "Songti SC", STSong, "Songti TC", "Source Han Serif SC", "Noto Serif SC", "Source Han Serif CN", "Noto Serif CJK SC", SimSun, "宋体", "Times New Roman", Georgia, serif;
  /* Body：中文无衬线 + 系统 UI 字体 */
  --font-body:    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --max-w: 1200px;
  --pad-x: clamp(20px, 5vw, 64px);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.brand-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--navy);
  line-height: 1.1;
}
.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--fg);
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover { color: var(--navy); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-cta {
  padding: 10px 22px;
  border: 1px solid var(--navy);
  color: var(--navy);
  font-size: 13px;
  letter-spacing: 0.22em;
  background: transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav-cta:hover { background: var(--navy); color: #fff; }

.nav-burger { display: none; }

/* 内页精简导航 — 只保留品牌 + 返回首页 */
.nav-inner-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-inner-page .back-home {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--navy);
  border: 1px solid var(--hairline);
  padding: 10px 18px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav-inner-page .back-home:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
@media (max-width: 520px) {
  .nav-inner-page .back-home { padding: 8px 14px; font-size: 11px; letter-spacing: 0.18em; }
  .nav-inner-page .brand-text { font-size: 15px !important; }
}

/* ---------- 联系横条（导航下方深蓝色） ---------- */
.contact-bar {
  background: var(--navy);
  color: #fff;
  border-bottom: 1px solid color-mix(in oklch, #fff 12%, transparent);
}
.contact-bar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px var(--pad-x);
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.2fr;
  gap: 32px;
  align-items: center;
}
.cb-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.cb-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}
.cb-value {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.04em;
}
.cb-value a,
.cb-wechat {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.25s var(--ease);
  cursor: pointer;
  background: transparent;
  border: 0;
  font: inherit;
  padding: 0;
}
.cb-value a:hover,
.cb-wechat:hover { opacity: 0.75; }
.cb-wechat-hint {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.04em;
}
/* 旧的 ::after 箭头已弃用，避免与微信图标视觉冲突 */
/* 微信绿圆图标 */
.wx-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #07c160;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.wx-icon svg { display: block; }

@media (max-width: 860px) {
  .contact-bar-inner {
    grid-template-columns: 1fr 1fr;
    gap: 18px 28px;
    padding: 18px 20px;
  }
  .cb-item { gap: 8px; flex-direction: column; align-items: flex-start; }
  .cb-label { font-size: 10px; letter-spacing: 0.26em; }
  .cb-value { font-size: 17px; letter-spacing: 0.03em; }
  .cb-wechat { gap: 8px; }
  .cb-wechat-hint { font-size: 14px; letter-spacing: 0.04em; }
}
/* 小屏：仍保持 2 列并排，纵向标签+值更舒展 */
@media (max-width: 420px) {
  .contact-bar-inner { gap: 16px 20px; padding: 16px 16px; }
  .cb-label { font-size: 10px; letter-spacing: 0.22em; }
  .cb-value { font-size: 16px; letter-spacing: 0.02em; }
  .cb-wechat-hint { font-size: 13px; letter-spacing: 0.03em; }
  .wx-icon { width: 20px; height: 20px; }
}

/* ---------- 微信二维码模态 ---------- */
.qr-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 26, 0.74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: qrFade 0.25s var(--ease);
}
.qr-modal.open { display: flex; }
.qr-card {
  background: #fff;
  padding: 32px 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  position: relative;
  border: 1px solid var(--hairline);
  animation: qrPop 0.32s var(--ease);
}
.qr-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}
.qr-card p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
  letter-spacing: 0.06em;
}
.qr-card img {
  width: 100%;
  height: auto;
  display: block;
}
.qr-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  background: transparent;
  border: 0;
  font-size: 22px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}
.qr-close:hover { color: var(--navy); }
@keyframes qrFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qrPop  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 通用区块 ---------- */
.section {
  padding: clamp(72px, 10vw, 128px) var(--pad-x);
}
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 18px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 500;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.section-lead {
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 56px;
  font-size: 15px;
}
.section-head-center {
  text-align: center;
}
.section-head-center .section-lead { margin-left: auto; margin-right: auto; }

/* ---------- 滚动揭示 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
}

/* ---------- 卡片通用 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  padding: 32px 28px;
  transition: border-color 0.3s var(--ease), transform 0.4s var(--ease);
}
.card:hover {
  border-color: var(--navy);
  transform: translateY(-3px);
}
.card-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}
.card-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 13px;
  letter-spacing: 0.22em;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: #fff;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { background: transparent; color: var(--navy); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
}
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-on-dark { border-color: rgba(255,255,255,0.6); background: transparent; color: #fff; }
.btn-on-dark:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* ---------- 底部联系区 ---------- */
.contact-band {
  background: var(--navy);
  color: #fff;
  padding: clamp(72px, 10vw, 112px) var(--pad-x);
}
.contact-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 36px;
  letter-spacing: 0.02em;
}
.contact-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  font-size: 15px;
  color: rgba(255,255,255,0.88);
}
.contact-line svg { flex-shrink: 0; opacity: 0.8; }
.office-hours { margin-top: 28px; }
.office-hours h4 {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
  font-weight: 400;
}
.office-hours dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 24px;
  font-size: 14px;
  color: rgba(255,255,255,0.82);
}
.office-hours dt { color: #fff; }

.consult-form {
  background: #fff;
  color: var(--fg);
  padding: 40px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-full { grid-column: 1 / -1; }
.field label {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea,
.field select {
  border: 0;
  border-bottom: 1px solid var(--hairline);
  background: transparent;
  padding: 10px 0;
  font: inherit;
  color: var(--fg);
  transition: border-color 0.25s var(--ease);
  font-family: var(--font-body);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--navy);
}
.field textarea { min-height: 100px; resize: vertical; }
.form-note {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.form-status {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--navy);
  min-height: 18px;
}

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding: 32px var(--pad-x);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-burger {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border: 1px solid var(--hairline);
    background: transparent;
  }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .consult-form { padding: 28px 22px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* 移动端弹出菜单 */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  padding: 80px var(--pad-x);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.mobile-menu.open { display: block; opacity: 1; }
.mobile-menu ul { list-style: none; }
.mobile-menu li {
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu a {
  display: block;
  padding: 22px 0;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--navy);
}
.mobile-close {
  position: absolute;
  top: 22px;
  right: var(--pad-x);
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  background: transparent;
  font-size: 20px;
  color: var(--navy);
}
