/**
 * site-chrome.css — 与根目录单页 index 共享的顶栏 / 底栏样式
 * 供 blog、pages 等子页与 home.css 视觉对齐（正文仍用 site.css）
 */

:root {
  --ff-display: 'Playfair Display', 'Noto Serif SC', Georgia, 'Times New Roman', serif;
  --ff-body: 'DM Sans', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --ff-mono: 'DM Mono', 'SF Mono', 'Fira Code', 'Courier New', monospace;
  --ink: #1A1814;
  --paper: #FAFAF8;
  --cream: #ffffff;
  --gold: #B8882A;
  --gold-light: #D4A843;
  --terracotta: #B8882A;
  --muted: #8A857C;
  --border: rgba(184,136,42,0.15);
  --nav-h: 68px;
  --max-w: 1420px;
  --text2: #4A4540;

  /* 字号体系（与 home.css 对齐，面向 40+ 企业主可读性） */
  --text-2xs: 0.8125rem;   /* 13px — 标签/元信息下限 */
  --text-sm: 0.875rem;     /* 14px — 次要正文 */
  --text-sm-plus: 0.9375rem; /* 15px — 卡片描述 */
  --text-base: 1rem;       /* 16px — 基准正文 */
  --text-md: 1.0625rem;    /* 17px — 引导文 */
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;
  --leading-tight: 1.45;

  /* Footer tokens（与 home.css 对齐） */
  --footer-text-strong: #FAFAF8;
  --footer-text: rgba(250,250,248,0.82);
  --footer-text-muted: rgba(250,250,248,0.68);
  --footer-border: rgba(184,136,42,0.22);
}

/* 子页：主内容区预留顶栏高度（与 index 首屏 padding-top 思路一致） */
body.has-site-chrome main.page-wrap {
  padding-top: calc(var(--nav-h) + 1.5rem);
}

/* ═══════════════════════════════════════════
   NAV（同 index #mainNav）
   ═══════════════════════════════════════════ */
#mainNav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 4rem;
  height: var(--nav-h);
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
#mainNav.scrolled {
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  align-self: stretch;
  min-height: 0;
}
.nav-logo:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}
.nav-logo-img {
  display: block;
  width: auto;
  height: auto;
  max-height: calc(var(--nav-h) - 16px);
  max-width: min(260px, 46vw);
  object-fit: contain;
  object-position: center center;
}
.nav-logo:hover .nav-logo-img {
  opacity: 0.92;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav-links > li {
  display: flex;
  align-items: center;
  list-style: none;
}
.nav-links > li > a:not(.nav-cta) {
  text-decoration: none;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-links > li > a:not(.nav-cta):hover {
  color: var(--ink);
}
.nav-links > li > a:not(.nav-cta).active {
  color: var(--ink);
}

.nav-cta {
  background: var(--ink) !important;
  color: var(--paper) !important;
  padding: 0.55rem 1.3rem !important;
  border-radius: 2px;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  transition: background 0.2s !important;
  text-decoration: none !important;
}
.nav-cta:hover {
  background: var(--terracotta) !important;
  color: white !important;
}

/* 下拉（技术 / 生活 等）：与顶栏文字同色 */
.nav-dropdown {
  position: relative;
}
.nav-dd-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  font-family: var(--ff-body);
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav-dd-trigger:hover,
.nav-dropdown:hover .nav-dd-trigger {
  color: var(--ink);
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  /* 顶缘贴父级避免 hover 断层；额外 padding 保留与原 top 偏移相当的视觉空隙 */
  padding: calc(0.35rem + 6px) 0 0.35rem 0;
  background: rgba(250, 247, 242, 0.98);
  border: 1px solid var(--border);
  border-radius: 2px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.08);
  z-index: 320;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: var(--text-sm-plus);
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-menu a:hover {
  background: rgba(200, 169, 110, 0.12);
  color: var(--ink);
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  justify-content: flex-start;
  align-items: stretch;
  background-color: var(--cream);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  z-index: 210;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 2.5rem 2rem;
  gap: 0;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-drawer.open {
  transform: translateX(0);
}
.nav-drawer a {
  text-decoration: none;
  color: var(--ink);
  font-size: 1.4rem;
  font-family: var(--ff-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s, padding-left 0.2s;
}
.nav-drawer a:hover {
  color: var(--gold);
  padding-left: 0.5rem;
}
.drawer-cat-label {
  font-size: var(--text-2xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 500;
  margin: 1rem 0 0.35rem;
}
.drawer-cat-label:first-child {
  margin-top: 0;
}
.nav-drawer .drawer-cta {
  margin-top: 2rem;
  background: var(--ink);
  color: var(--paper) !important;
  text-align: center;
  border-radius: 2px;
  padding: 1rem !important;
  border-bottom: none !important;
  font-size: 1rem !important;
}

/* ═══════════════════════════════════════════
   FOOTER（同 index.html 深色页脚，与全站 gold/ink 体系一致）
   ═══════════════════════════════════════════ */
footer {
  position: relative;
  background: linear-gradient(180deg, #1A1814 0%, #0c0b0a 100%);
  color: var(--footer-text);
  padding: clamp(3.25rem, 6vw, 4.75rem) clamp(1.5rem, 4vw, 4rem) clamp(2.5rem, 4vw, 3.25rem);
  border-top: none;
  overflow: hidden;
}
footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 18% 0%, rgba(184,136,42,0.09) 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 92% 85%, rgba(184,136,42,0.05) 0%, transparent 55%);
  pointer-events: none;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: clamp(2.5rem, 4vw, 3.5rem);
}
.footer-logo-link {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 1rem;
}
.footer-logo {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--footer-text-strong);
  margin-bottom: 0;
}
.footer-logo span { color: #D4A843; }
.footer-brand-desc {
  font-size: var(--text-sm-plus);
  line-height: 1.78;
  color: var(--footer-text);
  max-width: 320px;
  margin-bottom: 0.65rem;
}
.footer-brand-note {
  font-size: var(--text-sm);
  color: var(--footer-text-muted);
}
.footer-col h4 {
  font-size: var(--text-sm);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.1rem;
  font-weight: 700;
  font-family: var(--ff-body);
  padding-left: 0.7rem;
  border-left: 2px solid rgba(212,168,67,0.65);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: var(--text-sm-plus);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--footer-text-strong); }
.footer-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.75rem;
  border-top: 1px solid var(--footer-border);
}
.footer-legal-block {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.footer-copy {
  font-size: var(--text-sm);
  color: var(--footer-text);
  line-height: 1.65;
}
.footer-beian {
  font-size: var(--text-sm);
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-beian:hover { color: var(--gold-light); }
.footer-seo-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
  max-width: 420px;
}
.footer-seo-tag {
  font-size: var(--text-2xs);
  color: var(--footer-text-muted);
  border: 1px solid rgba(184,136,42,0.32);
  padding: 3px 9px;
  border-radius: 2px;
  background: rgba(255,255,255,0.06);
}

@media (max-width: 1200px) {
  .nav-links {
    gap: 1.35rem;
  }
}

@media (max-width: 1024px) {
  #mainNav {
    padding: 0 2rem;
  }
  footer {
    padding: 2.5rem 2rem;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  :root {
    --nav-h: 60px;
  }
  #mainNav {
    padding: 0 1.25rem;
  }
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .nav-drawer {
    display: flex;
  }
  .nav-dropdown-menu {
    display: none !important;
  }
  footer {
    padding: 2rem 1.25rem;
  }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .footer-seo-tags { justify-content: flex-start; max-width: none; }
}

@media (min-width: 1440px) {
  #mainNav {
    padding: 0 5rem;
  }
  footer {
    padding: 3rem 5rem;
  }
}
