/* ============================================================
   会泽盐水石榴 · 河谷来信
   视觉体系：暗（食欲开场）→ 米纸（河谷与过程）→ 石榴红（心意）→ 暗（收束）
   ============================================================ */

:root {
  --ink: #211712;
  --ink-soft: #55483e;
  --paper: #f4eee1;
  --paper-deep: #ece3d0;
  --dark: #161010;
  --dark-2: #1e1512;
  --cream: #f3e9d6;
  --cream-dim: rgba(243, 233, 214, 0.62);
  --red: #a8322b;
  --red-deep: #6f1b1d;
  --red-bright: #d8503c;
  --gold: #c99a4b;
  --line-dark: rgba(33, 23, 18, 0.14);
  --line-cream: rgba(243, 233, 214, 0.16);
  --radius: 22px;
  --font-serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "HarmonyOS Sans SC", "MiSans", "Noto Sans CJK SC", sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body { overflow-x: clip; }

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.9;
  color: var(--ink);
  background: var(--dark);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red); color: var(--cream); }

img, video { display: block; max-width: 100%; }

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

ul, ol { list-style: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px dashed currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 48px, 620px);
  margin-inline: auto;
}

/* ---------- 通用按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 0.12em;
  transition: transform 160ms ease-out, background-color 200ms ease;
}

.btn:active { transform: scale(0.97); }

.btn svg { width: 19px; height: 19px; flex: none; }

.btn--light {
  background: rgba(243, 233, 214, 0.94);
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.btn--cream {
  background: var(--cream);
  color: var(--red-deep);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  overflow: clip;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
}

.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 10, 8, 0.52) 0%, rgba(16, 10, 8, 0) 26%),
    linear-gradient(180deg, rgba(22, 16, 16, 0) 24%, rgba(22, 16, 16, 0.5) 52%, rgba(22, 16, 16, 0.82) 74%, var(--dark) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, 620px);
  margin-inline: auto;
  padding-bottom: 134px;
}

.hero__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.42em;
  color: rgba(243, 233, 214, 0.85);
  text-shadow: 0 1px 16px rgba(10, 6, 5, 0.75);
  margin-bottom: 26px;
}

.hero__brand .mark { width: 21px; height: 21px; color: var(--red-bright); }

.hero__overline {
  font-size: 13px;
  letter-spacing: 0.34em;
  color: #d9ab62;
  text-shadow: 0 1px 14px rgba(10, 6, 5, 0.6);
  margin-bottom: 14px;
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(58px, 16.5vw, 96px);
  line-height: 1.12;
  letter-spacing: 0.075em;
  text-wrap: balance;
  margin-bottom: 20px;
}

.hero__sub {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 2;
  color: var(--cream-dim);
  margin-bottom: 34px;
}

.hero__side {
  position: absolute;
  z-index: 1;
  top: 116px;
  right: 20px;
  writing-mode: vertical-rl;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.5em;
  color: rgba(243, 233, 214, 0.6);
  text-shadow: 0 1px 16px rgba(10, 6, 5, 0.75);
}

.hero__scroll {
  position: absolute;
  z-index: 1;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(243, 233, 214, 0.55);
  white-space: nowrap;
}

.hero__scroll i {
  width: 1px;
  height: 42px;
  background: linear-gradient(180deg, rgba(243, 233, 214, 0.7), rgba(243, 233, 214, 0));
  transform-origin: top;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__scroll i { animation: scroll-drip 2.1s var(--ease-out) infinite; }

  @keyframes scroll-drip {
    0% { transform: scaleY(0); }
    55% { transform: scaleY(1); }
    100% { transform: scaleY(1); opacity: 0; }
  }
}

/* ---------- 章节通用 ---------- */

.chapter { position: relative; }

.chapter--dark {
  background:
    radial-gradient(90% 46% at 82% 4%, rgba(168, 50, 43, 0.13), transparent 62%),
    var(--dark);
  color: var(--cream);
  padding: 100px 0 96px;
}

.chapter--paper {
  background:
    radial-gradient(120% 60% at 88% 0%, rgba(201, 154, 75, 0.07), transparent 55%),
    var(--paper);
  color: var(--ink);
  padding: 100px 0 96px;
}

.chapter--tint { background: var(--paper-deep); }

.chapter--red {
  background:
    radial-gradient(130% 62% at 84% 0%, rgba(255, 191, 118, 0.15), transparent 58%),
    radial-gradient(110% 55% at 8% 102%, rgba(0, 0, 0, 0.3), transparent 60%),
    var(--red-deep);
  color: var(--cream);
  padding: 100px 0 104px;
}

.chapter--close { padding-bottom: 150px; }

.chapter__head { margin-bottom: 44px; }

.chapter__no {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.chapter__no span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 17px;
  opacity: 0.85;
}

.chapter--dark .chapter__no span { color: var(--red-bright); border-color: rgba(216, 80, 60, 0.55); }
.chapter--paper .chapter__no span { color: var(--red); border-color: rgba(168, 50, 43, 0.4); }
.chapter--red .chapter__no span { color: var(--gold); border-color: rgba(201, 154, 75, 0.55); }

.chapter__no em {
  font-style: normal;
  font-size: 12.5px;
  letter-spacing: 0.34em;
  opacity: 0.66;
}

.chapter__head h2 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(33px, 9vw, 44px);
  line-height: 1.42;
  letter-spacing: 0.045em;
  text-wrap: balance;
}

.prose { margin-top: 34px; }

.prose p { margin-bottom: 1em; }
.prose p:last-child { margin-bottom: 0; }

.prose .lede {
  font-family: var(--font-serif);
  font-size: 18.5px;
  line-height: 2.05;
}

.chapter--dark .prose { color: rgba(243, 233, 214, 0.82); }
.chapter--paper .prose { color: var(--ink-soft); }
.chapter--paper .prose .lede { color: var(--ink); }
.chapter--red .prose { color: rgba(243, 233, 214, 0.82); }

.prose .fine { font-size: 13.5px; line-height: 1.95; opacity: 0.72; }

.prose .story-link {
  margin-top: -0.15em;
  font-family: var(--font-serif);
  font-size: 14.5px;
  font-style: italic;
  line-height: 1.8;
  letter-spacing: 0.06em;
}

.prose .story-link a {
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.1em;
  opacity: 0.82;
}

.prose .story-link a:hover,
.prose .story-link a:focus-visible { opacity: 1; }

.chapter__cta { margin-top: 40px; }

/* ---------- 图片与视频 ---------- */

.media__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(127, 105, 88, 0.12);
}

.media__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media figcaption {
  margin-top: 14px;
  font-size: 12.5px;
  letter-spacing: 0.2em;
}

.media--offset { margin-top: 56px; }

.media--offset .media__frame { width: 88%; margin-left: auto; }

.media--offset figcaption { text-align: right; padding-right: 4px; }

.media--offset.media--left .media__frame { margin-left: 0; margin-right: auto; }

.media--offset.media--left figcaption { text-align: left; padding-left: 4px; }

.media--bleed {
  margin-top: 48px;
  width: 100%;
}

.media--bleed .media__frame {
  width: 100%;
  border-radius: 0;
}

.media--bleed figcaption,
.media__tag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 0 24px;
  font-size: 12px;
  letter-spacing: 0.22em;
}

.media__tag svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.media--bleed .media__frame img { object-position: 50% 55%; }

.media--round .media__frame { border-radius: 50%; }

.media--round .media__frame img { object-position: 52% 42%; }

/* 转场横幅 */
.band { display: block; }

.band__frame {
  overflow: hidden;
  background: var(--dark-2);
}

.band__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% 55%;
}

.band__caption {
  padding: 18px 24px 0;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: 0.24em;
  color: var(--cream-dim);
  background: var(--dark);
}

/* 视频块 */
.video-block { margin-top: 8px; }

.video-block--burst .video-block__frame {
  width: min(100%, 440px);
  margin-inline: auto;
}

.video-block__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0d0b0a;
}

.video-block__frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-toggle {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  transition: transform 160ms ease-out;
}

.video-toggle:active { transform: scale(0.97); }

.video-toggle::before {
  content: "";
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(13, 9, 8, 0.46);
  border: 1px solid rgba(243, 233, 214, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.video-toggle svg {
  position: absolute;
  width: 26px;
  height: 26px;
  color: var(--cream);
}

.video-toggle .ico-play { margin-left: 3px; }

.video-toggle .ico-pause,
.video-toggle[aria-pressed="true"] .ico-play { display: none; }

.video-toggle[aria-pressed="true"] .ico-pause { display: block; }

/* 播放中淡化按钮，轻点仍可暂停 */
.video-toggle[data-dim]::before { opacity: 0; }

.video-toggle[data-dim] svg { opacity: 0; }

.video-toggle[data-dim] { transition: opacity 240ms ease; }

.video-block figcaption,
.timeline__video-note {
  display: block;
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.2em;
  opacity: 0.55;
}

.video-block--burst figcaption { text-align: center; }

/* 枝头圆形图 + 文案 */
.duo {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 52px;
}

.duo .media--round {
  flex: none;
  width: min(46%, 190px);
}

.duo__text p {
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 2.1;
  color: var(--ink);
}

.duo__note {
  display: inline-block;
  margin-top: 14px;
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--ink-soft);
  opacity: 0.7;
}

/* ---------- 叁 · 时间线 ---------- */

.timeline { counter-reset: step; }

.timeline__item { padding: 34px 0; }

.timeline__item + .timeline__item { border-top: 1px solid var(--line-dark); }

.timeline__item:first-child { padding-top: 6px; }

.timeline__media { margin-bottom: 22px; }

.timeline__media .video-block__frame { border-radius: var(--radius); }

.timeline__no {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}

.timeline__no {
  font-family: var(--font-serif);
  font-size: 30px;
  color: var(--red);
}

.timeline__no em {
  font-style: normal;
  font-size: 14.5px;
  letter-spacing: 0.26em;
  color: var(--ink);
}

.timeline__body > p:not(.timeline__no) {
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 34em;
}

.timeline__note {
  display: inline-block;
  margin-top: 10px;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  opacity: 0.65;
}

.timeline__video-note { opacity: 0.65; }

/* ---------- 肆 · 礼盒账目 ---------- */

.ledger {
  margin-top: 6px;
  border-top: 1px solid var(--line-cream);
}

.ledger__row {
  display: grid;
  grid-template-columns: 84px 58px 1fr;
  align-items: center;
  gap: 6px;
  padding: 26px 2px;
  border-bottom: 1px solid var(--line-cream);
}

.ledger__num {
  font-family: var(--font-serif);
  font-size: 46px;
  line-height: 1;
  color: var(--gold);
}

.ledger__spec {
  font-size: 13px;
  letter-spacing: 0.3em;
  color: rgba(243, 233, 214, 0.85);
}

.ledger__desc {
  font-size: 13.5px;
  color: rgba(243, 233, 214, 0.78);
  text-align: right;
  line-height: 1.7;
}

.prose--dim { margin-top: 26px; }

/* ---------- 陆 · 微信 ---------- */

.qr { margin-top: 44px; display: flex; justify-content: center; }

.qr__frame {
  position: relative;
  width: min(252px, 70vw);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  border: 1.5px dashed rgba(243, 233, 214, 0.5);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.qr__seeds {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: rgba(243, 233, 214, 0.14);
}

.qr__placeholder {
  position: relative;
  font-size: 13.5px;
  letter-spacing: 0.14em;
  color: rgba(243, 233, 214, 0.85);
}

.qr__hint {
  position: relative;
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--cream-dim);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.chips li {
  padding: 9px 18px;
  border: 1px solid rgba(243, 233, 214, 0.3);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: rgba(243, 233, 214, 0.88);
}

/* ---------- 页脚 ---------- */

.footer {
  background: #110d0c;
  color: var(--cream);
  text-align: center;
  padding: 76px 24px calc(110px + env(safe-area-inset-bottom));
}

.footer .mark {
  width: 26px;
  height: 26px;
  color: var(--red-bright);
  margin: 0 auto 18px;
}

.footer__name {
  font-family: var(--font-serif);
  font-size: 21px;
  letter-spacing: 0.3em;
  margin-bottom: 10px;
}

.footer__origin {
  font-size: 12.5px;
  letter-spacing: 0.2em;
  color: var(--cream-dim);
  margin-bottom: 22px;
}

.footer__line {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(243, 233, 214, 0.4);
}

/* ---------- 吸底微信入口（唯一固定入口） ---------- */

.wx-pill {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(18px);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: calc(100vw - 32px);
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: rgba(243, 233, 214, 0.96);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: transform 260ms var(--ease-out), opacity 260ms ease;
}

.wx-pill svg { width: 18px; height: 18px; color: var(--red); }

.wx-pill.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.wx-pill:active { transform: translateX(-50%) translateY(0) scale(0.97); }

/* ---------- 出现动效 ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease-soft), transform 700ms var(--ease-soft);
}

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

[data-stagger] > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease-soft), transform 600ms var(--ease-soft);
}

[data-stagger].is-in > * { opacity: 1; transform: none; }

[data-stagger].is-in > *:nth-child(2) { transition-delay: 80ms; }
[data-stagger].is-in > *:nth-child(3) { transition-delay: 160ms; }
[data-stagger].is-in > *:nth-child(4) { transition-delay: 240ms; }

/* 图片开幅：clip-path 揭示 + 轻微缩放 */
[data-clip] .media__frame {
  clip-path: inset(8% 6% 8% 6% round var(--radius));
  transition: clip-path 900ms var(--ease-soft) 60ms;
}

[data-clip] .media__frame img {
  transform: scale(1.09);
  transition: transform 1150ms var(--ease-soft);
}

[data-clip].is-in .media__frame { clip-path: inset(0 0 0 0 round var(--radius)); }

[data-clip].is-in .media__frame img { transform: none; }

[data-clip].is-in .media--round .media__frame,
.media--round[data-clip].is-in .media__frame { clip-path: inset(0 0 0 0 round 50%); }

.media--round[data-clip] .media__frame { clip-path: inset(0 0 0 0 round 50%); }

/* 首屏入场 */
[data-hero-stagger] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 800ms var(--ease-soft), transform 800ms var(--ease-soft);
}

body.is-loaded [data-hero-stagger] { opacity: 1; transform: none; }

body.is-loaded [data-hero-stagger]:nth-of-type(1) { transition-delay: 60ms; }
body.is-loaded [data-hero-stagger]:nth-of-type(2) { transition-delay: 150ms; }
body.is-loaded [data-hero-stagger]:nth-of-type(3) { transition-delay: 240ms; }
body.is-loaded [data-hero-stagger]:nth-of-type(4) { transition-delay: 330ms; }
body.is-loaded [data-hero-stagger]:nth-of-type(5) { transition-delay: 420ms; }

/* ---------- 减少动态效果 ---------- */

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-stagger] > *,
  [data-hero-stagger] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  [data-clip] .media__frame,
  [data-clip] .media__frame img {
    clip-path: none !important;
    transform: none !important;
    transition: none !important;
  }

  .hero__scroll i { animation: none; }

  .btn, .video-toggle, .wx-pill { transition-duration: 1ms; }
}

/* ---------- 桌面与平板 ---------- */

@media (min-width: 720px) {
  .timeline__item {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
    gap: 44px;
    align-items: center;
    padding: 44px 0;
  }

  .timeline__item:nth-child(even) .timeline__media { order: 2; }

  .timeline__media { margin-bottom: 0; }

  .band__caption { padding-top: 22px; }
}

@media (min-width: 920px) {
  .wrap { width: min(100% - 96px, 660px); }

  .hero__inner {
    width: min(100% - 96px, 1080px);
    padding-bottom: 132px;
  }

  .hero__title { font-size: clamp(72px, 8.6vw, 118px); }

  .chapter--dark,
  .chapter--paper,
  .chapter--red { padding: 150px 0 140px; }

  .chapter--close { padding-bottom: 170px; }

  .chapter__head h2 { font-size: clamp(40px, 4.6vw, 54px); }

  .prose .lede { font-size: 20px; }

  .media--bleed { width: min(100% - 96px, 1180px); margin-inline: auto; }

  .media--bleed .media__frame { border-radius: var(--radius); }

  .media--bleed figcaption,
  .media__tag { padding: 0 6px; }

  .band__frame { width: min(100%, 1180px); margin-inline: auto; border-radius: var(--radius); overflow: hidden; }

  .band { padding: 0 48px; }

  .band__caption { background: transparent; color: var(--cream-dim); width: min(100%, 1180px); margin-inline: auto; }

  .band { background: var(--dark); }

  .duo { gap: 44px; justify-content: center; }

  .duo .media--round { width: 230px; }

  .duo__text { max-width: 20em; }

  .ledger__row { grid-template-columns: 110px 70px 1fr; padding: 32px 4px; }

  .ledger__num { font-size: 56px; }

  .wx-pill { height: 52px; font-size: 14.5px; }
}
