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

/* 核心变量定义 */
:root {
  /* 色彩系统 */
  --primary-bg: #f9f7f4;    /* 主背景米白 */
  --secondary-bg: #f0ede8;  /* 次背景浅灰 */
  --accent-light: #e8e2d9;  /* 点缀浅沙色 */
  --text-dark: #2c2c2c;     /* 主文字深灰 */
  --text-light: #666666;    /* 次文字中灰 */
  --border-color: #dcd6ce;  /* 边框颜色 */
  
  /* 间距系统 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* 动画 */
  --transition-slow: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  --transition-base: all 0.3s ease;
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background-color: var(--primary-bg);
  color: var(--text-dark);
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Noto Serif SC', serif;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-light);
  font-weight: 300;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-base);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* 布局工具类 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
}

.text-center { text-align: center; }
.fade-in { animation: fadeIn 1s ease-out forwards; opacity: 0; }

/* 导航栏 */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(249, 247, 244, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid rgba(0,0,0,0.03);
  transition: var(--transition-base);
}

.nav-container {
  display: flex;
  justify-content: center; /* 居中导航 */
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  height: 60px;
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
}

.nav-links a {
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: var(--text-dark);
  transition: width 0.3s ease, left 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
  left: 0;
}

/* 首页：英雄区域（轮播图） */
.hero {
  position: relative;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.hero-slider {
  height: 100%;
  width: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  background-size: cover;
  background-position: center;
}

.slide.active {
  opacity: 1;
}

.slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.15); /* 轻微遮罩 */
}

/* 首页：引言区 */
.intro-section {
  padding: var(--spacing-xl) 0;
  background-color: var(--primary-bg);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.intro-text {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 2;
  margin-top: var(--spacing-md);
}

.intro-title {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.1em;
}

/* 首页：特色展示区 */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.feature-card {
  text-align: center;
  opacity: 0;
  animation: slideUp 0.8s ease-out forwards;
}
.feature-card:nth-child(1) { animation-delay: 0.2s; }
.feature-card:nth-child(2) { animation-delay: 0.4s; }
.feature-card:nth-child(3) { animation-delay: 0.6s; }

.feature-img-wrapper {
  overflow: hidden;
  margin-bottom: var(--spacing-md);
  aspect-ratio: 3/4;
}

.feature-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

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

.feature-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

.feature-desc {
  font-size: 0.9rem;
  padding: 0 var(--spacing-sm);
}

/* 灵感图库页面 */
.gallery-header {
  padding-top: 120px;
  padding-bottom: var(--spacing-lg);
  text-align: center;
}

.gallery-section {
  margin-bottom: var(--spacing-xl);
}

.section-title-wrapper {
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.section-subtitle {
  font-family: 'Noto Serif SC', serif;
  font-style: italic;
  color: var(--text-light);
  margin-bottom: var(--spacing-xs);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: #fff;
  padding: var(--spacing-xs); /* 像框效果 */
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  transition: var(--transition-base);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.gallery-img-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-info {
  padding: var(--spacing-sm) 0 0;
  text-align: center;
}

.gallery-caption {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* 视觉故事区 */
.visual-story {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: var(--spacing-xl) 0;
}

/* 设计理念页面 */
.philosophy-container {
  padding-top: 80px;
}

.philosophy-block {
  display: flex;
  align-items: center;
  min-height: 80vh;
  margin-bottom: var(--spacing-lg);
}

.philosophy-block:nth-child(even) {
  flex-direction: row-reverse;
}

.philo-content {
  flex: 1;
  padding: var(--spacing-xl);
}

.philo-image-wrapper {
  flex: 1;
  height: 80vh;
  position: relative;
  overflow: hidden;
}

.philo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.philo-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
}

.philo-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--text-dark);
  margin-top: var(--spacing-xs);
}

.philo-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-light);
}

/* 统一页脚 */
footer {
  margin-top: auto;
  padding: var(--spacing-lg) 0;
  background-color: #fff;
  border-top: 1px solid var(--secondary-bg);
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  font-family: 'Noto Serif SC', serif;
}

/* 动画定义 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* 响应式调整 */
@media (max-width: 1024px) {
  :root {
    --spacing-xl: 5rem;
  }
  .philo-title { font-size: 2rem; }
}

@media (max-width: 768px) {
  :root {
    --spacing-md: 1.5rem;
    --spacing-lg: 3rem;
  }
  
  .nav-links { gap: var(--spacing-md); }
  
  .features-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .philosophy-block,
  .philosophy-block:nth-child(even) {
    flex-direction: column;
    min-height: auto;
  }

  .philo-image-wrapper {
    width: 100%;
    height: 50vh;
  }

  .philo-content {
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: left;
  }
  
  .intro-title { font-size: 1.5rem; }
  .intro-text { font-size: 1rem; }
}