/* ============================================================
   卉卉网络科技官网 · base.css
   令牌 / 重置 / 页头 / 页脚 / 通用组件
   配色采用规范的企业蓝 + 中性灰（Arco Design 色板）
   ============================================================ */

:root {
  /* —— 品牌与中性色（柔和雾蓝 × 蓝灰，低饱和舒适基调） —— */
  --brand: #3b69bd;          /* 柔和钢蓝（白底对比约 5.3:1） */
  --brand-hover: #2f5aa6;
  --brand-active: #2f5aa6;
  --brand-light: #ebf1f9;    /* 浅蓝底 */
  --brand-light-2: #f4f8fc;  /* 更浅的雾蓝底 */
  --ink: #2a3648;            /* 主文字（蓝灰深色） */
  --ink-2: #566579;          /* 次文字 */
  --ink-3: #8492a6;          /* 辅助文字 */
  --line: #e6ebf1;
  --line-strong: #cdd6e0;
  --bg: #ffffff;
  --bg-soft: #f7f9fb;
  --bg-dark: #232d3b;        /* 页脚（蓝灰深色） */
  --on-dark: #ffffff;
  --on-dark-2: rgba(255, 255, 255, 0.68);

  /* —— 字体 —— */
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;

  /* —— 布局与形状 —— */
  --w-content: 1120px;
  --w-narrow: 840px;
  --radius: 8px;
  --shadow: 0 4px 10px rgba(35, 45, 59, 0.06);
  --shadow-hover: 0 8px 24px rgba(35, 45, 59, 0.1);
  --ease: cubic-bezier(0.25, 0.6, 0.3, 1);
}

/* ============ 重置 ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--brand-light); color: var(--brand-hover); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.35; }
p { margin: 0; }

/* ============ 布局 ============ */
.container { width: min(var(--w-content), calc(100% - 40px)); margin: 0 auto; }
.container--narrow { width: min(var(--w-narrow), calc(100% - 40px)); }

.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }

/* 区块标题 */
.section-head { margin-bottom: 40px; }
.section-head__tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  background: var(--brand-light);
  border-radius: 4px;
  padding: 2px 10px;
  margin-bottom: 12px;
}
.section-head h2 { font-size: 28px; }
.section-head p { margin-top: 10px; color: var(--ink-2); max-width: 620px; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); box-shadow: var(--shadow-hover); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: #fff; }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--lg { padding: 13px 34px; font-size: 16px; }
.btn .arr { transition: transform 0.25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ============ 页头 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 600;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.3; }
.brand__name { font-size: 17px; font-weight: 600; letter-spacing: 0.02em; }
.brand__en { font-size: 10px; letter-spacing: 0.18em; color: var(--ink-3); }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav__item {
  position: relative;
  padding: 6px 0;
  font-size: 15px;
  color: var(--ink-2);
  transition: color 0.25s;
}
.site-nav__item::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}
.site-nav__item:hover { color: var(--ink); }
.site-nav__item.is-active { color: var(--brand); font-weight: 500; }
.site-nav__item.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 9px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 移动端菜单 */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 36px 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu__item {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  font-weight: 500;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.mobile-menu.is-open .mobile-menu__item { transform: none; opacity: 1; }
.mobile-menu.is-open .mobile-menu__item:nth-child(1) { transition-delay: 0.04s; }
.mobile-menu.is-open .mobile-menu__item:nth-child(2) { transition-delay: 0.08s; }
.mobile-menu.is-open .mobile-menu__item:nth-child(3) { transition-delay: 0.12s; }
.mobile-menu.is-open .mobile-menu__item:nth-child(4) { transition-delay: 0.16s; }
.mobile-menu__item.is-active { color: var(--brand); }
.mobile-menu__foot { margin-top: 32px; font-size: 12px; color: var(--ink-3); }

/* ============ 页脚 ============ */
.site-footer { background: var(--bg-dark); color: var(--on-dark); }
.site-footer__top {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 1fr 1.3fr;
  gap: 40px;
  padding: 56px 0 40px;
}
.site-footer h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
  color: var(--on-dark);
}
.footer-brand__name { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.footer-brand__name .brand__mark { width: 32px; height: 32px; font-size: 16px; }
.footer-brand__slogan { margin-top: 14px; color: var(--on-dark-2); font-size: 13.5px; max-width: 280px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li + li { margin-top: 10px; }
.footer-links a { color: var(--on-dark-2); font-size: 14px; transition: color 0.25s; }
.footer-links a:hover { color: var(--on-dark); }
.footer-info { list-style: none; margin: 0; padding: 0; font-size: 13.5px; color: var(--on-dark-2); }
.footer-info li { display: flex; gap: 10px; }
.footer-info li + li { margin-top: 10px; }
.footer-info .k { flex: none; color: rgba(255, 255, 255, 0.4); }

.site-footer__bar { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 20px 0; }
.site-footer__bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--on-dark-2);
}
/* ICP 备案号链接：按工信部悬挂规范，须为醒目超链接并跳转 beian.miit.gov.cn */
.site-footer__bar .icp-link {
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 4px;
  transition: color 0.25s, text-decoration-color 0.25s;
}
.site-footer__bar .icp-link:hover,
.site-footer__bar .icp-link:focus-visible {
  color: #8ab4ff;
  text-decoration-color: #8ab4ff;
}

/* ============ 滚动显现（无 JS 时全可见） ============ */
.has-js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.has-js .reveal.is-in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .has-js .reveal { opacity: 1; transform: none; }
}

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .site-footer__top { grid-template-columns: 1fr; padding-top: 40px; }
  .site-footer__bar-inner { justify-content: center; text-align: center; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 24px; }
}
