/* ═══════════════════════════════════════════════════════════════
   叶俊律师官网 · 设计系统 CSS
   基于 OpenDesign Refined 生成，navy #1E3A8A + gold #B45309
   ═══════════════════════════════════════════════════════════════ */

/* ─── Google Fonts (由页面 <link> 引入 Playfair Display + Inter) ─── */

/* ─── Design Tokens ─── */
:root {
  /* Surfaces */
  --bg:            #F8FAFC;
  --surface:       #FFFFFF;
  --surface-warm:  #EEF2FF;
  --paper:         #F8FAFC;
  --soft:          #EEF2FF;

  /* Text */
  --fg:    #0F172A;
  --fg-2:  #334155;
  --muted: #64748B;
  --ink:   #0F172A;

  /* Lines */
  --border:      #CBD5E1;
  --border-soft: #E2E8F0;
  --line:        #E2E8F0;

  /* Accent */
  --accent:       #1E3A8A;   /* navy — primary authority */
  --accent-deep:  #172B6F;
  --accent-hover: #172B6F;
  --blue:         #1E3A8A;
  --blue-dark:    #172B6F;

  --gold:        #B45309;   /* amber gold — CTA */
  --gold-light:  #FEF3C7;
  --gold-hover:  #92400E;
  --brass:       #B45309;
  --clay:        #92400E;
  --focus:       #B45309;

  --hero-bg-start: #0F172A;
  --hero-bg-end:   #1E3A8A;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, "Times New Roman", "Songti SC", serif;
  --font-body:    Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;

  --text-xs:   11px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   18px;
  --text-lg:   22px;
  --text-xl:   30px;
  --text-2xl:  44px;
  --text-3xl:  64px;
  --text-4xl:  88px;

  /* Spacing */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 20px;  --sp-6: 24px;  --sp-8: 32px;  --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  --section-y-desktop: 104px;
  --section-y-tablet:  72px;
  --section-y-phone:   52px;

  /* Layout */
  --max: 1140px;
  --container-max:            1140px;
  --container-gutter-desktop: 40px;
  --container-gutter-tablet:  24px;
  --container-gutter-phone:   18px;

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   14px;
  --radius-lg:   22px;
  --radius-pill: 9999px;

  /* Elevation */
  --elev-card:  0 1px 3px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.08);
  --elev-hover: 0 4px 6px rgba(15,23,42,.06), 0 20px 48px rgba(15,23,42,.14);
  --focus-ring: 0 0 0 3px rgba(180,83,9,.35);

  /* Motion */
  --motion-fast: 150ms;
  --motion-base: 240ms;
  --ease-standard: cubic-bezier(.2,0,0,1);
}

/* ═══ Reset & Base ═══ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--motion-fast) var(--ease-standard);
}
a:hover { color: var(--gold); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ═══ NAV (site-header, 兼容脚本生成的内页) ═══ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: 12px clamp(18px, 4vw, 40px);
  background: rgba(248,250,252,.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(203,213,225,.6);
  transition: background var(--motion-base) var(--ease-standard);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--fg);
  text-decoration: none;
  min-width: 210px;
  flex-shrink: 0;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--accent);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
  flex-shrink: 0;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: .01em;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--sp-1);
}
.site-nav a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  color: var(--fg-2);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--motion-fast), background var(--motion-fast);
  white-space: nowrap;
}
.site-nav a:hover {
  color: var(--accent);
  background: rgba(30,58,138,.06);
}

/* ═══ MAIN ═══ */
main { min-height: 70vh; }

/* ═══ HERO (内页 legacy hero) ═══ */
.hero {
  position: relative;
  min-height: 74vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: linear-gradient(150deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 60%, #1e3a8a 100%);
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  mix-blend-mode: luminosity;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(180,83,9,.14) 0%, transparent 60%),
    linear-gradient(90deg, rgba(15,23,42,.82), rgba(15,23,42,.48) 55%, rgba(30,58,138,.28));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 72px;
  color: #fff;
}

.hero h1, .page-hero h1, .article-body h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.05;
  letter-spacing: -.02em;
  font-weight: 600;
}
.hero .subtitle {
  max-width: 760px;
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 400;
  line-height: 1.4;
  color: rgba(255,255,255,.9);
}
.hero p {
  max-width: 620px;
  color: rgba(255,255,255,.7);
  line-height: 1.8;
}

/* ═══ Buttons ═══ */
.hero-actions, .action-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
}
.button, .button-secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 13px 26px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--motion-fast) var(--ease-standard),
              color var(--motion-fast) var(--ease-standard),
              border-color var(--motion-fast) var(--ease-standard),
              box-shadow var(--motion-fast) var(--ease-standard),
              transform var(--motion-fast) var(--ease-standard);
}
.button:focus-visible, .button-secondary:focus-visible { box-shadow: var(--focus-ring); }
.button:active, .button-secondary:active { transform: translateY(1px); }

.button {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.button:hover {
  background: var(--gold-hover);
  color: #fff;
  border-color: var(--gold-hover);
}
.button-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}
.button-secondary:hover {
  background: var(--surface-warm);
  color: var(--accent-deep);
  border-color: var(--accent);
}
.hero .button-secondary {
  color: #fff;
  border-color: rgba(255,255,255,.5);
  background: transparent;
}
.hero .button-secondary:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
  border-color: rgba(255,255,255,.8);
}

/* ═══ Sections ═══ */
.content-band, .content-shell, .page-hero {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}
.content-band { padding: var(--section-y-desktop) 0; }
.page-hero {
  padding: 88px 0 48px;
  border-bottom: 1px solid var(--border-soft);
}
.page-hero.compact h1 {
  max-width: 850px;
  font-size: clamp(36px, 4.4vw, 56px);
}
.page-hero p {
  max-width: 820px;
  color: var(--fg-2);
  font-size: var(--text-md);
  line-height: 1.72;
}

.eyebrow, .meta-line {
  display: inline-block;
  color: var(--gold);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 0 var(--sp-3);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--sp-6);
  margin-bottom: var(--sp-12);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--border-soft);
}
.section-head h2, .article-body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.02em;
  color: var(--fg);
}
.section-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.7;
}

/* ═══ Cards ═══ */
.card-grid, .resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6);
}
.resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.service-card, .resource-card, .note-panel {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: var(--sp-10) var(--sp-8) var(--sp-8);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--motion-base) var(--ease-standard),
              transform var(--motion-base) var(--ease-standard),
              border-color var(--motion-base) var(--ease-standard);
}
.service-card::before, .resource-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--motion-base) var(--ease-standard);
}
.service-card:hover, .resource-card:hover {
  box-shadow: var(--elev-hover);
  transform: translateY(-4px);
  border-color: var(--border);
}
.service-card:hover::before, .resource-card:hover::before { transform: scaleX(1); }

.note-panel {
  padding: var(--sp-8) var(--sp-8) var(--sp-8) var(--sp-6);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.note-panel:hover {
  border-left-color: var(--accent);
  box-shadow: var(--elev-card);
  transform: none;
}
.note-panel::before { display: none; }

.service-card h3, .resource-card h3, .note-panel h3, .article-body h3 {
  margin: 0 0 var(--sp-4);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.28;
  color: var(--fg);
}
.service-card h3 a, .resource-card h3 a {
  color: inherit;
  text-decoration: none;
  transition: color var(--motion-fast);
}
.service-card h3 a:hover, .resource-card h3 a:hover { color: var(--accent); }

.service-card p, .resource-card p, .note-panel p {
  margin: 0;
  color: var(--fg-2);
  font-size: var(--text-sm);
  line-height: 1.85;
}
.tagline {
  display: inline-block;
  margin-top: var(--sp-3) !important;
  color: var(--gold) !important;
  font-weight: 600 !important;
  font-size: var(--text-xs) !important;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ═══ Article body ═══ */
.content-shell {
  max-width: 780px;
  padding: 88px 16px 96px;
  margin: 0 auto;
}
.article-body { overflow-wrap: anywhere; }
.article-body h1 { font-size: clamp(34px, 5vw, 56px); margin-top: 0; }
.article-body h2 {
  margin-top: var(--sp-16);
  margin-bottom: var(--sp-5);
  font-size: clamp(24px, 2.6vw, 34px);
}
.article-body h3 {
  margin-top: var(--sp-10);
  margin-bottom: var(--sp-3);
  font-size: var(--text-lg);
}
.article-body p, .article-body li {
  color: var(--fg-2);
  font-size: var(--text-md);
  line-height: 1.85;
}
.article-body p { margin: 0 0 var(--sp-5); }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 var(--sp-6); }
.article-body li { margin-bottom: var(--sp-2); }
.article-body blockquote {
  margin: var(--sp-6) 0;
  padding: var(--sp-5) var(--sp-6);
  border-left: 3px solid var(--gold);
  background: var(--surface-warm);
  color: var(--fg-2);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: var(--text-md);
}

.table-scroll {
  overflow-x: auto;
  margin: var(--sp-6) 0;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: #fff;
}
table { width: 100%; min-width: 640px; border-collapse: collapse; }
th, td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  vertical-align: top;
  font-size: var(--text-sm);
}
th { background: var(--surface-warm); font-weight: 600; color: var(--fg); }
td { color: var(--fg-2); }

pre {
  overflow-x: auto;
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  background: var(--fg);
  color: #f8fafc;
  font-size: var(--text-sm);
  line-height: 1.6;
}
code {
  font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}
p > code, li > code {
  padding: 2px 6px;
  background: var(--surface-warm);
  border-radius: 4px;
  color: var(--accent);
}

/* ═══ Info grid ═══ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  margin: var(--sp-6) 0;
}
.info-grid div {
  padding: var(--sp-5);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.info-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: .04em;
}
.info-grid span { color: var(--muted); font-size: var(--text-sm); }

.text-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.text-link:hover { color: var(--gold); }

/* ═══ Placeholder page ═══ */
.placeholder-page {
  border-top: 3px solid var(--gold);
  padding-top: var(--sp-10);
}

/* ═══ Footer ═══ */
.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr);
  gap: var(--sp-16);
  padding: 72px clamp(18px, 4vw, 40px) 40px;
  border-top: 1px solid var(--border-soft);
  background: var(--fg);
  color: rgba(255,255,255,.6);
}
.site-footer strong {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: rgba(255,255,255,.9);
  letter-spacing: .01em;
}
.site-footer p {
  max-width: 620px;
  margin: 12px 0 0;
  color: rgba(255,255,255,.4);
  font-size: var(--text-xs);
  line-height: 1.9;
}
.site-footer .filing-link {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--motion-fast);
}
.site-footer .filing-link:hover { color: rgba(255,255,255,.8); }
.footer-links {
  display: grid;
  gap: var(--sp-3);
  align-content: start;
}
.footer-links a {
  color: rgba(255,255,255,.5);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--motion-fast);
}
.footer-links a:hover { color: rgba(255,255,255,.9); }

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
  .content-band { padding: var(--section-y-tablet) 0; }
  .content-shell { padding-top: 64px; padding-bottom: 72px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .site-header { align-items: flex-start; flex-direction: column; padding: 12px 18px; }
  .site-nav { justify-content: flex-start; }
  .brand { min-width: 0; }
}
@media (max-width: 768px) {
  .card-grid, .resource-grid, .site-footer { grid-template-columns: 1fr; gap: var(--sp-4); }
  .section-head { display: block; }
  .section-head p { margin-top: var(--sp-3); }
  .site-footer { gap: var(--sp-10); padding-top: 56px; }
  .content-band { padding: var(--section-y-phone) 0; }
  .article-body h2 { margin-top: var(--sp-12); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { min-height: 78vh; }
  .hero-content { padding: 84px 0 52px; }
  .button, .button-secondary { width: 100%; }
  .info-grid { grid-template-columns: 1fr; }
  .content-shell { padding: 56px 16px 72px; }
  .article-body table { min-width: 0; table-layout: fixed; }
  .article-body th, .article-body td { padding: 10px 8px; overflow-wrap: anywhere; }
  .service-card, .resource-card, .note-panel { padding: var(--sp-8) var(--sp-6) var(--sp-6); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
