/* ============================================================
   HELEN — 印象旅行漫画
   设计语言来自作品本身：米色纸张、水墨、邮戳、印章红。
   一切装饰都为画面让路。
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* 色彩：纸与墨 */
  --paper: #F5EFE2;
  --paper-soft: #F1EAD9;
  --paper-card: #FBF7EC;
  --ink: #2B2620;
  --ink-soft: #7C7365;
  --ink-faint: #B3A896;
  --seal: #BC4327;
  --seal-soft: rgba(188, 67, 39, .12);
  --line: rgba(43, 38, 32, .14);
  --line-strong: rgba(43, 38, 32, .26);
  --glass: rgba(245, 239, 226, .82);

  /* 动效 */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur-s: 500ms;
  --dur-m: 900ms;
  --dur-l: 1300ms;

  /* 版式 */
  --max: 1560px;
  --body-w: 720px;
  --sp-1: 8px;  --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-5: 48px; --sp-6: 64px; --sp-7: 96px; --sp-8: 128px;
  --sp-9: 168px;

  --serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --mono: 'IBM Plex Mono', 'Menlo', monospace;
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
svg { display: block; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 纸张肌理：铺在最上层但不挡交互 */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--seal); color: var(--paper); }

/* ---------- 字体样式 ---------- */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: .02em; line-height: 1.28; }

.type-display {
  font-size: clamp(2.05rem, 5.6vw, 4.6rem);
  font-weight: 600;
  letter-spacing: .06em;
  line-height: 1.3;
}
.type-h1 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: .05em; }
.type-h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: .04em; }
.type-h3 { font-size: clamp(1.1rem, 1.5vw, 1.35rem); font-weight: 500; }

.type-eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.type-eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--seal);
  border-radius: 50%;
  flex: none;
}

.type-body {
  font-size: 1.02rem;
  line-height: 2.1;
  color: #464037;
}

.type-meta {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .08em;
  color: var(--ink-soft);
}

p + p { margin-top: 1.5em; }

/* ---------- 布局 ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--sp-5); }
.prose { max-width: var(--body-w); margin: 0 auto; }
.section { padding: var(--sp-8) 0; }
.section-tight { padding: var(--sp-7) 0; }

@media (max-width: 900px) {
  .container { padding: 0 var(--sp-3); }
  .section { padding: var(--sp-7) 0; }
  .section-tight { padding: var(--sp-6) 0; }
}

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity var(--dur-m) var(--ease), transform var(--dur-m) var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-1 { transition-delay: 90ms; }
.reveal-2 { transition-delay: 180ms; }
.reveal-3 { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 加载动画 ---------- */
.loader {
  position: fixed; inset: 0;
  background: var(--paper);
  z-index: 10000;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--sp-4);
  transition: opacity var(--dur-l) var(--ease), visibility var(--dur-l) var(--ease);
}
.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader-seal {
  width: 64px; height: 64px;
  border: 2px solid var(--seal);
  color: var(--seal);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 600;
  letter-spacing: 0;
  transform: rotate(-4deg);
  animation: sealIn 900ms var(--ease) both;
}
@keyframes sealIn {
  0% { opacity: 0; transform: rotate(-4deg) scale(1.35); }
  60% { opacity: 1; transform: rotate(-4deg) scale(.96); }
  100% { opacity: 1; transform: rotate(-4deg) scale(1); }
}
.loader-mark {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .5em;
  color: var(--ink-soft);
  text-indent: .5em;
}
.loader-track {
  width: 150px; height: 1px;
  background: var(--line);
  overflow: hidden;
}
.loader-progress {
  height: 100%; width: 0%;
  background: var(--ink);
  transition: width 1200ms var(--ease);
}

/* ---------- 阅读进度 ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  z-index: 600;
  transform-origin: left;
  transform: scaleX(0);
  background: var(--seal);
}

/* ---------- 导航 ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 500;
  padding: var(--sp-3) var(--sp-5);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease),
              padding var(--dur-s) var(--ease), backdrop-filter var(--dur-s) var(--ease);
}
.nav.is-solid {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: var(--sp-2);
  padding-bottom: var(--sp-2);
}
.nav-mark {
  display: inline-flex; align-items: baseline; gap: 12px;
  font-family: var(--mono);
  font-size: .95rem; font-weight: 500;
  letter-spacing: .34em;
}
.nav-mark .seal-dot {
  width: 20px; height: 20px;
  background: var(--seal);
  color: var(--paper);
  font-family: var(--serif);
  font-size: .68rem; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  transform: rotate(-4deg) translateY(2px);
}
.nav-links { display: flex; gap: var(--sp-5); }
.nav-links a {
  font-size: .88rem;
  letter-spacing: .18em;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-s) var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: var(--seal);
  transition: right var(--dur-s) var(--ease);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.is-active::after { right: 0; }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav { padding: var(--sp-2) var(--sp-3); }
  .nav-links { display: none; }
  .nav-toggle {
    display: block;
    position: relative;
    z-index: 450;
    font-family: var(--mono);
    font-size: .74rem;
    letter-spacing: .2em;
    border: 1px solid var(--line-strong);
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--paper);
  }
  .nav-links.is-open {
    display: flex;
    position: fixed; inset: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: var(--sp-4);
    z-index: 400;
  }
  .nav-links.is-open a { font-size: 1.4rem; color: var(--ink); letter-spacing: .3em; }
}

/* ---------- 按钮与链接 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: .9rem;
  letter-spacing: .22em;
  padding: 14px 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: background var(--dur-s) var(--ease), color var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease);
}
.btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--seal:hover { background: var(--seal); border-color: var(--seal); }

.link-underline { position: relative; display: inline-block; }
.link-underline::after {
  content: '';
  position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%;
  background: currentColor;
  transform: scaleX(1); transform-origin: right;
  transition: transform var(--dur-s) var(--ease);
}
.link-underline:hover::after { transform: scaleX(0); transform-origin: left; }

.magnetic { display: inline-block; }

/* ---------- 首页主视觉 ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  position: relative;
  padding: var(--sp-8) var(--sp-4) var(--sp-7);
  overflow: hidden;
}
.hero-inner { position: relative; max-width: 980px; }
.hero-eyebrow { margin-bottom: var(--sp-4); justify-content: center; }
.hero-line { position: relative; z-index: 1; }
.hero-line em {
  font-style: normal;
  color: var(--seal);
}
.hero-sub {
  margin-top: var(--sp-4);
  color: var(--ink-soft);
  font-size: 1.02rem;
  letter-spacing: .12em;
}
.hero-meta {
  margin-top: var(--sp-3);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--ink-faint);
}

/* 旋转邮戳 */
.hero-stamp {
  position: absolute;
  right: clamp(8px, 6vw, 120px);
  top: clamp(96px, 16vh, 180px);
  width: 148px; height: 148px;
  opacity: .8;
  animation: stampSpin 40s linear infinite;
  pointer-events: none;
}
.hero-stamp text {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 3.5px;
  fill: var(--ink-soft);
}
.hero-stamp .stamp-ring { stroke: var(--ink-soft); }
.hero-stamp .stamp-core { fill: var(--seal); }
@keyframes stampSpin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .hero-stamp { width: 104px; height: 104px; top: 100px; } }

/* 竖排侧注 */
.hero-vertical {
  position: absolute;
  left: clamp(8px, 5vw, 100px);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-size: .82rem;
  letter-spacing: .5em;
  color: var(--ink-faint);
  pointer-events: none;
}
@media (max-width: 900px) { .hero-vertical { display: none; } }

.scroll-indicator {
  position: absolute;
  bottom: var(--sp-5); left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: .3em;
  color: var(--ink-soft);
}
.scroll-indicator-line {
  width: 2px; height: 58px;
  background: var(--line-strong);
  position: relative; overflow: hidden;
}
.scroll-indicator-line::after {
  content: '';
  position: absolute; left: 0; top: -100%; width: 100%; height: 100%;
  background: var(--seal);
  animation: scrollLine 2.4s var(--ease) infinite;
}
@keyframes scrollLine {
  0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; }
}

/* ---------- 画廊（错落网格 + 明信片框） ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7) var(--sp-5);
}
.gallery-item { grid-column: auto; }

@media (min-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(12, 1fr); }
  .gallery-item { grid-column: span 12; }
}

@media (min-width: 900px) {
  .gallery-item.g-xl { grid-column: span 7; }
  .gallery-item.g-lg { grid-column: span 8; }
  .gallery-item.g-md { grid-column: span 5; }
  .gallery-item.g-sm { grid-column: span 4; }
  .gallery-item.g-wide { grid-column: span 12; }
  .gallery-item.g-offset { margin-top: var(--sp-8); }
}

.work-card { display: block; }

/* 明信片式画框 */
.work-card-frame {
  position: relative;
  background: var(--paper-card);
  border: 1px solid var(--line);
  padding: 12px;
  box-shadow: 0 1px 0 rgba(43,38,32,.04), 0 12px 40px rgba(43,38,32,.07);
  transition: transform var(--dur-m) var(--ease), box-shadow var(--dur-m) var(--ease);
}
.work-card-frame > .frame-clip { overflow: hidden; }
.work-card-frame img {
  width: 100%; height: auto;
  transition: transform var(--dur-l) var(--ease);
}
.work-card:hover .work-card-frame {
  transform: translateY(-6px);
  box-shadow: 0 1px 0 rgba(43,38,32,.04), 0 30px 70px rgba(43,38,32,.13);
}
.work-card:hover .work-card-frame img { transform: scale(1.02); }

/* 卡片角落的邮票齿孔小标 */
.work-card-frame::after {
  content: attr(data-no);
  position: absolute;
  top: -12px; right: 18px;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .18em;
  color: var(--seal);
  background: var(--paper);
  border: 1px dashed var(--seal);
  padding: 4px 10px;
  transform: rotate(2deg);
  opacity: 0;
  transition: opacity var(--dur-s) var(--ease), transform var(--dur-s) var(--ease);
}
.work-card:hover .work-card-frame::after {
  opacity: 1;
  transform: rotate(-1deg) translateY(-2px);
}

.work-card-meta {
  margin-top: var(--sp-3);
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--sp-2);
  padding: 0 4px;
}
.work-card-title {
  font-size: 1.12rem; font-weight: 500; letter-spacing: .08em;
}
.work-card-tags {
  font-family: var(--mono);
  color: var(--ink-soft);
  font-size: .72rem; letter-spacing: .1em;
  white-space: nowrap;
}

/* 图片载入：淡入 + 由虚到实 */
img.img-reveal {
  opacity: 0;
  filter: blur(12px);
  transition: opacity var(--dur-m) var(--ease), filter var(--dur-m) var(--ease),
              transform var(--dur-l) var(--ease);
}
img.img-reveal.is-loaded { opacity: 1; filter: blur(0); }

/* ---------- 引言块 ---------- */
.statement-wrap { position: relative; }
.statement {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  font-size: clamp(1.4rem, 2.8vw, 2.3rem);
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: .06em;
}
.statement .seal-inline {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.5em; height: 1.5em;
  background: var(--seal);
  color: var(--paper);
  font-size: .55em;
  transform: rotate(-6deg) translateY(-.2em);
  margin-left: .4em;
}

/* ---------- 页脚 ---------- */
.footer {
  padding: var(--sp-8) 0 var(--sp-5);
  text-align: center;
  border-top: 1px solid var(--line);
  position: relative;
}
.footer-line {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 500; letter-spacing: .1em;
  margin-bottom: var(--sp-6);
}
.footer-meta {
  display: flex; justify-content: center; flex-wrap: wrap; gap: var(--sp-4);
  font-family: var(--mono);
  color: var(--ink-faint);
  font-size: .74rem; letter-spacing: .1em;
}

/* ---------- 详情页 ---------- */
.detail-hero-content {
  padding: calc(var(--sp-9)) var(--sp-4) var(--sp-6);
  text-align: center;
}
.detail-vol {
  font-family: var(--mono);
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .3em;
  color: var(--seal);
  border: 1px solid var(--seal);
  padding: 6px 16px;
  transform: rotate(-1.5deg);
  margin-bottom: var(--sp-4);
}
.detail-sub {
  margin-top: var(--sp-3);
  color: var(--ink-soft);
  letter-spacing: .14em;
}

.detail-hero {
  display: flex; justify-content: center;
  padding: 0 var(--sp-4) var(--sp-7);
}
.detail-hero .work-card-frame {
  max-width: min(820px, 100%);
}
.detail-hero .work-card-frame img { max-height: 84vh; width: auto; margin: 0 auto; }

.detail-meta-row {
  display: flex; flex-wrap: wrap; gap: var(--sp-6) var(--sp-7);
  justify-content: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--sp-5) var(--sp-4);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.detail-meta-row div { text-align: center; }
.detail-meta-row div span { display: block; }
.detail-meta-row .type-meta { margin-bottom: 6px; }

.detail-body { padding: var(--sp-7) 0; }

.detail-spread { margin: var(--sp-7) auto 0; max-width: 820px; }
.detail-spread .work-card-frame { padding: 10px; }
.detail-spread-caption { margin-top: var(--sp-2); text-align: center; }

.detail-nav {
  display: flex; justify-content: space-between; gap: var(--sp-4);
  border-top: 1px solid var(--line);
  padding-top: var(--sp-6);
  padding-bottom: var(--sp-6);
}
.detail-nav a { max-width: 45%; }
.detail-nav .dir { display: block; margin-bottom: var(--sp-1); }
.detail-nav .to-right { text-align: right; }

/* ---------- 关于页 ---------- */
.about-grid {
  display: grid; grid-template-columns: 1fr; gap: var(--sp-7);
}
@media (min-width: 900px) {
  .about-grid { grid-template-columns: .85fr 1.15fr; align-items: start; }
  .about-portrait { position: sticky; top: 130px; }
}
.about-portrait .work-card-frame { transform: rotate(-1deg); }

.process-list { counter-reset: step; display: grid; gap: var(--sp-4); margin-top: var(--sp-5); }
.process-list li {
  counter-increment: step;
  display: grid; grid-template-columns: 64px 1fr; gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-top: 1px solid var(--line);
}
.process-list li::before {
  content: '0' counter(step);
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--seal);
}
.process-list h3 { margin-bottom: 8px; }

.timeline { border-top: 1px solid var(--line); margin-top: var(--sp-5); }
.timeline-item {
  display: grid; grid-template-columns: 130px 1fr; gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
}
.timeline-year { font-family: var(--mono); font-size: .82rem; letter-spacing: .1em; color: var(--seal); padding-top: 4px; }
@media (max-width: 640px) { .timeline-item { grid-template-columns: 84px 1fr; } }

/* ---------- 日记页 ---------- */
.journal-list { display: grid; gap: var(--sp-7); }
.journal-item {
  display: grid; grid-template-columns: 300px 1fr;
  gap: var(--sp-6);
  align-items: center;
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) { .journal-item { grid-template-columns: 1fr; gap: var(--sp-4); } }
.journal-item .work-card-frame { padding: 8px; }
.journal-item img { aspect-ratio: 4/3; object-fit: cover; object-position: top; width: 100%; }
.journal-date { margin-bottom: var(--sp-2); color: var(--seal); }

/* ---------- 联系页 ---------- */
.contact-hero {
  min-height: 72vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  gap: var(--sp-5);
  padding: var(--sp-9) var(--sp-4) var(--sp-7);
}
.contact-list { display: flex; flex-direction: column; gap: var(--sp-3); align-items: center; }
.contact-list a { font-size: clamp(1.2rem, 2.6vw, 1.9rem); font-weight: 500; letter-spacing: .06em; }
.contact-note { max-width: 460px; }

/* ---------- 自定义光标 ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot { width: 6px; height: 6px; background: var(--seal); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(188, 67, 39, .55);
  transition: width 300ms var(--ease), height 300ms var(--ease), opacity 200ms var(--ease);
}
.cursor-ring.is-active { width: 60px; height: 60px; }
body.has-custom-cursor, body.has-custom-cursor a, body.has-custom-cursor button { cursor: none; }
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- 工具类 ---------- */
.center { text-align: center; }
.mt-1 { margin-top: var(--sp-1); } .mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); } .mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }

.skip-link {
  position: fixed; top: -60px; left: var(--sp-3);
  background: var(--ink); color: var(--paper);
  padding: 10px 18px; z-index: 10001;
  transition: top var(--dur-s) var(--ease);
}
.skip-link:focus { top: var(--sp-3); }

:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
