﻿/* ==========================================================================
   Template G · EPIC（史诗自然 / Cinematic Landscape）
   雪山日出、云海、雾带与银河；全屏景观 + 极简文字
   ========================================================================== */

.tpl-epic {
  --ep-void: #04090f;
  --ep-night: #070f18;
  --ep-deep: #0b1a26;
  --ep-blue: #16304a;
  --ep-gold: #d8b776;
  --ep-gold-soft: #e7cf9c;
  --ep-ink: #eef2f6;
  --ep-ink-2: #c3d0dc;
  --ep-mute: #8ba0b4;
  --ep-line: rgba(216, 183, 118, 0.22);
  --ep-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", STSong, SimSun, Georgia, serif;
  --ep-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;

  background: var(--ep-void);
  color: var(--ep-ink);
  font-family: var(--ep-sans);
}

/* ---------- 首屏：日出雪山 ---------- */
.ep-hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.ep-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    #061019 0%,
    #0a1c2b 26%,
    #14314a 48%,
    #2b4c63 66%,
    #6d7f8c 82%,
    #1a2d3c 100%
  );
}

/* 天空里将熄的星 */
.ep-sky-stars {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 34%, transparent 58%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 34%, transparent 58%);
}

.ep-sky-stars i,
.ep-stars i {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 5px rgba(200, 220, 255, 0.7);
  animation: ep-twinkle var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* 地平线暖光 */
.ep-glow {
  position: absolute;
  left: 80%;
  top: 56%;
  width: 90%;
  height: 34%;
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 226, 170, 0.22), rgba(255, 226, 170, 0) 72%);
  filter: blur(20px);
  pointer-events: none;
}

/* 太阳 + 光晕 */
.ep-sun {
  position: absolute;
  left: 76%;
  top: 20%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    #fffdf2 0%,
    #ffe9b8 28%,
    rgba(240, 205, 140, 0.62) 55%,
    rgba(232, 189, 118, 0.14) 78%,
    rgba(232, 189, 118, 0) 100%
  );
  box-shadow: 0 0 70px 26px rgba(232, 189, 118, 0.16);
  filter: blur(0.6px);
  animation: ep-breathe 9s ease-in-out infinite;
  opacity: 0.9;
}

@keyframes ep-breathe {
  0%,
  100% {
    opacity: 0.92;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

/* 云层：两层缓慢横向漂移 */
.ep-clouds {
  position: absolute;
  left: -50%;
  width: 200%;
  pointer-events: none;
  background-repeat: no-repeat;
}

.ep-clouds--far {
  top: 34%;
  height: 40%;
  filter: blur(14px);
  opacity: 0.5;
  background-image: radial-gradient(48% 22% at 22% 52%, rgba(255, 255, 255, 0.16), transparent 70%),
    radial-gradient(40% 18% at 62% 44%, rgba(255, 240, 214, 0.18), transparent 72%),
    radial-gradient(44% 20% at 84% 60%, rgba(255, 255, 255, 0.1), transparent 70%);
  animation: ep-drift 90s linear infinite;
}

.ep-clouds--near {
  top: 52%;
  height: 34%;
  filter: blur(22px);
  opacity: 0.42;
  background-image: radial-gradient(52% 26% at 36% 60%, rgba(255, 255, 255, 0.14), transparent 72%),
    radial-gradient(46% 22% at 76% 52%, rgba(255, 238, 206, 0.16), transparent 74%);
  animation: ep-drift 140s linear infinite reverse;
}

@keyframes ep-drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-22%);
  }
}

.ep-ridges {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 78%;
  display: block;
}

/* 雾带 */
.ep-fog {
  position: absolute;
  left: -20%;
  width: 140%;
  height: 16%;
  filter: blur(26px);
  pointer-events: none;
}

.ep-fog--1 {
  bottom: 34%;
  background: linear-gradient(90deg, rgba(214, 228, 238, 0), rgba(214, 228, 238, 0.22), rgba(214, 228, 238, 0));
  animation: ep-fog-move 48s ease-in-out infinite alternate;
}

.ep-fog--2 {
  bottom: 18%;
  height: 12%;
  background: linear-gradient(90deg, rgba(238, 244, 248, 0), rgba(238, 244, 248, 0.16), rgba(238, 244, 248, 0));
  animation: ep-fog-move 34s ease-in-out infinite alternate-reverse;
}

@keyframes ep-fog-move {
  from {
    transform: translateX(-6%);
  }
  to {
    transform: translateX(6%);
  }
}

.ep-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, rgba(4, 9, 15, 0) 42%, rgba(4, 9, 15, 0.55) 100%),
    linear-gradient(180deg, rgba(4, 9, 15, 0.55) 0%, rgba(4, 9, 15, 0) 28%, rgba(4, 9, 15, 0.2) 78%, rgba(4, 9, 15, 0.92) 100%);
}

/* 首屏文字 */
.ep-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  padding: 0 24px clamp(130px, 22vh, 240px);
  text-align: center;
}

.ep-kicker {
  font-size: 9px;
  letter-spacing: 0.42em;
  color: var(--ep-gold);
  opacity: 0.92;
  text-shadow: 0 1px 12px rgba(4, 9, 15, 0.8);
}

.ep-names {
  margin-top: 22px;
  font-family: var(--ep-serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 11vw, 3.2rem);
  line-height: 1.25;
  letter-spacing: 0.16em;
  color: #f7f3e8;
  text-shadow: 0 2px 26px rgba(4, 9, 15, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.ep-names i {
  font-style: normal;
  font-size: 0.44em;
  letter-spacing: 0.2em;
  color: var(--ep-gold);
  opacity: 0.9;
}

.ep-title {
  margin-top: 14px;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  color: rgba(247, 243, 232, 0.82);
  text-shadow: 0 1px 14px rgba(4, 9, 15, 0.9);
}

.ep-tag {
  margin: 10px auto 0;
  max-width: 26em;
  font-family: var(--ep-serif);
  font-size: 0.92rem;
  letter-spacing: 0.1em;
  color: var(--ep-gold-soft);
  text-shadow: 0 1px 14px rgba(4, 9, 15, 0.9);
}

/* 计数：极简 */
.ep-counter {
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(216, 183, 118, 0.32);
  max-width: 260px;
}

.ep-counter__label {
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.38em;
  color: rgba(216, 183, 118, 0.9);
}

.ep-counter__row {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
}

.ep-counter__num {
  font-family: var(--ep-serif);
  font-size: 2.7rem;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fbf6ea;
  text-shadow: 0 2px 24px rgba(232, 189, 118, 0.35);
}

.ep-counter__unit {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  color: var(--ep-gold);
}

.ep-counter__clock {
  display: block;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(195, 208, 220, 0.8);
}

.ep-counter__clock--hint {
  letter-spacing: 0.06em;
  color: var(--ep-gold-soft);
}

.ep-scroll {
  margin-top: 20px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(231, 207, 156, 0.9);
  text-shadow: 0 1px 10px rgba(4, 9, 15, 0.95);
}

.ep-scroll span {
  font-size: 8px;
  letter-spacing: 0.4em;
}

.ep-scroll i {
  width: 1px;
  height: 34px;
  background: linear-gradient(180deg, var(--ep-gold), transparent);
  animation: ep-scroll 3.4s ease-in-out infinite;
  transform-origin: top;
}

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

/* ---------- 引言带 ---------- */
.ep-quote-band {
  position: relative;
  padding: 56px 24px;
  text-align: center;
  background: linear-gradient(180deg, #050c13 0%, #08131d 100%);
  border-top: 1px solid rgba(216, 183, 118, 0.12);
}

.ep-quote {
  font-family: var(--ep-serif);
  font-size: clamp(1.15rem, 4.6vw, 1.6rem);
  line-height: 1.9;
  letter-spacing: 0.14em;
  color: #f2ecdd;
}

.ep-quote__rule {
  display: block;
  width: 42px;
  height: 1px;
  margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, var(--ep-gold), transparent);
}

/* ---------- 通用区块 ---------- */
.ep-sec {
  padding: 52px 22px 0;
}

.ep-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(216, 183, 118, 0.16);
  margin-bottom: 20px;
}

.ep-label {
  font-size: 8.5px;
  letter-spacing: 0.36em;
  color: var(--ep-gold);
}

.ep-count {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--ep-mute);
}

/* ---------- 胶片 ---------- */
.ep-film {
  position: relative;
  margin: 0 -22px;
  padding: 20px 0;
  background: #040a10;
}

.ep-film::before,
.ep-film::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background-image: radial-gradient(circle, rgba(216, 183, 118, 0.4) 0 2px, transparent 2.4px);
  background-size: 18px 10px;
  background-repeat: repeat-x;
  opacity: 0.8;
}

.ep-film::before {
  top: 2px;
}

.ep-film::after {
  bottom: 2px;
}

.ep-film__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 22px;
  scrollbar-width: none;
}

.ep-film__track::-webkit-scrollbar {
  display: none;
}

.ep-frame {
  position: relative;
  flex: 0 0 78%;
  max-width: 420px;
  margin: 0;
  scroll-snap-align: center;
  cursor: zoom-in;
}

.ep-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.05);
  transition: transform 1.1s var(--ease), filter 0.5s ease;
}

.ep-frame:hover img {
  transform: scale(1.03);
  filter: saturate(1) contrast(1.02);
}

.ep-frame figcaption {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 8px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ep-mute);
}

.ep-frame figcaption .num {
  color: var(--ep-gold);
  font-size: 8.5px;
  letter-spacing: 0.16em;
}

/* ---------- 章节 ---------- */
.ep-chapters {
  display: grid;
  gap: 0;
}

.ep-chapter {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.ep-chapter:first-child {
  padding-top: 4px;
}

.ep-chapter__no {
  font-family: var(--ep-serif);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--ep-gold);
  padding-top: 3px;
}

.ep-chapter__date {
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--ep-mute);
}

.ep-chapter__body h3 {
  margin-top: 5px;
  font-family: var(--ep-serif);
  font-weight: 500;
  font-size: 1.08rem;
  letter-spacing: 0.08em;
  color: #f4efe2;
}

.ep-chapter__body p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.95;
  letter-spacing: 0.02em;
  color: var(--ep-ink-2);
  max-width: 42ch;
}

.ep-chapter__photo {
  margin-top: 12px;
  max-width: 320px;
  cursor: zoom-in;
}

.ep-chapter__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: saturate(0.94);
}

/* ---------- 信 ---------- */
.ep-letter {
  padding: 60px 24px 20px;
  text-align: center;
}

.ep-letter__label {
  font-size: 8.5px;
  letter-spacing: 0.4em;
  color: var(--ep-gold);
}

.ep-letter__body {
  margin: 22px auto 0;
  max-width: 30em;
  text-align: left;
}

.ep-letter__p {
  font-family: var(--ep-serif);
  font-size: 14.5px;
  line-height: 2.25;
  letter-spacing: 0.06em;
  color: #e9e2d3;
  text-align: justify;
  text-justify: inter-ideograph;
}

.ep-letter__p + .ep-letter__p {
  margin-top: 18px;
}

.ep-letter__sign {
  margin-top: 26px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  font-family: var(--ep-serif);
  font-size: 0.88rem;
  letter-spacing: 0.14em;
  color: var(--ep-gold-soft);
}

.ep-letter__sign .num {
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: var(--ep-mute);
}

/* ---------- 清单 ---------- */
.ep-list {
  display: grid;
}

.ep-list li {
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--ep-ink-2);
}

.ep-list--promise li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #dfe6ee;
}

.ep-list--promise i {
  flex: none;
  width: 14px;
  height: 1px;
  background: var(--ep-gold);
  opacity: 0.7;
  transform: translateY(-3px);
}

/* ---------- 结尾：银河 ---------- */
.ep-outro {
  position: relative;
  margin-top: 56px;
  padding: 96px 24px 48px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #050c13 0%, #060d16 40%, #040910 100%);
}

.ep-night {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ep-stars {
  position: absolute;
  inset: 0;
}

.ep-stars i {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(200, 220, 255, 0.75);
  animation: ep-twinkle var(--dur, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes ep-twinkle {
  0%,
  100% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.9;
  }
}

.ep-moon {
  position: absolute;
  top: 12%;
  right: 16%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #fffdf4, #e6dcc4 60%, #cbbfa4);
  box-shadow: 0 0 60px 18px rgba(232, 220, 196, 0.18);
}

.ep-night__ridge {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 26%;
  background: linear-gradient(180deg, #060d16 0%, #030810 100%);
  clip-path: polygon(0 62%, 12% 48%, 22% 58%, 34% 34%, 46% 52%, 58% 30%, 70% 50%, 82% 40%, 92% 54%, 100% 44%, 100% 100%, 0 100%);
}

.ep-blessing {
  position: relative;
  font-family: var(--ep-serif);
  font-size: clamp(1.15rem, 4.8vw, 1.5rem);
  line-height: 1.9;
  letter-spacing: 0.1em;
  color: #f6f1e4;
  text-shadow: 0 2px 20px rgba(4, 9, 15, 0.9);
}

.ep-outro__date {
  position: relative;
  margin-top: 12px;
  font-size: 8.5px;
  letter-spacing: 0.3em;
  color: var(--ep-mute);
}

.ep-song {
  position: relative;
  margin-top: 16px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: rgba(195, 208, 220, 0.75);
}

.ep-mark {
  position: relative;
  display: inline-block;
  margin-top: 30px;
  font-size: 8px;
  letter-spacing: 0.3em;
  color: var(--ep-mute);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.ep-mark:hover {
  border-bottom-color: currentColor;
  color: var(--ep-gold);
}

/* ---------- 宽屏 ---------- */
@container (min-width: 640px) {
  .ep-hero__inner {
    padding-bottom: 72px;
  }

  .ep-names {
    font-size: 3.4rem;
    letter-spacing: 0.2em;
  }

  .ep-counter__num {
    font-size: 3.1rem;
  }

  .ep-sec {
    max-width: 860px;
    margin: 0 auto;
    padding-inline: 44px;
  }

  .ep-film {
    margin-inline: 0;
  }

  .ep-film__track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    overflow: visible;
    padding-inline: 24px;
  }

  .ep-frame {
    max-width: none;
  }

  .ep-chapter {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 22px;
    padding: 24px 0;
  }

  .ep-letter {
    padding-top: 72px;
  }

  .ep-letter__p {
    font-size: 15px;
    line-height: 2.3;
  }

  .ep-outro {
    padding-top: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ep-sun,
  .ep-clouds,
  .ep-fog,
  .ep-scroll i,
  .ep-stars i {
    animation: none;
  }
}

/* ============================ 专属装饰：罗盘 ============================ */
.ep-compass {
  position: absolute;
  right: 20px;
  bottom: 30%;
  top: auto;
  width: 78px;
  height: 78px;
  color: var(--ep-gold);
  opacity: 0.62;
  pointer-events: none;
  z-index: 1;
}

@container (min-width: 640px) {
  .ep-compass {
    right: 44px;
    bottom: 28%;
    top: auto;
    width: 84px;
    height: 84px;
  }
}


