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

:root {
  /* 基础色板变量，配合 Tailwind 配置使用 */
  --color-neutral-light: #f8f9fa;
  --color-neutral-white: #ffffff;
  --color-neutral-dark: #212529;
  
  /* 莫兰迪强调色 */
  --color-accent-1: #a5a58d; /* 灰绿 */
  --color-accent-2: #b7b7a4; /* 暖灰 */
  --color-accent-3: #d4a276; /* 柔和陶土 */
  
  /* 文字颜色 */
  --color-text-dark: #333333;
  --color-text-light: #666666;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
  color: var(--color-text-dark);
  background-color: var(--color-neutral-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

/* 文本选中样式 */
::selection {
  background-color: var(--color-accent-2);
  color: white;
}

/* 视差滚动背景通用类 */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* 瀑布流布局修正 */
.masonry-grid {
  column-gap: 1.5rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  backface-visibility: hidden;
}

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

.img-zoom {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* 全屏滚动容器 */
.snap-container {
  scroll-snap-type: y mandatory;
  height: 100vh;
  overflow-y: scroll;
  scroll-behavior: smooth;
}

.snap-section {
  scroll-snap-align: start;
  height: 100vh;
  width: 100%;
  position: relative;
}

/* 文本两端对齐 */
.text-justify-cn {
  text-align: justify;
  text-justify: inter-ideograph;
}

/* 极简加载动画 */
.loading-fade {
  animation: fadeIn 0.8s ease-in-out;
}

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

/* 工具类：隐藏滚动条但允许滚动 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}