/* ============================================================
   书画家个人网站 · 水墨风
   严格对应 Ardot 设计稿：布局 / 配色 / 圆角 / 间距
   设计稿画布 1440px，内容区 1200px（两侧 120px）
   字体：LXGW WenKai TC（霞鹜文楷）
   ============================================================ */

:root {
  --ink-950: #141A1B;  /* footer 底 */
  --ink-900: #1B2224;  /* header / hero / contact 底 */
  --ink-800: #232D2F;  /* 联系卡片 */
  --ink-line: #5A666A; /* 次级按钮描边 */
  --paper: #F4EFE3;    /* 宣纸 */
  --paper-light: #FBF8F1; /* 关于浅底 */
  --vermilion: #B5341F;   /* 朱红印章 */
  --t-dark: #2B2B2B;   /* 深色标题 */
  --t-body: #4A463E;   /* 正文 */
  --t-muted: #6E6A60;  /* 弱化 */
  --t-dim: #9A948A;    /* 深底弱化 */
  --t-faint: #5A564E;  /* 版权 */
  --cream-1: #F4EFE3;
  --cream-2: #E8E2D4;  /* 导航文字 */
  --cream-3: #D8CFBC;  /* 副标题 */
  --cream-4: #C9C2B2;  /* 简介文字 */
  /* 首屏姓名金色渐变（设计稿 GRADIENT_LINEAR，自下而上） */
  --gold-1: #FCE6A8;
  --gold-2: #DEB052;
  --gold-3: #B5802E;
  --font-kai: 'LXGW WenKai TC', 'LXGW WenKai', '霞鹜文楷', 'STKaiti', 'Kaiti SC', 'KaiTi', '楷体', '楷体_GB2312', serif;
  --gap-grid: 24px;
  --row-target: 300px; /* 画廊行高基准 */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-kai);
  background: var(--paper);
  color: var(--t-body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; background: none; border: 0; cursor: pointer; }

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: 120px;
  padding-right: 120px;
}

/* ---------- 印章 ---------- */
.seal { display: inline-block; flex: none; }
.seal text { font-family: var(--font-kai); }
.seal-36 { width: 36px; height: 36px; }
.seal-32 { width: 32px; height: 32px; }

/* ============================================================
   Header —— 高 80 / 深墨底
   ============================================================ */
.site-header { background: var(--ink-900); }
.header-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-name { font-size: 22px; font-weight: 700; color: var(--cream-1); }
.nav { display: flex; align-items: center; gap: 40px; }
.nav a { font-size: 17px; color: var(--cream-2); }
.nav a:hover { color: var(--cream-1); }
.btn-nav {
  padding: 8px 18px;
  border-radius: 4px;
  background: var(--vermilion);
  color: var(--cream-1) !important;
  font-size: 15px;
}
.btn-nav:hover { filter: brightness(1.08); }

/* ============================================================
   Hero —— 高 760 / 内边距 90 120 / 深墨底
   ============================================================ */
.hero { background: var(--ink-900); position: relative; overflow: hidden; }
.hero-inner {
  min-height: 760px;
  padding-top: 90px;
  padding-bottom: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  z-index: 1;
}
.hero-left { width: 620px; max-width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }

/* 姓名：金色渐变（设计稿自下而上） */
.hero-title {
  font-size: 96px;
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(to top, var(--gold-1) 0%, var(--gold-2) 48%, var(--gold-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.hero-tagline { font-size: 30px; color: var(--cream-3); }
.hero-intro { font-size: 18px; line-height: 32px; color: var(--cream-4); max-width: 560px; }
.hero-ctas { display: flex; align-items: center; gap: 20px; }
.btn {
  padding: 14px 34px;
  border-radius: 4px;
  font-size: 17px;
  display: inline-block;
}
.btn-primary { background: var(--vermilion); color: var(--cream-1); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--ink-line); color: var(--cream-3); }
.btn-ghost:hover { color: var(--cream-1); border-color: var(--cream-3); }

/* 右侧卷轴展示位（《吉禽》） */
.hero-scroll {
  width: 360px; flex: none;
  background: var(--paper);
  border-radius: 2px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 24px 48px -10px rgba(0, 0, 0, 0.45);
}
.hero-art {
  display: block; width: 100%; height: 500px;
  border-radius: 2px; overflow: hidden;
  background: var(--paper);
  cursor: zoom-in;
}
.hero-art img {
  width: 100%; height: 100%;
  object-fit: contain; /* 完整呈现原作，不裁切 */
  transition: transform .35s ease;
}
.hero-scroll figcaption {
  font-size: 14px; color: var(--t-muted); text-align: center;
}
.hero-scroll:hover .hero-art img { transform: scale(1.015); }

/* 淡墨远山 */
.hero-mountains {
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 320px;
  opacity: 0.22; pointer-events: none;
}

/* ============================================================
   作品展示 —— 宣纸底 / 内边距 100 120 / 区块间距 48
   ============================================================ */
.works { background: var(--paper); }
.works-inner, .about-inner, .contact-inner { padding-top: 100px; padding-bottom: 100px; }
.works-inner { display: flex; flex-direction: column; gap: 48px; }

.section-header { display: flex; align-items: center; gap: 16px; }
.section-title { font-size: 40px; font-weight: 700; color: var(--t-dark); }
/* 设计稿字号 32；行高按 1.5 倍处理（设计稿 32/28 会导致行重叠） */
.section-desc { font-size: 32px; line-height: 48px; color: var(--t-muted); margin-top: -32px; }

/* 分类 */
.cat-block { display: flex; flex-direction: column; gap: 24px; }
.cat-title { font-size: 26px; font-weight: 700; color: var(--vermilion); }

/* 错落陈列（等高行 · 宽度随原作比例自适应） */
.justified { display: flex; flex-wrap: wrap; gap: var(--gap-grid); }
.justified.center { justify-content: center; }
.work { display: flex; flex-direction: column; gap: 12px; }
.work-thumb {
  display: block; width: 100%;
  border-radius: 2px; overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  background: var(--paper-light);
  cursor: zoom-in;
}
.work-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; /* 框比例 = 原作比例，cover 仅消除取整误差 */
  transition: transform .35s ease;
}
.work:hover .work-thumb img { transform: scale(1.02); }
.work figcaption { display: flex; flex-direction: column; gap: 4px; }
.work-title { font-size: 18px; font-weight: 700; color: var(--t-dark); }
.work-meta { font-size: 14px; color: var(--t-muted); }

/* ============================================================
   关于艺术家 —— 浅宣纸底 / 内边距 100 120 / 间距 64
   ============================================================ */
.about { background: var(--paper-light); }
.about-inner { display: flex; align-items: center; justify-content: space-between; gap: 64px; }

/* 相框宽 333 / 内图 300×400（与 600×800 原图等比，不裁切） */
.portrait-frame {
  width: 333px; flex: none;
  background: var(--paper);
  border-radius: 2px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 18px 36px -8px rgba(0, 0, 0, 0.15);
}
.portrait-img-box {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 2px; overflow: hidden;
}
.portrait-img-box img { width: 100%; height: 100%; object-fit: cover; }
.portrait-frame figcaption { font-size: 14px; color: var(--t-muted); text-align: center; }

.about-text { width: 680px; max-width: 100%; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.about-bio { font-size: 18px; line-height: 32px; color: var(--t-body); }
.about-stats { display: flex; align-items: center; gap: 48px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: 40px; font-weight: 700; color: var(--vermilion); line-height: 1.1; }
.stat-label { font-size: 15px; color: var(--t-muted); }

/* ============================================================
   合作联系 —— 深墨底 / 内边距 100 120 / 间距 40
   ============================================================ */
.contact { background: var(--ink-900); }
.contact-inner { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.contact-title { font-size: 44px; font-weight: 700; color: var(--cream-1); }
.contact-sub { font-size: 18px; color: var(--cream-4); }
.contact-cards { display: flex; align-items: center; justify-content: center; gap: 32px; flex-wrap: wrap; }
.contact-card {
  display: flex; align-items: center; gap: 16px;
  padding: 24px 36px;
  border-radius: 6px;
  background: var(--ink-800);
  transition: transform .25s ease;
}
.contact-card:hover { transform: translateY(-2px); }
.contact-icon { width: 28px; height: 28px; flex: none; }
.contact-text { display: flex; flex-direction: column; gap: 4px; }
.contact-label { font-size: 14px; color: var(--t-dim); }
/* 电话 / 邮箱数值：金色渐变，与首屏姓名一致 */
.contact-value {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(to top, var(--gold-1) 0%, var(--gold-2) 48%, var(--gold-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
   Footer —— 深墨底 / 大字「墨」水印
   ============================================================ */
.site-footer {
  background: var(--ink-950);
  min-height: 380px;
  padding: 56px 120px 40px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.footer-watermark {
  position: absolute; left: 0; right: 0; top: 62px;
  font-size: 260px; font-weight: 700; line-height: 1;
  text-align: center;
  color: #FFFFFF; opacity: 0.05;
  pointer-events: none;
}
.footer-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.footer-nav { display: flex; gap: 32px; }
.footer-nav a { font-size: 15px; color: var(--t-dim); }
.footer-nav a:hover { color: var(--cream-1); }
.footer-meta { font-size: 14px; color: var(--t-muted); }
.footer-copy { font-size: 13px; color: var(--t-faint); }

/* ============================================================
   Lightbox —— 全图查看（完整呈现 + 缩放 + 拖动）
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16, 20, 21, 0.96);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-stage {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
}
.lightbox-stage.zoomed { cursor: grab; }
.lightbox-stage.dragging { cursor: grabbing; }
#lightbox-img {
  max-width: 92vw; max-height: 86vh;
  width: auto; height: auto;
  object-fit: contain;         /* 完整未裁切 */
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-close {
  position: absolute; top: 24px; right: 28px; z-index: 2;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(244, 239, 227, 0.08);
  transition: background .2s ease;
}
.lightbox-close:hover { background: rgba(244, 239, 227, 0.18); }
.lightbox-close svg { width: 20px; height: 20px; }
.lightbox-hint {
  position: absolute; bottom: 24px; left: 0; right: 0;
  text-align: center;
  font-size: 14px; color: var(--t-dim);
  pointer-events: none;
}

/* ============================================================
   响应式（设计稿为 1440 桌面基准，以下为降级适配）
   ============================================================ */
@media (max-width: 1240px) {
  .container { padding-left: 48px; padding-right: 48px; }
  .site-footer { padding-left: 48px; padding-right: 48px; }
  .hero-inner { min-height: 0; padding-top: 72px; padding-bottom: 96px; }
  .hero-title { font-size: 72px; }
  .about-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 860px) {
  .container { padding-left: 24px; padding-right: 24px; }
  .site-footer { padding-left: 24px; padding-right: 24px; }
  .header-inner { flex-direction: column; height: auto; padding: 16px 0; gap: 12px; }
  .nav { gap: 20px; flex-wrap: wrap; justify-content: center; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 48px; }
  .hero-title { font-size: 56px; }
  .hero-tagline { font-size: 24px; }
  .hero-scroll { width: min(360px, 100%); }
  .section-title { font-size: 30px; }
  .section-desc { font-size: 22px; line-height: 34px; margin-top: -24px; }
  .works-inner, .about-inner, .contact-inner { padding-top: 64px; padding-bottom: 64px; }
  .contact-title { font-size: 32px; }
  .about-stats { gap: 32px; }
  .footer-watermark { font-size: 160px; }
}
