/* 引入思源黑体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* 全局变量定义 */
:root {
  --color-charcoal: #1A1A1A;
  --color-dark-grey: #333333;
  --color-midnight: #0A192F;
  --color-warm-grey: #E8E8E8;
  --color-ochre: #C67B3C;
  --font-primary: 'Helvetica Now', 'Neue Haas Grotesk', 'PingFang SC', 'Noto Sans SC', sans-serif;
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 基础重置与排版 */
html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-charcoal);
  color: #FFFFFF;
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden; /* 防止水平溢出 */
}

/* 自定义滚动条 - 极简风格 */
::-webkit-scrollbar {
  width: 6px;
  background: transparent;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

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

/* 文本选区颜色 */
::selection {
  background-color: var(--color-ochre);
  color: #FFFFFF;
}

/* 导航栏滚动状态 */
.nav-scrolled {
  background-color: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

/* 交互动效类 */
.img-hover-zoom {
  overflow: hidden;
  position: relative;
}

.img-hover-zoom img {
  transition: transform 1.2s var(--transition-smooth);
  will-change: transform;
}

.img-hover-zoom:hover img {
  transform: scale(1.05);
}

.text-reveal {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
}

.text-reveal > * {
  transform: translateY(100%);
  transition: transform 0.8s var(--transition-smooth);
}

.text-reveal.visible > * {
  transform: translateY(0);
}

/* 悬停下划线动画 */
.hover-underline {
  position: relative;
  display: inline-block;
}

.hover-underline::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transform-origin: bottom right;
  transition: transform 0.4s var(--transition-smooth);
}

.hover-underline:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* 加载动画 */
.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--color-charcoal);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.loader-hidden {
  opacity: 0;
  visibility: hidden;
}

/* 移动端菜单动画 */
.mobile-menu-enter {
  transform: translateX(100%);
  transition: transform 0.5s var(--transition-smooth);
}

.mobile-menu-enter-active {
  transform: translateX(0);
}

/* 辅助类：绝对居中 */
.center-absolute {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 遮罩层渐变 */
.overlay-gradient {
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
}

/* 视差滚动容器 */
.parallax-container {
  position: relative;
  overflow: hidden;
}

/* 确保iframe嵌入友好 */
@media (max-width: 768px) {
  .nav-scrolled {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
}