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

/* CSS 变量定义 */
:root {
  --font-primary: 'Noto Sans SC', sans-serif;
  --color-black: #050505;
  --color-white: #ffffff;
  --color-grey-light: #f3f4f6;
  --color-grey-dark: #374151;
  --color-accent: #1e3a8a; /* 深蓝 */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

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

body {
  font-family: var(--font-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-white);
  color: var(--color-black);
  overflow-x: hidden;
}

/* 极简主义滚动条美化 */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* 隐藏滚动条但保留功能 (用于横向滑动区域) */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 页面过渡层 */
.page-transition-curtain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-black);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform-origin: top;
}

/* 磁性吸附效果容器 */
.magnetic-wrap {
  display: inline-block;
  position: relative;
}

/* 图片悬停缩放效果 */
.img-zoom-container {
  overflow: hidden;
}

.img-zoom-container img {
  transition: transform 0.8s var(--ease-out-expo), filter 0.5s ease;
  will-change: transform;
}

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

/* 文本平衡断行 */
.text-balance {
  text-wrap: balance;
}

/* 动态内容槽位 (Dynamic Slot) */
.slot-container {
  display: contents; /* 保持布局流 */
}

.slot-placeholder {
  display: none; /* 默认隐藏占位符，仅作为标记 */
}

/* 开发模式下可见槽位 (可选) */
body.debug-slots .slot-placeholder {
  display: flex;
  width: 100%;
  height: 100px;
  border: 1px dashed #ccc;
  align-items: center;
  justify-content: center;
  color: #999;
  margin: 20px 0;
}

/* 移动端菜单过渡 */
.mobile-menu {
  transition: transform 0.4s var(--ease-out-expo);
}

/* 汉堡按钮动画 */
.hamburger svg {
  transition: transform 0.3s ease;
}
.hamburger[aria-expanded="true"] svg {
  transform: rotate(90deg);
}

/* 纯CSS加载动画 (兜底方案) */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(0,0,0,0.1);
  border-left-color: #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* GSAP 动画辅助类 */
.reveal-text {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s var(--ease-out-expo);
}

.reveal-text.is-visible {
  clip-path: inset(0 0 0 0);
}

/* 字体排版层级微调 */
.tracking-widest-custom {
  letter-spacing: 0.2em;
}

/* 响应式视频背景层 */
.video-bg-layer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: -1;
  opacity: 0.6;
}