/* 引入思源宋体、思源黑体、Playfair Display 和 Inter 字体 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Noto+Sans+SC:wght@300;400;500&family=Noto+Serif+SC:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap');

/* 定义CSS变量与设计令牌 */
:root {
  --font-serif: 'Playfair Display', 'Noto Serif SC', serif;
  --font-sans: 'Inter', 'Noto Sans SC', sans-serif;
  --color-bg: #FAF9F7;
  --color-text: #2C2C2C;
  --color-accent: #C17C74;
}

/* 全局基础设置 */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* 标题字体应用 */
h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-serif);
}

/* 交互效果：图片轻微放大并显示柔和阴影 */
.hover-zoom {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.6s ease;
  will-change: transform, filter;
  display: block;
  overflow: hidden;
}

.hover-zoom img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

/* 隐藏滚动条但保留功能 (用于工艺美学页面的横向滚动) */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.scrollbar-hide::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* 自定义选中文本颜色 */
::selection {
  background-color: rgba(193, 124, 116, 0.25);
  color: var(--color-text);
}

/* 页面淡入动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-up {
  opacity: 0; /* 初始隐藏，防止闪烁 */
  animation: fadeInUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* 动画延迟工具类 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }

/* 针对移动端的优化：减少动画干扰 */
@media (max-width: 640px) {
  .hover-zoom:hover img {
    transform: scale(1.02); /* 移动端减小缩放幅度 */
  }
}