/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500&family=Noto+Serif+SC:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* Base Configuration */
:root {
  --color-primary: #333333;
  --color-secondary: #666666;
  --color-accent: #8B5E5E; /* 干枯玫瑰粉示例 */
  --transition-slow: 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-base: 0.3s ease-out;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', sans-serif;
  color: var(--color-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #FAFAFA;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: 'Playfair Display', 'Noto Serif SC', serif;
}

/* Component: Glass Navigation */
.glass-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.glass-nav.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Utility: Hide Scrollbar */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Utility: Text Selection */
::selection {
  background: rgba(51, 51, 51, 0.1);
  color: #000;
}

/* Animation: Keyframes */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes kenBurns {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

/* Animation: Utility Classes */
.animate-fade-in {
  animation: fadeIn 1.2s ease-out forwards;
}

.animate-slide-up {
  opacity: 0; /* Default hidden */
  animation: slideUpFade 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.animate-ken-burns {
  animation: kenBurns 20s linear infinite alternate;
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-500 { animation-delay: 500ms; }
.delay-700 { animation-delay: 700ms; }

/* Interactive: Hover Underline */
.hover-underline-animation {
  display: inline-block;
  position: relative;
}

.hover-underline-animation::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: currentColor;
  transform-origin: bottom right;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-underline-animation:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Interactive: Image Hover Zoom */
.img-zoom-container {
  overflow: hidden;
  position: relative;
}

.img-zoom-container img {
  transition: transform var(--transition-slow), filter 0.5s ease;
  will-change: transform;
}

.img-zoom-container:hover img {
  transform: scale(1.05);
}

.img-overlay {
  background: rgba(0, 0, 0, 0.2);
  transition: opacity 0.5s ease;
}

/* Layout: Masonry Fallback */
.masonry-grid {
  display: column;
  column-count: 1;
  column-gap: 1.5rem;
}
@media (min-width: 640px) { .masonry-grid { column-count: 2; } }
@media (min-width: 1024px) { .masonry-grid { column-count: 3; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

/* Loader */
.page-loader {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease-out;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utility: Parallax Effect Support */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
@media (hover: none) {
  .parallax-bg { background-attachment: scroll; }
}