/* ============================================================
   古典画廊 — Awwwards 风格设计系统
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Color Palette: Classical Gallery */
  --bg-deep: #14110e;
  --bg-primary: #1a1612;
  --bg-surface: #221d17;
  --bg-elevated: #2a241c;
  --bg-muted: #1e1a14;

  --text-primary: #f2ece0;
  --text-secondary: #c4b89e;
  --text-muted: #8a7c68;
  --text-dim: #5a5040;

  --accent: #c9a050;
  --accent-light: #e0c878;
  --accent-dark: #a07828;
  --accent-glow: rgba(201, 160, 80, 0.25);

  --gold-gradient: linear-gradient(135deg, #c9a050 0%, #e0c878 30%, #a07828 70%, #c9a050 100%);
  --gold-line: linear-gradient(90deg, transparent, #c9a050, transparent);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-gold: rgba(201, 160, 80, 0.2);
  --border-gold-hover: rgba(201, 160, 80, 0.5);

  /* Typography */
  --font-display: 'Playfair Display', 'Noto Serif SC', 'STSong', Georgia, 'Times New Roman', serif;
  --font-body: 'Cormorant Garamond', 'Noto Serif SC', 'STSong', Georgia, serif;
  --font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  --font-classical: 'Cinzel', 'Playfair Display', 'Noto Serif SC', serif;

  /* Spacing & Sizing */
  --nav-height: 80px;
  --section-gap: 160px;
  --container-max: 1400px;
  --container-padding: clamp(24px, 5vw, 80px);

  /* Animation Easing */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quart: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out-quint: cubic-bezier(0.83, 0, 0.17, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  --dur-slow: 1.4s;
  --dur-medium: 0.9s;
  --dur-fast: 0.5s;
  --dur-instant: 0.25s;

  /* Z-index layers */
  --z-cursor: 9999;
  --z-lightbox: 1000;
  --z-nav: 100;
  --z-overlay: 50;
  --z-elevated: 10;
  --z-base: 1;
}

/* --- CSS Reset --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: default;
}

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

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

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* --- Grain Texture Overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* --- Typography --- */
h1, h2, h3, h4, .display-font {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-label {
  font-family: var(--font-classical);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: block;
}

/* --- Utility: Reveal animations (triggered by JS) --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade"] {
  transform: none;
}

[data-reveal="left"] {
  transform: translateX(-60px);
}

[data-reveal="left"].revealed {
  transform: translateX(0);
}

[data-reveal="right"] {
  transform: translateX(60px);
}

[data-reveal="right"].revealed {
  transform: translateX(0);
}

[data-reveal="scale"] {
  transform: scale(0.9);
}

[data-reveal="scale"].revealed {
  transform: scale(1);
}

/* --- Gold divider --- */
.gold-divider {
  width: 80px;
  height: 1px;
  background: var(--gold-line);
  margin: 0 auto;
}

.gold-divider.left {
  margin: 0;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--text-dim);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dark);
}

/* --- Selection --- */
::selection {
  background: var(--accent);
  color: var(--bg-deep);
}

/* --- Focus --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
