:root {
  --paper: #f7f3ea;
  --paper-deep: #eee7d9;
  --ink: #18212b;
  --muted: #5f665f;
  --blue: #1767c0;
  --blue-dark: #0e467f;
  --coral: #e86155;
  --yellow: #e9b52d;
  --line: rgba(24, 33, 43, .16);
  --shadow: 0 26px 70px rgba(32, 41, 47, .15);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; }
a { color: inherit; }
button { font: inherit; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: white;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.memory-thread {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 4;
  width: min(20vw, 210px);
  height: 100vh;
  pointer-events: none;
  opacity: .42;
}
.memory-thread path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 12 12;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: white;
}
.hero > img,
.hero-shade { position: absolute; inset: 0; height: 100%; }
.hero > img { object-fit: cover; object-position: center 58%; }
.hero-shade {
  background:
    linear-gradient(180deg, rgba(11, 18, 20, .08) 10%, rgba(11, 18, 20, .12) 42%, rgba(11, 18, 20, .78) 100%),
    linear-gradient(90deg, rgba(11, 18, 20, .38), transparent 60%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(700px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18vh 0 max(10vh, 74px);
}
.date,
.kicker,
footer p {
  margin: 0 0 18px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .22em;
}
.hero h1,
.section h2 {
  font-family: "STKaiti", "KaiTi", serif;
  font-weight: 700;
  letter-spacing: -.04em;
}
.hero h1 {
  max-width: 620px;
  margin: 0 0 24px;
  font-size: clamp(3.2rem, 10vw, 7.8rem);
  line-height: .98;
  text-shadow: 0 4px 26px rgba(0, 0, 0, .2);
}
.hero-copy > p:not(.date) {
  max-width: 440px;
  margin: 0 0 34px;
  color: rgba(255, 255, 255, .88);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.8;
}
.begin {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  padding: 0 2px 7px;
  border-bottom: 1px solid rgba(255, 255, 255, .75);
  text-decoration: none;
  font-weight: 700;
}

.section { position: relative; padding: clamp(88px, 12vw, 176px) 20px; }
.section-inner { width: min(1080px, 100%); margin: 0 auto; }
.section h2 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5.6rem);
  line-height: 1.08;
}
.kicker { color: var(--blue); }
.muted { color: var(--muted); line-height: 1.85; }

.voice-section {
  background:
    radial-gradient(circle at 84% 12%, rgba(233, 181, 45, .17) 0 2px, transparent 3px),
    linear-gradient(var(--paper), var(--paper));
  background-size: 56px 56px, auto;
}
.voice-layout { display: grid; gap: 70px; align-items: end; }
.voice-intro { max-width: 680px; }
.voice-intro .muted { max-width: 440px; margin: 28px 0 0; }
.audio-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .58);
  box-shadow: var(--shadow);
  backdrop-filter: blur(9px);
}
.play-button {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background: var(--blue);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}
.play-button:hover { transform: scale(1.04); background: var(--blue-dark); }
.play-button:focus-visible,
.wave:focus-visible,
.begin:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.play-button svg { width: 28px; height: 28px; fill: currentColor; }
.pause-icon { display: none; }
.is-playing .play-icon { display: none; }
.is-playing .pause-icon { display: block; }
.audio-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; font-weight: 700; }
.wave {
  height: 48px;
  display: flex;
  gap: 3px;
  align-items: center;
  margin: 8px 0 2px;
  cursor: pointer;
}
.wave span {
  width: 3px;
  height: var(--h);
  min-height: 7px;
  border-radius: 999px;
  background: var(--line);
  transition: background 120ms ease;
}
.wave span.played { background: var(--coral); }
.audio-note { margin: 0; color: var(--muted); font-size: .76rem; }

.memories { padding-top: 80px; overflow: hidden; }
.memory-heading { max-width: 760px; margin: 0 0 clamp(80px, 12vw, 150px); }
.moment { margin: 0; }
.moment figure { margin: 0; }
.moment img { object-fit: cover; box-shadow: var(--shadow); }
.moment figcaption {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--muted);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.7;
}
.moment figcaption span { display: inline-block; margin-right: 12px; color: var(--coral); font-family: inherit; font-weight: 700; }
.moment-wide { width: min(900px, 94%); }
.moment-wide img { aspect-ratio: 4 / 3; object-position: center; }
.moment-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr);
  gap: clamp(50px, 9vw, 130px);
  align-items: center;
  margin: clamp(110px, 18vw, 220px) 0;
}
.moment-pair .moment img { aspect-ratio: 3 / 4; }
.quote { margin: 0; }
.quote p {
  margin: 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.55;
}
.moment-ducks { width: min(630px, 85%); margin: 0 0 0 auto; }
.moment-ducks img { aspect-ratio: 3 / 4; }
.lake-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
  margin: clamp(110px, 18vw, 220px) 0;
}
.moment-selfie { padding-top: 12vw; }
.moment-selfie img { aspect-ratio: 4 / 3; }
.moment-portrait img { aspect-ratio: 4 / 3; }
.soft-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 6vw, 86px); align-items: end; }
.soft-grid article:first-child img { aspect-ratio: 3 / 2; }
.soft-grid article:last-child img { aspect-ratio: 1; }

.letter {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  background: #e9eced;
}
.letter-photo { min-height: 76vh; overflow: hidden; }
.letter-photo img { height: 100%; object-fit: cover; object-position: 50% center; filter: saturate(.75) contrast(.92); }
.letter-panel { align-self: center; padding: clamp(70px, 9vw, 150px) clamp(28px, 7vw, 110px); }
.letter-panel h2 { font-size: clamp(2.65rem, 5vw, 5.4rem); }
.letter-copy { max-width: 570px; margin: 44px 0 0; }
.letter-copy p { margin: 0 0 22px; color: #3e494f; line-height: 2; }
.signature { margin-top: 48px; color: var(--blue-dark); font-family: "STKaiti", "KaiTi", serif; font-size: 1.35rem; }
.signature svg { display: block; width: 120px; margin-top: 7px; }
.signature path { fill: none; stroke: var(--coral); stroke-width: 2; stroke-linecap: round; }

footer {
  min-height: 42vh;
  display: grid;
  place-content: center;
  gap: 20px;
  padding: 80px 20px;
  text-align: center;
  color: white;
  background: var(--blue-dark);
}
footer p { margin: 0; }
footer span { font-family: serif; font-size: 2.6rem; color: var(--coral); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 760ms ease, transform 760ms cubic-bezier(.2,.8,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (min-width: 820px) {
  .hero-copy { width: min(1180px, calc(100% - 96px)); }
  .voice-layout { grid-template-columns: 1fr .82fr; }
}

@media (max-width: 700px) {
  .memory-thread { width: 34vw; opacity: .22; }
  .hero > img { object-position: center 52%; }
  .hero-copy { padding-bottom: 72px; }
  .hero h1 { font-size: clamp(3.1rem, 16vw, 5rem); }
  .section { padding-inline: 22px; }
  .audio-card { grid-template-columns: 56px 1fr; gap: 15px; }
  .play-button { width: 56px; height: 56px; }
  .wave { gap: 2px; }
  .wave span { width: 2px; }
  .moment-pair,
  .lake-grid,
  .soft-grid,
  .letter { grid-template-columns: 1fr; }
  .moment-pair { gap: 80px; }
  .moment-wide,
  .moment-ducks { width: 100%; }
  .moment-selfie { padding-top: 0; }
  .lake-grid,
  .soft-grid { gap: 84px; }
  .letter-photo { min-height: 62vh; }
  .letter-panel { padding: 88px 22px 104px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
