/* ==========================================================================
   时光衣橱 (Time Wardrobe) - Global Styles
   Design System: Minimalist, High-End, Typography-Driven
   Version: 1.0.0
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-color: #FFFFFF;
  --bg-secondary: #F9F9F9;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-light: #999999;
  --accent-color: #D4B5A6; /* 浅陶土粉 */
  --accent-hover: #BCA093;
  --border-color: #EAEAEA;
  
  /* Typography */
  --font-base: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-serif: 'Georgia', 'Songti SC', serif;
  
  /* Layout */
  --container-width: 1200px;
  --header-height: 80px;
  --spacing-section: 6rem;
  --radius-sm: 4px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

/* ==========================================================================
   Typography Utilities
   ========================================================================== */
h1, h2, h3, h4 {
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
}

.text-center { text-align: center; }
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Components: Header & Nav
   ========================================================================== */
header {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 48px;
  background: rgba(255, 255, 255, 0.98);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

header.scrolled {
  border-bottom-color: var(--border-color);
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  text-transform: uppercase;
}

nav ul {
  display: flex;
  gap: 3rem;
}

nav a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 4px;
}

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

nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--accent-color);
}

/* ==========================================================================
   Components: Home Page
   ========================================================================== */
/* Hero Slider */
.hero-slider {
  position: relative;
  height: calc(100vh - var(--header-height));
  min-height: 600px;
  overflow: hidden;
  background-color: #f0f0f0;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active { opacity: 1; }

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

.slide-content {
  position: absolute;
  z-index: 10;
  text-align: center;
  color: #FFF;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
  max-width: 80%;
}

.slide-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s ease 0.3s;
}

.slide.active .slide-title {
  opacity: 1;
  transform: translateY(0);
}

/* Slogan Section */
.slogan-section {
  padding: var(--spacing-section) 0;
  background: var(--bg-color);
}

.slogan-box h2 {
  font-weight: 300;
  margin-bottom: 1.5rem;
}

.slogan-box p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Preview Grid */
.preview-section {
  padding: 0 0 var(--spacing-section);
}

.section-header {
  margin-bottom: 3rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.preview-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.preview-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.btn-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 1px solid var(--text-primary);
  padding-bottom: 2px;
}

/* ==========================================================================
   Components: Gallery Page
   ========================================================================== */
.gallery-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 3rem 0;
}

.filter-btn {
  background: transparent;
  border: none;
  font-size: 0.95rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 0;
  transition: all 0.3s;
}

.filter-btn:hover, .filter-btn.active {
  color: var(--text-primary);
  font-weight: 500;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px;
  padding-bottom: 4rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  aspect-ratio: 3/4;
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(2px);
}

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

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

.gallery-desc {
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  transform: translateY(10px);
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-desc {
  transform: translateY(0);
}

/* ==========================================================================
   Components: Inspiration Page
   ========================================================================== */
.article-header {
  height: 60vh;
  position: relative;
  margin-bottom: 4rem;
}

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

.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding-bottom: 6rem;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.article-section {
  margin-bottom: 4rem;
}

.article-section img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin: 2rem 0;
}

.drop-cap {
  font-size: 1.15rem;
  line-height: 1.8;
}

.drop-cap::first-letter {
  font-size: 3.5rem;
  float: left;
  margin-right: 0.75rem;
  line-height: 0.8;
  font-family: var(--font-serif);
}

.inspiration-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  margin-top: 2rem;
}

.inspiration-card {
  cursor: pointer;
  position: relative;
}

.inspiration-card img {
  aspect-ratio: 4/3;
  object-fit: cover;
  margin-bottom: 1rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255,255,255,0.98);
  overflow-y: auto;
  animation: fadeIn 0.3s;
}

.modal.open { display: block; }

.modal-content {
  max-width: 800px;
  margin: 80px auto;
  padding: 0 24px;
  position: relative;
}

.close-modal {
  position: fixed;
  top: 30px;
  right: 40px;
  font-size: 2rem;
  cursor: pointer;
  color: var(--text-primary);
  z-index: 2010;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-light);
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Animations & Utils
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.fade-up {
  animation: fadeUp 0.8s ease-out forwards;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2.5rem; }
}

@media (max-width: 600px) {
  header { padding: 0 20px; }
  nav ul { gap: 1.2rem; }
  nav a { font-size: 0.85rem; }
  
  .grid-3, .gallery-grid, .inspiration-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .hero-slider { min-height: 400px; }
  .slogan-box p { padding: 0 1rem; }
  
  .modal-content { margin: 60px auto; }
}