@import url('../fonts/iconfont.css');
/* 1. 设计令牌 */
:root {
  /* 品牌色 */
  --brand: #3b82f6;
  --brand-strong: #1664ff;
  --brand-violet: #8b5cf6;
  --brand-cyan: #06b6d4;
  --brand-emerald: #10b981;

  /* 语义色（暗色为默认主题） */
  --bg: #0a0a0a;
  --bg-soft: #121218;
  --bg-card: #16161e;
  --bg-footer: #060608;

  --text: #ffffff;
  --text-active: #ffffff;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  --text-footer: #9ca3af;
  --text-footer-dim: #6b7280;

  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);

  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --surface-soft: rgba(255, 255, 255, 0.02);

  --glass: rgba(255, 255, 255, 0.05);
  --glass-header: rgba(10, 10, 10, 0.7);
  --glass-footer: rgba(255, 255, 255, 0.02);

  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(96, 165, 250, 0.3);

  /* 渐变 */
  --grad-text: linear-gradient(135deg, #60a5fa, #c084fc, #f472b6);
  --grad-brand: linear-gradient(135deg, #1664ff, #8b5cf6);
  --grad-blue: linear-gradient(135deg, #2563eb, #06b6d4);
  --grad-purple: linear-gradient(135deg, #9333ea, #ec4899);
  --grad-orange: linear-gradient(135deg, #ea580c, #eab308);
  --grad-green: linear-gradient(135deg, #16a34a, #10b981);
  --grad-red: linear-gradient(135deg, #dc2626, #f43f5e);
  --grad-indigo: linear-gradient(135deg, #4f46e5, #3b82f6);
  --grad-teal: linear-gradient(135deg, #0d9488, #22c55e);
  --grad-violet: linear-gradient(135deg, #7c3aed, #a855f7);
  --grad-num: linear-gradient(180deg, #ffffff, #9ca3af);

  /* 尺寸 */
  --container: 1280px;
  --header-h: 64px;        /* 64px */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;

  /* 动效 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.3s;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  background-color: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.25;
}

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

img,
video,
svg {
  /*display: block;*/
  max-width: 100%;
}

ul {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #2a2a3a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3a3a4a;
}

/* 3. 布局容器 */
.container-index {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 24px;
}

.section {
  position: relative;
  padding-block: 96px;
  overflow: hidden;
}

.section--tint {
  background: linear-gradient(180deg, var(--bg), var(--bg-soft), var(--bg));
}

.section--matrix {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg), var(--bg));
}

.section__head {
  max-width: 672px;
  margin: 0 auto 64px;
  text-align: center;
}

.section__eyebrow {
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #60a5fa;
}

.section__title {
  margin-bottom: 16px;
  font-size: 30px;
  font-weight: 800;
}

.section__desc {
  font-size: 17px;
  color: var(--text-muted);
}

.section__title--underline {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.section__title--underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #60a5fa, transparent);
}

/* 4. 通用组件 */

/* 图标 */
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 16px;
  height: 16px;
}

.icon--lg {
  width: 28px;
  height: 28px;
}
svg.icon {
  display: inline-block !important;
}
.gradient-text {
  background: var(--grad-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.text-gradient-num {
  background: var(--grad-num);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: transform var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.btn--light {
  background: #ffffff;
  color: #000000;
}

.btn--light:hover {
  background: #e5e7eb;
}

.btn--primary {
  background: var(--grad-brand);
  color: #ffffff;
}

.btn--primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 30px rgba(22, 100, 255, 0.4);
}

.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface);
}

/* 卡片 */
.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  transition: transform 0.4s var(--ease), background-color 0.4s var(--ease),
    border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.card--solid {
  background: var(--surface);
}

.card--hover:hover {
  transform: translateY(-6px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}

/* 标签 */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-muted);
}

.tag-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.tag-blue { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.tag-emerald { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.tag-purple { background: rgba(168, 85, 247, 0.2); color: #d8b4fe; }
.tag-amber { background: rgba(245, 158, 11, 0.2); color: #fcd34d; }
.tag-pink { background: rgba(236, 72, 153, 0.2); color: #f9a8d4; }

/* 圆点指示器 */
.dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dots__item {
  width: 8px;
  height: 6px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: width var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.dots__item.is-active {
  width: 32px;
  background: var(--text);
}

/* 圆形箭头按钮 */
.ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  transition: background-color var(--duration) var(--ease);
}

.ctrl:hover {
  background: var(--surface-hover);
}

/* 图标底座 */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--grad-brand);
  color: #ffffff;
}

/* 入场动画 */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal--left { transform: translateX(-32px); }
.reveal--right { transform: translateX(32px); }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* 回到顶部悬浮按钮 */
.back-to-top {
  position: fixed;
  right: 4%;
  bottom: 30%;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--glass-header);
  backdrop-filter: blur(20px);
  color: var(--text);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}

/* 过渡在脚本接管后开启，避免首次渲染时按钮闪现 */
.back-to-top.is-animated {
  transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease),
    visibility var(--duration) var(--ease), background-color var(--duration) var(--ease);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.back-to-top:hover {
  border-color: transparent;
  background: var(--grad-brand);
  color: #ffffff;
}


/* 6. 亮色主题 */
html.light {
  --bg: #f4f6fb;
  --bg-soft: #eef2f9;
  --bg-card: #ffffff;

  --text: #1a1a2e;
  --text-active: #1a1a2e;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);

  --surface: rgba(15, 23, 42, 0.03);
  --surface-hover: rgba(15, 23, 42, 0.06);
  --surface-soft: #ffffff;

  --glass: rgba(255, 255, 255, 0.75);
  --glass-header: rgba(255, 255, 255, 0.5);

  --shadow-card: 0 20px 40px rgba(15, 23, 42, 0.12);
  --grad-text: linear-gradient(135deg, #1664ff, #8b5cf6);
  --grad-num: linear-gradient(180deg, #1a1a2e, #64748b);
}

html.light .card--hover:hover {
  box-shadow: var(--shadow-card);
}

html.light .section__eyebrow {
  color: #1664ff;
}

/* 亮色主题下，未滚动时导航默认透明（悬浮在首屏上）；
   鼠标移到 header 区域时再显示半透明白底，避免遮挡浅色轮播图的同时保证可读 */
html.light .site-header:not(.is-scrolled):hover {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

html.light .section__title--underline::after {
  background: linear-gradient(90deg, #1664ff, transparent);
}

html.light .nav__sublink:hover,
html.light .news-card:hover .news-card__title {
  color: #1664ff;
}

html.light .news-card:hover {
  border-color: rgba(22, 100, 255, 0.4);
}

html.light .support-card:hover {
  border-color: rgba(22, 100, 255, 0.4);
}

html.light .about__stat-suffix {
  color: #1664ff;
}

html.light .milestone__dot {
  border-color: var(--bg-soft);
}


/* 7. 响应式 */
@media (min-width: 640px) {
  .section__title,
  .about__title {
    font-size: 36px;
  }

  .hero__title {
    font-size: 60px;
  }

  .area-grid,
  .support-grid,
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .lang-btn,
  .search {
    display: inline-flex;
  }
}

@media (min-width: 768px) {
  .hero__title {
    font-size: 72px;
  }

  .section__title,
  .about__title {
    font-size: 48px;
  }

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

  .hero__stat-value {
    font-size: 30px;
  }

  .about__timeline-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .matrix {
    height: 550px;
  }

  .matrix__card {
    width: 288px;
  }
}

/* 导航在 1200px 以下放不下，改为汉堡菜单 */
@media (min-width: 1200px) {
  .nav {
    display: flex;
  }
  .menu-btn {
    display: none;
  }

  .mobile-nav {
    display: none;
  }
}

@media (min-width: 1024px) {
  .hero__title {
    font-size: 80px;
  }

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

  .area-grid,
  .support-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .showcase__slide {
    flex-direction: row;
  }

  .showcase__media {
    flex: 0 0 60%;
    aspect-ratio: auto;
    height: 500px;
  }

  .showcase__info {
    flex: 0 0 40%;
    padding: 56px;
  }

  .showcase__title {
    font-size: 36px;
  }

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

  .about__timeline-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .footer__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .footer__brand {
    grid-column: span 1;
  }

  .footer__bottom {
    flex-direction: row;
  }
}

@media (max-width: 1023px) {
  .matrix__card {
    width: 240px;
  }

  .matrix {
    height: 432px;
  }
}

@media (max-width: 639px) {
  .section {
    padding-block: 64px;
  }

  .section__head {
    margin-bottom: 40px;
  }

  .showcase__info {
    padding: 24px;
  }

  .brand__name {
    font-size: 15px;
  }

  .hero__stats {
    margin-top: 40px;
  }
}

/* 8. 动效降级 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

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

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

/* 主题切换视图过渡 */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
