:root {
  --ivory: #fff8ed;
  --gold: #efce91;
  --rose: #d9a0a8;
  --plum: #170d24;
  --glass: rgba(31, 17, 43, 0.54);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--plum);
}

body {
  margin: 0;
  color: var(--ivory);
  font-family: "Manrope", sans-serif;
  overflow-x: hidden;
}

.background {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: linear-gradient(rgba(13, 6, 24, .12), rgba(13, 6, 24, .62)), url("assets/moonlit-garden.png") center / cover;
  transform: scale(1.02);
}

.glow {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at 50% 25%, rgba(255, 217, 165, .15), transparent 27%);
  pointer-events: none;
}

#sparkles {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px 3px rgba(255, 223, 160, .65);
  animation: float var(--duration) ease-in-out infinite;
  opacity: 0;
}

main { position: relative; }

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8vh 20px 15vh;
  text-align: center;
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
}

h1, h2, h3, blockquote {
  font-family: "Cormorant Garamond", serif;
}

h1 {
  margin: 0;
  font-size: clamp(64px, 11vw, 146px);
  font-weight: 500;
  line-height: .79;
  letter-spacing: -.055em;
  text-shadow: 0 5px 35px rgba(0, 0, 0, .25);
}

h1 em {
  color: #f5c9c6;
  font-weight: 500;
}

.intro {
  margin: 34px 0 30px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(20px, 2.4vw, 29px);
  font-style: italic;
  line-height: 1.35;
  opacity: .9;
}

.button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 23px;
  border: 1px solid rgba(255, 240, 215, .45);
  border-radius: 999px;
  color: var(--plum);
  background: rgba(255, 248, 237, .94);
  box-shadow: 0 12px 35px rgba(7, 2, 13, .24);
  font: 600 11px/1 "Manrope", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .25s, box-shadow .25s, background .25s;
}

.button:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 16px 42px rgba(7, 2, 13, .35);
}

.button-heart { color: #b45f76; font-size: 16px; }

.scroll-note {
  position: absolute;
  bottom: 24px;
  margin: 0;
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  opacity: .55;
}

.scroll-note::after {
  content: "";
  display: block;
  width: 1px;
  height: 34px;
  margin: 12px auto 0;
  background: linear-gradient(var(--ivory), transparent);
}

.reasons {
  padding: 120px max(24px, 7vw) 140px;
  background: linear-gradient(180deg, rgba(15, 7, 25, .12), rgba(15, 7, 25, .88) 25%, rgba(15, 7, 25, .94));
}

.section-heading { text-align: center; }

h2 {
  margin: 0 0 50px;
  font-size: clamp(46px, 7vw, 82px);
  font-weight: 500;
  letter-spacing: -.045em;
}

.cards {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cards article {
  min-height: 250px;
  padding: 32px;
  border: 1px solid rgba(255, 240, 215, .18);
  border-radius: 4px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  transition: transform .3s, border-color .3s;
}

.cards article:hover {
  transform: translateY(-7px);
  border-color: rgba(239, 206, 145, .55);
}

.cards span { color: var(--gold); font: 500 11px/1 "Manrope", sans-serif; letter-spacing: .2em; }
.cards h3 { margin: 42px 0 10px; font-size: 35px; font-weight: 500; }
.cards p { margin: 0; color: rgba(255, 248, 237, .7); font-size: 13px; line-height: 1.8; }

.wish {
  padding: 130px 24px 150px;
  text-align: center;
  background: rgba(15, 7, 25, .94);
}

blockquote {
  margin: 0 auto 38px;
  font-size: clamp(36px, 5vw, 68px);
  font-style: italic;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.signature {
  color: var(--gold);
  font: italic 500 22px/1.3 "Cormorant Garamond", serif;
}

dialog {
  width: min(650px, calc(100% - 28px));
  max-height: calc(100svh - 28px);
  padding: 0;
  border: 1px solid rgba(239, 206, 145, .45);
  border-radius: 8px;
  color: #3b2036;
  background: #fff8ed;
  box-shadow: 0 30px 100px rgba(7, 2, 13, .65);
  overflow-y: auto;
}

dialog::backdrop {
  background: rgba(10, 4, 17, .74);
  backdrop-filter: blur(8px);
}

dialog[open] { animation: appear .4s ease both; }

.letter-content { padding: clamp(40px, 8vw, 72px); }
.letter-content .eyebrow { color: #a15e6c; margin-bottom: 14px; }
.letter-content h2 { margin: 0 0 24px; font-size: clamp(42px, 7vw, 62px); }
.letter-content p { font: 500 17px/1.8 "Cormorant Garamond", serif; }
.letter-content .letter-end { font-size: 20px; font-style: italic; }
.letter-content .signature { margin-top: 30px; color: #a15e6c; }

.close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 0;
  color: #7a5269;
  background: transparent;
  font: 300 28px/1 sans-serif;
  cursor: pointer;
}

@keyframes float {
  0%, 100% { transform: translateY(15px) scale(.6); opacity: 0; }
  30%, 70% { opacity: .8; }
  50% { transform: translateY(-30px) scale(1); opacity: 1; }
}

@keyframes appear {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 720px) {
  .background { background-position: 55% center; }
  .hero { padding-top: 4vh; }
  h1 { font-size: clamp(58px, 20vw, 82px); line-height: .85; }
  .cards { grid-template-columns: 1fr; }
  .cards article { min-height: 210px; }
  .reasons { padding-top: 90px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; }
}
