/* 全局样式文件 - 围巾艺术展示网站 */
@import url('https://fonts.loli.net/css2?family=Noto+Serif+SC:wght@300;400;500&family=Noto+Sans+SC:wght@300;400;500&display=swap');

/* CSS变量定义 - 中性色主题 */
:root {
  --color-primary: #f5f5f0;        /* 米白 */
  --color-secondary: #e8e8e3;      /* 浅灰米 */
  --color-accent: #d4c5b9;         /* 燕麦色 */
  --color-khaki: #c8b88b;          /* 淡卡其 */
  --color-text-dark: #3a3a3a;      /* 深色文字 */
  --color-text-light: #6b6b6b;     /* 浅色文字 */
  --color-border: #e0e0d8;         /* 边框色 */
  
  /* 间距变量 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* 动画时长 */
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
}

/* 全局重置和基础样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--color-primary);
  color: var(--color-text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 标题字体 */
.serif-font {
  font-family: 'Noto Serif SC', serif;
}

/* 导航栏样式 */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(245, 245, 240, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-normal) ease;
}

.nav-link {
  position: relative;
  color: var(--color-text-dark);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: color var(--transition-normal) ease;
}

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

.nav-link:hover {
  color: var(--color-khaki);
}

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

/* 首屏大图容器 */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow) ease;
}

.hero-section:hover .hero-image {
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
}

/* 文字样式 */
.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  animation: fadeInUp var(--transition-slow) ease;
}

.section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-text-dark);
  margin-bottom: var(--spacing-md);
  text-align: center;
  letter-spacing: 0.05em;
}

/* 网格布局 */
.grid-container {
  display: grid;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* 卡片样式 */
.card {
  background: white;
  border-radius: 4px;
  overflow: hidden;
  transition: all var(--transition-normal) ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: transform var(--transition-normal) ease;
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card-content {
  padding: var(--spacing-sm);
}

.card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text-dark);
  margin-bottom: var(--spacing-xs);
}

.card-description {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

/* 按钮样式 */
.btn {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: transparent;
  color: var(--color-text-dark);
  border: 1px solid var(--color-border);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: all var(--transition-normal) ease;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-khaki);
  color: white;
  border-color: var(--color-khaki);
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 2000;
  overflow-y: auto;
  animation: fadeIn var(--transition-normal) ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  background: white;
  max-width: 90%;
  max-height: 90vh;
  overflow: auto;
  animation: slideUp var(--transition-normal) ease;
}

.modal-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast) ease;
}

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

/* 工艺页面样式 */
.process-item {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--spacing-lg);
}

.process-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  margin-bottom: var(--spacing-md);
}

.process-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-dark);
}

/* 系法步骤样式 */
.step-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.step-item {
  text-align: center;
}

.step-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: var(--spacing-sm);
  transition: transform var(--transition-normal) ease;
}

.step-item:hover .step-image {
  transform: scale(1.02);
}

.step-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--color-text-dark);
  margin-bottom: var(--spacing-xs);
}

.step-description {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

/* 页脚样式 */
footer {
  background: var(--color-secondary);
  padding: var(--spacing-md);
  text-align: center;
  border-top: 1px solid var(--color-border);
  margin-top: var(--spacing-xl);
}

.footer-text {
  font-size: 0.85rem;
  color: var(--color-text-light);
  letter-spacing: 0.05em;
}

/* 动画定义 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* 响应式设计 */
@media (max-width: 768px) {
  :root {
    font-size: 14px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .hero-section {
    height: 70vh;
  }
  
  .grid-container {
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
  }
  
  .process-item {
    flex-direction: column;
  }
  
  .step-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: var(--spacing-xs);
  }
  
  .nav-link {
    font-size: 0.85rem;
    padding: var(--spacing-xs);
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .card-image {
    height: 200px;
  }
  
  .process-image {
    height: 250px;
  }
}