/* ============================================================
   清大文森大数据研究院 — 全站公共样式
   ============================================================ */

/* ---------- 本地字体（替代 Google Fonts，国内访问无阻） ----------
   仅收录本站实际用到的 921 个字符，6 个字重合计约 680KB。
   文案更新后重新运行 tools/build-fonts.py 即可重建。            */
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/noto-sans-sc-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/noto-sans-sc-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/noto-sans-sc-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/noto-sans-sc-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/noto-sans-sc-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/noto-sans-sc-900.woff2') format('woff2');
}

/* ---------- CSS Variables ---------- */
:root {
  --primary:       #0d3b6e;   /* 深蓝 */
  --primary-light: #1a5ca8;
  --accent:        #e05c1a;   /* 橙红 */
  --accent2:       #f5a623;   /* 金黄 */
  --teal:          #0891b2;
  --bg:            #f5f7fa;
  --bg-white:      #ffffff;
  --bg-section:    #eef2f8;
  --text:          #1a2332;
  --text-sub:      #4a5a72;
  --text-muted:    #7a8fa8;
  --border:        #d8e2ef;
  --shadow-sm:     0 2px 8px rgba(13,59,110,.08);
  --shadow:        0 6px 24px rgba(13,59,110,.12);
  --shadow-lg:     0 12px 48px rgba(13,59,110,.16);
  --radius:        12px;
  --radius-sm:     8px;
  --font:          'Noto Sans SC','PingFang SC','Microsoft YaHei',sans-serif;
  --nav-h:         68px;
  --transition:    all .25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.75; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
  background: var(--primary);
  color: rgba(255,255,255,.8);
  font-size: 14px;
  padding: 7px 60px;
  display: flex; justify-content: space-between; align-items: center;
}
.top-bar a { color: rgba(255,255,255,.75); margin-left: 20px; transition: var(--transition); }
.top-bar a:hover { color: #fff; }

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: sticky; top: 0; z-index: 1000;
  height: var(--nav-h);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center;
  padding: 0 60px;
  gap: 0;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  margin-right: 40px; flex-shrink: 0;
}
.nav-logo-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 19px; font-weight: 900;
}
/* 真实 logo 图片样式 */
.nav-logo-img {
  height: 40px; width: auto; max-width: 120px;
  object-fit: contain; display: block;
}
.nav-logo-text .name { font-size: 19px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.nav-logo-text .en   { font-size: 11px; color: var(--text-muted); letter-spacing: .5px; }

/* Main menu */
.nav-menu { display: flex; align-items: stretch; flex: 1; }
.nav-item  { position: relative; }
.nav-link  {
  display: flex; align-items: center; gap: 5px;
  height: var(--nav-h); padding: 0 20px;
  font-size: 16px; font-weight: 500; color: var(--text);
  white-space: nowrap; transition: var(--transition);
  border-bottom: 3px solid transparent;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}
.nav-link svg { width: 12px; height: 12px; fill: currentColor; flex-shrink: 0; }

/* Dropdown */
.dropdown {
  position: absolute; top: calc(var(--nav-h) - 1px); left: 0;
  min-width: 220px; background: var(--bg-white);
  border: 1px solid var(--border); border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 200;
}
.nav-item:hover .dropdown {
  opacity: 1; pointer-events: all; transform: translateY(0);
}
.dropdown a {
  display: block; padding: 12px 22px;
  font-size: 15px; color: var(--text-sub);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { background: var(--bg-section); color: var(--primary); padding-left: 26px; }

/* Mobile */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; margin-left: auto;
}
.hamburger span { width: 24px; height: 2px; background: var(--primary); transition: .3s; }

/* ============================================================
   PAGE HERO (banner)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 60%, var(--teal) 100%);
  padding: 72px 60px 60px;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 360px; height: 360px; border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.page-hero::before {
  content: '';
  position: absolute; right: 120px; bottom: -100px;
  width: 260px; height: 260px; border-radius: 50%;
  background: rgba(255,255,255,.03);
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: rgba(255,255,255,.6);
  margin-bottom: 20px; position: relative; z-index: 1;
}
.breadcrumb a { color: rgba(255,255,255,.6); transition: var(--transition); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { opacity: .4; }
.page-hero h1 {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 800; color: #fff;
  position: relative; z-index: 1;
  margin-bottom: 12px;
}
.page-hero p {
  font-size: 16px; color: rgba(255,255,255,.75);
  max-width: 600px; position: relative; z-index: 1;
}
.sub-nav {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-white);
  padding: 0 60px;
  overflow-x: auto;
  position: sticky; top: var(--nav-h); z-index: 900;
  box-shadow: var(--shadow-sm);
}
.sub-nav a {
  padding: 15px 24px;
  font-size: 15px; font-weight: 500;
  color: var(--text-sub); white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}
.sub-nav a:hover  { color: var(--primary); }
.sub-nav a.active { color: var(--primary); border-bottom-color: var(--accent); font-weight: 600; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container   { max-width: 1180px; margin: 0 auto; padding: 0 60px; }
.section     { padding: 80px 60px; }
.section-alt { background: var(--bg-section); }
.section-label {
  font-size: 13px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px;
}
.section-title {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800; color: var(--primary); line-height: 1.25;
  margin-bottom: 12px;
}
.section-title span { color: var(--accent); }
.section-desc { font-size: 16px; color: var(--text-sub); max-width: 640px; line-height: 1.85; }
.divider { width: 48px; height: 4px; background: var(--accent); border-radius: 2px; margin: 16px 0 28px; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin-bottom: 20px;
  background: var(--bg-section);
}
.card-title { font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.card-desc  { font-size: 15px; color: var(--text-sub); line-height: 1.8; }

/* Service list inside card */
.service-list { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.service-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 15px; color: var(--text-sub); line-height: 1.65;
}
.service-list li::before {
  content: ''; flex-shrink: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-top: 8px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: none; transition: var(--transition); font-family: var(--font);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px rgba(224,92,26,.3);
}
.btn-primary:hover { background: #c44d12; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(224,92,26,.4); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary-light);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary-light); padding-left: 0; }
.btn-ghost:hover { color: var(--accent); }

/* ============================================================
   TAG / BADGE
   ============================================================ */
.tag {
  display: inline-block; padding: 3px 12px;
  border-radius: 20px; font-size: 12px; font-weight: 500;
  background: var(--bg-section); color: var(--text-sub);
  border: 1px solid var(--border);
}
.tag-accent { background: rgba(224,92,26,.08); color: var(--accent); border-color: rgba(224,92,26,.2); }
.tag-primary { background: rgba(13,59,110,.08); color: var(--primary); border-color: rgba(13,59,110,.2); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--primary);
  color: rgba(255,255,255,.75);
  padding: 60px 60px 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .name { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.9; max-width: 260px; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 16px; letter-spacing: 1px; text-transform: uppercase; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,.6); transition: var(--transition); }
.footer-col ul li a:hover { color: #fff; padding-left: 4px; }
.footer-bottom {
  padding: 20px 0;
  display: flex; flex-direction: column; gap: 10px;
  align-items: center; text-align: center;
  font-size: 14px; color: rgba(255,255,255,.4);
}
.footer-bottom > div:last-child {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: center;
}
.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-bottom a:hover { color: rgba(255,255,255,.8); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}
.fade-up.in { opacity: 1; transform: translateY(0); }
.fade-left  {
  opacity: 0; transform: translateX(-30px);
  transition: opacity .65s ease, transform .65s ease;
}
.fade-left.in { opacity: 1; transform: translateX(0); }
.fade-right {
  opacity: 0; transform: translateX(30px);
  transition: opacity .65s ease, transform .65s ease;
}
.fade-right.in { opacity: 1; transform: translateX(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  #navbar, .page-hero, .section, .sub-nav, .top-bar { padding-left: 32px; padding-right: 32px; }
  footer { padding: 48px 32px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .container { padding: 0 32px; }
}
@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  #navbar { padding: 0 20px; }
  .top-bar { padding: 6px 20px; }
  .nav-menu { display: none; position: fixed; top: 60px; left: 0; right: 0; bottom: 0;
    flex-direction: column; background: var(--bg-white); padding: 20px;
    overflow-y: auto; border-top: 1px solid var(--border); }
  .nav-menu.open { display: flex; }
  .nav-item { width: 100%; }
  .nav-link { height: auto; padding: 14px 0; border-bottom: 1px solid var(--border); border-left: none; }
  .dropdown { position: static; opacity: 1; pointer-events: all; transform: none;
    box-shadow: none; border: none; border-radius: 0; }
  .dropdown a { padding: 10px 20px; font-size: 13px; }
  .hamburger { display: flex; }
  .page-hero, .section { padding-left: 20px; padding-right: 20px; }
  .sub-nav { padding: 0 20px; }
  footer { padding: 40px 20px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .container { padding: 0 20px; }
}
