/* ========================================
   笙喻科技官网 - 全局样式
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* CSS 变量定义 */
:root {
  /* 背景色 */
  --bg-primary: #0b1120;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.6);

  /* 文字色 */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* 品牌色 */
  --brand-cyan: #0ea5e9;
  --brand-teal: #06b6d4;
  --accent-glow: rgba(14, 165, 233, 0.15);

  /* 边框 */
  --border-default: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(14, 165, 233, 0.3);

  /* 字体 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-display: "Inter", var(--font-sans);

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

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* 容器 */
  --container-max: 1280px;
  --navbar-height: 72px;
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ========================================
   导航栏组件
   ======================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-cyan);
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 15px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-teal));
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-teal));
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  color: white !important;
  font-weight: 500;
}

.nav-cta::after {
  display: none !important;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 17, 32, 0.98);
  backdrop-filter: blur(20px);
  padding: var(--space-xl);
  z-index: 999;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.mobile-menu a {
  font-size: 20px;
  color: var(--text-secondary);
  display: block;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-default);
}

.mobile-menu a.active {
  color: var(--brand-cyan);
}

@media (max-width: 991px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* ========================================
   按钮组件
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-teal));
  color: white;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.btn-secondary:hover {
  border-color: var(--brand-cyan);
  background: rgba(14, 165, 233, 0.1);
}

/* ========================================
   卡片组件
   ======================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-teal));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
  opacity: 1;
}

/* ========================================
   表单组件
   ======================================== */

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 14px;
  color: var(--text-secondary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-cyan);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ========================================
   Section 通用样式
   ======================================== */

.section {
  padding: var(--space-2xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-label {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 20px;
  font-size: 14px;
  color: var(--brand-cyan);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ========================================
   滚动动画类
   ======================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ========================================
   Footer 组件
   ======================================== */

.footer {
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.5));
  border-top: 1px solid var(--border-default);
  padding: var(--space-2xl) 0 var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand .logo {
  display: inline-block;
  margin-bottom: var(--space-md);
}

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

.footer-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--brand-cyan);
}

.footer-contact p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.footer-bottom {
  border-top: 1px solid var(--border-default);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
  background: rgba(14, 165, 233, 0.1);
}

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

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* ========================================
   首页专用样式
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--navbar-height) var(--space-lg) var(--space-xl);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  z-index: -1;
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  max-width: 800px;
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-size: 56px;
  font-weight: 700;
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--brand-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.hero-scroll {
  position: absolute;
  bottom: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  font-size: 14px;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.scroll-indicator {
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}

.scroll-indicator::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--brand-cyan);
  border-radius: 2px;
  animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(8px); }
}

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

.stats-section {
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
}

.stat-item {
  text-align: center;
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--brand-cyan);
  margin-bottom: var(--space-sm);
  font-family: var(--font-display);
}

.stat-label {
  font-size: 16px;
  color: var(--text-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.service-card {
  text-align: center;
}

.service-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
}

.service-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.service-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.case-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.case-image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.case-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 500;
}

.case-content {
  padding: var(--space-lg);
}

.case-tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 20px;
  font-size: 12px;
  color: var(--brand-cyan);
  margin-bottom: var(--space-sm);
}

.case-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.case-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.partner-logo {
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.partner-logo:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
  background: rgba(14, 165, 233, 0.05);
}

.section-actions {
  text-align: center;
  margin-top: var(--space-xl);
}

@media (max-width: 1199px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .hero-title {
    font-size: 42px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .hero-title {
    font-size: 36px;
  }
  .hero-subtitle {
    font-size: 16px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .services-grid,
  .stats-grid,
  .cases-grid,
  .partners-grid {
    grid-template-columns: 1fr;
  }
  .section-title {
    font-size: 28px;
  }
}
