/* 续命日记官网 · 窗光手账 · 进场仪式 */
:root {
  --ink: #1C1A17;
  --ink-2: #5C574F;
  --ink-3: #8A8478;
  --sill: #EDE8E0;
  --linen: #2D3E33;
  --wash: #F7F2EA;
  --bright: #FBF7F0;
  --seal: #C6463A;
  --hair: rgba(28,26,23,0.16);
  --max: 48rem;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: #1a1714;
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.78; }

.page {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.photo {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(237,232,224,0.28) 0%, rgba(237,232,224,0.02) 36%, rgba(28,26,23,0.18) 62%, rgba(28,26,23,0.72) 100%),
    url('/scene-sun.jpg') center 32% / cover no-repeat;
  opacity: 0;
  transform: scale(1.06);
  filter: brightness(0.88) saturate(0.92);
  animation: photoIn 3.2s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}
.photo::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 45% at 55% 30%, rgba(251,247,240,0.22), transparent 70%);
  opacity: 0;
  animation: washIn 2.8s ease 0.4s forwards;
  pointer-events: none;
}
@keyframes photoIn {
  to { opacity: 1; transform: scale(1); filter: brightness(1) saturate(1); }
}
@keyframes washIn {
  0% { opacity: 0; }
  45% { opacity: 1; }
  100% { opacity: 0.55; }
}

.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: flex-end;
  width: min(100% - 2.25rem, var(--max));
  margin: 0 auto;
  padding: 1.2rem 0 0;
  opacity: 0;
  animation: fadeUp 1.1s ease 0.85s forwards;
}
.nav { display: flex; gap: 1.25rem; font-size: 0.86rem; letter-spacing: 0.22em; color: var(--ink-2); }

.stage {
  position: relative; z-index: 1;
  flex: 1;
  width: min(100% - 2.25rem, var(--max));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 3.2rem;
  color: var(--bright);
}

.rite {
  margin: 0 0 2.1rem;
  padding: 0;
  list-style: none;
  max-width: 38rem;
}
.rite li { margin: 0; }

.line-main {
  font-weight: 500;
  font-size: clamp(1.55rem, 4.6vw, 2.35rem);
  letter-spacing: 0.3em;
  line-height: 1.55;
  color: rgba(251,247,240,0.96);
  text-shadow: 0 1px 18px rgba(28,26,23,0.25);
  display: flex;
  flex-wrap: wrap;
}
.line-main .ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) scale(0.96);
  filter: blur(4px);
}
.line-main.is-in .ch {
  animation: chIn 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.line-main .ch.punct {
  letter-spacing: 0.08em;
}

.line-body {
  margin-top: 1.45rem !important;
  font-size: clamp(1.12rem, 3.1vw, 1.45rem);
  line-height: 1.95;
  color: rgba(251,247,240,0.88);
  max-width: 34rem;
  opacity: 0;
  letter-spacing: 0.55em;
  filter: blur(3px);
}
.line-body.is-in {
  animation: bodyIn 1.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.line-body .break { display: block; margin-top: 0.15em; }

.seal-line {
  margin-top: 1.85rem !important;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: clamp(1rem, 2.5vw, 1.18rem);
  letter-spacing: 0.36em;
  color: rgba(251,247,240,0.78);
  opacity: 0;
}
.seal-line.is-in { animation: fadeUp 0.9s ease forwards; }
.seal-line .stamp {
  width: 1.15rem; height: 1.15rem; flex: none;
  border: 1.5px solid var(--seal);
  color: var(--seal);
  font-size: 0.62rem;
  letter-spacing: 0;
  display: grid; place-items: center;
  line-height: 1;
  opacity: 0;
  transform: scale(1.6) rotate(-8deg);
  box-shadow: 0 0 0 0 rgba(198,70,58,0);
}
.seal-line.is-in .stamp {
  animation: stampIn 0.75s cubic-bezier(0.18, 1.2, 0.35, 1) 0.05s forwards;
}
.seal-line .rule {
  display: block;
  width: 2.4rem;
  height: 1px;
  background: rgba(198,70,58,0.9);
  flex: none;
  transform: scaleX(0);
  transform-origin: left center;
}
.seal-line.is-in .rule {
  animation: ruleIn 0.9s ease 0.35s forwards;
}
.seal-line .txt {
  opacity: 0;
  transform: translateX(0.4em);
}
.seal-line.is-in .txt {
  animation: fadeUp 0.9s ease 0.55s forwards;
}

@keyframes chIn {
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes bodyIn {
  to { opacity: 1; letter-spacing: 0.18em; filter: blur(0); }
}
@keyframes stampIn {
  0% { opacity: 0; transform: scale(1.7) rotate(-10deg); box-shadow: 0 0 0 0 rgba(198,70,58,0); }
  60% { opacity: 1; transform: scale(0.92) rotate(0deg); box-shadow: 0 0 0 10px rgba(198,70,58,0.12); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); box-shadow: 0 0 0 0 rgba(198,70,58,0); }
}
@keyframes ruleIn { to { transform: scaleX(1); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.links {
  display: flex; gap: 1.5rem; flex-wrap: wrap;
  font-size: 0.9rem;
  letter-spacing: 0.24em;
  color: rgba(251,247,240,0.7);
  opacity: 0;
  transform: translateY(10px);
}
.links.is-in { animation: fadeUp 1s ease forwards; }
.links a {
  border-bottom: 1px solid rgba(251,247,240,0.28);
  padding-bottom: 0.18rem;
}
.links a:hover { color: var(--bright); border-bottom-color: var(--bright); opacity: 1; }

@media (max-width: 640px) {
  .line-main { letter-spacing: 0.18em; }
  .line-body.is-in { letter-spacing: 0.1em; }
  .seal-line { letter-spacing: 0.2em; }
}

@media (prefers-reduced-motion: reduce) {
  .photo, .photo::after, .top, .line-main .ch, .line-body, .seal-line, .seal-line .stamp, .seal-line .rule, .seal-line .txt, .links {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    letter-spacing: inherit;
  }
  .line-body { letter-spacing: 0.18em; filter: none; }
  .seal-line .rule { transform: scaleX(1); }
}

/* 内页 */
.inner-body { background: var(--wash); min-height: 100vh; color: var(--ink); }
.inner-top {
  display: flex; align-items: center; justify-content: space-between;
  width: min(100% - 2.25rem, var(--max)); margin: 0 auto; padding: 1.15rem 0;
  border-bottom: 1px solid var(--hair);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  letter-spacing: 0.22em; font-size: 0.92rem; color: var(--ink);
}
.brand .mark { width: 9px; height: 9px; background: var(--seal); flex: none; }
.inner-top .nav { display: flex; gap: 1.1rem; font-size: 0.88rem; letter-spacing: 0.16em; }
.inner-top .nav a { color: var(--ink-2); }
.prose { width: min(100% - 2.25rem, var(--max)); margin: 0 auto; padding: 2.2rem 0 3.5rem; }
.prose h1 { margin: 0 0 0.35rem; font-weight: 500; font-size: 1.7rem; letter-spacing: 0.24em; }
.prose .meta { color: var(--ink-3); font-size: 0.88rem; margin-bottom: 1.75rem; }
.prose h2 { margin: 1.85rem 0 0.7rem; font-weight: 500; font-size: 1.05rem; letter-spacing: 0.14em; color: var(--linen); }
.prose p, .prose li { color: var(--ink-2); line-height: 1.75; }
.prose ul { padding-left: 1.15rem; }
.prose a { color: var(--seal); }
.foot {
  width: min(100% - 2.25rem, var(--max)); margin: 0 auto;
  padding: 0 0 1.8rem; font-size: 0.8rem; color: var(--ink-3);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.foot a { color: var(--ink-3); }
