/* ============================================================
   四时流年 · 四季画卷样式
   界面色变量由 season.js 按当季写入 body（--ink/--soft/--line/--panel/--accent）
   ============================================================ */
:root {
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
  /* 春色兜底（引擎未接管时亦有清新观感） */
  --ink: #3a4a2f;
  --soft: #7a8c6a;
  --line: rgba(90,120,70,0.25);
  --panel: rgba(255,252,248,0.6);
  --accent: #e07aa0;
  --veil: rgba(255,255,255,0.28);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  background: #eef3ea;
  overflow-x: hidden;
  transition: color .8s ease, background .8s ease;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, canvas { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }

/* 背景画布（铺满视口，随四季与昼夜自行流转） */
#life-scroll {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1;
  pointer-events: none;
}

/* ---------- 实景照片打底层（两层交替淡入淡出） ---------- */
.stage {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #eef3ea;
}
.stage__photo.front { z-index: 2; }   /* 入场层置顶，压在旧图之上淡入，保证过渡无漏底 */
.stage__photo {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  will-change: opacity;
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none;
}

/* 可读性纱罩：上下淡、中间极淡，保文字清晰又不压住画面主体 */
.veil {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255,255,255,.20) 0,
    rgba(255,255,255,.06) 16%,
    rgba(255,255,255,.03) 50%,
    rgba(255,255,255,.07) 84%,
    rgba(255,255,255,.18) 100%);
}

.page { position: relative; z-index: 3; min-height: 100vh; display: flex; flex-direction: column; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 30px; width: 100%; }

/* ---------- 淡入 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.65,.25,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 顶栏 ---------- */
.topnav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
.topnav__in, .topnav { display: flex; }
.topnav { padding: 22px 30px 0; }
.brand {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: .22em;
  color: var(--ink);
  text-shadow: 0 1px 12px rgba(255,255,255,.5);
  transition: color .8s ease;
}
.brand small {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .38em;
  color: var(--soft);
  margin-top: 4px;
  transition: color .8s ease;
}

/* ---------- 右上角时钟 ---------- */
.clock {
  position: fixed; top: 26px; right: 32px;
  z-index: 60;
  text-align: right;
  font-family: var(--serif);
  color: var(--ink);
  text-shadow: 0 1px 14px rgba(255,255,255,.55);
  line-height: 1.5;
  pointer-events: none;
  transition: color .8s ease;
}
.clock__time { font-size: 22px; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.clock__date { font-size: 11px; letter-spacing: .2em; color: var(--soft); font-family: var(--sans); }
.clock__chips { margin-top: 6px; display: flex; gap: 6px; justify-content: flex-end; }
.clock__chip {
  font-size: 10px; letter-spacing: .28em; text-indent: .28em;
  font-family: var(--sans);
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  background: var(--panel);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.clock__season { color: var(--accent); }
/* 节日题签：随节日气氛变色——肃穆冷青、欢庆暖朱、举国同庆最亮；整体依旧低存在感 */
.clock__festival { font-weight: 600; transition: color .4s, border-color .4s, box-shadow .4s; }
.clock__festival[data-mood="fest"] { color: #b0633c; border-color: rgba(176,99,60,.35); }
.clock__festival[data-mood="grand"] {
  color: #c2442f; border-color: rgba(194,68,47,.5);
  box-shadow: 0 0 10px rgba(214,106,58,.25);
}
.clock__festival[data-mood="dim"] { color: #5a6b84; border-color: rgba(90,107,132,.4); }

/* ---------- 四季切换（左下角淡入口） ---------- */
.season-picker { position: fixed; left: 26px; bottom: 26px; z-index: 60; font-family: var(--sans); }
/* 景色切换器：复用季节切换器同款低存在感样式，仅位置叠于其上方 */
.scene-picker { bottom: 78px; }
.season-picker__btn {
  display: inline-flex; align-items: center; gap: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--soft);
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 12px; letter-spacing: .28em;
  cursor: pointer;
  transition: color .3s, border-color .3s;
}
.season-picker__btn:hover { color: var(--ink); border-color: var(--accent); }
.season-picker__btn i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  transition: background .8s ease, box-shadow .8s ease;
}
.season-picker__list {
  position: absolute; left: 0; bottom: 52px;
  display: none;
  flex-direction: column; gap: 2px;
  border: 1px solid var(--line);
  background: var(--panel);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: 12px;
  padding: 8px;
  min-width: 168px;
  box-shadow: 0 8px 26px rgba(40,50,35,.14);
}
.season-picker.open .season-picker__list { display: flex; }
.season-picker__list button {
  border: none; background: transparent;
  text-align: left;
  font-size: 13px; letter-spacing: .18em;
  color: var(--soft);
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.season-picker__list button:hover { background: rgba(140,160,120,.14); color: var(--ink); }
.season-picker__list button.on { color: var(--accent); }

/* ---------- 环境音开关（右下角淡色小钮） ---------- */
.ambient-btn {
  position: fixed; right: 26px; bottom: 26px; z-index: 60;
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--soft);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: .5;
  transition: opacity .4s, color .4s, border-color .4s, box-shadow .4s;
}
.ambient-btn:hover { opacity: 1; }
.ambient-btn.on {
  color: var(--accent); border-color: var(--accent);
  opacity: .92;
  box-shadow: 0 0 12px rgba(0,0,0,.06), 0 0 6px var(--accent) inset;
}

/* ---------- 序 ---------- */
.prologue {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 30px 80px;
}
.prologue__char {
  font-family: var(--serif);
  font-size: 104px;
  line-height: 1;
  color: var(--prologue-ink, var(--ink));
  opacity: .16;
  letter-spacing: .05em;
  margin-bottom: 12px;
  transition: color .8s ease, opacity .8s ease;
}
.prologue__line {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: .22em;
  color: var(--prologue-ink, var(--ink));
  opacity: var(--prologue-op, 1);
  margin: 0 0 14px;
  text-shadow: 0 2px 18px var(--prologue-halo, rgba(255,255,255,.5));
  transition: color .8s ease, opacity .8s ease;
}
.prologue__sub {
  font-size: 13px;
  letter-spacing: .28em;
  color: var(--prologue-soft, var(--soft));
  opacity: var(--prologue-op, 1);
  margin: 0;
  text-shadow: 0 1px 12px var(--prologue-halo, rgba(255,255,255,.45));
  transition: color .8s ease, opacity .8s ease;
}
.prologue__cue {
  position: absolute; left: 50%; bottom: 46px;
  transform: translateX(-50%);
  font-size: 11px; letter-spacing: .3em;
  color: var(--soft);
  animation: cue 2.6s ease-in-out infinite;
}
@keyframes cue { 0%,100% { opacity: .35; transform: translate(-50%, 0); } 50% { opacity: .85; transform: translate(-50%, 6px); } }

/* ---------- 四时流转 ---------- */
.seasons { padding: 90px 0 120px; }
.seasons__head { text-align: center; margin-bottom: 44px; }
.seasons__head h2 {
  font-family: var(--serif);
  font-size: 24px; letter-spacing: .4em; text-indent: .4em;
  color: var(--ink); margin: 0 0 10px;
  text-shadow: 0 2px 16px rgba(255,255,255,.45);
  transition: color .8s ease;
}
.seasons__head p { margin: 0; font-size: 12px; letter-spacing: .3em; color: var(--soft); }

.seasons__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.scard {
  position: relative;
  display: block;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 26px 24px 22px;
  cursor: pointer;
  color: var(--ink);
  overflow: hidden;
  transition: transform .5s cubic-bezier(.2,.65,.25,1), border-color .4s, box-shadow .4s, background .8s ease;
}
.scard::after {
  content: '';
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.2,.65,.25,1);
}
.scard:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(40,50,35,.16); }
.scard:hover::after { transform: scaleX(1); }
.scard.on { border-color: var(--accent); }
.scard.on::after { transform: scaleX(1); }
.scard__seal {
  position: absolute; right: 18px; top: 14px;
  font-family: var(--serif);
  font-size: 42px; line-height: 1;
  color: var(--accent); opacity: .22;
  transition: opacity .4s;
}
.scard:hover .scard__seal { opacity: .4; }
.scard h3 {
  font-family: var(--serif);
  font-size: 18px; letter-spacing: .2em;
  margin: 0 0 10px;
}
.scard p {
  font-family: var(--serif);
  font-size: 14px; letter-spacing: .08em;
  color: var(--soft); margin: 0 0 12px;
  transition: color .8s ease;
}
.scard em { font-style: normal; font-size: 11px; letter-spacing: .22em; color: var(--soft); opacity: .85; }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: auto;
  padding: 46px 30px 40px;
  text-align: center;
  border-top: 1px solid var(--line);
  background: var(--panel);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.foot__line { font-family: var(--serif); font-size: 15px; letter-spacing: .34em; text-indent: .34em; margin: 0 0 8px; color: var(--ink); }
.foot__note { margin: 0; font-size: 11px; letter-spacing: .2em; color: var(--soft); }
/* 合规信息：低存在感小号字，链接可直达查询 */
.foot__legal {
  margin: 14px 0 0;
  display: flex; flex-wrap: wrap;
  gap: 4px 18px; justify-content: center; align-items: center;
  font-size: 11px; letter-spacing: .12em;
  color: var(--soft);
}
.foot__legal a { color: var(--soft); opacity: .8; transition: color .3s, opacity .3s; }
.foot__legal a:hover { color: var(--accent); opacity: 1; }
.foot__shield { vertical-align: -2px; margin-right: 3px; }
.foot__report { margin: 6px 0 0; font-size: 10px; letter-spacing: .14em; color: var(--soft); opacity: .75; }

/* ---------- 自适应 ---------- */
@media (max-width: 760px) {
  .seasons__grid { grid-template-columns: 1fr; gap: 14px; }
  .prologue__char { font-size: 76px; }
  .prologue__line { font-size: 20px; letter-spacing: .16em; }
  .prologue__sub { font-size: 12px; letter-spacing: .18em; }
  .clock { top: 20px; right: 18px; }
  .clock__time { font-size: 18px; }
  .brand { font-size: 17px; }
  .season-picker { left: 16px; bottom: 16px; }
  .scene-picker { bottom: 66px; }
  .ambient-btn { right: 16px; bottom: 16px; width: 34px; height: 34px; }
  .seasons { padding: 60px 0 90px; }
}
