/* ==========================================================================
   无去来处 · 官网首页
   宣纸留白 / 墨黑朱砂 / 移动端优先（微信内置浏览器为主场景）
   约束：无构建工具、无框架、无外部图片（底纹全部 CSS + SVG 生成）
   ========================================================================== */

:root {
  --paper:        #f3ede1;   /* 宣纸 */
  --paper-warm:   #ece3d2;   /* 纸心微暖 */
  --paper-edge:   #ddd2bd;   /* 纸边 */
  --ink:          #1f1c18;   /* 浓墨 */
  --ink-soft:     #4a453c;   /* 淡墨 */
  --ink-faint:    #8c8477;   /* 墨灰 */
  --cinnabar:     #a8321e;   /* 朱砂 */
  --cinnabar-dim: #b8593f;

  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC",
           "Times New Roman", serif;
  --sans:  -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --gutter: 22px;
  --measure: 640px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ============================ 底纹 ============================ */

/* 纸纹：SVG 分形噪声，一次生成、平铺复用，不占网络请求 */
.paper-grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.22'/%3E%3C/svg%3E");
}

/* 墨晕：两团极淡的墨色晕染，用径向渐变实现（不加 blur，省 GPU） */
.ink-wash {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ink {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: 0.55;
}

.ink-1 {
  width: 88vw;
  height: 88vw;
  top: -26vw;
  right: -32vw;
  background: radial-gradient(circle at 50% 50%,
              rgba(58, 52, 44, 0.13) 0%,
              rgba(58, 52, 44, 0.06) 42%,
              rgba(58, 52, 44, 0) 68%);
}

.ink-2 {
  width: 74vw;
  height: 74vw;
  bottom: -20vw;
  left: -28vw;
  background: radial-gradient(circle at 50% 50%,
              rgba(168, 50, 30, 0.07) 0%,
              rgba(168, 50, 30, 0.03) 45%,
              rgba(168, 50, 30, 0) 70%);
}

/* ============================ 顶栏 ============================ */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 14px;
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

.topbar.is-solid {
  background: rgba(243, 237, 225, 0.86);
  box-shadow: 0 1px 0 rgba(31, 28, 24, 0.07);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
}

.brand {
  font-size: 17px;
  letter-spacing: 0.22em;
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 20px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.nav a { padding: 4px 0; position: relative; }

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--cinnabar);
  transition: right 0.3s ease;
}

.nav a:active::after,
.nav a:hover::after { right: 0; }

/* ============================ 首屏 ============================ */

.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px var(--gutter) 96px;
  text-align: center;
}

.hero-inner { max-width: 560px; }

.hero-eyebrow {
  margin: 0 0 26px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: var(--ink-faint);
  animation: fade-up 1s 0.1s both;
}

.hero-title {
  margin: 0;
  font-size: clamp(44px, 15vw, 88px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  animation: fade-up 1.1s 0.22s both;
}

/* 标题下的朱砂细线：一竖一横，取「印」的意象 */
.hero-title::after {
  content: "";
  display: block;
  width: 1px;
  height: 34px;
  margin: 30px auto 0;
  background: linear-gradient(to bottom, var(--cinnabar) 0%, rgba(168, 50, 30, 0) 100%);
  animation: grow-line 0.9s 0.7s both;
}

.hero-quote {
  margin: 30px 0 0;
  font-size: clamp(15px, 4.1vw, 19px);
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  color: var(--ink-soft);
  animation: fade-up 1s 0.5s both;
}

.hero-sub {
  margin: 10px 0 0;
  font-size: clamp(13px, 3.6vw, 15px);
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  color: var(--ink-faint);
  animation: fade-up 1s 0.62s both;
}

.hero-more {
  position: absolute;
  bottom: calc(30px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: fade-up 1s 1s both;
}

.hero-more-line {
  display: block;
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, rgba(31, 28, 24, 0) 0%, rgba(31, 28, 24, 0.4) 100%);
  transform-origin: top;
  animation: scroll-hint 2.4s ease-in-out infinite;
}

.hero-more-text {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  color: var(--ink-faint);
}

/* ============================ 通用版块 ============================ */

.section {
  position: relative;
  z-index: 1;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 76px var(--gutter) 84px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--paper-edge);
}

.section-no {
  font-size: 12px;
  color: var(--cinnabar);
  letter-spacing: 0.1em;
}

.section-title {
  margin: 0;
  font-size: clamp(19px, 5vw, 22px);
  font-weight: 400;
  letter-spacing: 0.12em;
}

.section-desc {
  margin: 0 0 0 auto;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  font-family: var(--sans);
  text-align: right;
}

.lead {
  margin: 0 0 1.4em;
  font-size: clamp(15px, 4.2vw, 17px);
  line-height: 2.15;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
  text-align: justify;
}

.lead:last-child { margin-bottom: 0; }

/* ============================ 五阶次第 ============================ */

.stages { margin-top: 52px; }

.stages-caption {
  margin: 0 0 20px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--ink-faint);
}

.stages-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--paper-edge);
  border: 1px solid var(--paper-edge);
}

.stages-list li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  background: var(--paper-warm);
}

.stage-no {
  font-size: 11px;
  color: var(--cinnabar);
  letter-spacing: 0.1em;
}

.stage-name {
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.stage-note {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ============================ 纲领 ============================ */

.motto {
  margin-top: 46px;
  padding-left: 16px;
  border-left: 2px solid var(--cinnabar);
}

.motto p {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  line-height: 2;
}

.motto p:last-child { color: var(--ink-faint); }

/* ============================ 作品 ============================ */

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 14px;
}

.work-card {
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.work-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--paper-warm);
  border: 1px solid var(--paper-edge);
  box-shadow: 0 2px 10px rgba(31, 28, 24, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

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

.work-card:active .work-cover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(31, 28, 24, 0.12);
}

/* 无封面时的仿古书封：磁青布面书衣 + 左上题签 + 朱砂小印
 * （线装书意象：深蓝布面、题签竖排书名、印钤在题签下端） */
.work-blank {
  position: absolute;
  inset: 0;
  background:
    /* 布面细织纹 */
    repeating-linear-gradient(0deg,
      rgba(255, 255, 255, 0.035) 0px, rgba(255, 255, 255, 0.035) 1px,
      transparent 1px, transparent 3px),
    repeating-linear-gradient(90deg,
      rgba(0, 0, 0, 0.05) 0px, rgba(0, 0, 0, 0.05) 1px,
      transparent 1px, transparent 3px),
    radial-gradient(130% 95% at 50% 28%,
      #3d5470 0%, #2e415a 52%, #232f40 100%);
}

/* 内圈浅色细线：函套包边的意象 */
.work-blank::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(240, 231, 209, 0.22);
  pointer-events: none;
}

/* 题签：左上角竖贴的纸条 */
.work-label {
  position: absolute;
  top: 8%;
  left: 10%;
  width: 32%;
  height: 62%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14% 0 9%;
  background: linear-gradient(180deg, #f8f0dd 0%, #f1e6cd 70%, #e9dcbf 100%);
  border: 1px solid #a2937352;
  outline: 1px solid rgba(34, 48, 64, 0.5);
  box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.38);
}

/* 题签纸面上淡淡的竖帘纹 */
.work-label::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(90deg,
    rgba(140, 122, 88, 0.07) 0px, rgba(140, 122, 88, 0.07) 1px,
    transparent 1px, transparent 4px);
}

.work-blank-title {
  writing-mode: vertical-rl;
  font-size: 15px;
  letter-spacing: 0.16em;
  color: #241f19;
  line-height: 1.4;   /* 列间距：长书名换列时更省宽度 */
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* 朱砂印：钤在题签下端 */
.work-blank-seal {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--cinnabar);
  color: #f6eeda;
  font-size: 10px;
  line-height: 17px;
  text-align: center;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  position: relative;
  z-index: 1;
}

.work-title {
  margin: 11px 0 0;
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  color: var(--ink);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.work-meta {
  margin: 3px 0 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.works-hint {
  margin: 34px 0 0;
  padding: 26px 18px;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  border: 1px dashed var(--paper-edge);
}

/* ============================ 页脚 ============================ */

.footer {
  position: relative;
  z-index: 1;
  padding: 52px var(--gutter) calc(46px + env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1px solid var(--paper-edge);
}

.footer-brand {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: var(--ink-soft);
}

.footer-line {
  margin: 10px 0 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}

.footer-meta {
  margin: 22px 0 0;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  opacity: 0.8;
}

/* 备案号链接：与正文同色，仅下划线提示可点 */
.footer-meta .icp {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}

/* ============================ 动效 ============================ */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@keyframes grow-line {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

@keyframes scroll-hint {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 0.9; }
}

/* ============================ 响应式 ============================ */

@media (min-width: 600px) {
  .works-grid { grid-template-columns: repeat(3, 1fr); gap: 22px 18px; }
  .work-blank-title { font-size: 17px; }
}

@media (min-width: 960px) {
  :root { --measure: 720px; }
  .works-grid { grid-template-columns: repeat(4, 1fr); }
  .section { padding-top: 96px; padding-bottom: 104px; }
  .work-card:hover .work-cover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(31, 28, 24, 0.13);
  }
}

/* 尊重系统「减弱动态效果」 */
@media (max-width: 599px) {
  /* 窄屏下说明文字让标题独占一行：移到标题下方左对齐 */
  .section-head { flex-wrap: wrap; }
  .section-desc { flex-basis: 100%; margin: 4px 0 0; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
