/* ============================================================
   AegisX 首页视觉增强层
   - 只做视觉升级，不改任何 HTML 结构 / 不改动功能逻辑
   - 在 home.css 之后引入，通过更高优先级覆盖样式
   ============================================================ */

/* ---------- 1. Hero：多层光晕 + 网格纹理背景 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(56px, 7vw, 96px) 0 clamp(48px, 6vw, 84px);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(99, 102, 241, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, .055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 78% 62% at 50% 32%, #000 42%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 32%, #000 42%, transparent 100%);
  pointer-events: none;
}

/* 三色柔光晕（蓝 / 紫 / 青），呼吸式微动 */
.hero::after {
  content: "";
  position: absolute;
  inset: -28% -12% auto -12%;
  height: 780px;
  z-index: -1;
  background:
    radial-gradient(46% 52% at 16% 24%, rgba(99, 102, 241, .18), transparent 68%),
    radial-gradient(42% 48% at 82% 16%, rgba(139, 92, 246, .15), transparent 66%),
    radial-gradient(52% 46% at 56% 76%, rgba(6, 182, 212, .11), transparent 70%);
  filter: blur(26px);
  pointer-events: none;
  animation: heroGlowFloat 16s ease-in-out infinite alternate;
}

@keyframes heroGlowFloat {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(0, -16px, 0) scale(1.035); }
  100% { transform: translate3d(0, 10px, 0) scale(1.015); }
}

/* ---------- 2. Hero 文案：渐变标题 + 更强层次 ---------- */
.hero h1 {
  letter-spacing: -1.1px;
  line-height: 1.14;
}

.hero h1 .accent {
  background: linear-gradient(96deg, #6366F1 0%, #818CF8 42%, #A855F7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-desc {
  font-size: 16.5px;
  color: #CBD5E1;
  letter-spacing: .1px;
}

/* 标签：毛玻璃 + 呼吸点 */
.hero-tag {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(15, 23, 42, .55) !important;
  border-color: rgba(99, 102, 241, .22) !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, .10) !important;
}

.hero-tag .dot {
  animation: tagPulse 1.9s ease-in-out infinite;
}

@keyframes tagPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
  50%      { box-shadow: 0 0 0 7px rgba(34, 197, 94, .06); }
}

/* ---------- 3. Hero 按钮：渐变 + 光晕 + 抬升 ---------- */
.hero-actions .btn--primary {
  background: linear-gradient(135deg, #6366F1, #818CF8) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 10px 26px rgba(99, 102, 241, .30) !important;
  transition: transform .22s cubic-bezier(.4, 0, .2, 1), box-shadow .22s ease;
}

.hero-actions .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(99, 102, 241, .40) !important;
}

.hero-actions .btn--outline {
  background: rgba(15, 23, 42, .65) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-color: rgba(99, 102, 241, .30) !important;
  transition: transform .22s cubic-bezier(.4, 0, .2, 1), box-shadow .22s ease, border-color .22s ease;
}

.hero-actions .btn--outline:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, .55) !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12) !important;
}

/* ---------- 4. Hero 统计数字：渐变文字 ---------- */
.hero-stats .s .v {
  background: linear-gradient(135deg, #94A3B8 0%, #818CF8 50%, #06B6D4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  letter-spacing: -.4px;
}

.hero-stats .s .l {
  color: #94A3B8;
  font-size: 12.5px;
  letter-spacing: .2px;
}

/* ---------- 5. Hero 右侧面板：玻璃拟态 + 悬浮 ---------- */
.hero-panel {
  background: rgba(15, 23, 42, .75) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(99, 102, 241, .18) !important;
  box-shadow:
    0 26px 60px -12px rgba(15, 23, 42, .18),
    0 8px 24px -8px rgba(99, 102, 241, .14) !important;
  transition: transform .32s cubic-bezier(.4, 0, .2, 1), box-shadow .32s ease;
}

.hero-panel:hover {
  transform: translateY(-5px);
  box-shadow:
    0 34px 74px -12px rgba(15, 23, 42, .22),
    0 12px 30px -8px rgba(99, 102, 241, .20) !important;
}

/* 面板内进度条：加渐变与流光 */
.hero-panel .bar-fill {
  background: linear-gradient(90deg, #6366F1, #818CF8);
}

.hero-panel .bar-fill.cyan {
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
}

.hero-panel .bar-fill.orange {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* ---------- 6. 区块标题：更精致 ---------- */
.section h2,
.host-overview h2,
section[id] h2 {
  letter-spacing: -.6px;
}

.section .sub,
.section-desc,
.section > .container > p.lead {
  color: #94A3B8;
}

/* ---------- 7. 卡片：统一悬浮增强 ---------- */
.section .card,
.feature-card,
.pricing-card,
.news-card,
.solution-card,
.mod-card,
.def-card {
  transition: transform .32s cubic-bezier(.4, 0, .2, 1), box-shadow .32s ease, border-color .32s ease;
  border-radius: 18px;
  background: rgba(15, 23, 42, .88);
  border: 1px solid rgba(241, 245, 249, 1);
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, .06);
}

.section .card:hover,
.feature-card:hover,
.pricing-card:hover,
.news-card:hover,
.solution-card:hover,
.mod-card:hover,
.def-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 56px -12px rgba(99, 102, 241, .18);
  border-color: rgba(99, 102, 241, .32);
}

/* 标题区更精致 */
.section h2,
.host-overview h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.8px;
  color: #0f172a;
}

.section .sub,
.section .section-desc,
.section p.lead {
  font-size: 16px;
  color: #CBD5E1;
  line-height: 1.7;
}

/* ---------- 8. CTA 区块：渐变背景 ---------- */
.cta {
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 90% at 20% 20%, rgba(99, 102, 241, .13), transparent 68%),
    radial-gradient(56% 88% at 84% 78%, rgba(124, 92, 255, .12), transparent 66%);
  pointer-events: none;
}

/* ---------- 9. 滚动入场动画（渐进增强，不支持时自动忽略） ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-panel,
  .section .card,
  .feature-card,
  .pricing-card,
  .news-card,
  .mod-card,
  .def-card {
    animation: axFadeUp .62s cubic-bezier(.22, .68, .32, 1) both;
  }

  /* 依次错开出现，避免全部同时弹出 */
  .section .card:nth-child(2),
  .feature-card:nth-child(2),
  .mod-card:nth-child(2) { animation-delay: .06s; }
  .section .card:nth-child(3),
  .feature-card:nth-child(3),
  .mod-card:nth-child(3) { animation-delay: .12s; }
  .section .card:nth-child(4),
  .feature-card:nth-child(4),
  .mod-card:nth-child(4) { animation-delay: .18s; }
  .section .card:nth-child(5),
  .feature-card:nth-child(5),
  .mod-card:nth-child(5) { animation-delay: .24s; }
  .section .card:nth-child(n+6),
  .feature-card:nth-child(n+6),
  .mod-card:nth-child(n+6) { animation-delay: .30s; }
}

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

/* ---------- 10. 移动端：关闭重特效，保证流畅 ---------- */
@media (max-width: 768px) {
  .hero::after { animation: none; filter: blur(18px); }
  .hero-panel:hover,
  .section .card:hover,
  .feature-card:hover,
  .pricing-card:hover { transform: none; }
}
