/* =====================================================
   时光邮局 · 品牌故事网站
   风格：岁月沉淀 · 温暖复古 · 书信质感
   配色：米白纸张 + 墨色文字 + 赭石暖棕 + 旧蓝点缀
   ===================================================== */

:root {
  /* ---- 纸张色系（暖调、有温度）---- */
  --paper-1: #f7f2e8;       /* 主背景：暖米白 */
  --paper-2: #f0ebe1;       /* 次背景：略深米色 */
  --paper-3: #e8e0d0;       /* 卡片/装饰：旧纸色 */
  --paper-line: rgba(80,60,40,0.08);  /* 纸张分界线 */

  /* ---- 文字色系（墨色、有书卷气）---- */
  --ink-1: #2c241b;          /* 主文字：深墨褐 */
  --ink-2: #5a4a38;          /* 次文字 */
  --ink-3: #8a7a68;          /* 辅助文字 */
  --ink-4: #b0a390;          /* 弱化文字 */

  /* ---- 强调色（赭石、旧蓝、朱砂）---- */
  --ochre: #a0522d;          /* 赭石：按钮、链接 */
  --ochre-light: #c97b4a;    /* 浅赭石：hover */
  --ochre-soft: #e8d5c4;     /* 赭石浅底 */
  --navy-old: #3a4a6b;      /* 旧蓝：点缀 */
  --navy-old-soft: #d0d8e8;  /* 旧蓝浅底 */
  --cinnabar: #b33a2a;      /* 朱砂：强调/邮戳 */
  --gold-warm: #b8893e;      /* 暖金：标签 */

  /* ---- 字体 ---- */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", "Georgia", serif;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-hand: "Kaiti SC", "STKaiti", "AR PL UKai CN", "KaiTi", "Georgia", cursive;

  /* ---- 动效 ---- */
  --ease: cubic-bezier(0.25, 0.8, 0.25, 1);
  --dur: 1000ms;
}

/* ========== Reset ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--paper-1);
  color: var(--ink-1);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.8;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--ochre-soft); color: var(--ink-1); }

/* ========== 容器 ========== */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 5rem;
  overflow: hidden;
}

/* 纸张纹理（用 SVG 噪点 + 渐变模拟） */
.paper-texture {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(160,82,45,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(58,74,107,0.04) 0%, transparent 50%),
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}
.paper-texture.light {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(160,82,45,0.05) 0%, transparent 60%),
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
}

/* ========== 通用排版 ========== */
.section-label {
  text-align: center;
  font-family: var(--font-serif);
  color: var(--ochre);
  letter-spacing: 0.5em;
  font-size: 0.82rem;
  margin-bottom: 0.8rem;
}
.section-title {
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4.2vw, 2.8rem);
  font-weight: 500;
  margin-bottom: 3.5rem;
  letter-spacing: 0.06em;
  color: var(--ink-1);
  line-height: 1.4;
}

/* ========== 导航栏 ========== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), padding var(--dur) var(--ease);
}
.nav.scrolled {
  background: rgba(247,242,232,0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 0.7rem 0;
  box-shadow: 0 1px 0 rgba(80,60,40,0.08), 0 2px 12px rgba(80,60,40,0.04);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-serif); font-size: 1.2rem; font-weight: 500; color: var(--ink-1); letter-spacing: 0.1em; }
.logo-icon { color: var(--ochre); display: flex; }
.logo-text { letter-spacing: 0.15em; }
.nav-links { display: flex; align-items: center; gap: 1.8rem; font-size: 0.9rem; }
.nav-links a { color: var(--ink-2); transition: color .25s; position: relative; }
.nav-links a:hover { color: var(--ochre); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 1px;
  background: var(--ochre); transform: scaleX(0); transition: transform .3s var(--ease); transform-origin: center;
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--ochre) !important;
  color: var(--paper-1) !important;
  padding: 0.5rem 1.2rem;
  border-radius: 2px;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: background .25s, transform .25s, box-shadow .25s;
}
.nav-cta:hover { background: var(--ochre-light) !important; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(160,82,45,0.3); color: var(--paper-1) !important; }
.nav-cta::after { display: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink-1); border-radius: 1px; transition: all .3s; }

/* ========== 第一屏 Hero ========== */
.hero {
  background: var(--paper-1);
  text-align: center;
  padding-top: 9rem;
}
.hero-content { position: relative; z-index: 2; max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }
.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  color: var(--ochre);
  text-transform: uppercase;
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeUp 1.2s var(--ease) 0.3s forwards;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.08em;
  color: var(--ink-1);
  margin-bottom: 1rem;
}
.hero-title .line { display: block; opacity: 0; transform: translateY(24px); animation: fadeUp 1.2s var(--ease) forwards; }
.hero-title .line:nth-child(1) { animation-delay: 0.5s; }
.hero-title .line:nth-child(2) { animation-delay: 0.85s; }
.hero-divider { margin: 0.5rem 0 1.2rem; color: var(--ochre); opacity: 0; animation: fadeUp 1.2s var(--ease) 1.1s forwards; }
.hero-sub {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--ink-2);
  letter-spacing: 0.25em;
  margin-bottom: 2.8rem;
  opacity: 0;
  animation: fadeUp 1.2s var(--ease) 1.3s forwards;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; opacity: 0; animation: fadeUp 1.2s var(--ease) 1.6s forwards; }
.hero-hint { margin-top: 2.8rem; font-size: 0.82rem; color: var(--ink-3); opacity: 0; animation: fadeUp 1.2s var(--ease) 1.9s forwards; font-family: var(--font-sans); }
.count { color: var(--ochre); font-weight: 600; font-family: var(--font-serif); font-size: 0.95rem; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: transform .25s, box-shadow .25s, background .25s, color .25s;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}
.btn-primary { background: var(--ochre); color: var(--paper-1); border-radius: 2px; }
.btn-primary:hover { background: var(--ochre-light); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(160,82,45,0.3); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1px solid var(--ink-4); border-radius: 2px; }
.btn-ghost:hover { border-color: var(--ochre); color: var(--ochre); }
.btn-large { padding: 1rem 2.6rem; font-size: 1.05rem; }

/* 邮戳装饰 */
.postmark { position: absolute; z-index: 1; color: var(--cinnabar); opacity: 0.35; }
.postmark-tl { top: 12%; left: 6%; transform: rotate(-18deg); }
.postmark-br { bottom: 14%; right: 7%; transform: rotate(12deg); }

/* ========== 第二屏 缘起 ========== */
.story { background: var(--paper-2); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.story-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 4rem; align-items: center; }
.story-text p { font-size: 1.05rem; line-height: 2.1; margin-bottom: 0.8rem; color: var(--ink-1); }
.story-text em { color: var(--ochre); font-style: italic; font-family: var(--font-serif); }
.story-punch { font-family: var(--font-serif); font-size: 1.2rem; color: var(--ochre); margin: 1.5rem 0 !important; letter-spacing: 0.05em; }
.story-text .channel { font-family: var(--font-hand); font-style: italic; color: var(--ink-1); }
.story-sign { margin-top: 2rem !important; color: var(--ink-3) !important; font-family: var(--font-hand); font-style: italic; font-size: 0.95rem; }

/* 旧日记本 */
.story-visual { display: flex; justify-content: center; position: relative; }
.old-diary {
  width: 220px;
  position: relative;
  perspective: 1200px;
  animation: gentleFloat 7s ease-in-out infinite;
}
.diary-spine {
  position: absolute; left: -6px; top: 4px; bottom: 4px; width: 10px;
  background: linear-gradient(90deg, #4a2818, #6b3a2a);
  border-radius: 3px 0 0 3px;
  z-index: 3;
}
.diary-cover-page {
  position: relative;
  background: linear-gradient(145deg, #8b5e3c 0%, #6b3a2a 100%);
  border-radius: 2px 8px 8px 2px;
  padding: 2.5rem 1.2rem;
  text-align: center;
  color: var(--paper-1);
  box-shadow: 4px 8px 30px rgba(0,0,0,0.2), inset 0 0 20px rgba(0,0,0,0.15);
  z-index: 2;
}
.diary-cover-inner { position: relative; }
.diary-label { display: block; font-family: var(--font-serif); font-size: 1.3rem; letter-spacing: 0.4em; color: var(--ochre-soft); }
.diary-year { display: block; margin-top: 0.8rem; font-family: var(--font-serif); font-size: 0.85rem; color: rgba(255,255,255,0.5); letter-spacing: 0.2em; }
.diary-ribbon {
  position: absolute; top: -2.5rem; right: -0.5rem;
  width: 10px; height: 50px;
  background: var(--cinnabar);
  border-radius: 0 0 2px 2px;
  box-shadow: 1px 2px 4px rgba(0,0,0,0.2);
}
.diary-pages-stack { position: absolute; top: 8%; bottom: 8%; right: -16px; width: 62%; z-index: 1; }
.diary-pages-stack .page {
  position: absolute;
  width: 100%;
  height: 40%;
  background: var(--paper-1);
  border-radius: 0 4px 4px 0;
  box-shadow: 1px 2px 6px rgba(0,0,0,0.08);
  animation: pageSway 6s ease-in-out infinite;
}
.diary-pages-stack .page::before {
  content: ''; position: absolute; top: 8px; left: 12px; right: 12px; bottom: 8px;
  background: repeating-linear-gradient(0deg, transparent 0 10px, rgba(80,60,40,0.06) 10px 11px);
}
.diary-pages-stack .page-1 { top: 0; transform: rotate(1deg); }
.diary-pages-stack .page-2 { top: 30%; right: -4px; transform: rotate(-1.2deg); animation-delay: -2s; }
.diary-pages-stack .page-3 { top: 60%; transform: rotate(0.4deg); animation-delay: -4s; }
.diary-back {
  height: 6px; width: 96%; margin-left: 6px;
  background: linear-gradient(145deg, #7a4830, #5a3020);
  border-radius: 0 3px 3px 0;
}
@keyframes pageSway { 0%,100% { translate: 0 0; } 50% { translate: 2px 0; } }

/* 梧桐叶 */
.leaf { position: absolute; border-radius: 50% 0 50% 50%; opacity: 0.5; }
.leaf-1 { width: 28px; height: 22px; background: #c47a3a; top: -10px; right: -20px; transform: rotate(25deg); animation: leafDrift 8s ease-in-out infinite; }
.leaf-2 { width: 22px; height: 18px; background: #a0522d; bottom: 20px; left: -30px; transform: rotate(-40deg); animation: leafDrift 10s ease-in-out infinite reverse; }

@keyframes gentleFloat { 0%,100%{transform:translateY(0) rotate(0deg)} 50%{transform:translateY(-14px) rotate(0.5deg)} }
@keyframes leafDrift { 0%,100%{transform:rotate(25deg) translate(0,0)} 50%{transform:rotate(35deg) translate(6px,-8px)} }

/* ========== 第三屏 如何工作 ========== */
.how { background: var(--paper-1); }
.steps { display: flex; align-items: flex-start; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.step {
  flex: 1; min-width: 220px; max-width: 300px;
  text-align: center;
  padding: 2.8rem 1.8rem;
  background: var(--paper-2);
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  transition: transform .4s var(--ease), border-color .4s, box-shadow .4s;
  position: relative;
}
.step:hover { transform: translateY(-6px); border-color: var(--ochre-soft); box-shadow: 0 12px 36px rgba(80,60,40,0.08); }
.step-num {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--ochre);
  letter-spacing: 0.3em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.step-icon { color: var(--ochre); margin-bottom: 1.2rem; display: flex; justify-content: center; }
.step h3 { font-family: var(--font-serif); font-size: 1.3rem; font-weight: 500; margin-bottom: 0.7rem; color: var(--ink-1); }
.step p { font-size: 0.93rem; color: var(--ink-2); line-height: 1.8; }
.step-divider { display: flex; align-items: center; color: var(--ochre); opacity: 0.5; }

/* ========== 第四屏 用户故事（信件卡片） ========== */
.voices { background: var(--paper-2); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.voices-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.8rem; }
.letter-card {
  position: relative;
  background: var(--paper-1);
  border: 1px solid var(--paper-line);
  border-radius: 3px;
  padding: 2.2rem;
  box-shadow: 0 2px 12px rgba(80,60,40,0.04);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.letter-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(80,60,40,0.1); }
/* 邮票装饰 */
.letter-corner {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 44px;
  background: var(--navy-old-soft);
  border: 2px solid var(--navy-old);
  border-radius: 2px;
  opacity: 0.35;
  background-image: radial-gradient(circle at 0 0, transparent 3px, var(--navy-old-soft) 3px);
  background-size: 8px 8px;
}
.letter-corner::after {
  content: '邮票'; position: absolute; bottom: 4px; left: 0; right: 0;
  text-align: center; font-size: 8px; color: var(--navy-old); font-family: var(--font-serif);
}
.voice-header { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.2rem; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 1.1rem; color: var(--paper-1); font-weight: 500;
}
.avatar-warm { background: var(--ochre); }
.avatar-warm2 { background: var(--navy-old); }
.avatar-warm3 { background: var(--cinnabar); }
.voice-name { font-weight: 500; font-size: 0.95rem; color: var(--ink-1); }
.voice-meta { font-size: 0.75rem; color: var(--ink-3); }
.letter-card blockquote {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 2;
  color: var(--ink-1);
  border-left: 2px solid var(--ochre);
  padding-left: 1rem;
  margin: 0;
  position: relative;
}
.letter-card blockquote::before {
  content: '"';
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--ochre);
  position: absolute;
  top: -0.3rem;
  left: -0.2rem;
  opacity: 0.3;
}

/* ========== 第五屏 承诺 ========== */
.promise { background: var(--paper-1); }
.promise-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.promise-item {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  transition: transform .35s, border-color .35s;
}
.promise-item:hover { transform: translateY(-4px); border-color: var(--ochre-soft); }
.promise-symbol {
  width: 52px; height: 52px;
  margin: 0 auto 1.2rem;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--ochre);
  background: var(--ochre-soft);
  border-radius: 50%;
}
.promise-item h3 { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 500; margin-bottom: 0.6rem; color: var(--ink-1); }
.promise-item p { font-size: 0.9rem; color: var(--ink-2); line-height: 1.8; }

/* ========== 第六屏 CTA ========== */
.cta {
  background: var(--paper-2);
  text-align: center;
  border-top: 1px solid var(--paper-line);
}
.cta-inner { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 2; }
.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4.8vw, 3rem);
  font-weight: 500;
  margin-bottom: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--ink-1);
}
.cta-sub { font-size: 1.05rem; color: var(--ink-2); margin-bottom: 2.8rem; line-height: 2; font-family: var(--font-serif); }
.cta-links { margin-top: 2.2rem; font-size: 0.9rem; color: var(--ink-3); display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.cta-links a { color: var(--ink-2); transition: color .25s; }
.cta-links a:hover { color: var(--ochre); }
.cta-links .dot { opacity: 0.4; }

/* 散落的信纸 */
.scatter-paper { position: absolute; z-index: 1; opacity: 0.25; }
.sp-1 { width: 60px; height: 72px; background: var(--paper-1); border: 1px solid var(--paper-line); top: 15%; right: 8%; transform: rotate(15deg); box-shadow: 1px 2px 8px rgba(0,0,0,0.04); }
.sp-1::before { content: ''; position: absolute; top: 10px; left: 8px; right: 8px; bottom: 10px; background: repeating-linear-gradient(0deg, transparent 0 8px, var(--paper-line) 8px 9px); }
.sp-2 { width: 48px; height: 58px; background: var(--paper-1); border: 1px solid var(--paper-line); bottom: 20%; left: 6%; transform: rotate(-22deg); box-shadow: 1px 2px 6px rgba(0,0,0,0.04); }

/* ========== 页脚 ========== */
.footer { background: #2c241b; color: rgba(255,255,255,0.6); padding: 4rem 0 2rem; }
.footer-inner { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; margin-bottom: 3rem; }
.footer-brand { font-family: var(--font-serif); font-size: 1.3rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; color: rgba(255,255,255,0.85); }
.footer-brand .logo-icon { color: var(--ochre-light); display: flex; }
.footer-tag { color: rgba(255,255,255,0.4); font-size: 0.88rem; font-family: var(--font-serif); }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(255,255,255,0.35); margin-bottom: 1rem; font-weight: 400; }
.footer-col a { display: block; color: rgba(255,255,255,0.55); font-size: 0.9rem; margin-bottom: 0.5rem; transition: color .25s; }
.footer-col a:hover { color: var(--ochre-light); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-size: 0.78rem; color: rgba(255,255,255,0.3); padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-bottom a { color: rgba(255,255,255,0.3); }
.footer-bottom a:hover { color: var(--ochre-light); }

/* ========== 滚动入场动画 ========== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ========== 关键帧 ========== */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* ========== 响应式 ========== */
@media (max-width: 900px) {
  .story-grid { grid-template-columns: 1fr; gap: 3rem; }
  .steps { flex-direction: column; align-items: center; }
  .step { max-width: 400px; width: 100%; }
  .step-divider { transform: rotate(90deg); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: rgba(247,242,232,0.97); padding: 1.5rem; gap: 1rem; border-bottom: 1px solid var(--paper-line); box-shadow: 0 4px 16px rgba(80,60,40,0.06); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero-actions { flex-direction: column; align-items: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 5rem 0 3rem; }
  .postmark { display: none; }
}
