/* ============================================
   互亿无线·语音通知 - 公共样式 common.css
   包含：CSS变量 / Reset / 导航 / 页脚 / 按钮 / 动画 / 工具类
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
  /* 品牌色 */
  --primary: #0099FF;
  --primary-dark: #0077CC;
  --primary-darker: #005FA3;
  --primary-light: #E6F4FF;
  --primary-lighter: #F0F9FF;
  --primary-gradient: linear-gradient(135deg, #0099FF 0%, #0066CC 100%);

  /* 中性色 */
  --ink: #0A1628;
  --ink-2: #1E293B;
  --text: #334155;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --border: #E5E7EB;
  --border-light: #F1F5F9;
  --bg-white: #FFFFFF;
  --bg-gray: #F8FAFC;
  --bg-gray-2: #F1F5F9;
  --bg-dark: #0A1628;
  --bg-dark-2: #0F1E35;

  /* 功能色 */
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --info: #3B82F6;
  --purple: #8B5CF6;
  --pink: #EC4899;
  --cyan: #06B6D4;

  /* 字体 */
  --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', Consolas, 'Courier New', monospace;

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 72px;
  --space-4xl: 96px;

  /* 圆角 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.1);
  --shadow-xl: 0 16px 40px rgba(0,0,0,.12);
  --shadow-primary: 0 4px 16px rgba(0,153,255,.25);
  --shadow-primary-lg: 0 8px 32px rgba(0,153,255,.3);

  /* 过渡 */
  --transition-fast: .15s ease;
  --transition: .25s ease;
  --transition-slow: .4s cubic-bezier(.4,0,.2,1);

  /* 导航高度 */
  --nav-height: 68px;

  /* 最大宽度 */
  --container-max: 1280px;
  --container-padding: 24px;
}

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

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

body {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

code, pre {
  font-family: var(--font-mono);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

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

.container-narrow {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.5;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-primary-lg);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--bg-gray);
  color: var(--primary);
}

.btn-white {
  background: #fff;
  color: var(--primary);
}
.btn-white:hover {
  background: var(--primary-lighter);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255,255,255,.2);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.btn-outline-white:hover {
  border-color: #fff;
  background: rgba(255,255,255,.08);
}

.btn-lg {
  padding: 14px 30px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-sm {
  padding: 7px 16px;
  font-size: 13px;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ---------- 导航栏 ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.nav.scrolled {
  background: rgba(255,255,255,.95);
  border-bottom-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo img {
  height: 30px;
  width: auto;
}

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

.nav-links a {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  color: var(--primary);
  background: var(--primary-lighter);
}

.nav-links a.active {
  color: var(--primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- 页脚 ---------- */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,.7);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-brand .footer-logo img {
  height: 28px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,.5);
  margin-bottom: 20px;
}

.footer-qrcode {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-qrcode-img {
  width: 84px;
  height: 84px;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  flex-shrink: 0;
  overflow: hidden;
}

.footer-qrcode-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-qrcode-text {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  line-height: 1.6;
}

.footer-qrcode-text strong {
  display: block;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 18px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 13px;
  color: rgba(255,255,255,.5);
  transition: all var(--transition-fast);
}

.footer-col ul li a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-certs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}

.footer-cert {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,.5);
  white-space: nowrap;
  text-align: left;
  transition: color var(--transition-fast);
}

.footer-cert:hover {
  color: rgba(255,255,255,.85);
}

.footer-cert-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.footer-cert:hover .footer-cert-icon {
  transform: scale(1.1);
}

.footer-cert-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.footer-cert-icon svg {
  width: 28px;
  height: 28px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: rgba(255,255,255,.4);
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: #fff;
}

/* ---------- 动画 ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

@keyframes pulse-ring {
  0% { transform: scale(.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 滚动动画基础类 */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s cubic-bezier(.4,0,.2,1), transform .7s cubic-bezier(.4,0,.2,1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: .1s; }
.animate-on-scroll.delay-2 { transition-delay: .2s; }
.animate-on-scroll.delay-3 { transition-delay: .3s; }
.animate-on-scroll.delay-4 { transition-delay: .4s; }
.animate-on-scroll.delay-5 { transition-delay: .5s; }

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--primary); }
.text-white { color: #fff; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

.fw-300 { font-weight: 300; }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-700 { font-weight: 700; }
.fw-900 { font-weight: 900; }

.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-24 { font-size: 24px; }
.fs-28 { font-size: 28px; }
.fs-32 { font-size: 32px; }

.mt-0 { margin-top: 0; }
.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; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

.w-100 { width: 100%; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.tag-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.tag-success {
  background: rgba(16,185,129,.1);
  color: var(--success);
}

.tag-warning {
  background: rgba(245,158,11,.1);
  color: var(--warning);
}

/* 区块通用 */
.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.section-title {
  font-size: 34px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 14px;
  letter-spacing: -.5px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* 卡片通用 */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition-slow);
}

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

/* 底部CTA */
.bottom-cta {
  background:
    radial-gradient(at 15% 70%, rgba(56,189,248,.35) 0, transparent 55%),
    radial-gradient(at 85% 80%, rgba(139,92,246,.3) 0, transparent 55%),
    radial-gradient(at 50% 30%, rgba(6,182,212,.25) 0, transparent 55%),
    linear-gradient(135deg, #0066CC 0%, #004C99 50%, #003D7A 100%);
  color: #fff;
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.bottom-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,.12) 0%, transparent 70%);
  pointer-events: none;
}

.bottom-cta h2 {
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.bottom-cta p {
  font-size: 16px;
  color: rgba(255,255,255,.75);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.bottom-cta .cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 16px;
    --nav-height: 60px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

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

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

  .nav-toggle {
    display: flex;
  }

  .nav-cta .btn-ghost {
    display: none;
  }

  .section {
    padding: 48px 0;
  }

  .section-title {
    font-size: 26px;
  }

  .section-desc {
    font-size: 15px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-certs {
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .bottom-cta h2 {
    font-size: 26px;
  }

  .bottom-cta .cta-group {
    flex-direction: column;
  }

  .bottom-cta .cta-group .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .nav-cta .btn {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
