/* ===========================
   全局样式 - 极简现代主义设计
   =========================== */

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

:root {
  --primary-bg: #FAFAFA;
  --secondary-bg: #FFFFFF;
  --primary-text: #2C2C2C;
  --secondary-text: #5C5C5C;
  --accent-color: #A0A0A0;
  --spacing-unit: 8px;
  --max-width: 1200px;
  --transition-fast: 300ms;
  --transition-slow: 500ms;
}

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

body {
  font-family: 'Source Han Sans CN', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--primary-bg);
  color: var(--primary-text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* 字体加载 */
@import url('https://fonts.loli.net/css2?family=Noto+Sans+SC:wght@300;400;500&display=swap');

/* 通用容器 */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 3);
}

/* ===========================
   页眉导航
   =========================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--accent-color);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--spacing-unit) * 3) calc(var(--spacing-unit) * 6);
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 2px;
  color: var(--primary-text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: calc(var(--spacing-unit) * 6);
  list-style: none;
}

.nav-links a {
  color: var(--secondary-text);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 1px;
  position: relative;
  transition: color var(--transition-fast);
}

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

.nav-links a:hover {
  color: var(--primary-text);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ===========================
   页脚
   =========================== */
footer {
  text-align: center;
  padding: calc(var(--spacing-unit) * 6) 0;
  color: var(--accent-color);
  font-size: 0.8rem;
  margin-top: calc(var(--spacing-unit) * 12);
}

/* ===========================
   排版系统
   =========================== */
h1 {
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 3px;
  margin-bottom: calc(var(--spacing-unit) * 4);
}

h2 {
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 2px;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

h3 {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 1px;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

p {
  line-height: 1.8;
  margin-bottom: calc(var(--spacing-unit) * 3);
  color: var(--secondary-text);
}

/* ===========================
   首页轮播图
   =========================== */
.hero-slider {
  height: 100vh;
  position: relative;
  margin-top: 72px;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-controls {
  position: absolute;
  bottom: calc(var(--spacing-unit) * 6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  z-index: 10;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-dot.active {
  background: rgba(255, 255, 255, 0.9);
  width: 24px;
  border-radius: 4px;
}

/* ===========================
   内容区域
   =========================== */
.content-section {
  padding: calc(var(--spacing-unit) * 12) 0;
  text-align: center;
}

.intro-text {
  max-width: 800px;
  margin: 0 auto calc(var(--spacing-unit) * 8);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--spacing-unit) * 6);
  margin-top: calc(var(--spacing-unit) * 8);
}

.feature-item {
  background: var(--secondary-bg);
  padding: calc(var(--spacing-unit) * 4);
  border-radius: 2px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.feature-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

.feature-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.feature-item p {
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ===========================
   风格图库
   =========================== */
.gallery-header {
  padding: calc(var(--spacing-unit) * 15) 0 calc(var(--spacing-unit) * 6);
  text-align: center;
}

.filter-tags {
  display: flex;
  justify-content: center;
  gap: calc(var(--spacing-unit) * 3);
  margin-top: calc(var(--spacing-unit) * 4);
  flex-wrap: wrap;
}

.filter-tag {
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 3);
  border: 1px solid var(--accent-color);
  background: transparent;
  color: var(--secondary-text);
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: all var(--transition-fast);
}

.filter-tag:hover,
.filter-tag.active {
  background: var(--primary-text);
  color: var(--primary-bg);
  border-color: var(--primary-text);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--spacing-unit) * 4);
  margin-top: calc(var(--spacing-unit) * 8);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/5;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: calc(var(--spacing-unit) * 3);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.overlay h4 {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 1px;
}

/* 大图模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: calc(var(--spacing-unit) * 6);
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  position: relative;
}

.modal-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-caption {
  color: white;
  text-align: center;
  margin-top: calc(var(--spacing-unit) * 3);
  font-size: 0.9rem;
}

.modal-close {
  position: absolute;
  top: calc(var(--spacing-unit) * 3);
  right: calc(var(--spacing-unit) * 3);
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  width: 48px;
  height: 48px;
}

/* ===========================
   设计理念页面
   =========================== */
.concept-hero {
  padding: calc(var(--spacing-unit) * 20) 0 calc(var(--spacing-unit) * 10);
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.concept-modules {
  display: grid;
  gap: calc(var(--spacing-unit) * 12);
  margin: calc(var(--spacing-unit) * 12) 0;
}

.concept-module {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--spacing-unit) * 8);
  align-items: center;
}

.concept-module:nth-child(even) {
  direction: rtl;
}

.concept-module:nth-child(even) > * {
  direction: ltr;
}

.concept-image {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.concept-text h2 {
  margin-bottom: calc(var(--spacing-unit) * 3);
}

.concept-text p {
  line-height: 1.9;
}

/* 时间线 */
.timeline {
  position: relative;
  max-width: 800px;
  margin: calc(var(--spacing-unit) * 12) auto;
  padding: calc(var(--spacing-unit) * 6) 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--accent-color);
}

.timeline-item {
  position: relative;
  margin-bottom: calc(var(--spacing-unit) * 8);
  width: 45%;
}

.timeline-item:nth-child(odd) {
  margin-left: 0;
}

.timeline-item:nth-child(even) {
  margin-left: 55%;
}

.timeline-content {
  padding: calc(var(--spacing-unit) * 4);
  background: var(--secondary-bg);
  border-radius: 2px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.timeline-item::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--primary-text);
  border: 3px solid var(--primary-bg);
  border-radius: 50%;
  top: 24px;
}

.timeline-item:nth-child(odd)::before {
  right: -58px;
}

.timeline-item:nth-child(even)::before {
  left: -58px;
}

/* ===========================
   响应式设计
   =========================== */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .concept-module {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 4);
  }
  
  .concept-module:nth-child(even) {
    direction: ltr;
  }
}

@media (max-width: 768px) {
  nav {
    padding: calc(var(--spacing-unit) * 2) calc(var(--spacing-unit) * 3);
  }
  
  .nav-links {
    gap: calc(var(--spacing-unit) * 3);
  }
  
  .nav-links a {
    font-size: 0.8rem;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.3rem;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
    gap: calc(var(--spacing-unit) * 4);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--spacing-unit) * 2);
  }
  
  .content-section {
    padding: calc(var(--spacing-unit) * 8) 0;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    width: 100%;
    margin-left: 60px !important;
  }
  
  .timeline-item::before {
    left: -50px !important;
  }
  
  .concept-image {
    height: 320px;
  }
}

@media (max-width: 480px) {
  .nav-links {
    gap: calc(var(--spacing-unit) * 2);
  }
  
  .filter-tags {
    gap: calc(var(--spacing-unit) * 1.5);
  }
  
  .filter-tag {
    padding: calc(var(--spacing-unit) * 1) calc(var(--spacing-unit) * 2);
    font-size: 0.75rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   工具类
   =========================== */
.fade-in {
  animation: fadeIn var(--transition-slow) ease-in;
}

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

.lazy-load {
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.lazy-load.loaded {
  opacity: 1;
}