/* ============================================================
   通用可配置科技企业单页官网 - 自定义样式
   ============================================================ */

/* ---------- 颜色变量 ---------- */
:root {
  --color-primary:   #0a1929;   /* 深蓝主色 */
  --color-secondary: #102a43;   /* 次深蓝 */
  --color-accent:    #00a8ff;   /* 科技蓝（强调） */
  --color-accent-2:  #4cc9f0;   /* 浅蓝渐变 */
  --color-text:      #e6f1ff;
  --color-muted:     #8892b0;
  --glass-bg:        rgba(16, 42, 67, 0.55);
  --glass-border:    rgba(0, 168, 255, 0.18);
}

/* ---------- 全局 ---------- */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  background: var(--color-primary);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

/* 科技蓝文字色（兼容 Tailwind 未覆盖场景） */
.text-tech-blue   { color: var(--color-accent); }
.bg-tech-blue     { background: var(--color-accent); }
.border-tech-blue { border-color: var(--color-accent); }

/* ---------- 顶部导航 ---------- */
.nav-scrolled {
  background: rgba(10, 25, 41, 0.78) !important;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 4px;
  width: 0; height: 2px;
  background: var(--color-accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}
.nav-link:hover::after,
.nav-active::after { width: 60%; }
.nav-active         { color: #fff !important; }

/* ---------- 通用按钮 ---------- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  color: #fff;
  box-shadow: 0 8px 25px rgba(0, 168, 255, 0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0, 168, 255, 0.55);
  background: linear-gradient(135deg, #1ab8ff 0%, #6dd5fa 100%);
}
.btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(0, 168, 255, 0.5);
}
.btn-secondary:hover {
  background: rgba(0, 168, 255, 0.12);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

/* ---------- Hero ---------- */
#home {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(0, 168, 255, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(76, 201, 240, 0.12) 0%, transparent 50%),
    linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}
.hero-overlay {
  background:
    repeating-linear-gradient(0deg, transparent 0, transparent 39px, rgba(0, 168, 255, 0.04) 40px),
    repeating-linear-gradient(90deg, transparent 0, transparent 39px, rgba(0, 168, 255, 0.04) 40px);
  pointer-events: none;
}
.hero-title {
  background: linear-gradient(135deg, #ffffff 0%, var(--color-accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(0, 168, 255, 0.2);
}
.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  animation: bounce 2.4s infinite ease-in-out;
  z-index: 10;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50%      { transform: translateX(-50%) translateY(-10px); opacity: 1; }
}

/* ---------- 通用 section 标题 ---------- */
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  margin: 14px auto 0;
  border-radius: 2px;
}

/* ---------- 滚动渐入动画 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 产品卡片 ---------- */
.product-card {
  background: rgba(16, 42, 67, 0.55);
  border: 1px solid rgba(0, 168, 255, 0.12);
  border-radius: 0.875rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}
.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 168, 255, 0.5);
  box-shadow: 0 25px 50px rgba(0, 168, 255, 0.15);
}
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  color: var(--color-accent);
  background: rgba(0, 168, 255, 0.12);
  border: 1px solid rgba(0, 168, 255, 0.25);
  border-radius: 9999px;
}

/* ---------- 技术优势卡片 ---------- */
.advantage-card {
  background: rgba(16, 42, 67, 0.5);
  border: 1px solid rgba(0, 168, 255, 0.12);
  border-radius: 1rem;
  padding: 2rem 1.75rem;
  transition: all 0.4s ease;
  backdrop-filter: blur(6px);
  height: 100%;
}
.advantage-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-accent);
  background: rgba(0, 168, 255, 0.06);
  box-shadow: 0 15px 40px rgba(0, 168, 255, 0.18);
}
.advantage-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.18), rgba(76, 201, 240, 0.06));
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 1rem;
  margin-bottom: 1.25rem;
  font-size: 1.6rem;
  color: var(--color-accent);
  transition: all 0.4s ease;
}
.advantage-card:hover .advantage-icon {
  transform: rotate(-8deg) scale(1.06);
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: #fff;
  border-color: transparent;
}

/* ---------- 团队卡片 ---------- */
.team-card {
  background: rgba(16, 42, 67, 0.55);
  border: 1px solid rgba(0, 168, 255, 0.12);
  border-radius: 0.875rem;
  overflow: hidden;
  transition: all 0.4s ease;
  backdrop-filter: blur(8px);
}
.team-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 168, 255, 0.5);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* ---------- 新闻卡片 ---------- */
.news-card {
  background: rgba(16, 42, 67, 0.55);
  border: 1px solid rgba(0, 168, 255, 0.12);
  border-radius: 0.875rem;
  overflow: hidden;
  transition: all 0.4s ease;
  backdrop-filter: blur(8px);
}
.news-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 168, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0, 168, 255, 0.12);
}

/* ---------- 合作伙伴轮播 ---------- */
.partners-mask {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
#partners-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: partners-scroll 35s linear infinite;
}
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.partner-logo {
  flex-shrink: 0;
  width: 200px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(1) brightness(0.9);
  opacity: 0.7;
  transition: all 0.3s ease;
}
.partner-logo:hover { filter: grayscale(0) brightness(1); opacity: 1; }
.partner-logo img   { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- 表单 ---------- */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  background: rgba(16, 42, 67, 0.4);
  border: 1px solid rgba(0, 168, 255, 0.08);
  transition: all 0.3s ease;
}
.contact-info-item:hover { border-color: rgba(0, 168, 255, 0.4); }
.contact-info-icon {
  flex-shrink: 0;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(0, 168, 255, 0.18), rgba(76, 201, 240, 0.06));
  border: 1px solid rgba(0, 168, 255, 0.3);
  border-radius: 0.6rem;
  color: var(--color-accent);
}
.form-group  { display: flex; flex-direction: column; }
.form-label  { font-size: 0.85rem; color: var(--color-text); margin-bottom: 0.4rem; font-weight: 500; }
.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background: rgba(10, 25, 41, 0.6);
  border: 1px solid rgba(0, 168, 255, 0.18);
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.92rem;
  transition: all 0.3s ease;
  outline: none;
}
.form-input::placeholder { color: rgba(230, 241, 255, 0.35); }
.form-input:focus {
  border-color: var(--color-accent);
  background: rgba(10, 25, 41, 0.85);
  box-shadow: 0 0 0 3px rgba(0, 168, 255, 0.18);
}
.form-error {
  font-size: 0.75rem;
  color: #ff6b6b;
  margin-top: 0.3rem;
  min-height: 1rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.form-error.show { opacity: 1; }

/* ---------- 社交图标 ---------- */
.social-icon {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(16, 42, 67, 0.6);
  border: 1px solid rgba(0, 168, 255, 0.18);
  border-radius: 50%;
  color: var(--color-accent);
  transition: all 0.3s ease;
}
.social-icon:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-3px);
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(0, 168, 255, 0.35);
}

/* ---------- 移动端汉堡菜单 ---------- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 480px;
  opacity: 1;
}

/* ---------- 产品详情弹窗 ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 12, 22, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-content {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border: 1px solid rgba(0, 168, 255, 0.25);
  border-radius: 1rem;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  transform: scale(0.92);
  transition: transform 0.3s ease;
}
.modal-backdrop.open .modal-content { transform: scale(1); }
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 168, 255, 0.12);
  border-radius: 50%;
  color: #fff;
  transition: all 0.25s ease;
  cursor: pointer;
}
.modal-close:hover { background: var(--color-accent); transform: rotate(90deg); }

/* ---------- 通用滚动条 ---------- */
::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-primary); }
::-webkit-scrollbar-thumb {
  background: rgba(0, 168, 255, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ---------- 行数限制工具 ---------- */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 响应式微调 ---------- */
@media (max-width: 768px) {
  .hero-title { font-size: 2.4rem; }
  .scroll-cue { display: none; }
}