/**
 * 初见征服 · 全站公共样式（顶栏/导航/无障碍）
 * 各页在 <head> 中先于页面内 <style> 引入：href="css/site-common.css"
 */

:root {
  --bg-deep: #0a0907;
  --bg-mid: #12100d;
  --surface: rgba(22, 19, 15, 0.72);
  --surface-2: rgba(30, 26, 20, 0.55);
  --gold: #d4af37;
  --gold-soft: #c9a227;
  --gold-dim: #8b7340;
  --text: #e4d9c4;
  --text-muted: #958a78;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(212, 175, 55, 0.12), 0 4px 24px rgba(0, 0, 0, 0.35);
  --site-focus: rgba(212, 175, 55, 0.95);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* 键盘/辅助功能：焦点环清晰可见 */
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--site-focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 10px 16px;
  background: #1a1612;
  color: #f5e6bc;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

.site-top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(18, 15, 12, 0.92) 0%, rgba(12, 10, 8, 0.88) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(139, 115, 64, 0.28);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.site-top-inner {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px 18px 124px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px 24px;
}

.site-top-inner > nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.brand {
  font-size: 1.25rem;
  flex-shrink: 0;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: #f0e0b8;
  text-shadow: 0 0 28px rgba(212, 175, 55, 0.35);
  transition: color 0.2s ease, text-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.brand .brand-text {
  display: inline-block;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.brand .brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: min(280px, 52vw);
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 560px) {
  .site-top-inner {
    padding-left: 94px;
  }
  .brand {
    left: 16px;
    font-size: 1.1rem;
  }
  .brand .brand-logo {
    height: 44px;
    max-width: 210px;
  }
}

.brand:hover {
  color: #fff8e8;
  text-shadow: 0 0 36px rgba(255, 220, 140, 0.45);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  color: #d8ccb8;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-glow);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.site-nav a:hover {
  color: #fff8ec;
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.15), 0 6px 20px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.site-nav a.nav-current {
  color: #1a1408;
  font-weight: 700;
  border-color: rgba(255, 235, 180, 0.45);
  background: linear-gradient(145deg, #f2d878, #b8941f);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.32);
  pointer-events: none;
  transform: none;
}

.site-nav a.nav-current:hover {
  color: #1a1408;
  border-color: rgba(255, 235, 180, 0.45);
  background: linear-gradient(145deg, #f2d878, #b8941f);
  transform: none;
}

.site-nav a.nav-hot {
  position: relative;
  padding-right: 28px;
}

.site-nav a .badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 22px;
  height: 20px;
  line-height: 20px;
  padding: 0 6px;
  font-size: 11px;
  color: #1a1208;
  background: linear-gradient(135deg, #ffe9a8, #d4a41a);
  border-radius: 999px;
  font-weight: 700;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

@media (max-width: 900px) {
  .site-top-inner > nav {
    justify-content: center;
  }
  .site-nav {
    justify-content: center;
  }
}
