:root {
  --ink: #101014;
  --ink-2: #18171f;
  --paper: #fff8f1;
  --paper-soft: rgba(255, 248, 241, 0.82);
  --line: rgba(255, 248, 241, 0.16);
  --text: #fffaf2;
  --muted: rgba(255, 250, 242, 0.7);
  --rose: #ff6f91;
  --coral: #ff9671;
  --gold: #ffd166;
  --cyan: #7ddff2;
  --mint: #94e8b4;
  --violet: #b99cff;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(130deg, rgba(255, 111, 145, 0.14), transparent 30%),
    linear-gradient(220deg, rgba(125, 223, 242, 0.12), transparent 34%),
    linear-gradient(180deg, var(--ink), #07070a 72%);
  color: var(--text);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    system-ui,
    -apple-system,
    sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 248, 241, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 248, 241, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), transparent 92%);
  z-index: -2;
}

button,
a,
input {
  font: inherit;
}

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

img {
  display: block;
  max-width: 100%;
}

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

.ambient-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 18%, rgba(255, 209, 102, 0.07) 19%, transparent 20%),
    linear-gradient(75deg, transparent 44%, rgba(125, 223, 242, 0.06) 45%, transparent 46%);
  background-size: 680px 680px, 540px 540px;
  animation: driftLines 36s linear infinite;
  opacity: 0.46;
  z-index: -1;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 16, 20, 0.62);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.brand span {
  font-size: 1.1rem;
  white-space: nowrap;
}

.brand small {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(125, 223, 242, 0.16);
  color: var(--cyan);
  font-family: inherit;
  font-size: 0.76rem;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.site-nav a {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
  transition:
    color 180ms ease,
    background 180ms ease;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 248, 241, 0.08);
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 248, 241, 0.18);
  border-radius: 999px;
  background: rgba(255, 248, 241, 0.08);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.icon-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 209, 102, 0.5);
  background: rgba(255, 209, 102, 0.13);
}

.icon-button svg,
.primary-action svg,
.ghost-action svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.icon-button i,
.primary-action i,
.ghost-action i {
  font-style: normal;
  line-height: 1;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  align-items: center;
  gap: 56px;
  padding: 124px 7vw 54px;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 170px;
  background:
    linear-gradient(to bottom, transparent, rgba(255, 248, 241, 0.09)),
    repeating-linear-gradient(
      -8deg,
      transparent 0,
      transparent 18px,
      rgba(255, 248, 241, 0.04) 19px,
      transparent 20px
    );
  clip-path: polygon(0 42%, 100% 12%, 100% 100%, 0 100%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 5.5rem;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.poem {
  min-height: 5.2em;
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--paper);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 1.28rem;
}

.poem::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  background: var(--gold);
  vertical-align: -0.14em;
  animation: blink 1s step-end infinite;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.primary-action,
.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.primary-action {
  color: #261014;
  background: linear-gradient(135deg, var(--gold), var(--coral) 55%, var(--rose));
  box-shadow: 0 16px 34px rgba(255, 111, 145, 0.24);
  font-weight: 700;
}

.primary-action:hover,
.ghost-action:hover {
  transform: translateY(-2px);
}

.ghost-action {
  border-color: rgba(255, 248, 241, 0.2);
  background: rgba(255, 248, 241, 0.08);
  color: var(--paper);
}

.couple-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 150px 1fr;
  align-items: center;
  min-height: 420px;
}

.couple-stage::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 49%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--gold), var(--rose), transparent);
  box-shadow: 0 0 24px rgba(255, 209, 102, 0.5);
  animation: linePulse 2.8s ease-in-out infinite;
}

.avatar-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.avatar-wrap img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid rgba(255, 248, 241, 0.86);
  object-fit: cover;
  box-shadow:
    0 0 0 10px rgba(255, 248, 241, 0.06),
    0 24px 50px rgba(0, 0, 0, 0.38);
}

.avatar-wrap span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 700;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.avatar-left {
  transform: translateY(-20px);
}

.avatar-right {
  transform: translateY(28px);
}

.heart-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
}

.heart-core img {
  width: 78px;
  height: 78px;
  animation: heartBeat 1.7s ease-in-out infinite;
  filter: drop-shadow(0 0 22px rgba(255, 111, 145, 0.62));
}

.time-panel {
  position: absolute;
  z-index: 2;
  left: 7vw;
  right: 7vw;
  bottom: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 248, 241, 0.14);
  border-radius: 8px;
  background: rgba(16, 16, 20, 0.56);
  backdrop-filter: blur(18px);
}

.time-label {
  color: var(--muted);
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(8, auto);
  align-items: baseline;
  gap: 5px 8px;
  white-space: nowrap;
}

.time-grid strong {
  min-width: 2.25ch;
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
  text-align: right;
}

.time-grid span {
  color: var(--muted);
  font-size: 0.9rem;
}

.band {
  padding: 92px 7vw;
  position: relative;
}

.band:nth-of-type(2n) {
  background: rgba(255, 248, 241, 0.035);
}

.section-heading {
  max-width: 740px;
  margin-bottom: 30px;
}

.section-heading h2,
.finale h2,
.love-dialog h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 2.5rem;
  line-height: 1.22;
  letter-spacing: 0;
  text-wrap: balance;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.intro-text {
  display: grid;
  gap: 16px;
  color: var(--paper-soft);
  font-size: 1.14rem;
}

.intro-text p {
  margin: 0;
}

.moment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.moment-card {
  min-height: 245px;
  padding: 24px;
  border: 1px solid rgba(255, 248, 241, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(155deg, rgba(255, 248, 241, 0.12), rgba(255, 248, 241, 0.035)),
    rgba(16, 16, 20, 0.42);
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.moment-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 209, 102, 0.44);
  background:
    linear-gradient(155deg, rgba(255, 209, 102, 0.15), rgba(125, 223, 242, 0.07)),
    rgba(16, 16, 20, 0.48);
}

.moment-card span {
  color: var(--cyan);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  line-height: 1;
}

.moment-card h3 {
  margin: 24px 0 10px;
  font-size: 1.2rem;
}

.moment-card p {
  margin: 0;
  color: var(--muted);
}

.promise-layout {
  max-width: 760px;
}

.promise-copy {
  max-width: 720px;
  color: var(--paper-soft);
  font-size: 1.15rem;
}

.promise-copy p {
  margin: 0 0 16px;
}

blockquote {
  margin: 26px 0 0;
  padding: 20px 22px;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(255, 248, 241, 0.07);
  color: var(--paper);
  font-family: "Noto Serif SC", "Songti SC", serif;
}

.letter-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.letter-strip p {
  margin: 0;
  min-height: 170px;
  padding: 22px;
  border: 1px solid rgba(255, 248, 241, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 241, 0.12), rgba(255, 248, 241, 0.04)),
    rgba(16, 16, 20, 0.44);
  color: var(--paper-soft);
}

.wishlist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wish {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 248, 241, 0.14);
  border-radius: 8px;
  background: rgba(255, 248, 241, 0.06);
  color: var(--paper-soft);
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.wish:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 232, 180, 0.38);
  background: rgba(148, 232, 180, 0.08);
}

.wish input {
  width: 20px;
  height: 20px;
  accent-color: var(--mint);
  flex: 0 0 auto;
}

.wish span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.finale {
  position: relative;
  display: grid;
  min-height: 82vh;
  place-items: center;
  padding: 92px 7vw;
  text-align: center;
  overflow: hidden;
}

.finale::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 111, 145, 0.05), transparent 36%),
    repeating-linear-gradient(90deg, transparent 0, transparent 120px, rgba(255, 248, 241, 0.035) 121px, transparent 122px);
  opacity: 0.8;
}

.finale-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.finale-inner p:not(.eyebrow) {
  margin: 22px auto 30px;
  max-width: 620px;
  color: var(--paper-soft);
  font-size: 1.15rem;
}

.love-dialog {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(255, 248, 241, 0.18);
  border-radius: 8px;
  background: rgba(20, 18, 24, 0.94);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(18px);
}

.love-dialog::backdrop {
  background: rgba(6, 6, 8, 0.72);
  backdrop-filter: blur(6px);
}

.love-dialog form {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 34px;
}

.love-dialog p:not(.eyebrow) {
  margin: 0;
  color: var(--paper-soft);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 680ms ease,
    transform 680ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.spark {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  background: var(--spark-color);
  box-shadow: 0 0 18px var(--spark-color);
  transform: translate(-50%, -50%);
  animation: sparkFly 760ms ease-out forwards;
  z-index: 30;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes driftLines {
  to {
    background-position: 680px 680px, -540px 540px;
  }
}

@keyframes linePulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scaleX(0.86);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes heartBeat {
  0%,
  100% {
    transform: scale(0.92);
  }
  40% {
    transform: scale(1.12);
  }
  58% {
    transform: scale(0.98);
  }
}

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

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 14px 20px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 106px 22px 150px;
  }

  .hero h1 {
    font-size: 3.9rem;
  }

  .poem {
    font-size: 1.08rem;
  }

  .couple-stage {
    grid-template-columns: 1fr 104px 1fr;
    min-height: 290px;
  }

  .couple-stage::before {
    left: 8%;
    right: 8%;
  }

  .avatar-wrap img {
    width: 112px;
    height: 112px;
  }

  .heart-core {
    width: 104px;
    height: 104px;
  }

  .heart-core img {
    width: 58px;
    height: 58px;
  }

  .time-panel {
    left: 22px;
    right: 22px;
    bottom: 24px;
    align-items: flex-start;
    flex-direction: column;
  }

  .time-grid {
    white-space: normal;
  }

  .intro-band,
  .moment-grid,
  .letter-strip,
  .wishlist {
    grid-template-columns: 1fr;
  }

  .band {
    padding: 72px 22px;
  }

  .section-heading h2,
  .finale h2,
  .love-dialog h2 {
    font-size: 2rem;
  }

}

@media (max-width: 540px) {
  .brand span {
    font-size: 1rem;
  }

  .brand small {
    display: none;
  }

  .hero h1 {
    font-size: 2.85rem;
  }

  .hero-actions {
    display: grid;
  }

  .primary-action,
  .ghost-action {
    width: 100%;
  }

  .couple-stage {
    grid-template-columns: 1fr 74px 1fr;
    gap: 0;
    min-height: 185px;
  }

  .couple-stage::before {
    display: block;
    left: 9%;
    right: 9%;
    top: 42%;
  }

  .avatar-left,
  .avatar-right {
    transform: translateY(0);
  }

  .avatar-wrap {
    gap: 8px;
  }

  .avatar-wrap img {
    width: 84px;
    height: 84px;
    border-width: 2px;
    box-shadow:
      0 0 0 7px rgba(255, 248, 241, 0.06),
      0 16px 28px rgba(0, 0, 0, 0.32);
  }

  .avatar-wrap span {
    font-size: 1rem;
  }

  .heart-core {
    width: 74px;
    height: 74px;
  }

  .heart-core img {
    width: 44px;
    height: 44px;
  }

  .time-grid strong {
    font-size: 1.42rem;
  }

  .moment-card,
  .letter-strip p {
    min-height: auto;
  }

  .love-dialog form {
    padding: 30px 20px 22px;
  }
}

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