/* 
 * Project: 素雅风尚 - Minimalist Fashion Showcase
 * Description: 全局样式定义，遵循极简主义美学与响应式设计规范
 * Version: 1.0.0
 * Author: HAISNAP
 */

/* =========================================
   1. Design Tokens & Variables
   ========================================= */
:root {
  /* Color Palette - Neutral & Morandi Tones */
  --color-bg-body: #fdfcfb;      /* 温暖的象牙白 */
  --color-bg-secondary: #f4f2f0; /* 浅燕麦色 */
  --color-text-primary: #2c2c2c; /* 深炭灰，非纯黑 */
  --color-text-secondary: #6e6e6e; /* 柔和灰 */
  --color-accent: #a8a09a;       /* 莫兰迪暖灰 */
  --color-border: #e0e0e0;
  
  /* Typography */
  --font-family-base: "Helvetica Neue", "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-family-serif: "Songti SC", "SimSun", serif; /* 用于强调文字 */
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
  
  /* Layout */
  --container-width: 1440px;
  --header-height: 80px;
  
  /* Transitions */
  --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================
   2. Reset & Base Styles
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family-base);
  background-color: var(--color-bg-body);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
}

/* =========================================
   3. Typography
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.section-title {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: var(--spacing-lg);
  position: relative;
  letter-spacing: 0.2em;
}

.text-justify {
  text-align: justify;
}

.text-muted {
  color: var(--color-text-secondary);
}

/* =========================================
   4. Layout Components
   ========================================= */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(253, 252, 251, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

header.scrolled {
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 5%;
}

.site-name {
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  z-index: 1001;
}

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

.nav-links li a {
  position: relative;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  padding-bottom: 4px;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

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

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

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

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  width: 24px;
  height: 1px;
  background-color: var(--color-text-primary);
  transition: all 0.3s ease;
}

/* Footer */
footer {
  padding: var(--spacing-lg) 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  border-top: 1px solid rgba(0,0,0,0.03);
  margin-top: var(--spacing-xl);
}

/* =========================================
   5. Page Specific: Index (Hero & Gallery)
   ========================================= */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  z-index: 1;
}

.slide.active {
  opacity: 1;
  z-index: 2;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%; /* 稍微偏上以聚焦面部/上身 */
}

.slider-indicators {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.3s;
}

.indicator.active {
  background: #fff;
}

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

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
}

@media (min-width: 1024px) {
  .grid-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4; /* 保持竖版时尚摄影比例 */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  transition: transform var(--transition-smooth);
}

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

/* =========================================
   6. Page Specific: Collections
   ========================================= */
.collection-group {
  margin-top: calc(var(--header-height) + var(--spacing-lg));
  margin-bottom: var(--spacing-xl);
}

.collection-title {
  text-align: center;
  font-family: var(--font-family-serif);
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
  opacity: 0.9;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .collection-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.collection-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/5;
  background-color: var(--color-bg-secondary);
}

.collection-card img {
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.2, 1, 0.2, 1);
}

.collection-card:hover img {
  transform: scale(1.03);
}

/* =========================================
   7. Page Specific: Philosophy
   ========================================= */
.philosophy-split {
  display: flex;
  flex-direction: column;
  min-height: 80vh;
  margin-top: var(--header-height);
}

@media (min-width: 992px) {
  .philosophy-split {
    flex-direction: row;
    height: calc(100vh - var(--header-height));
  }
}

.split-visual {
  flex: 1;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  height: 50vh;
}

@media (min-width: 992px) {
  .split-visual {
    height: auto;
  }
}

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

.split-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-lg);
  background-color: #fff;
}

.content-inner {
  max-width: 480px;
}

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

.philosophy-text {
  font-size: 1rem;
  line-height: 2;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
}

.details-section {
  padding: var(--spacing-xl) 5%;
  background-color: var(--color-bg-secondary);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--spacing-md);
}

@media (min-width: 768px) {
  .details-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================================
   8. Animation Utilities
   ========================================= */
.fade-in {
  animation: fadeIn 1s ease-out forwards;
  opacity: 0;
}

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

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

/* =========================================
   9. Mobile Responsive Adjustments
   ========================================= */
@media (max-width: 768px) {
  :root {
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s ease;
  }

  .nav-links.active {
    transform: translateX(0);
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .hero-slider {
    height: 80vh;
  }
  
  .section-title {
    font-size: 1.25rem;
  }
  
  .philosophy-title {
    font-size: 1.5rem;
  }
}