/* ============================================
   互亿无线·语音通知 - 首页样式 home.css
   ============================================ */

/* ---------- Hero 区域 ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-height) + 60px) 0 80px;
  background:
    radial-gradient(at 25% 70%, #c7d2fe 0, transparent 55%),
    radial-gradient(at 70% 30%, #fce7f3 0, transparent 55%),
    radial-gradient(at 55% 10%, #d8b4fe 0, transparent 55%),
    #eef2ff;
  overflow: hidden;
}

/* 弥散光斑背景 */
.hero::before {
  display: none;
}

.hero::after {
  display: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  animation: fadeInDown .6s ease both;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
}

.hero-badge .dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-ring 1.5s ease-out infinite;
}

.hero h1 {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 20px;
  letter-spacing: -1px;
  animation: fadeInUp .6s ease .1s both;
}

.hero h1 .highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 540px;
  animation: fadeInUp .6s ease .2s both;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  animation: fadeInUp .6s ease .3s both;
}

.hero-features {
  display: flex;
  align-items: center;
  gap: 24px;
  animation: fadeInUp .6s ease .4s both;
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.hero-feature svg {
  width: 16px;
  height: 16px;
  color: var(--success);
  flex-shrink: 0;
}

/* Hero 右侧 - 代码面板 */
.hero-visual {
  position: relative;
  animation: fadeInRight .8s ease .2s both;
}

.hero-visual-decoration {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 120px;
  height: 120px;
  opacity: .3;
  animation: float 6s ease-in-out infinite;
}

.code-panel {
  background: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255,255,255,.05);
  overflow: hidden;
  position: relative;
}

.code-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.code-panel-dots {
  display: flex;
  gap: 8px;
}

.code-panel-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code-panel-dots span:nth-child(1) { background: #FF5F57; }
.code-panel-dots span:nth-child(2) { background: #FEBC2E; }
.code-panel-dots span:nth-child(3) { background: #28C840; }

.code-panel-lang {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  font-family: var(--font-mono);
}

.code-panel-body {
  padding: 24px;
  overflow-x: auto;
}

.code-panel-body pre {
  color: #E2E8F0;
  font-size: 13px;
  line-height: 1.8;
  font-family: var(--font-mono);
}

.code-panel-body .comment { color: #64748B; }
.code-panel-body .keyword { color: #7DD3FC; }
.code-panel-body .string { color: #86EFAC; }
.code-panel-body .func { color: #FBBF24; }
.code-panel-body .var { color: #F9A8D4; }
.code-panel-body .number { color: #F472B6; }

/* 代码打字效果 */
.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--primary);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Hero 浮动卡片 */
.hero-float-card {
  position: absolute;
  background: #fff;
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
}

.hero-float-card-1 {
  top: -16px;
  left: -30px;
  animation: float 5s ease-in-out infinite;
}

.hero-float-card-2 {
  bottom: 30px;
  right: -20px;
  animation: float 7s ease-in-out infinite reverse;
}

.hero-float-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-float-icon svg {
  width: 18px;
  height: 18px;
}

.hero-float-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.hero-float-text strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
  font-weight: 700;
}

/* ---------- 客户logo墙 ---------- */
.clients-section {
  padding: 48px 0;
  background: #fff;
  border-bottom: 1px solid var(--border-light);
}

.clients-label {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 32px;
  letter-spacing: .5px;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 24px;
  align-items: center;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  opacity: .55;
  transition: all var(--transition);
  filter: saturate(1.2);
}

.client-logo:hover {
  opacity: 1;
  transform: scale(1.08);
  filter: saturate(1.4) drop-shadow(0 2px 8px rgba(0,0,0,.1));
}

.client-logo img {
  max-height: 36px;
  max-width: 100%;
  object-fit: contain;
}

/* ---------- 核心功能 ---------- */
.features-section {
  background: var(--bg-gray);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}

.feature-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all var(--transition-slow);
  background: var(--primary-light);
}

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

.feature-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  opacity: 0;
  transform: translateX(-8px);
  transition: all var(--transition);
}

.feature-card:hover .feature-link {
  opacity: 1;
  transform: translateX(0);
}

.feature-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.feature-link:hover svg {
  transform: translateX(4px);
}

/* ---------- 应用场景 ---------- */
.scenarios-section {
  background: #fff;
}

.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.scenario-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.scenario-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.scenario-card-bg {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 180px;
  height: 180px;
  opacity: .12;
  z-index: 0;
  pointer-events: none;
}

.scenario-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scenario-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.scenario-icon svg {
  width: 26px;
  height: 26px;
}

.scenario-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.scenario-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.scenario-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.scenario-tag {
  padding: 3px 10px;
  background: var(--bg-gray);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---------- 接入流程 ---------- */
.steps-section {
  background: var(--bg-gray);
}

.steps-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.steps-flow::before {
  content: '';
  position: absolute;
  top: 44px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  opacity: .2;
  z-index: 0;
}

.step-item {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}

.step-number {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  transition: all var(--transition-slow);
  position: relative;
}

.step-item:hover .step-number {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: var(--shadow-primary-lg);
}

.step-number::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  opacity: 0;
  transition: opacity var(--transition);
}

.step-item:hover .step-number::after {
  opacity: .3;
  animation: pulse-ring 1.5s ease-out infinite;
}

.step-item h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.step-item p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- 数据统计 ---------- */
.stats-section {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 52px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-number small {
  font-size: 24px;
  font-weight: 700;
}

.stat-label {
  font-size: 15px;
  color: rgba(255,255,255,.6);
}

/* ---------- 开发者体验 ---------- */
.dev-section {
  background: #fff;
}

.dev-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.dev-content h2 {
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 16px;
}

.dev-content > p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

.dev-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dev-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.dev-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.dev-feature-icon svg {
  width: 22px;
  height: 22px;
}

.dev-feature h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.dev-feature p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 语言标签切换 */
.lang-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
}

.lang-tab {
  padding: 6px 14px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: rgba(255,255,255,.5);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-tab:hover {
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.05);
}

.lang-tab.active {
  color: #fff;
  background: rgba(255,255,255,.1);
}

.code-content {
  display: none;
}

.code-content.active {
  display: block;
  animation: fadeIn .3s ease;
}

/* ---------- FAQ 预览 ---------- */
.faq-preview-section {
  background: var(--bg-gray);
}

.faq-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}

.faq-preview-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: all var(--transition);
  cursor: pointer;
}

.faq-preview-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.faq-preview-item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-preview-item h4 svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.faq-preview-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 26px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .clients-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .features-grid,
  .scenarios-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-flow {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 0;
  }

  .steps-flow::before {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .dev-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .faq-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: calc(var(--nav-height) + 40px) 0 56px;
  }

  .hero h1 {
    font-size: 32px;
  }

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

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-features {
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero-float-card {
    display: none;
  }

  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .features-grid,
  .scenarios-grid {
    grid-template-columns: 1fr;
  }

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

  .stat-number {
    font-size: 38px;
  }

  .code-panel-body {
    padding: 16px;
  }

  .code-panel-body pre {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }

  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-flow {
    grid-template-columns: 1fr;
  }
}
