/* 主样式文件 - 定义色彩方案、字体规范和基础布局 */

/* ==================== 全局重置和基础配置 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color: #333333;
  background-color: #FFFFFF;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==================== 色彩方案 ==================== */
:root {
  --color-primary-bg: #FFFFFF;
  --color-secondary-bg: #F9F9F9;
  --color-text-primary: #333333;
  --color-text-secondary: #666666;
  --color-accent: #B3543C;
  --color-nav-bg: rgba(255, 255, 255, 0.95);
  --color-footer-bg: #000000;
  --color-footer-text: #FFFFFF;
}

/* ==================== 容器和布局 ==================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
}

section {
  padding: 5rem 0;
}

/* ==================== 导航栏 ==================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-nav-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-size: 1.25rem;
  font-weight: 300;
  letter-spacing: 2px;
  color: var(--color-text-primary);
}

nav .nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

nav .nav-links a {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-primary);
  text-decoration: none;
  letter-spacing: 1px;
  position: relative;
  padding: 0.5rem 0;
}

.mobile-menu-btn {
  display: none;
}

/* ==================== 首页轮播图区域 ==================== */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

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

.hero-slide.active {
  opacity: 1;
}

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #FFFFFF;
  width: 90%;
  max-width: 800px;
  z-index: 10;
}

.hero-slide h2 {
  font-size: 48px;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 3px;
  margin-bottom: 1.5rem;
}

.hero-slide p {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 1px;
  opacity: 0.95;
}

/* ==================== 滚动指示器 ==================== */
.scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  cursor: pointer;
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  stroke: #FFFFFF;
  opacity: 0.8;
}

/* ==================== 页面标题区域 ==================== */
.page-title {
  font-size: 48px;
  font-weight: 300;
  text-align: center;
  letter-spacing: 4px;
  color: var(--color-text-primary);
  margin-top: 8rem;
  margin-bottom: 1.5rem;
}

.page-subtitle {
  font-size: 18px;
  font-weight: 300;
  text-align: center;
  color: var(--color-text-secondary);
  line-height: 1.8;
  letter-spacing: 1px;
  max-width: 600px;
  margin: 0 auto 4rem;
}

/* ==================== 匠心辑录 - 3x3网格布局 ==================== */
.grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 4rem 0;
}

.detail-item {
  position: relative;
  overflow: hidden;
  background: var(--color-secondary-bg);
  border-radius: 4px;
  cursor: pointer;
  height: 500px;
}

.detail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-text {
  position: absolute;
  right: -400px;
  top: 50%;
  transform: translateY(-50%);
  max-width: 350px;
  background: rgba(255, 255, 255, 0.98);
  padding: 2rem;
  border-radius: 4px;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.detail-text h3 {
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.detail-text p {
  font-size: 14px;
  font-weight: 300;
  color: var(--color-text-secondary);
  line-height: 1.8;
  letter-spacing: 0.5px;
}

/* ==================== 风格典藏 - 筛选区域 ==================== */
.style-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.style-filters button {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-primary);
  background: transparent;
  border: 1px solid #E0E0E0;
  padding: 0.75rem 2rem;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.style-filters button:hover,
.style-filters button.active {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ==================== 风格典藏 - 瀑布流布局 ==================== */
.masonry-grid {
  column-count: 4;
  column-gap: 2rem;
  margin: 4rem 0;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 2rem;
  background: var(--color-secondary-bg);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
}

.masonry-caption {
  padding: 1rem 1.25rem;
  background: #FFFFFF;
}

.masonry-caption .tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-accent);
  background: rgba(179, 84, 60, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 2px;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.masonry-caption .title {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-primary);
  letter-spacing: 0.5px;
}

/* ==================== 分隔线 ==================== */
.divider {
  width: 100%;
  height: 1px;
  background: #E0E0E0;
  margin: 5rem 0;
}

.divider-text {
  text-align: center;
  font-size: 14px;
  font-weight: 300;
  color: var(--color-text-secondary);
  letter-spacing: 1px;
  margin: 3rem 0;
}

/* ==================== 页脚 ==================== */
footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  text-align: center;
  padding: 40px 20px;
  margin-top: 80px;
}

.footer-content p {
  font-size: 13px;
  letter-spacing: 2px;
  opacity: 0.7;
}

/* ==================== 图片懒加载占位 ==================== */
img[data-src] {
  background: var(--color-secondary-bg);
  min-height: 300px;
}

img.loaded {
  animation: fadeIn 0.6s ease-in;
}

/* ==================== 辅助类 ==================== */
.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.8s ease-in forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ==================== 可访问性 ==================== */
a:focus,
button:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

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

::selection {
  background: var(--color-accent);
  color: #FFFFFF;
}