/* ============================================================
   裴文魁律师网 · 站点样式
   深藏青 + 金铜色 庄重律所风
   ============================================================ */

:root {
  /* 色彩 */
  --navy-950: #10192e;
  --navy-900: #1b2a4a;
  --navy-800: #24365c;
  --navy-700: #2e4370;
  --gold: #c9a961;
  --gold-light: #dcc28a;
  --gold-dark: #a8873f;
  --paper: #f7f5f0;
  --paper-dark: #efece4;
  --ink: #24292f;
  --ink-soft: #5a6270;
  --white-warm: #f5f2ea;
  --line: rgba(201, 169, 97, 0.35);

  /* 字体 */
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;

  /* 间距 */
  --section-y: clamp(64px, 9vw, 110px);
  --container: 1140px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* 锚点跳转时预留吸顶导航的高度 */
[id] {
  scroll-margin-top: 74px;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
}

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

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

ul {
  list-style: none;
}

.container {
  width: min(var(--container), 92%);
  margin: 0 auto;
}

/* 标题统一使用衬线字体 */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.35;
}

/* 板块标题 */
.section-head {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head .eyebrow {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  color: var(--gold-dark);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(26px, 3.6vw, 36px);
  color: var(--navy-900);
}

.section-head .rule {
  width: 56px;
  height: 2px;
  background: var(--gold);
  margin: 18px auto 0;
  position: relative;
}

.section-head .rule::before,
.section-head .rule::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--gold);
  transform: translateY(-50%) rotate(45deg);
}

.section-head .rule::before { left: -14px; }
.section-head .rule::after { right: -14px; }

/* 深色板块中的标题 */
.on-dark .section-head h2 { color: var(--white-warm); }
.on-dark .section-head .eyebrow { color: var(--gold); }

/* 正文内链接 */
.text-link {
  color: var(--gold-dark);
  border-bottom: 1px solid rgba(168, 135, 63, 0.45);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.text-link:hover {
  color: var(--navy-900);
  border-color: var(--navy-900);
}

.text-link:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.cred-card .text-link {
  color: var(--gold);
  border-color: rgba(201, 169, 97, 0.5);
}

.cred-card .text-link:hover {
  color: var(--gold-light);
  border-color: var(--gold-light);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 13px 36px;
  font-size: 15px;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease,
    border-color 0.25s ease;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-950);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.btn-outline {
  border-color: rgba(245, 242, 234, 0.55);
  color: var(--white-warm);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- 顶栏 ---------- */
.topbar {
  background: var(--navy-950);
  color: rgba(245, 242, 234, 0.8);
  font-size: 13px;
  padding: 8px 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar-contact {
  display: flex;
  gap: 24px;
  align-items: center;
}

.topbar-contact a:hover { color: var(--gold); }

.topbar .icon {
  width: 13px;
  height: 13px;
  margin-right: 6px;
  vertical-align: -1px;
  fill: var(--gold);
}

/* ---------- 导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-900);
  border-bottom: 1px solid rgba(201, 169, 97, 0.25);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(9, 14, 26, 0.45);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 66px;
}

.brand {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--white-warm);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand .icon {
  width: 26px;
  height: 26px;
  fill: var(--gold);
  flex-shrink: 0;
}

.site-nav ul {
  display: flex;
  gap: 6px;
}

.site-nav a {
  display: block;
  padding: 22px 18px;
  font-size: 15.5px;
  letter-spacing: 0.08em;
  color: rgba(245, 242, 234, 0.85);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--gold);
}

.site-nav a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

/* 移动端菜单按钮 */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(201, 169, 97, 0.5);
  padding: 10px;
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle .bar + .bar { margin-top: 5px; }

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  background: var(--navy-950) url("../images/banner1.jpg") center 30% / cover
    no-repeat;
  color: var(--white-warm);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(13, 20, 38, 0.94) 0%,
    rgba(20, 31, 56, 0.82) 55%,
    rgba(20, 31, 56, 0.55) 100%
  );
}

.hero .container {
  position: relative;
  padding: clamp(90px, 13vw, 170px) 0;
  max-width: 720px;
  margin-left: max(calc((100vw - var(--container)) / 2), 4%);
}

.hero .eyebrow {
  font-size: 15px;
  letter-spacing: 0.5em;
  color: var(--gold);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: 0.16em;
  margin-bottom: 24px;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero .lede {
  font-size: 16.5px;
  color: rgba(245, 242, 234, 0.85);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- 所获荣誉 ---------- */
.honors {
  background: var(--navy-900);
  border-top: 1px solid var(--line);
  padding: 36px 0;
}

.honors .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.honor {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--white-warm);
  position: relative;
}

.honor + .honor::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  height: 44px;
  width: 1px;
  background: rgba(201, 169, 97, 0.3);
}

.honor .icon {
  width: 30px;
  height: 30px;
  fill: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
}

.honor .h-title {
  font-family: var(--font-serif);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.45;
}

.honor .h-sub {
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(245, 242, 234, 0.6);
  margin-top: 4px;
}

/* ---------- 律师简介 ---------- */
.about {
  padding: var(--section-y) 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.portrait {
  position: relative;
  margin: 14px 0 0 14px;
}

.portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  box-shadow: 0 18px 40px rgba(16, 25, 46, 0.25);
}

.portrait::before {
  content: "";
  position: absolute;
  inset: -14px 14px 14px -14px;
  border: 1px solid var(--gold);
}

.portrait figcaption {
  position: relative;
  z-index: 1;
  background: var(--navy-900);
  color: var(--white-warm);
  text-align: center;
  padding: 14px 10px;
}

.portrait figcaption strong {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: 0.15em;
  display: block;
}

.portrait figcaption span {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.about-body h3 {
  font-size: 22px;
  color: var(--navy-900);
  margin-bottom: 16px;
}

.about-body h3::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-top: 10px;
}

.about-body p {
  color: var(--ink-soft);
  text-align: justify;
  margin-bottom: 14px;
}

/* 简介下方两张信息卡 */
.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.info-card {
  background: #fff;
  border: 1px solid var(--paper-dark);
  border-top: 3px solid var(--gold);
  padding: 26px 28px;
  box-shadow: 0 8px 24px rgba(16, 25, 46, 0.06);
}

.info-card h4 {
  font-size: 18px;
  color: var(--navy-900);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card .icon {
  width: 20px;
  height: 20px;
  fill: var(--gold-dark);
  flex-shrink: 0;
}

.info-card li {
  color: var(--ink-soft);
  font-size: 15px;
  padding: 5px 0;
}

.info-card li strong {
  color: var(--ink);
  font-weight: 600;
  margin-right: 8px;
}

/* ---------- 业务范围 ---------- */
.practice {
  padding: var(--section-y) 0;
  background: linear-gradient(180deg, var(--paper-dark) 0%, var(--paper) 100%);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.practice-card {
  background: #fff;
  padding: 34px 36px;
  border: 1px solid var(--paper-dark);
  border-left: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(16, 25, 46, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.practice-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(16, 25, 46, 0.12);
}

.practice-card .icon {
  width: 40px;
  height: 40px;
  fill: var(--gold-dark);
  margin-bottom: 18px;
}

.practice-card h3 {
  font-size: 20px;
  color: var(--navy-900);
  margin-bottom: 12px;
}

.practice-card p {
  color: var(--ink-soft);
  font-size: 15px;
  text-align: justify;
}

/* ---------- 法律顾问 ---------- */
.credentials {
  padding: var(--section-y) 0;
  background: var(--navy-900);
  position: relative;
  overflow: hidden;
}

.credentials::before {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(201, 169, 97, 0.15);
  transform: rotate(45deg);
  pointer-events: none;
}

.credentials .container { position: relative; }

.cred-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-bottom: 44px;
}

.cred-card {
  background: rgba(245, 242, 234, 0.05);
  border: 1px solid rgba(201, 169, 97, 0.3);
  padding: 34px 36px;
  color: rgba(245, 242, 234, 0.85);
}

.cred-card .icon {
  width: 34px;
  height: 34px;
  fill: var(--gold);
  margin-bottom: 16px;
}

.cred-card h3 {
  font-size: 19px;
  color: var(--white-warm);
  margin-bottom: 10px;
}

.cred-card p {
  font-size: 15px;
}

.credentials .cta-line {
  text-align: center;
}

.credentials .cta-line p {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.6vw, 26px);
  color: var(--white-warm);
  letter-spacing: 0.2em;
  margin-bottom: 26px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--navy-950);
  color: rgba(245, 242, 234, 0.75);
  padding: clamp(48px, 7vw, 72px) 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

.footer-col h4 {
  font-size: 17px;
  color: var(--gold);
  letter-spacing: 0.15em;
  margin-bottom: 14px;
}

.footer-col p,
.footer-col a {
  font-size: 15px;
  line-height: 1.9;
}

.footer-col a:hover { color: var(--gold); }

.footer-brand {
  text-align: center;
  padding: 36px 0 28px;
}

.footer-brand .name {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--white-warm);
  letter-spacing: 0.2em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-brand .icon {
  width: 22px;
  height: 22px;
  fill: var(--gold);
}

.footer-social {
  margin-top: 16px;
}

.footer-social a {
  display: inline-block;
  padding: 8px 22px;
  font-size: 14px;
  letter-spacing: 0.1em;
  border: 1px solid rgba(201, 169, 97, 0.4);
  border-radius: 999px;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    color 0.25s ease;
}

.footer-social a:hover {
  background: rgba(201, 169, 97, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.copyright {
  background: rgba(0, 0, 0, 0.35);
  text-align: center;
  font-size: 13.5px;
  color: rgba(245, 242, 234, 0.5);
  padding: 16px 0;
}

/* ---------- 返回顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-900);
  border: 1px solid var(--gold);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 90;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.to-top .icon {
  width: 16px;
  height: 16px;
  fill: var(--gold);
}

/* ---------- 滚动入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .practice-card:hover { transform: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 991px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .portrait {
    max-width: 320px;
    margin: 14px auto 0;
  }

  .honors .container {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
  }

  .honor:nth-child(3)::before { display: none; }
}

@media (max-width: 767px) {
  .topbar .container {
    justify-content: center;
  }

  .topbar-location { display: none; }

  .nav-toggle { display: block; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-950);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .site-nav.is-open { display: block; }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }

  .site-nav a {
    padding: 14px 6%;
    border-bottom: none;
  }

  .hero .container {
    margin-left: auto;
    margin-right: auto;
    width: 92%;
  }

  .hero h1 {
    font-size: 30px;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }

  .practice-grid,
  .cred-grid,
  .about-cards,
  .honors .container {
    grid-template-columns: 1fr;
  }

  .honor + .honor::before { display: none; }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
