/* ============================================================
   感藏 GANCANG · 设计系统
   气质：当代艺术编辑部 × 可信收藏服务
   底色暖白 / 正文炭黑 / 低饱和中性 / 单一暗金强调色
   ============================================================ */

:root {
  --paper: #F6F3EE;
  --paper-2: #EFEAE1;
  --paper-3: #E7E1D5;
  --ink: #1B1A18;
  --ink-2: #3A3935;
  --muted: #8A867E;
  --line: #E0D9CC;
  --line-strong: #C9C1B2;
  --accent: #9A7B4F;
  --accent-deep: #7C6240;
  --accent-soft: #EFE6D8;
  --success: #5D7A5A;
  --danger: #A2534F;
  --warning: #B0883F;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(27, 26, 24, .04);
  --shadow: 0 12px 32px rgba(27, 26, 24, .08);
  --shadow-lg: 0 24px 64px rgba(27, 26, 24, .12);
  --radius: 2px;
  --radius-lg: 6px;
  --font-serif: Georgia, "Times New Roman", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Segoe UI", "Helvetica Neue", sans-serif;
  --container: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

::selection { background: var(--accent-soft); color: var(--ink); }

/* ===== 排版 ===== */
h1, h2, h3, h4, .serif {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.25;
}
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(26px, 3.6vw, 40px); }
h3 { font-size: clamp(20px, 2.6vw, 26px); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead { font-size: 17px; color: var(--ink-2); line-height: 1.85; }
.small { font-size: 12.5px; color: var(--muted); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }
.section { padding: clamp(56px, 8vw, 112px) 0; }
.section--tight { padding: clamp(32px, 5vw, 64px) 0; }

/* ===== 顶部导航 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 243, 238, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: .18em;
  display: flex; align-items: baseline; gap: 10px;
}
.brand .brand-sub { font-family: var(--font-sans); font-size: 10px; letter-spacing: .3em; color: var(--muted); }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); }
.nav-links a {
  font-size: 13.5px; letter-spacing: .06em; color: var(--ink-2);
  position: relative; padding: 6px 0; transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent);
}
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-burger { display: none; background: none; border: none; font-size: 20px; color: var(--ink); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px;
  font-size: 13px; letter-spacing: .12em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all .22s ease;
  background: transparent;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent-deep); }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-deep); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn--sm { padding: 9px 18px; font-size: 12px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--danger { color: var(--danger); border-color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: #fff; }

/* ===== 表单 ===== */
.field { margin-bottom: 20px; }
.field label {
  display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 8px;
}
.input, .select, .textarea {
  width: 100%;
  padding: 13px 15px;
  font-size: 14.5px;
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(154, 123, 79, .12);
}
.textarea { min-height: 110px; resize: vertical; }
.field-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-error { color: var(--danger); font-size: 12.5px; margin-top: 6px; }

/* ===== 标签 ===== */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; letter-spacing: .05em;
  padding: 4px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  color: var(--ink-2);
  background: transparent;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag--mood { border-color: rgba(154, 123, 79, .4); color: var(--accent-deep); }
.tag--style { color: var(--ink-2); }
.tag--ai { border-style: dashed; color: var(--muted); }
.tag--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ===== 徽标 ===== */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: .16em;
  padding: 5px 12px;
  border-radius: 100px;
}
.badge--platform { background: var(--ink); color: var(--paper); }
.badge--partner { background: var(--accent-soft); color: var(--accent-deep); border: 1px solid rgba(154, 123, 79, .35); }
.badge--outline { border: 1px solid var(--line-strong); color: var(--muted); }

/* ===== 作品卡片 ===== */
.art-card { display: block; }
.art-card__frame {
  position: relative; overflow: hidden;
  background: var(--paper-2);
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
}
.art-card__frame img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .55s ease, transform .6s cubic-bezier(.2,.6,.2,1);
}
.art-card__frame img.loaded { opacity: 1; }
.art-card:hover .art-card__frame img { transform: scale(1.045); }
.art-card__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.art-card__meta { padding-top: 16px; }
.art-card__title { font-family: var(--font-serif); font-size: 17px; letter-spacing: .02em; }
.art-card__artist { font-size: 12.5px; color: var(--muted); margin-top: 2px; letter-spacing: .04em; }
.art-card__foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 10px; }
.art-card__price { font-family: var(--font-serif); font-size: 15px; }
.art-card__price .cn { font-family: var(--font-sans); font-size: 12px; color: var(--muted); }
.art-card__mood { display: flex; flex-wrap: nowrap; gap: 5px; margin-top: 10px; overflow: hidden; }

/* ===== 网格 ===== */
.grid { display: grid; gap: clamp(20px, 3vw, 32px); }
.grid--works { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ===== 区块头 ===== */
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { margin: 14px 0 12px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ===== 分隔 ===== */
.hr { height: 1px; background: var(--line); border: none; margin: 0; }

/* ===== 页脚 ===== */
.footer { background: var(--ink); color: rgba(246, 243, 238, .72); padding: clamp(48px, 6vw, 80px) 0 40px; }
.footer a { color: rgba(246, 243, 238, .72); }
.footer a:hover { color: #fff; }
.footer .brand { color: #fff; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer h4 { font-family: var(--font-sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(246,243,238,.5); margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; font-size: 13.5px; }
.footer-bottom { border-top: 1px solid rgba(246,243,238,.14); padding-top: 24px; font-size: 12px; color: rgba(246,243,238,.45); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ===== 提示 ===== */
.alert { padding: 14px 18px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 20px; }
.alert--info { background: var(--accent-soft); color: var(--accent-deep); }
.alert--danger { background: #F5E9E7; color: var(--danger); }
.alert--success { background: #E8EFE6; color: var(--success); }

/* ===== 空状态 / 加载 ===== */
.empty { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty .glyph { font-size: 34px; opacity: .4; display: block; margin-bottom: 12px; }
.skeleton {
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper-3) 50%, var(--paper-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== 页头（内页）===== */
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 40px); }
.page-head h1 { margin-top: 12px; }
.page-head .desc { max-width: 620px; margin-top: 14px; color: var(--ink-2); }

/* ===== 过渡 ===== */
.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 20px clamp(20px, 4vw, 48px); gap: 14px;
  }
  .nav-burger { display: block; }
  .grid--3, .grid--4, .footer-top { grid-template-columns: 1fr; }
  .grid--works { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
