/* 全局变量定义：色彩与字体系统 */
:root {
  --color-primary: #1a1a1a;   /* 极深灰，用于主文字 */
  --color-secondary: #666666; /* 中灰，用于辅助文字 */
  --color-accent: #dca596;    /* 陶土粉，用于微小的交互点缀 */
  --bg-color: #ffffff;        /* 纯白背景 */
  
  /* 字体系统：衬线标题 + 无衬线正文 */
  --font-serif: "Playfair Display", "Didot", "Bodoni MT", "Times New Roman", serif;
  --font-sans: "Inter", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  
  /* 布局参数 */
  --header-height: 80px;
  --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 0.3s ease;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-primary);
  background-color: var(--bg-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

p {
  line-height: 1.8;
  color: var(--color-secondary);
}

/* 导航链接动效 */
.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--color-primary);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  padding-bottom: 4px;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: 0;
  left: 0;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover {
  opacity: 0.7;
}

/* 图片容器与悬停缩放效果 */
.img-container {
  overflow: hidden;
  position: relative;
  display: block;
  background-color: #f5f5f5; /* 占位色 */
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: transform;
}

/* 极轻微的缩放，营造呼吸感 */
.img-container:hover img {
  transform: scale(1.05);
}

/* 页面加载淡入动画 */
.fade-in-up {
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
}

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }

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

/* 滚动显现效果 (JS配合使用 .reveal 类) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 1s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* 灯箱效果 (用于系列页面) */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.15);
  transform: scale(0.98);
  transition: transform 0.4s ease;
}

.lightbox-overlay.open .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  transition: transform 0.3s ease;
}

.lightbox-close:hover {
  transform: rotate(90deg);
}

.lightbox-close::before,
.lightbox-close::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  background-color: #000;
}

.lightbox-close::before { transform: rotate(45deg); }
.lightbox-close::after { transform: rotate(-45deg); }

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-family: var(--font-serif);
  font-size: 2rem;
  cursor: pointer;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox-overlay:hover .lightbox-btn {
  opacity: 0.4;
}

.lightbox-btn:hover {
  opacity: 1 !important;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* 极简滚动条 */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.1);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0,0,0,0.3);
}

/* 响应式调整辅助类 */
@media (max-width: 768px) {
  .nav-mobile-hidden {
    display: none;
  }
  
  /* 移动端汉堡菜单动画 */
  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 50;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .mobile-menu.open {
    transform: translateX(0);
  }
}

/* 文本选择颜色 */
::selection {
  background: rgba(0, 0, 0, 0.1); /* 极简灰 */
  color: #000;
}