/* 
 * 形韵 (XingYun) - 高端时尚女装展示网站全局样式
 * 风格：现代极简主义 (Modern Minimalism)
 * 依赖：Water.css (作为Reset/兜底), Google Fonts
 */

/* 引入字体: 思源宋体 (标题/艺术感) 和 思源黑体 (正文/现代感) */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&family=Noto+Serif+SC:wght@300;400;500;700&display=swap');

/* =========================================
   1. 设计令牌 (Design Tokens)
   ========================================= */
:root {
  /* 字体栈 */
  --font-serif: 'Noto Serif SC', serif;
  --font-sans: 'Noto Sans SC', sans-serif;

  /* 调色板 - 中性色基底 */
  --color-bg: #F9F8F6;       /* 柔和米白，模拟纸张 */
  --color-text-main: #1A1A1A; /* 深岩灰，接近黑色 */
  --color-text-sub: #595959;  /* 沉稳的中灰 */
  --color-text-light: #9E9E9E;/* 浅灰，用于辅助信息 */
  --color-accent: #C2B280;    /* 哑光金/驼色，极少量点缀 */
  --color-white: #FFFFFF;

  /* 布局与间距 */
  --spacing-base: 1rem;
  --spacing-lg: 5rem;        /* 大留白 */
  --container-width: 1200px;
  --header-height: 80px;

  /* 动效 */
  --transition-slow: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-base: all 0.3s ease;
}

/* =========================================
   2. 全局重置与基础样式 (Override Water.css)
   ========================================= */
body {
  background-color: var(--color-bg);
  color: var(--color-text-main);
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  line-height: 1.8;
  overflow-x: hidden;
  max-width: 100vw; /* 覆盖 Water.css 的最大宽度限制 */
}

/* 强制覆盖 Water.css 对容器的默认限制 */
body > header, body > main, body > footer {
  max-width: 100% !important;
  padding: 0 !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--color-text-main);
  margin-top: 0;
  line-height: 1.4;
}

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

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

/* 实用工具类 */
.text-serif { font-family: var(--font-serif); }
.text-center { text-align: center; }
.text-light { color: var(--color-text-light); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* 内容容器 */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* =========================================
   3. 导航栏 (Navbar)
   ========================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  mix-blend-mode: difference; /* 关键：在深色/浅色背景上自动反色 */
  color: var(--color-white); 
  transition: background-color 0.3s ease;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  user-select: none;
}

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  position: relative;
  opacity: 0.7;
}

.nav-link:hover, .nav-link.active {
  opacity: 1;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width 0.3s ease, left 0.3s ease;
}

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

/* 移动端菜单切换按钮 */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
}

/* =========================================
   4. 首页特定样式 (Home)
   ========================================= */
/* 全屏主视觉 */
.hero-section {
  height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.85) contrast(1.1); /* 提升质感 */
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
  max-width: 800px;
  padding: 0 1rem;
}

.hero-quote {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem); /* 响应式字体 */
  font-weight: 300;
  line-height: 1.3;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeIn 1.5s ease-out forwards 0.5s;
}

/* 引语区 */
.intro-section {
  padding: 8rem 2rem;
  text-align: center;
  background-color: var(--color-bg);
}

.intro-text {
  max-width: 700px;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-text-sub);
  line-height: 2.2;
}

/* =========================================
   5. 档案库与网格系统 (Archive & Grid)
   ========================================= */
.archive-header {
  padding: 8rem 0 4rem;
  text-align: center;
}

.grid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 3rem 2rem;
  padding-bottom: 6rem;
}

.card {
  cursor: pointer;
  group: hover;
}

.card-img-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background-color: #eee;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

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

.card-info {
  margin-top: 1.2rem;
  text-align: center;
}

.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  letter-spacing: 0.05em;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--color-text-sub);
  margin-bottom: 0.5rem;
}

.card-tags {
  font-size: 0.75rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* 模态弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(253, 251, 247, 0.98); /* 极高不透明度的米白背景 */
  z-index: 2000;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  overflow-y: auto;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-close-btn {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--color-text-main);
  z-index: 2002;
  transition: transform 0.3s;
}

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

.modal-content {
  width: 100%;
  max-width: 1200px;
  margin: 6rem auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.modal-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.modal-text {
  position: sticky;
  top: 6rem;
}

.modal-images {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* =========================================
   6. 灵感志 (Inspiration)
   ========================================= */
.inspiration-list {
  display: flex;
  flex-direction: column;
  gap: 8rem;
  padding: 8rem 0;
  max-width: 900px;
  margin: 0 auto;
}

.article {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.article.visible {
  opacity: 1;
  transform: translateY(0);
}

.article-header {
  text-align: center;
  margin-bottom: 3rem;
}

.article-title {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.article-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 3rem;
}

.article-body {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--color-text-sub);
  columns: 1; /* 默认单栏 */
}

.article-quote {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  text-align: center;
  margin: 3rem 0;
  color: var(--color-text-main);
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  padding: 2rem 0;
}

/* =========================================
   7. 页脚与动画
   ========================================= */
.site-footer {
  text-align: center;
  padding: 4rem 0;
  color: var(--color-text-light);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  border-top: 1px solid rgba(0,0,0,0.03);
}

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

/* =========================================
   8. 响应式适配 (Responsive)
   ========================================= */
@media (max-width: 768px) {
  .navbar {
    padding: 0 1.5rem;
    mix-blend-mode: normal; /* 移动端可能有菜单背景，取消混合模式 */
    background: rgba(255, 255, 255, 0.95);
    color: var(--color-text-main);
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    z-index: 999;
  }

  .nav-links.active {
    transform: translateY(0);
  }

  .menu-toggle {
    display: block;
  }

  .modal-details {
    grid-template-columns: 1fr;
  }
  
  .modal-text {
    position: static;
    order: -1; /* 移动端先显示文字 */
  }

  .grid-gallery {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .hero-quote {
    font-size: 2rem;
  }
}