/* ============================================
   XIM Studio — 电影级首页样式表
   极简黑白 · 史诗光影
   ============================================ */

/* ---------- 设计令牌 ---------- */
:root {
  --bg-deep: #000000;
  --bg-dark: #0a0a0a;
  --bg-surface: #111111;
  --bg-elevated: #181818;
  --bg-card: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.15);
  --border-active: rgba(255, 255, 255, 0.25);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.35);
  --accent: #ffffff;
  --accent-glow: rgba(255, 255, 255, 0.08);
  --accent-glow-strong: rgba(255, 255, 255, 0.15);

  --font-display: 'Playfair Display', serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* 新增：间距设计令牌，统一全局纵向节奏 */
  --space-section: 8rem;
  --space-section-mobile: 4rem;
  --space-card-padding: 2.5rem;
  --space-header-bottom: 4.5rem;
  --space-title-desc: 1.25rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}

/* ---------- 选中文字 ---------- */
::selection {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* 新增：键盘导航焦点样式 — 可访问性提升 */
:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
}

/* 按钮使用更显眼的焦点样式 */
.btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 2px;
}

/* ---------- 自定义光标 ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid #ffffff;
  border-radius: 50%;
  position: absolute;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.cursor.hovering .cursor-ring {
  width: 60px;
  height: 60px;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.cursor.clicking .cursor-ring {
  transform: translate(-50%, -50%) scale(0.8);
  border-color: rgba(255, 255, 255, 0.8);
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 10000;
  background: transparent;
}

.scroll-progress-bar {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.1s linear;
}

/* ---------- 导航栏 ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  mix-blend-mode: difference;
  opacity: 0;
  transform: translateY(-20px);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #ffffff;
  text-decoration: none;
}

.nav-logo span {
  font-weight: 300;
  opacity: 0.5;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color var(--transition-fast);
}

/* 增强：导航下划线动效 — 从中间展开更优雅 */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: #ffffff;
  transition: width var(--transition-base), left var(--transition-base);
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link:hover::after {
  width: 100%;
  left: 0;
}

/* ---------- 噪点纹理 ---------- */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 粒子画布 ---------- */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- 英雄区域 ---------- */
/* 增强：full-bleed 布局，移除 max-width 约束让品牌字真正舒展 */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

/* 增强：电影级暗角 + 顶部聚光灯双重光晕，提升文字可读性 */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    /* 顶部柔光，聚光灯效果 */
    radial-gradient(ellipse at 50% 30%, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
    /* 底部暗角，电影感 vignette */
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.6) 0%, transparent 60%),
    /* 四角暗角 */
    radial-gradient(ellipse at 20% 50%, rgba(0, 0, 0, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(0, 0, 0, 0.3) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

/* 增强：移除 max-width 限制，让品牌字真正充满视口 */
.hero-content {
  text-align: center;
  z-index: 2;
  padding: 2rem;
  max-width: 100%;
  width: 100%;
}

/* 标题 */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 10rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  opacity: 0;
  filter: blur(20px);
  transform: translateY(40px);
}

.hero-title-light {
  font-weight: 300;
  opacity: 0.6;
  display: block;
  font-size: clamp(1.5rem, 4vw, 3rem);
  letter-spacing: 0.3em;
  margin-bottom: 0.25rem;
}

/* 装饰分隔线 */
.hero-divider {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ffffff, transparent);
  margin: 1.5rem auto;
  transform: scaleX(0);
}

.hero-divider-icon {
  color: #ffffff;
  font-size: 0.75rem;
  margin: 0 0.75rem;
  opacity: 0.5;
}

/* 副标题 */
.hero-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 0.02em;
  overflow: hidden;
}

.hero-subtitle .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
}

/* CTA 按钮组 */
.hero-cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2.25rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: none;
  overflow: hidden;
  transition: all var(--transition-base), transform var(--transition-bounce);
}

/* 新增：按钮图标悬浮时轻微滑动 */
.btn svg,
.btn .btn-icon {
  transition: transform var(--transition-base);
}

.btn:hover svg,
.btn:hover .btn-icon {
  transform: translateX(4px);
}

.btn-primary {
  background: #ffffff;
  color: #000000;
  border: none;
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15);
}

/* 新增：按钮点击微反馈 — 下沉缩放模拟物理按压 */
.btn-primary:active {
  transform: translateY(0px) scale(0.97);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 1px solid var(--border-medium);
}

.btn-outline:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* 新增：outline 按钮点击反馈 */
.btn-outline:active {
  transform: translateY(0px) scale(0.97);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
  transition: transform 0.1s ease, background 0.1s ease;
}

/* 滚动提示 */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0;
}

.scroll-hint-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.3), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ---------- 通用区段 ---------- */
/* 优化：使用设计令牌统一间距，section-header 视觉节奏更紧凑 */
.section {
  position: relative;
  padding: var(--space-section) 2rem;
  z-index: 1;
  background: var(--bg-dark);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-header-bottom);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* 优化：视觉层级 — label 更克制，增加装饰性底部分隔强化章节感 */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

/* label 下方装饰小点，强化章节索引的视觉锚点 */
.section-label::after {
  content: '◆';
  display: block;
  font-size: 0.4rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
  opacity: 0.4;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-title-desc);
}

/* 优化：desc 宽度控制保证一瞥可读，最大宽度收窄提升阅读舒适度 */
.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.7;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- 项目展示 ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.projects-more {
  text-align: center;
  margin-top: 3rem;
}

.projects-more .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: transparent;
  color: #ffffff;
  border: 1px solid var(--border-medium);
  text-decoration: none;
  cursor: none;
  transition: all var(--transition-base), transform var(--transition-bounce);
}

.projects-more .btn-outline:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.projects-more-arrow {
  transition: transform var(--transition-base);
}

.projects-more .btn-outline:hover .projects-more-arrow {
  transform: translateX(4px);
}

.project-card {
  position: relative;
  background: var(--bg-surface);
  padding: var(--space-card-padding);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent);
  opacity: 1;
  transition: opacity var(--transition-base);
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-active);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--accent-glow);
}

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

.project-card-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.project-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.project-card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.project-tag {
  font-size: 0.7rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: all var(--transition-fast);
}

/* 新增：标签悬停 — 边框亮起、文字高亮 */
.project-tag:hover {
  border-color: var(--border-active);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

/* ---------- 团队区域 ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.team-card {
  text-align: center;
  padding: var(--space-card-padding) 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.team-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.25rem;
  border: 1px solid var(--border-subtle);
  filter: grayscale(100%);
  transition: filter var(--transition-base);
}

.team-card:hover .team-avatar {
  filter: grayscale(0%);
}

.team-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.team-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 0.75rem;
}

.team-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  transition: color var(--transition-base);
}

/* 新增：卡片悬停时 bio 微微亮起 */
.team-card:hover .team-bio {
  color: var(--text-primary);
}

/* ---------- 时间线 ---------- */
.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 2rem;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--border-medium), transparent);
}

.timeline-item {
  position: relative;
  padding: 0 0 3rem 5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 1.6rem;
  top: 0.25rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--bg-dark);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- 页脚 ---------- */
.footer {
  position: relative;
  z-index: 1;
  background: var(--bg-deep);
  padding: 4rem 2rem 2rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}

.footer-brand span {
  opacity: 0.5;
  font-weight: 300;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition-fast);
}

/* 增强：footer 链接悬停 — 柔光下划线 */
.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text-secondary);
  transition: width var(--transition-base);
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-link:hover::after {
  width: 100%;
}

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .nav-link {
    font-size: 0.7rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  .hero-title-light {
    font-size: clamp(1rem, 4vw, 1.5rem);
  }

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

  .section {
    padding: var(--space-section-mobile) 1.25rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

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

  .team-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    padding-left: 3.5rem;
  }

  .timeline::before {
    left: 1rem;
  }

  .timeline-dot {
    left: 0.55rem;
  }
}

/* ---------- 先导动画 ---------- */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100001;
  pointer-events: none;
}

.intro-overlay-top,
.intro-overlay-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background: #000000;
}

.intro-overlay-top {
  top: 0;
}

.intro-overlay-bottom {
  bottom: 0;
}

.intro-logo {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 100002;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.3em;
  color: #ffffff;
  opacity: 0;
}

/* ---------- 项目卡片图片 ---------- */
.project-card-image {
  position: relative;
  width: 100%;
  height: 180px;
  margin: -2.5rem -2.5rem 1.5rem -2.5rem;
  overflow: hidden;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%) brightness(1.4) contrast(1.1);
  transition: filter 0.8s ease, transform 0.8s ease;
}

.project-card:hover .project-card-image img {
  filter: grayscale(0%) brightness(1) contrast(1);
  transform: scale(1.08);
}

/* ---------- 卡片光晕扫过动效 ---------- */
.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  transform: skewX(-25deg);
  transition: left 0s;
  pointer-events: none;
  z-index: 2;
}

.project-card:hover::after {
  left: 150%;
  transition: left 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---------- 卡片微倾斜 3D 效果 ---------- */
.project-card {
  perspective: 600px;
}

.project-card-inner {
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
}

/* ---------- 增强团队卡片悬停 ---------- */
.team-card {
  position: relative;
  overflow: hidden;
}

.team-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.03),
    transparent
  );
  transform: skewX(-25deg);
  pointer-events: none;
}

.team-card:hover::after {
  left: 150%;
  transition: left 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---------- 返回顶部按钮 ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9990;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  border-color: #ffffff;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.back-to-top svg {
  width: 18px;
  height: 18px;
}

/* ---------- 移动端汉堡菜单 ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
  z-index: 10001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: #ffffff;
  transition: all 0.3s ease;
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* 移动端菜单面板 */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.97);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-link {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  letter-spacing: 0.15em;
  transition: color 0.3s ease;
}

.mobile-menu-link:hover {
  color: #ffffff;
}

/* ---------- 页面转场遮罩 ---------- */
.page-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100003;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.page-transition-half {
  flex: 1;
  background: #000000;
  transform: scaleY(0);
  transform-origin: top;
}

.page-transition-half:last-child {
  transform-origin: bottom;
}

/* ---------- 渲染性能 (will-change) ---------- */
.project-card,
.project-card-inner,
.team-card,
.back-to-top,
.nav,
.hero-title,
.hero-subtitle .word {
  will-change: transform;
}

#particle-canvas {
  will-change: transform;
}

/* ---------- 响应式：移动端菜单按钮 ---------- */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
  }
}

/* ---------- 色彩实验室 ---------- */
.color-lab-container {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.color-area {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  cursor: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-base);
  overflow: hidden;
  user-select: none;
}

.color-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.color-area:hover {
  border-color: var(--border-medium);
}

.color-display {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  mix-blend-mode: difference;
}

.color-hint {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.15em;
  margin-top: 0.75rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.color-area:hover .color-hint {
  opacity: 1;
}

.color-saved {
  margin-top: 2rem;
  text-align: center;
}

.color-saved-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.color-saved-list {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  min-height: 40px;
  flex-wrap: wrap;
}

.saved-color-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  cursor: none;
  transition: all var(--transition-bounce);
  position: relative;
}

.saved-color-dot:hover {
  transform: scale(1.25);
  border-color: var(--border-active);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.saved-color-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid transparent;
  transition: border-color var(--transition-base);
}

.saved-color-dot:hover::after {
  border-color: rgba(255, 255, 255, 0.2);
}

/* ---------- 部门卡片 ---------- */
.dept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.dept-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: all var(--transition-base);
}

.dept-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.04),
    transparent
  );
  transform: skewX(-25deg);
  pointer-events: none;
  z-index: 2;
}

.dept-card:hover::before {
  left: 150%;
  transition: left 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.dept-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.dept-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-active);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--accent-glow);
}

.dept-card:hover .dept-card-glow {
  opacity: 1;
}

.dept-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  transition: all var(--transition-bounce);
}

.dept-card:hover .dept-icon {
  color: #ffffff;
  transform: scale(1.15) rotate(-5deg);
}

.dept-icon svg {
  width: 100%;
  height: 100%;
}

.dept-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.dept-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.dept-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  position: relative;
  z-index: 1;
  transition: color var(--transition-fast);
}

.dept-card:hover .dept-link {
  color: var(--text-primary);
}

/* 部门卡片响应式 */
@media (max-width: 768px) {
  .dept-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .color-area {
    height: 240px;
  }

  .color-display {
    font-size: 1.5rem;
  }
}

/* ---------- 交互式 XIM 标志 ---------- */
.xim-brand-section {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg-deep);
  cursor: none;
}

.xim-brand-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.xim-brand-content {
  position: relative;
  z-index: 2;
  text-align: center;
  pointer-events: none;
}

.xim-letters {
  display: flex;
  gap: clamp(1rem, 4vw, 3rem);
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}

.xim-letter {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(5rem, 20vw, 14rem);
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  letter-spacing: 0.05em;
  cursor: none;
  transition: color 0.3s ease;
  text-shadow: 0 0 40px rgba(255,255,255,0.1);
  position: relative;
  user-select: none;
}

.xim-letter:hover {
  color: rgba(255,255,255,0.85);
  text-shadow: 0 0 60px rgba(255,255,255,0.2), 0 0 120px rgba(255,255,255,0.1);
}

.xim-subtitle {
  font-family: var(--font-mono);
  font-size: clamp(0.7rem, 1.2vw, 1rem);
  letter-spacing: 0.5em;
  color: var(--text-muted);
  margin-top: 1.5rem;
  font-weight: 300;
  pointer-events: auto;
}

.xim-tagline {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  opacity: 0.5;
  pointer-events: auto;
}

.xim-brand-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.xim-brand-section:hover .xim-brand-glow {
  opacity: 1;
}

.xim-brand-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
}

@media (max-width: 768px) {
  .xim-brand-section {
    min-height: 40vh;
  }
  .xim-letter {
    font-size: clamp(4rem, 15vw, 6rem);
  }
  .xim-letters {
    gap: 1rem;
  }
}

/* ============================================
   第二阶段改进
   ============================================ */

/* ---------- 自定义滚动条 ---------- */
::-webkit-scrollbar {
  width: 4px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* ---------- 导航栏滚动状态 ---------- */
.nav.scrolled {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-subtle);
  padding-top: 1rem;
  padding-bottom: 1rem;
  mix-blend-mode: normal;
}

.nav.scrolled .nav-logo {
  color: var(--text-primary);
}

.nav.scrolled .nav-link {
  color: var(--text-secondary);
}

.nav.scrolled .nav-link:hover {
  color: var(--text-primary);
}

/* ---------- 区域分割线 ---------- */
.section-divider {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 20%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.06) 80%,
    transparent 100%
  );
  overflow: visible;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 12px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.15) 0px,
      rgba(255, 255, 255, 0.15) 6px,
      transparent 6px,
      transparent 12px
    );
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
}

/* ---------- 逐字标题增强 ---------- */
.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
}

/* ---------- 增强磁吸卡片 ---------- */
.project-card[data-magnetic] {
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.project-card[data-magnetic]:hover {
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ---------- 响应式补充 ---------- */
@media (max-width: 768px) {
  .nav.scrolled {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .section-divider::before {
    width: 60px;
    height: 8px;
    background:
      repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.15) 0px,
        rgba(255, 255, 255, 0.15) 4px,
        transparent 4px,
        transparent 8px
      );
  }
}

/* ---------- 各区段粒子背景 Canvas ---------- */
.section-particle-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* 各区段需要 position: relative 来定位 Canvas */
.section {
  position: relative;
}

/* ---------- 移动端降低粒子 Canvas 透明度节省性能 ---------- */
@media (max-width: 768px) {
  .section-particle-bg {
    opacity: 0.3;
  }
}

/* ============================================
   第三阶段改进 — 动效增强 + 可访问性 + 文案建议
   ============================================ */

/* ---------- 滚动入场动效 ---------- */
/* 配合 JS：元素进入视口时添加 .revealed 类，实现淡入上滑入场 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.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; }

/* ---------- 卡片过渡平滑化增强 ---------- */
/* 覆盖原有 transition:all，改用精细属性声明提升性能 */
.project-card {
  transition: transform var(--transition-bounce),
              border-color var(--transition-base),
              box-shadow var(--transition-base),
              background var(--transition-base),
              opacity var(--transition-base);
}

.team-card {
  transition: transform var(--transition-bounce),
              border-color var(--transition-base),
              box-shadow var(--transition-base),
              background var(--transition-base);
}

/* ---------- 移动端链接悬停增强（触屏设备）---------- */
@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-active);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--accent-glow);
  }

  .team-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  }
}

/* 触屏设备悬停效果降级 */
@media (hover: none) {
  .project-card {
    transform: none !important;
  }
  .team-card {
    transform: none !important;
  }
}

/* ---------- 文案润色建议（不改 HTML，仅供 CSS 层参考）---------- */
/*
  以下为 section-desc 文案精简建议（供设计师参考，不对 HTML 做修改）：

  ▼ Portfolio 区域
  当前：A curated showcase of our finest work — from brand identities to digital experiences. Each project reflects our obsession with craft and narrative.
  建议：Curated works that speak for themselves. Brand, digital, craft.

  ▼ Team 区域
  当前：We are a tight-knit crew of designers, developers, and storytellers united by a shared belief in the power of visual narrative.
  建议：Designers, developers, storytellers — united by narrative.

  ▼ Timeline 区域
  当前：A look back at the milestones that shaped our journey — from a spark of an idea to a studio that pushes creative boundaries.
  建议：From spark to studio — the milestones that matter.
*/