:root {
  --ink: #fff9ec;
  --muted: rgba(255, 249, 236, 0.74);
  --night: #101726;
  --deep: #142d38;
  --rose: #ff8aa7;
  --coral: #ffbf92;
  --gold: #f8dc8e;
  --mint: #8ce6d7;
  --panel: rgba(17, 30, 43, 0.68);
  --line: rgba(255, 249, 236, 0.18);
  --shadow: 0 28px 80px rgba(2, 8, 15, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 138, 167, 0.22), transparent 28rem),
    radial-gradient(circle at 82% 22%, rgba(140, 230, 215, 0.18), transparent 24rem),
    linear-gradient(145deg, #0d1520 0%, #123140 45%, #261c2e 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 72%);
  z-index: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.aurora {
  position: fixed;
  inset: -18vh -22vw;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  mix-blend-mode: screen;
  opacity: 0.78;
  filter: blur(18px) saturate(1.25);
}

.aurora span {
  position: absolute;
  width: 76vw;
  height: 54vh;
  border-radius: 999px;
  opacity: 0.62;
  transform-origin: center;
  animation: auroraDrift 14s ease-in-out infinite alternate;
}

.aurora span:first-child {
  top: 10vh;
  left: -22vw;
  background: radial-gradient(ellipse at center, rgba(140, 230, 215, 0.48), rgba(255, 138, 167, 0.16) 44%, transparent 70%);
}

.aurora span:last-child {
  right: -28vw;
  bottom: 8vh;
  background: radial-gradient(ellipse at center, rgba(248, 220, 142, 0.38), rgba(107, 142, 216, 0.2) 46%, transparent 72%);
  animation-delay: -5s;
}

.scroll-orbit {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 14px;
  z-index: 5;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 249, 236, 0.12);
  pointer-events: none;
  box-shadow: 0 0 18px rgba(140, 230, 215, 0.16);
}

.scroll-orbit span {
  position: absolute;
  left: 0;
  top: 50%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow:
    0 0 14px rgba(248, 220, 142, 0.9),
    0 0 32px rgba(255, 138, 167, 0.58);
  transform: translate(-50%, -50%);
}

.hero,
.section,
.footer {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 92vh;
  padding: 28px clamp(18px, 5vw, 72px) 42px;
  display: flex;
  flex-direction: column;
}

.nav {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(248, 220, 142, 0.45);
  border-radius: 50%;
  color: var(--gold);
  font-weight: 900;
  box-shadow: 0 0 26px rgba(248, 220, 142, 0.22);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 15px;
}

.nav-links a {
  padding: 8px 0;
}

.hero-grid {
  width: min(1180px, 100%);
  min-height: calc(92vh - 118px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: clamp(34px, 7vw, 84px);
}

.hero-copy {
  max-width: 690px;
}

.date,
.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  font-size: 17px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow:
    0 0 18px rgba(255, 249, 236, 0.12),
    0 18px 48px rgba(0, 0, 0, 0.32);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 24px;
}

.hero-text {
  max-width: 640px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.95;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-action,
.ghost-action,
.letter-toggle,
.wish-buttons button {
  position: relative;
  overflow: hidden;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.primary-action::after,
.letter-toggle::after,
.wish-buttons button::after {
  content: "";
  position: absolute;
  inset: -80% auto -80% -45%;
  width: 34px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.64), transparent);
  transform: rotate(18deg);
  animation: buttonShine 3.8s ease-in-out infinite;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
}

.primary-action {
  color: #1b1520;
  background: linear-gradient(135deg, var(--gold), var(--coral), var(--rose));
  box-shadow: 0 18px 42px rgba(255, 138, 167, 0.28);
}

.ghost-action {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.primary-action:hover,
.ghost-action:hover,
.letter-toggle:hover,
.wish-buttons button:hover {
  transform: translateY(-2px);
}

.moon-scene {
  margin: 0;
  min-height: 520px;
  display: grid;
  place-items: center;
  position: relative;
  perspective: 900px;
}

.moon-scene img {
  width: min(100%, 520px);
  filter: drop-shadow(0 34px 56px rgba(0, 0, 0, 0.34));
  transform: translate3d(var(--tilt-x, 0), var(--tilt-y, 0), 0);
  transition: transform 160ms ease-out;
  animation: floatMoon 6s ease-in-out infinite;
}

.halo-ring {
  position: absolute;
  width: min(82%, 460px);
  aspect-ratio: 1;
  border: 1px solid rgba(248, 220, 142, 0.18);
  border-radius: 50%;
  filter: drop-shadow(0 0 22px rgba(140, 230, 215, 0.2));
  animation: ringPulse 5.8s ease-in-out infinite;
}

.ring-one {
  transform: rotate(-18deg) scaleX(1.15);
}

.ring-two {
  border-color: rgba(255, 138, 167, 0.16);
  transform: rotate(24deg) scaleX(0.92);
  animation-delay: -2.6s;
}

.moon-scene figcaption {
  position: absolute;
  bottom: 12px;
  color: rgba(255, 249, 236, 0.68);
  font-family: "Kaiti SC", "STKaiti", "Songti SC", serif;
  font-size: 18px;
}

.section {
  padding: 94px clamp(18px, 5vw, 72px);
}

.story-section {
  padding-top: 56px;
}

.section-heading {
  width: min(1180px, 100%);
  margin: 0 auto 38px;
}

.section-heading h2 {
  max-width: 780px;
}

.timeline {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.time-card,
.letter-panel,
.wish-board {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.time-card {
  min-height: 260px;
  padding: 26px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
}

.time-card::before,
.letter-panel::before,
.wish-board::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.12) 42%, transparent 64%);
  transform: translateX(-120%);
  animation: panelSweep 7s ease-in-out infinite;
}

.time-card::after {
  content: "";
  position: absolute;
  inset: auto 20px 18px 20px;
  height: 2px;
  background: linear-gradient(90deg, var(--rose), var(--gold), var(--mint));
  opacity: 0.72;
}

.time-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 620ms ease, transform 620ms ease;
}

.time-year {
  display: inline-block;
  margin-bottom: 44px;
  color: var(--gold);
  font-size: 34px;
  font-weight: 900;
}

.time-card p,
.letter-panel p,
.wish-board p {
  color: var(--muted);
  line-height: 1.85;
}

.letter-section {
  background: linear-gradient(180deg, transparent, rgba(255, 138, 167, 0.08), transparent);
}

.letter-layout {
  width: min(960px, 100%);
  margin: 0 auto;
}

.letter-layout .section-heading {
  width: 100%;
}

.letter-panel {
  padding: clamp(26px, 5vw, 52px);
  position: relative;
  overflow: hidden;
}

.letter-greeting {
  color: var(--ink);
  font-size: 22px;
}

.letter-body {
  max-height: 188px;
  overflow: hidden;
  transition: max-height 480ms ease;
}

.letter-body.open {
  max-height: 620px;
}

.hidden-line {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.letter-body.open .hidden-line {
  opacity: 1;
  transform: translateY(0);
}

.letter-toggle {
  margin-top: 20px;
  padding: 0 20px;
  color: #1b1520;
  background: var(--gold);
}

.wish-grid {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 58px);
}

.planet {
  width: 300px;
  aspect-ratio: 1;
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 32%, #fff5cb 0 5%, transparent 6%),
    radial-gradient(circle at 50% 50%, #f7b2c2 0 28%, #e5698e 29% 48%, #6b8ed8 49% 70%, #15243d 71%);
  box-shadow:
    inset -28px -34px 54px rgba(4, 8, 20, 0.46),
    0 0 72px rgba(255, 138, 167, 0.28);
  animation: slowSpin 16s linear infinite;
  transform: translate3d(calc(var(--tilt-x, 0) * -0.6), calc(var(--tilt-y, 0) * -0.6), 0);
  transition: transform 160ms ease-out;
}

.planet::before,
.planet::after {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px solid rgba(248, 220, 142, 0.2);
  animation: planetPulse 3.8s ease-out infinite;
}

.planet::after {
  inset: -38px;
  border-color: rgba(140, 230, 215, 0.18);
  animation-delay: -1.7s;
}

.orbit {
  position: absolute;
  inset: 42px;
  border: 1px solid rgba(248, 220, 142, 0.42);
  border-radius: 50%;
}

.orbit-one {
  transform: rotate(-18deg) scaleX(1.38);
}

.orbit-two {
  transform: rotate(22deg) scaleX(1.18);
  border-color: rgba(140, 230, 215, 0.38);
}

.little-star {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 50px;
  right: 54px;
  background: var(--gold);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 92%, 50% 70%, 21% 92%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 0 14px rgba(248, 220, 142, 0.76));
}

.wish-board {
  padding: clamp(24px, 4vw, 40px);
  position: relative;
  overflow: hidden;
}

.wish-board p {
  min-height: 104px;
  margin-bottom: 24px;
  font-size: 22px;
}

.wish-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.wish-buttons button {
  padding: 0 18px;
  color: var(--ink);
  border-color: rgba(255, 249, 236, 0.22);
  background: rgba(255, 255, 255, 0.07);
}

.footer {
  padding: 48px 18px 60px;
  text-align: center;
  color: rgba(255, 249, 236, 0.74);
}

.spark {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  pointer-events: none;
  z-index: 4;
  animation: sparkFly 760ms ease-out forwards;
}

.heart-spark {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--rose);
  pointer-events: none;
  z-index: 6;
  transform: rotate(45deg);
  animation: heartFly 900ms ease-out forwards;
}

.heart-spark::before,
.heart-spark::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: inherit;
}

.heart-spark::before {
  left: -5px;
}

.heart-spark::after {
  top: -5px;
}

@keyframes auroraDrift {
  0% {
    transform: translate3d(0, 0, 0) rotate(-8deg) scale(1);
  }
  100% {
    transform: translate3d(18vw, 8vh, 0) rotate(12deg) scale(1.12);
  }
}

@keyframes buttonShine {
  0%,
  58% {
    transform: translateX(0) rotate(18deg);
    opacity: 0;
  }
  70% {
    opacity: 1;
  }
  100% {
    transform: translateX(360px) rotate(18deg);
    opacity: 0;
  }
}

@keyframes ringPulse {
  0%,
  100% {
    opacity: 0.22;
    scale: 0.94;
  }
  50% {
    opacity: 0.72;
    scale: 1.05;
  }
}

@keyframes panelSweep {
  0%,
  52% {
    transform: translateX(-120%);
  }
  74%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes planetPulse {
  0% {
    opacity: 0.65;
    transform: scale(0.92);
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes floatMoon {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -18px;
  }
}

@keyframes slowSpin {
  to {
    rotate: 360deg;
  }
}

@keyframes sparkFly {
  to {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.2);
  }
}

@keyframes heartFly {
  to {
    opacity: 0;
    transform: translate(var(--x), var(--y)) rotate(45deg) scale(0.15);
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .wish-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-top: 46px;
  }

  .moon-scene {
    min-height: 310px;
  }

  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planet {
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  body {
    background:
      radial-gradient(circle at 20% 6%, rgba(248, 220, 142, 0.14), transparent 13rem),
      radial-gradient(circle at 90% 28%, rgba(140, 230, 215, 0.13), transparent 15rem),
      linear-gradient(160deg, #0d1520 0%, #122735 56%, #231a2d 100%);
  }

  .aurora {
    inset: -10vh -48vw;
    opacity: 0.86;
    filter: blur(16px) saturate(1.34);
  }

  .scroll-orbit {
    left: 22px;
    right: 22px;
    bottom: 10px;
  }

  .hero {
    padding-top: 18px;
    padding-bottom: 24px;
    min-height: auto;
  }

  .nav {
    align-items: center;
  }

  .brand {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
  }

  .nav-links {
    gap: 8px;
    font-size: 14px;
  }

  .nav-links a {
    min-height: 36px;
    padding: 8px 7px;
    display: inline-flex;
    align-items: center;
  }

  h1 {
    font-size: 34px;
    margin-bottom: 18px;
  }

  .hero-grid {
    min-height: 0;
  }

  h2 {
    font-size: 30px;
  }

  .hero-text,
  .time-card p,
  .letter-panel p {
    font-size: 16px;
  }

  .hero-text {
    line-height: 1.62;
  }

  .hero-actions {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1.18fr;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .time-card {
    min-height: 0;
    padding: 20px 20px 26px;
  }

  .time-year {
    margin-bottom: 14px;
    font-size: 28px;
  }

  .time-card h3 {
    margin-bottom: 8px;
    font-size: 22px;
  }

  .section {
    padding: 68px 20px;
  }

  .story-section {
    padding-top: 48px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .letter-panel,
  .wish-board {
    padding: 22px;
  }

  .letter-greeting {
    font-size: 20px;
  }

  .letter-body {
    max-height: 244px;
  }

  .letter-toggle {
    width: 100%;
    min-height: 48px;
  }

  .wish-grid {
    gap: 24px;
  }

  .planet {
    width: min(224px, 70vw);
  }

  .moon-scene img {
    width: min(248px, 76vw);
  }

  .moon-scene {
    min-height: 250px;
  }

  .halo-ring {
    width: min(72vw, 260px);
  }

  .wish-board p {
    min-height: 112px;
    font-size: 19px;
    line-height: 1.75;
  }

  .wish-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .wish-buttons button {
    min-height: 46px;
    padding: 0 8px;
  }
}

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