/* ===== 设计变量 · 自然有机·草木 ===== */
:root {
  --c-primary: #3a4fa6;
  --c-accent: #7a52b7;
  --c-cta: #8836c9;
  --c-bg: #f8f9fb;
  --c-surface: #ffffff;
  --c-text: #1b1e2c;
  --c-text-soft: #5c627a;
  --c-border: #dbdde6;
  --c-primary-soft: rgba(58, 79, 166, 0.10);
  --c-accent-soft: rgba(122, 82, 183, 0.12);
  --c-cta-soft: rgba(136, 54, 201, 0.12);
  --c-sand: #fff7e6;
  --c-sand-deep: #ffe9a8;

  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;

  --font-head: 'Quicksand', 'PingFang SC', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;

  --shadow-soft: 0 12px 34px rgba(27, 30, 44, 0.08);
  --shadow-lift: 0 18px 44px rgba(58, 79, 166, 0.16);
  --ease: cubic-bezier(.34, 1.2, .4, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* ===== 背景 organic blobs ===== */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(52% 40% at 12% 8%, rgba(122, 82, 183, 0.10), transparent 70%),
    radial-gradient(44% 36% at 92% 18%, rgba(58, 79, 166, 0.10), transparent 70%),
    var(--c-bg);
}
.blob {
  position: absolute;
  border-radius: 42% 58% 60% 40% / 48% 42% 58% 52%;
  filter: blur(2px);
  opacity: .55;
}
.blob-a {
  width: 420px; height: 340px;
  left: -140px; top: -90px;
  background: linear-gradient(140deg, rgba(122, 82, 183, .18), rgba(255, 233, 168, .22));
  animation: drift 18s ease-in-out infinite alternate;
}
.blob-b {
  width: 380px; height: 300px;
  right: -120px; top: 30%;
  background: linear-gradient(220deg, rgba(58, 79, 166, .16), rgba(136, 54, 201, .12));
  animation: drift 22s ease-in-out infinite alternate-reverse;
}
.blob-c {
  width: 360px; height: 300px;
  left: 30%; bottom: -140px;
  background: linear-gradient(40deg, rgba(255, 233, 168, .3), rgba(122, 82, 183, .12));
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(-4deg) scale(1); }
  to   { transform: translate3d(30px, 26px, 0) rotate(6deg) scale(1.06); }
}

/* ===== 顶栏 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(248, 249, 251, .82);
  border-bottom: 1px solid var(--c-border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  font-size: 22px;
  background: linear-gradient(140deg, var(--c-primary), var(--c-accent));
  color: #fff;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
}
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .5px;
}
.main-nav { display: flex; gap: 6px; }
.nav-link {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--c-text-soft);
  transition: color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.nav-link:hover { color: var(--c-primary); transform: translateY(-1px); }
.nav-link.active {
  background: var(--c-primary-soft);
  color: var(--c-primary);
  font-weight: 600;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), background .28s var(--ease), color .28s var(--ease);
}
.btn-primary {
  background: linear-gradient(135deg, var(--c-cta), var(--c-accent));
  color: #fff;
  box-shadow: 0 10px 24px rgba(136, 54, 201, .3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(136, 54, 201, .4); }
.btn-ghost {
  background: var(--c-surface);
  border-color: var(--c-border);
  color: var(--c-text);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--c-accent); color: var(--c-accent); }

/* ===== Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
  padding-block: 64px 40px;
}
.eyebrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.18;
  margin: 0 0 18px;
  color: var(--c-text);
}
.hero h1 b { color: var(--c-primary); }
.hero-sub {
  font-size: 17px;
  color: var(--c-text-soft);
  max-width: 34em;
  margin: 0 0 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-art { position: relative; }
.hero-art svg { width: 100%; height: auto; border-radius: var(--r-lg); }
.hero-art::before {
  content: "";
  position: absolute;
  inset: 12% 6% -4% 8%;
  border-radius: 48% 52% 44% 56% / 52% 46% 54% 48%;
  background: linear-gradient(150deg, rgba(255, 233, 168, .5), rgba(122, 82, 183, .12));
  filter: blur(6px);
  z-index: -1;
}

/* ===== 区块通用 ===== */
.section { padding-block: 46px; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head h2 {
  font-family: var(--font-head);
  font-size: clamp(26px, 3.6vw, 36px);
  margin: 0;
  font-weight: 700;
}

/* ===== 三步卡片 ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.step-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 30px 26px 26px;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.step-num {
  position: absolute;
  top: -14px; right: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 78px;
  color: var(--c-primary);
  opacity: .08;
  line-height: 1;
}
.step-icon { font-size: 30px; display: block; margin-bottom: 12px; }
.step-card h3 { font-family: var(--font-head); font-size: 19px; margin: 0 0 8px; }
.step-card p { margin: 0; color: var(--c-text-soft); font-size: 15px; }

/* ===== 筛选 ===== */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}
.chip {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-soft);
  font-size: 15px;
  font-weight: 500;
  transition: all .28s var(--ease);
}
.chip:hover { border-color: var(--c-accent); color: var(--c-accent); transform: translateY(-1px); }
.chip.active {
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(58, 79, 166, .28);
}

/* ===== 故事网格 ===== */
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.story-card {
  display: flex;
  flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .32s var(--ease), box-shadow .32s var(--ease);
}
.story-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.story-cover {
  position: relative;
  aspect-ratio: 5 / 3;
  display: grid;
  place-items: center;
}
.story-cover .emoji { font-size: 58px; filter: drop-shadow(0 8px 12px rgba(27, 30, 44, .14)); }
.story-cover::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: var(--r-md);
  border: 2px dashed rgba(255, 255, 255, .7);
}
.story-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255, 255, 255, .92);
  color: var(--c-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.story-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.story-body h3 { font-family: var(--font-head); font-size: 19px; margin: 0; }
.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.meta-tag {
  font-size: 13px;
  color: var(--c-accent);
  background: var(--c-accent-soft);
  padding: 3px 11px;
  border-radius: 999px;
  font-weight: 600;
}
.meta-tag.time { color: var(--c-cta); background: var(--c-cta-soft); }
.story-desc {
  margin: 0;
  color: var(--c-text-soft);
  font-size: 14.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-link {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 700;
  font-size: 15px;
  color: var(--c-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .28s var(--ease), color .28s var(--ease);
}
.story-card:hover .story-link { gap: 12px; color: var(--c-cta); }

.cover-tint-1 { background: linear-gradient(150deg, #e7ecff, #f3efff); }
.cover-tint-2 { background: linear-gradient(150deg, #fdeef7, #fff3e0); }
.cover-tint-3 { background: linear-gradient(150deg, #e6f6ee, #eef2ff); }
.cover-tint-4 { background: linear-gradient(150deg, #fff4e6, #fce4f0); }
.cover-tint-5 { background: linear-gradient(150deg, #eef2ff, #e6f8f2); }
.cover-tint-6 { background: linear-gradient(150deg, #f3efff, #fff0e0); }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-text-soft);
  background: var(--c-surface);
  border: 1px dashed var(--c-border);
  border-radius: var(--r-lg);
}
.empty-state span { font-size: 40px; display: block; margin-bottom: 10px; }
.empty-state p { margin: 0; }

/* ===== 故事详情页 ===== */
.story-page {
  padding-block: 44px;
}
.story-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--c-text-soft);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 22px;
  transition: color .25s var(--ease), gap .25s var(--ease);
}
.story-back:hover { color: var(--c-primary); gap: 10px; }
.story-detail-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.story-detail-head {
  position: relative;
  padding: 34px 34px 26px;
  display: grid;
  gap: 4px;
}
.story-detail-head .emoji { font-size: 52px; line-height: 1; }
.story-detail-head h1 {
  font-family: var(--font-head);
  font-size: clamp(26px, 4vw, 38px);
  margin: 10px 0 6px;
  font-weight: 700;
}
.story-detail-head .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* 音频播放器 */
.player {
  margin: 6px 34px 0;
  background: linear-gradient(120deg, var(--c-primary-soft), var(--c-accent-soft));
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.play-btn {
  width: 52px; height: 52px;
  flex: none;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--c-cta), var(--c-accent));
  color: #fff;
  font-size: 20px;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(136, 54, 201, .34);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.play-btn:hover { transform: scale(1.06); box-shadow: 0 12px 22px rgba(136, 54, 201, .44); }
.player-info { flex: 1; min-width: 160px; }
.player-title { font-weight: 700; font-size: 15px; }
.player-time {
  font-size: 13px;
  color: var(--c-text-soft);
  font-variant-numeric: tabular-nums;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 2px;
}
.speed-btn {
  flex: none;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-soft);
  transition: all .25s var(--ease);
}
.speed-btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.progress-wrap { margin-top: 14px; }
input[type="range"].seek {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--c-cta) var(--fill, 0%), #e5e4ec var(--fill, 0%));
  outline: none;
}
input[type="range"].seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--c-cta);
  box-shadow: 0 2px 6px rgba(27, 30, 44, .18);
  cursor: pointer;
}
input[type="range"].seek::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--c-cta);
  cursor: pointer;
}

.story-detail-body { padding: 28px 34px 40px; }
.story-detail-body h2 {
  font-family: var(--font-head);
  font-size: 20px;
  margin: 26px 0 10px;
  color: var(--c-primary);
}
.story-detail-body h2:first-child { margin-top: 0; }
.story-text p { margin: 0 0 14px; font-size: 16.5px; line-height: 2; }
.story-detail-body .leading { font-size: 17px; color: var(--c-text-soft); }
.ending-note {
  margin-top: 26px;
  padding: 18px 20px;
  border-radius: var(--r-md);
  background: var(--c-sand);
  border: 1px dashed var(--c-sand-deep);
  color: #8a6d1f;
  font-weight: 600;
}
.next-links { display: flex; gap: 14px; margin-top: 26px; }

/* ===== 关于页 ===== */
.about-hero { grid-template-columns: 1fr .9fr; }
.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.about-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.about-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.about-icon { font-size: 34px; display: block; margin-bottom: 14px; }
.about-card h3 { font-family: var(--font-head); font-size: 19px; margin: 0 0 8px; }
.about-card p { margin: 0; color: var(--c-text-soft); font-size: 15px; }

.tips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 860px;
  margin-inline: auto;
}
.tip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.tip:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.tip-dot {
  flex: none;
  width: 14px; height: 14px;
  margin-top: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  box-shadow: 0 0 0 5px var(--c-primary-soft);
}
.tip p { margin: 0; font-size: 15px; color: var(--c-text-soft); }
.tip strong { color: var(--c-text); }

.cta-banner {
  margin-top: 40px;
  text-align: center;
  padding: 44px 26px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 160% at 20% 0%, rgba(255, 233, 168, .55), transparent 55%),
    linear-gradient(135deg, var(--c-primary-soft), var(--c-accent-soft));
  border: 1px solid var(--c-border);
}
.cta-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(22px, 3.4vw, 30px);
  margin: 0 0 20px;
}

/* ===== 页脚 ===== */
.site-footer {
  margin-top: 30px;
  border-top: 1px solid var(--c-border);
  background: rgba(255, 255, 255, .6);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-block: 22px;
}
.footer-note { margin: 0; color: var(--c-text-soft); font-size: 14px; }

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

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero, .about-hero { grid-template-columns: 1fr; text-align: center; padding-block: 44px 24px; }
  .hero-actions, .hero-actions .btn { justify-content: center; }
  .hero-sub { margin-inline: auto; }
  .hero-art { max-width: 360px; margin-inline: auto; }
  .steps, .about-cards, .story-grid { grid-template-columns: 1fr 1fr; }
  .hero-art-about { order: -1; }
}
@media (max-width: 620px) {
  .steps, .about-cards, .story-grid, .tips { grid-template-columns: 1fr; }
  .nav-wrap { flex-direction: column; gap: 10px; }
  .story-detail-head, .player, .story-detail-body { padding-left: 20px; padding-right: 20px; }
  .player-row { gap: 10px; }
}
