/* ============================================================
   common.css — 共享样式
   两页共用：reset、字体、容器、header 导航、footer 备案、按钮、动效
   各页通过覆盖 :root 变量切换主题（公司主页=专业靛蓝，讯伴页=暖色）
   ============================================================ */

/* ---------- 设计令牌（默认：公司主页专业主流风） ---------- */
:root {
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --bg-elevated: #FFFFFF;
  --ink: #0F172A;
  --ink-soft: #475569;
  --ink-muted: #94A3B8;
  --accent: #1E3A8A;
  --accent-lt: #3B5BDB;
  --accent-soft: rgba(30, 58, 138, 0.08);
  --border: #E2E8F0;
  --border-soft: #F1F5F9;

  --serif: 'Noto Serif SC', 'Songti SC', serif;
  --sans: 'Noto Sans SC', 'PingFang SC', -apple-system, BlinkMacSystemFont, sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);

  --container: 1200px;
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* ---------- 容器 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Header 导航 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

/* 让容器撑满 header 高度，使内部 .nav 的 height:100% 生效，
   从而 nav-brand 与 nav-links 能在 header 中真正垂直居中 */
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-brand.is-product img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 15px;
  color: var(--ink-soft);
  font-weight: 500;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-lt);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-soft);
}

.btn-light {
  background: var(--bg-elevated);
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- 区块通用 ---------- */
.section {
  padding: 96px 0;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 56px;
}

/* ---------- 卡片 ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* ---------- 滚动渐显动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] {
  transition-delay: 0.1s;
}

.reveal[data-delay="2"] {
  transition-delay: 0.2s;
}

.reveal[data-delay="3"] {
  transition-delay: 0.3s;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
}

.footer-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 16px;
  text-align: center;
  /* 版权与备案统一字体、字号、字重、颜色 */
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.6;
}

.footer-content p {
  margin: 0;
}

.footer-content a {
  color: inherit;
  font: inherit;
  transition: color 0.2s ease;
}

.footer-content a:hover {
  color: var(--accent);
}

.footer-brand {
  margin: 0;
}

.footer-sep {
  color: inherit;
  font-size: inherit;
  user-select: none;
}

.filing-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 16px;
}

.gab-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.gab-link:hover {
  text-decoration: none;
}

.gab-logo {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }

  .container {
    padding: 0 20px;
  }

  .section {
    padding: 64px 0;
  }

  .section-desc {
    margin-bottom: 40px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 32px 32px;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
  }

  .nav-links a.active::after {
    display: none;
  }

  .card {
    padding: 24px;
  }
}

/* ---------- 可访问性 ---------- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
