
:root {
  --ink: #18231f;
  --paper: #f5f1e8;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #0a1514;
}

body {
  margin: 0;
  color: var(--ink);
  background: #0a1514;
  font-family: var(--sans);
  overflow-x: hidden;
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

.site {
  min-height: 100vh;
  isolation: isolate;
}

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 2px;
  transform-origin: left;
  background: linear-gradient(90deg, #f8d5d2, #eacb78, #dce9f1);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  height: 72px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: white;
  mix-blend-mode: difference;
  pointer-events: none;
}

.site-header a,
.site-header button {
  pointer-events: auto;
}

.brand {
  width: max-content;
  font: 600 14px/1 var(--serif);
  letter-spacing: 0.2em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 28px;
}

.site-header nav a {
  position: relative;
  padding: 10px 2px;
  font: 500 12px/1 var(--serif);
  text-decoration: none;
  opacity: 0.42;
  transition: opacity 300ms ease;
}

.site-header nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%) scale(0);
  transition: transform 300ms ease;
}

.site-header nav a.active {
  opacity: 1;
}

.site-header nav a.active::after {
  transform: translateX(-50%) scale(1);
}

.sound-toggle {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 10px 0;
  background: transparent;
  color: inherit;
  font-size: 10px;
  letter-spacing: 0.15em;
  cursor: pointer;
}

.sound-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 14px;
  height: 12px;
}

.sound-bars i {
  width: 2px;
  height: 3px;
  background: currentColor;
}

.sound-bars--on i {
  animation: sound 900ms ease-in-out infinite alternate;
}

.sound-bars--on i:nth-child(2) {
  animation-delay: -500ms;
}

.sound-bars--on i:nth-child(3) {
  animation-delay: -200ms;
}

@keyframes sound {
  to { height: 11px; }
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  background: #172a28;
}

.hero-image {
  position: absolute;
  inset: -4%;
  background-image: url("/memories/spring-swing.jpg");
  background-position: 50% 44%;
  background-size: cover;
  filter: saturate(0.78) contrast(1.03);
  transform: scale(1.04);
  animation: hero-breathe 14s ease-in-out infinite alternate;
}

@keyframes hero-breathe {
  to { transform: scale(1.1) translateY(-1%); }
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 18, 17, 0.24), rgba(8, 18, 17, 0.08) 38%, rgba(8, 18, 17, 0.72)),
    radial-gradient(circle at center, transparent 20%, rgba(5, 13, 13, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(90vw, 780px);
  padding: 120px 24px 76px;
  text-align: center;
  text-shadow: 0 2px 28px rgba(6, 18, 16, 0.35);
}

.hero-kicker,
.finale-kicker {
  margin: 0 0 26px;
  font-size: 11px;
  letter-spacing: 0.4em;
  opacity: 0.82;
}

.hero h1 {
  margin: 0;
  font: 400 clamp(48px, 8vw, 104px)/1.05 var(--serif);
  letter-spacing: 0.06em;
}

.hero h1 span {
  display: block;
  margin-top: 12px;
  font-size: 0.52em;
  letter-spacing: 0.15em;
}

.hero-poem {
  margin: 44px auto 0;
  font: 400 clamp(14px, 1.5vw, 17px)/2.05 var(--serif);
  letter-spacing: 0.12em;
}

.hero-poem p {
  margin: 0;
}

.enter-button {
  position: relative;
  margin-top: 44px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  padding: 14px 18px 14px 24px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  color: white;
  font-size: 11px;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: background 300ms ease, transform 300ms ease;
}

.enter-button:hover {
  background: rgba(255, 255, 255, 0.17);
  transform: translateY(-2px);
}

.enter-button i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: white;
  color: #19312c;
  font-style: normal;
}

.hero-seasons {
  position: absolute;
  inset: auto clamp(20px, 4vw, 64px) 26px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 0.24em;
  opacity: 0.52;
}

.petals i,
.season-atmosphere i,
.finale-stars i {
  --i: 0;
  position: absolute;
}

.petals i {
  top: -10%;
  left: calc((var(--i) * 7%) - 4%);
  width: calc(7px + (var(--i) % 4) * 2px);
  height: calc(5px + (var(--i) % 3) * 2px);
  border-radius: 80% 20% 70% 30%;
  background: rgba(255, 230, 232, 0.72);
  animation: petal-fall calc(9s + (var(--i) % 5) * 2s) linear infinite;
  animation-delay: calc(var(--i) * -0.9s);
}

@keyframes petal-fall {
  0% { transform: translate3d(0, -5vh, 0) rotate(0); opacity: 0; }
  12% { opacity: 0.8; }
  100% { transform: translate3d(calc((var(--i) % 5) * 24px - 50px), 115vh, 0) rotate(540deg); opacity: 0; }
}

.chapter {
  position: relative;
  min-height: 200vh;
  padding: clamp(100px, 13vw, 190px) clamp(20px, 7vw, 110px);
  overflow: hidden;
}

.chapter--spring {
  color: #263a31;
  background: linear-gradient(180deg, #f3eee5, #e2ecdf 82%, #d8e6df);
}

.chapter--summer {
  color: #183e46;
  background: linear-gradient(180deg, #d8e6df, #d9edf0 56%, #d7e3d5);
}

.chapter--autumn {
  color: #342b18;
  background: linear-gradient(180deg, #d7e3d5, #d6c08f 36%, #7a6642 100%);
}

.chapter--winter {
  color: #263e4a;
  background: linear-gradient(180deg, #7a6642, #d7e4e8 20%, #eef3f3 100%);
}

.chapter-intro {
  position: relative;
  width: min(100%, 780px);
  margin: 0 auto clamp(100px, 16vw, 220px);
  text-align: center;
}

.chapter-number {
  display: block;
  margin-bottom: 22px;
  font: italic 26px/1 Georgia, serif;
  opacity: 0.38;
}

.chapter-season {
  margin: 0 0 18px;
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.42em;
}

.chapter h2 {
  margin: 0;
  font: 400 clamp(40px, 6.5vw, 82px)/1.15 var(--serif);
  letter-spacing: 0.08em;
}

.chapter-subtitle {
  width: min(100%, 520px);
  margin: 34px auto 0;
  font: 400 clamp(14px, 1.5vw, 17px)/2 var(--serif);
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.chapter-year {
  position: absolute;
  top: 52%;
  right: max(-18vw, -220px);
  font: 500 9px/1 var(--sans);
  letter-spacing: 0.28em;
  transform: rotate(90deg);
  opacity: 0.46;
}

.memories {
  width: min(100%, 1260px);
  margin: 0 auto;
  display: grid;
  gap: clamp(130px, 18vw, 260px);
}

.memory-card {
  --move-x: 0px;
  --move-y: 0px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  align-items: center;
  gap: clamp(48px, 8vw, 120px);
}

.memory-card--reverse {
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
}

.memory-card--reverse .photo-wrap {
  order: 2;
}

.photo-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 52% 48% 48% 52% / 3% 3% 3% 3%;
  box-shadow: 0 40px 100px rgba(28, 35, 28, 0.18);
  cursor: crosshair;
}

.memory-card--square .photo-wrap {
  aspect-ratio: 1;
}

.memory-card--landscape .photo-wrap {
  aspect-ratio: 16 / 10;
}

.photo-wrap img {
  width: calc(100% + 22px);
  height: calc(100% + 22px);
  margin: -11px;
  display: block;
  object-fit: cover;
  filter: saturate(0.86) contrast(1.03);
  transform: translate3d(var(--move-x), var(--move-y), 0) scale(1.045);
  transition: transform 400ms cubic-bezier(.2,.8,.2,1), filter 500ms ease;
}

.memory-card:hover .photo-wrap img {
  filter: saturate(1) contrast(1.02);
}

.photo-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.photo-index {
  position: absolute;
  left: 20px;
  bottom: 18px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: white;
  font: 500 9px/1 var(--sans);
  backdrop-filter: blur(7px);
}

.memory-ripple {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: ripple 1.1s ease-out forwards;
}

@keyframes ripple {
  to { width: 260px; height: 260px; opacity: 0; }
}

.memory-copy {
  position: relative;
  padding-left: clamp(16px, 3vw, 42px);
}

.memory-copy::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 1px;
  height: 72px;
  background: currentColor;
  opacity: 0.35;
}

.memory-eyebrow {
  display: block;
  margin-bottom: 22px;
  font: 500 10px/1 var(--sans);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  opacity: 0.58;
}

.memory-copy p {
  margin: 0;
  font: 400 clamp(19px, 2.15vw, 29px)/1.9 var(--serif);
  letter-spacing: 0.055em;
}

.memory-copy p span {
  display: block;
}

.chapter-closing {
  margin: clamp(140px, 20vw, 280px) auto 0;
  text-align: center;
  font: 400 clamp(15px, 1.8vw, 21px)/1.8 var(--serif);
  letter-spacing: 0.12em;
}

.chapter-closing span {
  display: block;
  margin-bottom: 24px;
  font-size: 11px;
  opacity: 0.48;
}

.season-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.chapter--spring .season-atmosphere i {
  top: calc((var(--i) * 13%) + 8%);
  left: calc((var(--i) * 31%) % 100%);
  width: 7px;
  height: 5px;
  border-radius: 80% 20% 80% 20%;
  background: rgba(225, 157, 167, 0.36);
  transform: rotate(calc(var(--i) * 31deg));
}

.chapter--summer .season-atmosphere i {
  top: calc((var(--i) * 17%) + 7%);
  left: calc((var(--i) * 29%) % 100%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 250, 193, 0.7);
  box-shadow: 0 0 12px #fff9b6;
  animation: glow 2s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -0.2s);
}

@keyframes glow {
  to { opacity: 0.18; transform: translateY(-12px); }
}

.chapter--autumn .season-atmosphere i {
  top: calc((var(--i) * 13%) + 5%);
  left: calc((var(--i) * 23%) % 100%);
  width: 11px;
  height: 7px;
  border-radius: 90% 10% 80% 20%;
  background: rgba(110, 75, 21, 0.26);
  transform: rotate(calc(var(--i) * 49deg));
}

.chapter--winter .season-atmosphere i {
  top: calc((var(--i) * 11%) + 3%);
  left: calc((var(--i) * 37%) % 100%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

.finale {
  position: relative;
  min-height: 170vh;
  min-height: 170svh;
  padding: clamp(130px, 16vw, 220px) 24px 150px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f4efe5;
  background:
    radial-gradient(circle at 50% 38%, rgba(186, 143, 92, 0.16), transparent 26%),
    radial-gradient(circle at 50% 50%, #17312f, #071312 72%);
}

.finale::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: repeating-linear-gradient(100deg, transparent 0 80px, rgba(255,255,255,.12) 81px, transparent 82px 160px);
}

.finale-stars i {
  --x: calc((var(--i) * 47%) % 100%);
  --y: calc((var(--i) * 29%) % 100%);
  left: var(--x);
  top: var(--y);
  width: calc(1px + (var(--i) % 3) * 1px);
  height: calc(1px + (var(--i) % 3) * 1px);
  border-radius: 50%;
  background: white;
  opacity: calc(0.22 + (var(--i) % 5) * 0.12);
  animation: star 2.4s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -0.12s);
}

@keyframes star {
  to { opacity: 0.14; transform: scale(0.5); }
}

.finale-copy {
  position: relative;
  z-index: 3;
  width: min(92vw, 720px);
  text-align: center;
}

.finale h2 {
  margin: 0;
  font: 400 clamp(42px, 7vw, 82px)/1.35 var(--serif);
  letter-spacing: 0.08em;
}

.finale-letter {
  margin: 68px auto 0;
  font: 400 clamp(15px, 1.8vw, 19px)/2.15 var(--serif);
  letter-spacing: 0.08em;
}

.finale-letter p {
  margin: 0 0 29px;
  opacity: 0.74;
}

.finale-letter strong {
  display: block;
  margin-top: 46px;
  color: #fff8e9;
  font: 400 clamp(22px, 3vw, 34px)/1.75 var(--serif);
  text-shadow: 0 0 30px rgba(248, 210, 154, 0.22);
}

.promise-button {
  margin-top: 58px;
  min-width: 220px;
  border: 1px solid rgba(244, 239, 229, 0.42);
  border-radius: 999px;
  padding: 16px 30px;
  background: transparent;
  color: #f4efe5;
  font: 500 12px/1 var(--serif);
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: all 450ms ease;
}

.promise-button:hover,
.promise-button--done {
  border-color: #f3dfb7;
  background: #f3dfb7;
  color: #17312f;
  box-shadow: 0 0 60px rgba(243, 223, 183, 0.22);
}

.after-note {
  margin-top: 20px;
  font: 400 12px/1.8 var(--serif);
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.after-note--visible {
  opacity: 0.6;
  transform: translateY(0);
}

.finale-orbit {
  position: absolute;
  z-index: 1;
  inset: 50% auto auto 50%;
  width: min(78vw, 980px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: orbit 90s linear infinite;
}

.finale-orbit img {
  position: absolute;
  width: clamp(58px, 9vw, 120px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.42);
  filter: saturate(0.72) brightness(0.75);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.finale-orbit img:nth-child(1) { left: 11%; top: 10%; transform: rotate(-8deg); }
.finale-orbit img:nth-child(2) { right: -2%; top: 34%; transform: rotate(7deg); }
.finale-orbit img:nth-child(3) { right: 15%; bottom: 5%; transform: rotate(-5deg); }
.finale-orbit img:nth-child(4) { left: -1%; bottom: 26%; transform: rotate(9deg); }

@keyframes orbit {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

footer {
  min-height: 100px;
  padding: 34px clamp(20px, 4vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  color: rgba(255, 255, 255, 0.5);
  background: #071312;
  font-size: 9px;
  letter-spacing: 0.2em;
}

@media (max-width: 760px) {
  .site-header {
    height: 58px;
    grid-template-columns: 1fr auto;
    padding-inline: 18px;
  }

  .site-header nav {
    position: fixed;
    inset: auto 18px 18px;
    z-index: 95;
    justify-content: space-around;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(13, 27, 25, 0.62);
    backdrop-filter: blur(18px);
    mix-blend-mode: normal;
  }

  .site-header nav a {
    padding: 7px 13px;
    color: white;
  }

  .sound-toggle {
    display: none;
  }

  .hero-image {
    background-position: 52% 52%;
  }

  .hero-content {
    padding-top: 96px;
  }

  .hero h1 {
    font-size: clamp(44px, 14vw, 68px);
  }

  .hero h1 span {
    margin-top: 16px;
    font-size: 0.44em;
  }

  .hero-poem {
    margin-top: 36px;
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .enter-button {
    margin-top: 36px;
    padding-left: 18px;
    font-size: 10px;
    letter-spacing: 0.1em;
  }

  .hero-seasons {
    display: none;
  }

  .chapter {
    min-height: 150vh;
    padding: 120px 20px 130px;
  }

  .chapter-intro {
    margin-bottom: 110px;
  }

  .chapter h2 {
    font-size: 40px;
  }

  .chapter-subtitle {
    padding-inline: 18px;
    font-size: 14px;
  }

  .chapter-year {
    display: none;
  }

  .memories {
    gap: 140px;
  }

  .memory-card,
  .memory-card--reverse {
    display: flex;
    flex-direction: column;
    gap: 38px;
  }

  .memory-card--reverse .photo-wrap {
    order: 0;
  }

  .photo-wrap,
  .memory-card--square .photo-wrap,
  .memory-card--landscape .photo-wrap {
    width: 100%;
    aspect-ratio: 4 / 5;
    border-radius: 49% 51% 50% 50% / 2% 2% 2% 2%;
  }

  .memory-card--landscape .photo-wrap {
    aspect-ratio: 1 / 1;
  }

  .memory-copy {
    width: 100%;
    padding-left: 18px;
  }

  .memory-copy p {
    font-size: 19px;
    line-height: 1.9;
  }

  .chapter-closing {
    margin-top: 150px;
    padding-inline: 18px;
    font-size: 15px;
  }

  .finale {
    min-height: 160vh;
    min-height: 160svh;
    padding: 150px 20px 130px;
  }

  .finale h2 {
    font-size: 42px;
  }

  .finale-letter {
    margin-top: 52px;
    font-size: 14px;
    line-height: 2.05;
  }

  .finale-letter strong {
    font-size: 22px;
  }

  .finale-orbit {
    width: 124vw;
    opacity: 0.26;
  }

  footer {
    padding-bottom: 100px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
