/* ============================================================
   Huvia 辉佳 - 全局样式
   品牌色：橙 #FD7446 / 深灰 #4D4D4D
   风格：扁平、现代、B端专业感
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'PingFang SC', 'Inter', -apple-system, BlinkMacSystemFont,
    'Microsoft YaHei', 'Hiragino Sans GB', 'Noto Sans SC', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #4D4D4D;
  background: #FFFFFF;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- 设计令牌 ---------- */
:root {
  --brand: #FD7446;
  --brand-light: #FFA37D;
  --brand-soft: #FFF1EC;
  --brand-tint: #FFE5D9;
  --ink: #1F2024;
  --text: #4D4D4D;
  --text-light: #6B6E73;
  --text-mute: #9A9CA0;
  --text-soft: #555861;
  --line: #ECEEF0;
  --border: #ECEEF0;
  --line-soft: #F4F5F7;
  --bg: #FFFFFF;
  --bg-soft: #F8F9FB;
  --bg-card: #FFFFFF;
  --bg-dark: #14151A;
  --bg-dark-soft: #1F2024;
  --shadow-sm: 0 1px 2px rgba(20,21,26,.04), 0 1px 4px rgba(20,21,26,.04);
  --shadow-md: 0 4px 16px rgba(20,21,26,.06), 0 2px 6px rgba(20,21,26,.04);
  --shadow-lg: 0 20px 60px rgba(20,21,26,.10), 0 8px 24px rgba(20,21,26,.06);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --container: 1240px;
  --gutter: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ---------- 通用排版 ---------- */
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.02em; }
h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.015em; }
h3 { font-size: clamp(20px, 2vw, 24px); }
h4 { font-size: 18px; }
p  { line-height: 1.75; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--brand);
}
.section-title {
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-title h2 { margin-bottom: 16px; }
.section-title p { color: var(--text-light); font-size: 16px; }

.muted { color: var(--text-light); }
.brand-text { color: var(--brand); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 100px;
  transition: all .25s var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 20px rgba(253,116,70,.30);
}
.btn-primary:hover {
  background: #E85A2B;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(253,116,70,.40);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.btn-light {
  background: #fff;
  color: var(--ink);
}
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- 导航栏 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
  height: 36px;
}
.nav-logo img { height: 36px; width: auto; }
.nav-menu {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ---------- 顶层导航项 ---------- */
.nav-item { position: relative; }
.nav-item > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  font-size: 15px;
  color: var(--text);
  border-radius: 8px;
  transition: color .25s var(--ease), background .25s var(--ease);
  cursor: pointer;
}
/* 悬浮下划线指示器 — 从中心向两侧展开 */
.nav-item > a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width .28s var(--ease);
}
.nav-item > a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}
.nav-item > a:hover::before { width: 22px; }

/* 当前页面高亮 */
.nav-item > a.active {
  color: var(--ink);
  font-weight: 500;
}
.nav-item > a.active::before { width: 22px; }

/* ---------- 下拉触发箭头 ---------- */
.nav-item.has-dropdown > a::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  margin-left: 4px;
  transition: transform .28s var(--ease);
}
.nav-item.has-dropdown:hover > a::after,
.nav-item.has-dropdown.open > a::after {
  transform: rotate(-135deg) translate(-1px, -1px);
}

/* ---------- Dropdown 面板 ---------- */
.nav-item > .dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(6px) scale(.96);
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 48px -12px rgba(20,21,26,.12),
              0 6px 16px -6px rgba(20,21,26,.06);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .24s var(--ease),
              transform .24s var(--ease),
              visibility .24s;
  z-index: 100;
}
.nav-item.has-dropdown:hover > .dropdown,
.nav-item.has-dropdown.open > .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ---------- Dropdown 项 ---------- */
.nav-item > .dropdown a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  transition: background .22s var(--ease),
              color .22s var(--ease),
              padding-left .22s var(--ease);
}
.nav-item > .dropdown a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-mute);
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color .22s var(--ease), transform .22s var(--ease);
}
/* 左侧品牌色指示条 — 从零高度展开 */
.nav-item > .dropdown a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--brand);
  border-radius: 0 2px 2px 0;
  transform: translateY(-50%);
  transition: height .25s var(--ease);
}
.nav-item > .dropdown a:hover {
  color: var(--brand);
  background: var(--brand-soft);
  padding-left: 18px;
}
.nav-item > .dropdown a:hover svg {
  color: var(--brand);
  transform: scale(1.15);
}
.nav-item > .dropdown a:hover::before { height: 60%; }
.nav-item > .dropdown a.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 500;
}
.nav-item > .dropdown a.active svg { color: var(--brand); }

/* ---------- Dropdown 小三角 ---------- */
.nav-item > .dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  pointer-events: none;
}
/* 导航栏 CTA 按钮 */
.nav-cta-btn {
  padding: 8px 22px !important;
  font-size: 14px !important;
  border-radius: 100px !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all .25s var(--ease);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,.65);
  padding: 80px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo-light { height: 36px; margin-bottom: 20px; }
.footer-brand p { font-size: 13px; line-height: 1.8; max-width: 280px; }
.footer-col h5 {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 20px;
  white-space: nowrap;
}
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  transition: color .2s ease;
}
.footer-col ul li a:hover { color: var(--brand); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  font-size: 12px;
  color: rgba(255,255,255,.4);
}
.footer-bottom a:hover { color: var(--brand); }

/* ---------- 通用 Section ---------- */
.section {
  padding: 100px 0;
  position: relative;
}
.section-soft { background: var(--bg-soft); }
.section-dark {
  background: var(--bg-dark);
  color: rgba(255,255,255,.78);
}
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
  color: #fff;
}
.section-dark .section-title p { color: rgba(255,255,255,.6); }
.section-dark .eyebrow { color: var(--brand-light); }
.section-dark .eyebrow::before { background: var(--brand-light); }

/* ---------- Reveal 动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- 通用视觉元素 ---------- */
.dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--brand);
  border-radius: 50%;
  margin: 0 8px;
  vertical-align: middle;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 500;
  border-radius: 100px;
}
.tag-dark {
  background: rgba(253,116,70,.15);
  color: var(--brand-light);
}

/* ---------- 工具类 ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

.center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .nav-menu { display: none; }
  .nav-menu.open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    padding: 16px 20px 20px;
    border-bottom: 1px solid var(--line);
    align-items: stretch;
    gap: 0;
    z-index: 99;
    box-shadow: 0 16px 40px -16px rgba(0,0,0,.12);
  }
  .nav-menu.open .nav-item > a {
    width: 100%;
    justify-content: space-between;
    padding: 12px 8px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav-menu.open .nav-item > a::before { display: none; }
  .nav-menu.open .nav-item > a:hover { background: transparent; }
  .nav-menu.open .nav-item > .dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--bg-soft);
    margin: 4px 0 8px;
    padding: 4px;
    border-radius: 8px;
    min-width: 0;
  }
  .nav-menu.open .nav-item > .dropdown::before { display: none; }
  .nav-menu.open .nav-item > .dropdown a:hover { padding-left: 14px; }
  .nav-toggle { display: flex; }
  .nav-cta-btn { padding: 6px 16px !important; font-size: 13px !important; }
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .section { padding: 64px 0; }
  .section-title { margin-bottom: 36px; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-cta .btn { padding: 10px 18px; font-size: 13px; }
  :root { --gutter: 18px; }
}
