/* ============================================================
   周夏律师个人网站 - 全局样式
   品牌主色:深橙体系(与小程序一致)
   板块色彩:四大业务各有专属色,丰富页面层次
   动效:首屏流动渐变、滚动显现、数字滚动、悬浮微交互
   本文件由 tools/build.py 复制到 site/ 目录
   ============================================================ */
:root {
  --primary: #C25E17;
  --primary-dark: #8A3D0B;
  --accent: #E07B25;
  --gold: #C9A227;
  --bg: #F6F7F9;
  --bg-warm: #FBF6F0;
  --card: #FFFFFF;
  --text: #1F2328;
  --muted: #57606A;
  --border: #E5E7EB;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(0, 0, 0, .08);
  --shadow-lg: 0 10px 32px rgba(110, 52, 8, .16);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .serif {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-weight: 700;
  line-height: 1.4;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

/* ---------- 顶栏 ---------- */
.site-header {
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--primary-dark); }
.logo img {
  width: 40px; height: 40px; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(138, 61, 11, .35);
  transition: transform .3s ease;
}
.logo:hover img { transform: rotate(-6deg) scale(1.06); }
.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-text .logo-name { font-size: 19px; font-weight: 700; font-family: "Songti SC", serif; }
.logo-text small { font-size: 11px; color: var(--muted); font-weight: 400; }
.site-nav { margin-left: auto; }
.site-nav a {
  color: var(--text); margin-left: 22px; font-size: 15px;
  padding-bottom: 4px; position: relative;
}
.nav-share {
  margin-left: 18px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #6E3408, #D97A26); color: #fff;
  font-size: 14px; font-weight: 600; padding: 7px 16px; border-radius: 18px;
  box-shadow: 0 2px 8px rgba(110, 52, 8, .3);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nav-share:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(110, 52, 8, .4); }
@media (max-width: 760px) {
  .nav-share { margin-left: auto; margin-right: 12px; padding: 5px 12px; font-size: 13px; }
  .logo-text small { display: none; }
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--primary); }
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); }
.nav-toggle {
  display: none; background: none; border: none; font-size: 22px;
  color: var(--primary-dark); cursor: pointer;
}
@media (max-width: 760px) {
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border); flex-direction: column; padding: 8px 20px; }
  .site-nav.open { display: flex; }
  .site-nav a { margin: 8px 0; }
  .nav-toggle { display: block; }
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #6E3408, #A85013 40%, #D97A26 70%, #B4530F);
  background-size: 240% 240%;
  animation: heroGradient 14s ease infinite alternate;
  color: #fff; text-align: center; padding: 80px 20px 64px;
}
@keyframes heroGradient {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}
.hero .blob {
  position: absolute; border-radius: 50%; filter: blur(46px); opacity: .4;
  pointer-events: none;
}
.hero .blob-1 {
  width: 260px; height: 260px; background: #F2A65A;
  top: -80px; left: -60px; animation: float 9s ease-in-out infinite;
}
.hero .blob-2 {
  width: 200px; height: 200px; background: #7C2D12;
  bottom: -60px; right: -40px; animation: float 11s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-22px); }
}
.hero .container { position: relative; }
.hero-avatar {
  width: 108px; height: 108px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  object-fit: cover; margin-bottom: 16px;
  animation: avatarIn .8s ease both;
}
@keyframes avatarIn {
  from { opacity: 0; transform: scale(.7); }
  to { opacity: 1; transform: scale(1); }
}
.hero .name { font-size: 40px; letter-spacing: 6px; margin-bottom: 8px; }
.hero .title-line { font-size: 18px; opacity: .95; }
.hero .slogan { font-size: 15px; opacity: .85; margin-top: 12px; }
.hero .cta, .cta { margin-top: 32px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 32px; border-radius: 24px;
  font-size: 16px; cursor: pointer; border: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn-primary { background: #fff; color: var(--primary-dark); font-weight: 600; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.btn-primary:hover { background: #f3e8dc; box-shadow: 0 8px 22px rgba(0,0,0,.3); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.8); }
.btn-outline:hover { background: rgba(255,255,255,.12); }

/* ---------- 通用区块 ---------- */
.section { padding: 52px 0; }
.section-title { font-size: 26px; text-align: center; margin-bottom: 6px; }
.section-title::after {
  content: ""; display: block; width: 56px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--gold));
  margin: 10px auto 0;
}
.section-sub { text-align: center; color: var(--muted); font-size: 14px; margin: 10px 0 32px; }

/* 执业数据 */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 12px; text-align: center;
  border-top: 3px solid transparent;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.stat-card:nth-child(1) { border-top-color: var(--primary); }
.stat-card:nth-child(2) { border-top-color: var(--accent); }
.stat-card:nth-child(3) { border-top-color: var(--gold); }
.stat-card:nth-child(4) { border-top-color: #2E7D32; }
.stat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.stat-card .num { font-size: 32px; color: var(--primary); font-weight: 700; font-family: "Songti SC", serif; }
.stat-card .label { font-size: 14px; color: var(--muted); margin-top: 4px; }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* 卡片 */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform .25s ease, box-shadow .25s ease;
  border-bottom: 3px solid transparent;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-bottom-color: var(--accent); }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--primary); }
.card .desc { font-size: 14.5px; color: var(--muted); margin-bottom: 12px; }
.card ul { list-style: none; font-size: 14px; color: var(--muted); }
.card ul li { padding-left: 16px; position: relative; margin: 4px 0; }
.card ul li::before { content: "▪"; color: var(--accent); position: absolute; left: 0; }
@media (max-width: 760px) { .card-grid { grid-template-columns: 1fr; } }

/* 列表项(文章/动态) */
.article-item {
  display: flex; gap: 16px; align-items: center;
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--tc, var(--primary));
  border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.article-item:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.item-tile {
  flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  font-family: "Songti SC", serif; font-size: 30px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--tc, var(--primary)), var(--tc2, var(--accent)));
}
.item-tile img { width: 100%; height: 100%; object-fit: cover; }
.item-body { flex: 1; min-width: 0; }
.article-item h3 { font-size: 17.5px; margin-bottom: 4px; }
.article-item h3 a { color: var(--text); }
.article-item h3 a:hover { color: var(--tc, var(--primary)); }
.article-meta { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.tag {
  display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 10px;
  margin-right: 8px; font-weight: 500;
}
.article-item .desc { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) {
  .article-item { flex-direction: column; align-items: flex-start; }
  .item-tile { width: 100%; height: 120px; font-size: 40px; }
}

/* FAQ */
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; transition: box-shadow .25s ease; }
.faq-item:hover { box-shadow: var(--shadow); }
.faq-item summary {
  padding: 16px 20px; cursor: pointer; font-weight: 600; font-size: 15.5px;
  list-style: none; position: relative; transition: color .2s;
}
.faq-item summary:hover { color: var(--primary); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 20px; color: var(--primary); font-size: 20px; transition: transform .25s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 20px 16px; color: var(--muted); font-size: 15px; animation: fadeUp .35s ease both; }

/* 详情页头部(按业务色彩着色) */
.detail-header {
  text-align: center; padding: 52px 0 20px;
  background: linear-gradient(180deg, var(--tcsoft, #fdf0e3) 0%, transparent 100%);
}
.detail-header h1 { font-size: 28px; }
.detail-header .article-meta { margin-top: 10px; }
.cover-banner { max-width: 760px; margin: 24px auto 0; padding: 0 20px; }
.cover-banner img {
  width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.article-body { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.article-body p { margin: 14px 0; font-size: 15.5px; text-align: justify; }
.back-link { display: block; text-align: center; margin: 24px 0; font-size: 15px; }

/* 页面标题 */
.page-header { text-align: center; padding: 48px 0 8px; }
.page-header h1 { font-size: 30px; }
.page-header p { color: var(--muted); margin-top: 6px; }

/* 关于页 */
.about-profile {
  display: flex; gap: 28px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin-bottom: 24px;
}
.about-profile img {
  width: 128px; height: 128px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fdf0e3; box-shadow: 0 4px 16px rgba(110, 52, 8, .2);
  flex: 0 0 auto;
}
.about-profile h2 { font-size: 22px; margin-bottom: 6px; }
.about-profile p { color: var(--muted); font-size: 15px; }
@media (max-width: 560px) { .about-profile { flex-direction: column; text-align: center; } }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.license-card { margin-top: 24px; }
.license-card img {
  width: 100%; max-width: 420px; border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow); display: block; margin: 0 auto;
  transition: transform .25s ease;
}
.license-card img:hover { transform: scale(1.02); }
.info-list { list-style: none; }
.info-list li { padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 15px; }
.info-list li strong { display: inline-block; min-width: 96px; color: var(--primary-dark); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; } }

/* 工作剪影 */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-item {
  display: block; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3; box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-lg); }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }

/* 联系页 */
.contact-avatar {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fdf0e3; box-shadow: var(--shadow); margin: 0 auto 16px; display: block;
}

/* CTA */
.cta-panel {
  background: linear-gradient(135deg, #6E3408, #A85013 60%, #C25E17);
  color: #fff; text-align: center; border-radius: var(--radius);
  padding: 44px 24px; margin-top: 8px; position: relative; overflow: hidden;
}
.cta-panel::before {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255, 255, 255, .07); top: -120px; right: -80px;
  animation: float 10s ease-in-out infinite;
}
.cta-panel h2 { font-size: 24px; margin-bottom: 8px; position: relative; }
.cta-panel p { opacity: .9; font-size: 15px; margin-bottom: 24px; position: relative; }
.cta-panel .cta { position: relative; }

/* 页脚 */
.site-footer {
  background: #241a12; color: #c9c0b6; text-align: center;
  padding: 36px 20px; font-size: 13.5px; line-height: 1.9; margin-top: 56px;
}
.site-footer .firm { color: #e8dfd4; font-size: 15px; }

/* 返回顶部 */
.backtop {
  position: fixed; left: 24px; bottom: 28px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; font-size: 20px;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: opacity .3s ease, transform .3s ease;
}
.backtop.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.backtop:hover { transform: translateY(-3px); }

/* ---------- 分享 ---------- */
.share-mask {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(20, 12, 6, .55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.share-mask.open { display: flex; animation: fadeIn .25s ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.share-modal {
  background: #fff; border-radius: 16px; padding: 28px 24px;
  width: 100%; max-width: 360px; text-align: center;
  animation: modalIn .3s ease both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
.share-modal h3 { font-size: 19px; margin-bottom: 6px; }
.share-modal .share-title { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.share-actions { display: grid; gap: 10px; }
.share-action {
  padding: 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-warm); font-size: 15px; cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.share-action:hover { transform: translateY(-2px); border-color: var(--accent); background: #fdf0e3; }
.share-qrbox { margin-top: 18px; }
.share-qrbox canvas, .share-qrbox img { display: block; margin: 0 auto; }
.share-qrbox p { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.share-close {
  margin-top: 18px; padding: 8px 28px; border-radius: 20px; border: none;
  background: #f0f0f0; color: var(--muted); cursor: pointer; font-size: 14px;
}
.share-close:hover { background: #e5e5e5; }
.share-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(12px);
  background: rgba(30, 24, 18, .92); color: #fff; font-size: 14px;
  padding: 10px 22px; border-radius: 22px; z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  max-width: 86vw;
}
.share-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.wx-guide {
  position: fixed; inset: 0; z-index: 250; background: rgba(20, 12, 6, .92);
  color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; cursor: pointer; padding: 20px;
}
.wx-guide-arrow {
  position: absolute; top: 14px; right: 44px; font-size: 64px;
  animation: pointUp 1.4s ease-in-out infinite;
}
@keyframes pointUp {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.wx-guide p { font-size: 19px; line-height: 1.9; }
.wx-guide .wx-guide-tip { font-size: 13px; opacity: .6; margin-top: 18px; }

/* ---------- 滚动显现(JS 可用时才隐藏) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 弱动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
