/* 蔡琰律师个人网站 · 主样式 */
:root {
  --navy: #17324f;
  --navy-deep: #0f2438;
  --navy-soft: #2a4d73;
  --gold: #c9a45c;
  --gold-light: #e6cf9f;
  --bg: #faf9f6;
  --surface: #ffffff;
  --text: #2b3641;
  --muted: #6b7885;
  --line: #e6e9ec;
  --shadow: 0 10px 34px rgba(23, 50, 79, 0.08);
  --radius: 14px;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: min(var(--maxw), calc(100% - 48px)); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(145deg, var(--navy), var(--navy-soft));
  color: var(--gold-light); display: grid; place-items: center;
  font-family: "Songti SC", "STSong", serif; font-size: 21px; font-weight: 700;
}
.brand-name { font-size: 19px; font-weight: 700; color: var(--navy); letter-spacing: .5px; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: 1px; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a {
  position: relative; padding: 8px 13px; font-size: 14.5px; color: var(--text);
  border-radius: 8px; transition: color .2s, background .2s;
}
.main-nav a:hover { color: var(--navy); background: #f2f5f8; }
.main-nav a.active { color: var(--navy); font-weight: 600; }
.main-nav a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 1px;
  height: 2px; background: var(--gold); border-radius: 2px;
}

.header-contact { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.header-phone {
  display: flex; align-items: center; gap: 8px;
  color: var(--gold); font-weight: 900; font-size: 23px; letter-spacing: .5px;
  text-shadow: 0 2px 7px rgba(169,132,74,.38), 0 1px 2px rgba(27,44,61,.22);
}
.header-phone svg { width: 21px; height: 21px; fill: var(--gold); filter: drop-shadow(0 2px 4px rgba(169,132,74,.4)); }
.header-phone:hover { color: #a9844a; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: 9px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-gold {
  background: linear-gradient(135deg, #d3b26e, var(--gold));
  color: #fff; box-shadow: 0 5px 16px rgba(201,164,92,.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(201,164,92,.45); }
.btn-outline { border-color: rgba(255,255,255,.5); color: #fff; background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-soft); transform: translateY(-2px); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 23px; height: 2px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(900px 500px at 82% 18%, rgba(201,164,92,.16), transparent 60%),
              linear-gradient(125deg, var(--navy-deep), var(--navy) 62%, #21456b);
  color: #fff; padding: 74px 0 84px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -120px; bottom: -220px;
  width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.07); border-radius: 50%;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; position: relative; z-index: 1; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 9px; font-size: 13px; letter-spacing: 2px;
  color: var(--gold-light); border: 1px solid rgba(230,207,159,.4);
  padding: 6px 14px; border-radius: 30px; margin-bottom: 24px;
}
.hero-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.hero h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.22; font-weight: 700; letter-spacing: 1px; margin-bottom: 20px; }
.hero h1 .accent { color: var(--gold-light); font-family: "Songti SC", "STSong", serif; }
.hero-lead { font-size: 18px; color: rgba(255,255,255,.86); max-width: 560px; margin-bottom: 16px; }
.hero-desc { font-size: 15px; color: rgba(255,255,255,.62); max-width: 570px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-photo-wrap { position: relative; display: flex; justify-content: center; }
.hero-photo {
  width: min(100%, 380px); border-radius: 16px; border: 5px solid rgba(255,255,255,.16);
  box-shadow: 0 24px 60px rgba(0,0,0,.3); background: #d9dde3;
}
.hero-photo-badge {
  position: absolute; left: -18px; bottom: 34px; background: var(--gold); color: #1b2c3d;
  padding: 16px 24px; border-radius: 12px; box-shadow: var(--shadow);
}
.hero-photo-badge strong { display: block; font-size: 34px; line-height: 1.1; font-weight: 800; }
.hero-photo-badge span { font-size: 15px; letter-spacing: 1px; }

/* ---------- Stats ---------- */
.stats { background: var(--surface); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 20px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-num { font-size: 34px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.stat-num small { font-size: 16px; margin-left: 2px; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; letter-spacing: .5px; }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section.alt { background: #f4f5f3; }
.section-head { margin-bottom: 40px; }
.section-kicker { color: var(--gold); font-size: 13px; font-weight: 700; letter-spacing: 3px; margin-bottom: 10px; }
.section-title { font-size: clamp(26px, 3vw, 34px); color: var(--navy); font-weight: 700; letter-spacing: .5px; }
.section-desc { color: var(--muted); margin-top: 10px; font-size: 15px; max-width: 720px; }
.section-more { display: inline-flex; align-items: center; gap: 6px; color: var(--navy); font-weight: 600; font-size: 14px; margin-top: 22px; border-bottom: 1px solid var(--gold); padding-bottom: 3px; }
.section-more:hover { color: var(--gold); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; align-items: center; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 16px 40px rgba(23,50,79,.12); }
.card-icon {
  width: 46px; height: 46px; border-radius: 11px; background: #f2f0e9; color: var(--navy);
  display: grid; place-items: center; margin-bottom: 18px; font-size: 21px;
}
.card h3 { font-size: 19px; color: var(--navy); margin-bottom: 10px; }
.card p { font-size: 14.5px; color: var(--muted); }
.card ul.tick { margin-top: 14px; }
.card ul.tick li { font-size: 13.5px; color: var(--text); padding: 4px 0 4px 20px; position: relative; }
.card ul.tick li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* ---------- Page banner ---------- */
.page-banner {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy) 70%, #21456b);
  color: #fff; padding: 52px 0 48px; position: relative; overflow: hidden;
}
.page-banner::after { content: ""; position: absolute; right: 6%; top: -90px; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.page-banner .crumb { font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 10px; }
.page-banner h1 { font-size: clamp(30px, 4vw, 42px); letter-spacing: 1px; }
.page-banner p { color: rgba(255,255,255,.7); margin-top: 10px; max-width: 700px; font-size: 15px; }

/* ---------- About ---------- */
.about-text p { margin-bottom: 16px; color: #44515d; font-size: 15.5px; }
.about-photo { border-radius: 16px; box-shadow: var(--shadow); border: 5px solid #fff; }
.quote-box {
  border-left: 3px solid var(--gold); background: #fff; padding: 20px 24px;
  border-radius: 0 12px 12px 0; margin: 26px 0; font-size: 16px; color: var(--navy); font-weight: 600;
}
.timeline { position: relative; padding-left: 28px; margin-top: 10px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding-bottom: 26px; }
.timeline-item::before { content: ""; position: absolute; left: -25px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px #faf9f6; }
.timeline-year { font-weight: 700; color: var(--navy); font-size: 15px; }
.timeline-item p { color: var(--muted); font-size: 14px; margin-top: 3px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.info-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.info-table td:first-child { color: var(--muted); width: 34%; }
.info-table td:last-child { color: var(--text); font-weight: 500; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.badge { background: #eef2f6; color: var(--navy); border: 1px solid #dde5ed; padding: 7px 14px; border-radius: 30px; font-size: 13px; }

/* ---------- Cases ---------- */
.case-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; box-shadow: 0 4px 18px rgba(23,50,79,.04); overflow: hidden; }
.case-item summary {
  display: flex; align-items: center; gap: 16px; padding: 20px 24px; cursor: pointer;
  list-style: none; font-weight: 600; color: var(--navy); font-size: 16.5px;
}
.case-item summary::-webkit-details-marker { display: none; }
.case-no {
  width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; background: var(--navy); color: var(--gold-light);
  display: grid; place-items: center; font-size: 14px; font-weight: 700;
}
.case-tag { margin-left: auto; font-size: 12px; color: var(--gold); font-weight: 600; background: #f7f2e8; padding: 4px 10px; border-radius: 20px; }
.case-chevron { width: 16px; height: 16px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-left: 4px; }
.case-item[open] .case-chevron { transform: rotate(-135deg); }
.case-body { padding: 0 24px 24px 72px; color: #4a5662; font-size: 14.5px; }
.case-body p { margin-bottom: 12px; }
.case-result { background: #f6f8fa; border-left: 3px solid var(--gold); padding: 12px 16px; border-radius: 0 8px 8px 0; margin-top: 12px; }

/* ---------- Article list ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter-btn {
  padding: 8px 17px; border-radius: 30px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 14px; cursor: pointer; transition: all .2s;
}
.filter-btn:hover { border-color: var(--gold); color: var(--navy); }
.filter-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.article-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 4px 18px rgba(23,50,79,.04); display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.article-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.article-cat { color: var(--navy); background: #eef2f6; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.article-card h3 { font-size: 17px; line-height: 1.5; color: var(--navy); margin-bottom: 10px; }
.article-card p { font-size: 13.5px; color: var(--muted); flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.article-foot { margin-top: 16px; font-size: 13px; color: var(--gold); font-weight: 600; }

/* ---------- Article detail ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 300px; gap: 36px; align-items: start; }
.article-main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 40px; }
.article-main h1 { font-size: 28px; color: var(--navy); line-height: 1.45; margin-bottom: 14px; }
.article-head-meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 26px; }
.article-content h2 { font-size: 20px; color: var(--navy); margin: 30px 0 12px; padding-left: 12px; border-left: 3px solid var(--gold); }
.article-content h3 { font-size: 16.5px; color: var(--navy); margin: 20px 0 8px; }
.article-content p { font-size: 15px; color: #44515d; margin-bottom: 14px; }
.article-content ul { margin: 0 0 16px; }
.article-content li { font-size: 15px; color: #44515d; padding: 5px 0 5px 20px; position: relative; }
.article-content li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.article-content strong { color: var(--navy); }
.faq-item { background: #f7f8fa; border-radius: 10px; padding: 14px 18px; margin-bottom: 12px; }
.faq-q { font-weight: 700; color: var(--navy); font-size: 15px; }
.faq-a { font-size: 14.5px; color: #4a5662; margin-top: 5px; }
.case-summary-box { background: #f6f4ee; border: 1px solid #e9e0cc; border-radius: 12px; padding: 18px 20px; margin-bottom: 24px; font-size: 14.5px; color: #4a4033; }
.lawyer-note { margin-top: 38px; border-top: 1px solid var(--line); padding-top: 22px; font-size: 14px; color: var(--muted); }
.sidebar-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.sidebar-card h3 { font-size: 16px; color: var(--navy); margin-bottom: 14px; }
.sidebar-lawyer { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; }
.sidebar-lawyer img { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; object-position: center 22%; border: 2px solid var(--gold-light); }
.sidebar-lawyer strong { color: var(--navy); font-size: 16px; display: block; }
.sidebar-lawyer span { font-size: 12px; color: var(--muted); }
.sidebar-card .btn { width: 100%; }
.related-list a { display: block; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: #44515d; }
.related-list a:last-child { border-bottom: 0; }
.related-list a:hover { color: var(--gold); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.contact-card h3 { color: var(--navy); font-size: 19px; margin-bottom: 18px; }
.contact-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 0; }
.contact-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: #f2f0e9; color: var(--navy); display: grid; place-items: center; }
.contact-icon svg { width: 18px; height: 18px; fill: currentColor; }
.contact-label { font-size: 12px; color: var(--muted); }
.contact-value { font-size: 15px; color: var(--navy); font-weight: 600; margin-top: 2px; }
.big-phone { font-size: 30px; font-weight: 700; color: var(--navy); letter-spacing: 1px; }
.notice { background: #f7f4ec; border: 1px solid #ebe2cd; border-radius: 10px; padding: 14px 18px; font-size: 13px; color: #7a6a48; margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.75); padding: 50px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { font-size: 13.5px; margin-top: 14px; color: rgba(255,255,255,.6); }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; font-size: 13.5px; color: rgba(255,255,255,.62); padding: 4px 0; }
.footer-col a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 20px; font-size: 12.5px; color: rgba(255,255,255,.45); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Back to top ---------- */
.back-top {
  position: fixed; right: 24px; bottom: 26px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: #fff; border: 0; cursor: pointer; box-shadow: var(--shadow);
  display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 90;
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { transform: translateY(-3px); background: var(--navy-soft); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .header-inner { height: auto; flex-wrap: wrap; padding: 12px 0; gap: 12px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 4px; }
  .header-contact { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo-wrap { order: -1; }
  .hero-photo { width: min(100%, 320px); }
  .hero-photo-badge { left: auto; right: 4%; bottom: 20px; }
  .grid-3, .article-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .sidebar-card { margin-bottom: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 32px, var(--maxw)); }

  /* 头部：品牌一行，电话 + 咨询按钮一行，均显眼 */
  .header-inner { flex-wrap: wrap; gap: 8px; padding: 10px 0 8px; }
  .brand { flex: 1 1 100%; }
  .brand-mark { width: 36px; height: 36px; font-size: 19px; }
  .brand-name { font-size: 18px; }
  .header-contact { width: 100%; margin-left: 0; justify-content: space-between; gap: 10px; }
  .header-phone { font-size: 20px; gap: 6px; }
  .header-phone svg { width: 19px; height: 19px; }
  .header-contact .btn-gold { font-size: 13px; padding: 9px 14px; }
  .main-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding: 4px 0 2px; gap: 2px; }
  .main-nav a { padding: 7px 11px; font-size: 13.5px; white-space: nowrap; }

  .hero { padding: 42px 0 52px; }
  .hero h1 { font-size: clamp(32px, 9vw, 42px); }
  .hero-lead { font-size: 16px; }
  .hero-desc { font-size: 14px; }
  .hero-photo { width: min(100%, 300px); }
  .hero-photo-badge { right: 0; bottom: 16px; padding: 12px 18px; left: auto; }
  .hero-photo-badge strong { font-size: 28px; }
  .hero-photo-badge span { font-size: 13px; }
  .hero-actions .btn { flex: 1 1 auto; }

  .section { padding: 48px 0; }
  .grid-3, .grid-2, .article-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 25px; }
  .card { padding: 24px 20px; }

  .stat { padding: 22px 10px; }
  .stat-num { font-size: 30px; }

  .page-banner { padding: 36px 0 32px; }
  .page-banner h1 { font-size: 30px; }

  .btn { padding: 10px 16px; font-size: 14px; }

  .article-main { padding: 22px 18px; }
  .article-main h1 { font-size: 22px; }
  .article-head-meta { flex-wrap: wrap; gap: 8px; }
  .article-content h2 { font-size: 18px; }
  .article-content p, .article-content li { font-size: 14.5px; }
  .sidebar { grid-template-columns: 1fr; }
  .big-phone { font-size: 26px; word-break: break-all; }
  .contact-card { padding: 24px 20px; }

  .case-item summary { padding: 16px; font-size: 15px; flex-wrap: wrap; gap: 10px; }
  .case-tag { margin-left: 0; }
  .case-body { padding: 0 16px 18px; }

  .filters { gap: 8px; }
  .filter-btn { padding: 7px 13px; font-size: 13px; }

  .back-top { right: 14px; bottom: 18px; width: 40px; height: 40px; }
}
