:root {
  --blush: #f6c6cf;
  --rose: #d87a8d;
  --petal: #fff4f6;
  --cream: #fffaf1;
  --sage: #b8cbbb;
  --mist: #dce8ef;
  --ink: #3d3438;
  --muted: #7b6e72;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(80, 55, 64, 0.14);
  --app-height: 100vh;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(246, 198, 207, 0.42), transparent 22rem),
    radial-gradient(circle at 88% 28%, rgba(220, 232, 239, 0.5), transparent 24rem),
    linear-gradient(180deg, #fffaf7 0%, #fff5f7 46%, #f8fbf7 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", sans-serif;
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

.page-shell {
  overflow-x: hidden;
}

.hero {
  position: relative;
  display: grid;
  min-height: 94vh;
  padding: 28px 20px 72px;
  padding-top: max(28px, env(safe-area-inset-top));
  place-items: center;
  isolation: isolate;
}

.hero::before {
  position: absolute;
  inset: 18px;
  z-index: -2;
  border: 1px solid rgba(216, 122, 141, 0.16);
  border-radius: 34px;
  content: "";
}

.hero-mark {
  position: absolute;
  top: 17%;
  width: min(420px, 76vw);
  aspect-ratio: 1;
  z-index: -1;
  border: 1px solid rgba(216, 122, 141, 0.14);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.52) 0 28%, transparent 29%),
    conic-gradient(from 120deg, rgba(246, 198, 207, 0.42), rgba(220, 232, 239, 0.35), rgba(184, 203, 187, 0.3), rgba(246, 198, 207, 0.42));
  filter: blur(0.2px);
  opacity: 0.68;
}

.hero-content {
  width: min(850px, 100%);
  text-align: center;
}

.eyebrow,
.section-kicker,
.section-heading p {
  margin-bottom: 12px;
  color: var(--rose);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 22px;
  color: #4b3a41;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(3.9rem, 14vw, 8.6rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.92;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(1.9rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.14;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.22rem;
  line-height: 1.35;
}

.hero-copy {
  width: min(660px, 100%);
  margin: 0 auto 30px;
  color: #67585e;
  font-size: clamp(1rem, 3.8vw, 1.24rem);
  font-weight: 500;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-action {
  min-width: 150px;
  padding: 0 24px;
  color: var(--white);
  background: #3f3439;
  box-shadow: 0 14px 32px rgba(63, 52, 57, 0.18);
}

.secondary-action {
  min-width: 150px;
  padding: 0 22px;
  color: #6a4d56;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 30px rgba(80, 55, 64, 0.1);
}

.primary-action:active,
.secondary-action:active,
.gift-button:active {
  transform: scale(0.97);
}

.wish-section,
.memory-section,
.surprise-section {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
  padding: 76px 0;
}

.section-heading {
  margin-bottom: 30px;
  text-align: center;
}

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

.wish-card {
  min-height: 224px;
  padding: 26px;
  border: 1px solid rgba(216, 122, 141, 0.13);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 48px rgba(80, 55, 64, 0.09);
}

.card-number {
  display: inline-flex;
  margin-bottom: 28px;
  color: rgba(216, 122, 141, 0.74);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
}

.wish-card p,
.memory-text p,
.surprise-message {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}

.memory-section {
  width: 100%;
  padding-top: 84px;
}

.memory-heading {
  width: auto;
  max-width: 920px;
  padding-right: 18px;
  padding-left: 18px;
  margin-right: auto;
  margin-left: auto;
}

.memory-reveal {
  width: auto;
  max-width: 760px;
  padding-right: 18px;
  padding-left: 18px;
  margin: 0 auto 70px;
}

.memory-item {
  display: grid;
  min-height: var(--memory-stage-height, 360px);
  align-items: stretch;
}

.memory-item::before {
  display: none;
}

.memory-photo,
.memory-text {
  grid-area: 1 / 1;
  width: 100%;
}

.memory-photo {
  display: block;
  width: 100%;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
  line-height: 0;
  opacity: var(--memory-photo-opacity, 1);
  transform: translateY(var(--memory-photo-y, 0)) scale(var(--memory-photo-scale, 1));
  transition: opacity 120ms linear, transform 120ms linear;
  z-index: 1;
}

.memory-photo img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: inherit;
}

.memory-text {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 7vw, 58px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  opacity: var(--memory-text-opacity, 0);
  transform: translateY(var(--memory-text-y, 0));
  transition: opacity 120ms linear, transform 120ms linear;
  z-index: 2;
  pointer-events: none;
}

.memory-text span {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--rose);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
}

.memory-text h3 {
  font-size: clamp(1.8rem, 6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.18;
}

.surprise-section {
  padding-bottom: 92px;
}

.surprise-box {
  position: relative;
  overflow: hidden;
  padding: 44px 22px;
  border: 1px solid rgba(216, 122, 141, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: var(--shadow);
  text-align: center;
}

.gift-button {
  position: relative;
  width: 138px;
  height: 124px;
  margin: 8px auto 20px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.gift-lid,
.gift-body,
.gift-ribbon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.gift-lid {
  top: 20px;
  width: 118px;
  height: 28px;
  border-radius: 10px;
  background: #d87a8d;
  transition: transform 280ms ease;
}

.gift-body {
  top: 51px;
  width: 104px;
  height: 68px;
  border-radius: 13px;
  background: linear-gradient(135deg, #f3c9a4, #d87a8d);
  box-shadow: 0 16px 34px rgba(216, 122, 141, 0.2);
}

.gift-ribbon {
  top: 18px;
  width: 21px;
  height: 101px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.gift-button.is-open .gift-lid {
  transform: translateX(-50%) translateY(-16px) rotate(-8deg);
}

.surprise-message {
  width: min(650px, 100%);
  max-height: 0;
  margin: 0 auto;
  overflow: hidden;
  opacity: 0;
  transition: max-height 420ms ease, opacity 420ms ease;
}

.surprise-message.is-visible {
  max-height: 220px;
  opacity: 1;
}

.site-footer {
  padding: 28px 18px 36px;
  color: #8a787e;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.confetti-piece {
  position: fixed;
  top: -18px;
  z-index: 20;
  width: 8px;
  height: 12px;
  border-radius: 999px;
  pointer-events: none;
  animation: confetti-fall 1.9s linear forwards;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes confetti-fall {
  to {
    transform: translate3d(var(--drift), 110vh, 0) rotate(540deg);
    opacity: 0.82;
  }
}

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

@media (max-width: 760px) {
  .hero {
    min-height: var(--app-height);
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero::before {
    inset: 10px;
    border-radius: 24px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: min(350px, 100%);
    margin: 0 auto;
  }

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

  .wish-section,
  .surprise-section {
    width: auto;
    max-width: 560px;
    margin-right: auto;
    margin-left: auto;
    padding: 58px 14px;
  }

  .wish-grid {
    grid-template-columns: 1fr;
  }

  .wish-card {
    min-height: auto;
    padding: 22px;
  }

  .memory-heading {
    width: auto;
    max-width: 560px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .memory-reveal {
    width: auto;
    max-width: 520px;
    padding-right: 14px;
    padding-left: 14px;
    margin-bottom: 56px;
  }

  .memory-item {
    gap: 14px;
  }

  .memory-photo,
  .memory-text {
    width: 100%;
    max-width: 100%;
  }

  .memory-photo img {
    height: auto;
    max-width: 100%;
    border-radius: 20px;
  }

  .memory-text {
    border-radius: 20px;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: clamp(3.2rem, 16vw, 4.4rem);
  }

  .hero-copy {
    font-size: 0.96rem;
    line-height: 1.75;
  }

  .memory-photo,
  .memory-text {
    width: 100%;
  }

  .memory-photo img {
    height: auto;
  }
}

@media (max-height: 680px) and (max-width: 760px) {
  .section-heading {
    margin-bottom: 22px;
  }

  .memory-photo img {
    height: auto;
  }

  .memory-text {
    padding: 22px;
  }

  .memory-text h3 {
    font-size: clamp(1.45rem, 7vw, 2.2rem);
  }
}

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

  .memory-photo,
  .memory-text {
    transform: none;
  }
}
