:root {
  --cream: #fffaf6;
  --paper: #fffdf9;
  --rose: #b85c6e;
  --deep: #4f3439;
  --pink: #f6dce0;
  --peach: #f8e7da;
  --lavender: #e9e2f2;
  --sage: #dfe8dc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--deep);
  background: var(--cream);
  font-family: "DM Sans", sans-serif;
  overflow-x: hidden;
}

.grain {
  position: fixed;
  inset: 0;
  opacity: .035;
  pointer-events: none;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}

.music-toggle {
  position: fixed;
  right: 24px;
  top: 22px;
  z-index: 30;
  border: 1px solid rgba(184, 92, 110, .25);
  background: rgba(255, 253, 249, .84);
  backdrop-filter: blur(12px);
  color: var(--rose);
  border-radius: 30px;
  padding: 10px 15px;
  display: flex;
  gap: 9px;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(91, 50, 60, .08);
}
.music-icon { font-family: serif; font-size: 19px; }
.music-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.sound-waves { display: none; align-items: center; gap: 2px; height: 14px; }
.sound-waves i { width: 2px; height: 8px; background: var(--rose); animation: wave .8s infinite alternate; }
.sound-waves i:nth-child(2) { animation-delay: .25s; height: 13px; }
.sound-waves i:nth-child(3) { animation-delay: .45s; height: 6px; }
.music-toggle.playing .sound-waves { display: flex; }
@keyframes wave { to { transform: scaleY(.35); } }

.hero {
  min-height: 100vh;
  padding: 100px 24px 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  background:
    radial-gradient(circle at 18% 18%, rgba(246,220,224,.72), transparent 26%),
    radial-gradient(circle at 83% 75%, rgba(233,226,242,.7), transparent 27%);
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 140px;
  border: 1px solid rgba(184,92,110,.25);
  border-radius: 50%;
  transform: rotate(35deg);
}
.hero::before { left: -45px; top: 38%; }
.hero::after { right: -50px; bottom: 14%; transform: rotate(-35deg); }
.eyebrow, .section-number {
  color: var(--rose);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
}
.script { font-family: "Petit Formal Script", cursive; color: var(--rose); font-size: clamp(24px, 3vw, 38px); margin: 0 0 12px; }
h1, h2, h3 { font-family: "Italiana", serif; font-weight: 400; margin: 0; }
h1 { font-size: clamp(56px, 9.5vw, 128px); line-height: .9; letter-spacing: -.035em; max-width: 1100px; margin: 22px 0 32px; }
h1 em, h2 em { color: var(--rose); font-weight: 400; }
.hero-copy { max-width: 535px; line-height: 1.85; color: #775d62; font-size: 16px; margin: 0 0 35px; }
.love-button {
  text-decoration: none;
  background: var(--rose);
  color: white;
  padding: 15px 18px 15px 28px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  letter-spacing: .06em;
  box-shadow: 0 12px 30px rgba(184,92,110,.24);
  transition: transform .25s, box-shadow .25s;
}
.love-button:hover { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(184,92,110,.32); }
.button-heart { width: 31px; height: 31px; background: #fff; color: var(--rose); border-radius: 50%; display: grid; place-items: center; }
.scroll-note { position: absolute; bottom: 24px; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: #a88b90; }
.scroll-note span { display: block; font-size: 17px; margin-top: 7px; animation: bob 1.6s infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }
.hero-flower { position: absolute; color: rgba(184,92,110,.28); font-size: 30px; animation: sway 5s ease-in-out infinite; }
.flower-one { left: 14%; top: 24%; }
.flower-two { right: 15%; top: 29%; animation-delay: -2s; font-size: 24px; }
@keyframes sway { 50% { transform: rotate(15deg) translateY(-8px); } }

.section-wrap { max-width: 1180px; margin: auto; padding: 120px 32px; }
.section-heading { text-align: center; margin: 55px 0; }
.section-heading h2, .memory-copy h2, .gallery h2 { font-size: clamp(42px, 6vw, 76px); line-height: 1.02; }
.reason-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.reason-card {
  position: relative;
  min-height: 310px;
  background: var(--peach);
  padding: 40px 34px;
  border-radius: 150px 150px 20px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform .35s;
}
.reason-card:hover { transform: translateY(-8px) rotate(-1deg); }
.reason-card.blush { background: var(--pink); }
.reason-card.lavender { background: var(--lavender); }
.card-icon { font-size: 30px; color: var(--rose); margin-bottom: 20px; }
.reason-card h3 { font-size: 35px; margin-bottom: 13px; }
.reason-card p { color: #795f64; line-height: 1.7; font-size: 14px; max-width: 250px; }
.card-count { position: absolute; bottom: 20px; font-family: serif; color: rgba(79,52,57,.35); font-size: 12px; }

.memories { max-width: none; background: #f7eee8; padding-left: max(32px, calc((100vw - 1116px)/2)); padding-right: max(32px, calc((100vw - 1116px)/2)); }
.memory-layout { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 70px; margin-top: 60px; }
.memory-copy > p:not(.script) { line-height: 1.9; color: #765e63; max-width: 430px; }
.tiny-note { display: inline-block; margin-top: 23px; border-bottom: 1px solid #c999a2; padding-bottom: 8px; font-family: "Petit Formal Script"; color: var(--rose); }
.polaroids { position: relative; min-height: 530px; }
.polaroid { position: absolute; margin: 0; background: white; padding: 12px 12px 42px; box-shadow: 0 18px 45px rgba(79,52,57,.15); width: 245px; transition: transform .35s, z-index 0s; }
.polaroid:hover { transform: rotate(0) scale(1.04); z-index: 5; }
.p-one { left: 2%; top: 80px; transform: rotate(-8deg); }
.p-two { right: 5%; top: 10px; transform: rotate(7deg); }
.p-three { left: 31%; bottom: 0; transform: rotate(2deg); }
.photo-placeholder { height: 250px; display: grid; place-items: center; overflow: hidden; background-size: cover; }
.photo-placeholder::before { content: "♡"; font: 65px "Italiana"; color: rgba(255,255,255,.75); }
.photo-placeholder span { position: absolute; color: white; font-size: 9px; text-transform: uppercase; letter-spacing: .2em; margin-top: 90px; }
.photo-one { background: linear-gradient(145deg, #d8bbb1, #e8d8ca 48%, #a8b1a1); }
.photo-two { background: linear-gradient(35deg, #b5a3ae, #e7c7c5 50%, #e9d9c3); }
.photo-three { background: linear-gradient(130deg, #b9b8a5, #e4d7c8 48%, #c8a9ad); }
.polaroid figcaption { font-family: "Petit Formal Script"; text-align: center; color: #796066; margin-top: 14px; font-size: 13px; }

.message { text-align: center; }
.message > .section-number { margin-bottom: 65px; }
.letter { position: relative; max-width: 820px; margin: auto; background: var(--paper); padding: 80px 95px 70px; box-shadow: 0 15px 70px rgba(93,59,66,.10); transform: rotate(-.4deg); border: 1px solid rgba(180,145,150,.18); }
.letter h2 { font-size: clamp(38px, 5vw, 60px); margin: 18px 0 35px; }
.letter > p:not(.script) { font-family: Georgia, serif; color: #765d62; font-size: 16px; line-height: 2; }
.signature { font-family: "Petit Formal Script"; font-size: clamp(26px, 4vw, 40px); color: var(--rose); margin-top: 35px; }
.tape { position: absolute; width: 130px; height: 34px; background: rgba(231,211,189,.55); top: -18px; left: calc(50% - 65px); transform: rotate(2deg); }
.letter-stamp { position: absolute; right: 28px; top: 28px; width: 55px; height: 66px; border: 1px solid #cf9ea6; color: var(--rose); display: grid; place-items: center; font: 23px "Italiana"; }
.letter-stamp small { position: absolute; bottom: 6px; font-size: 10px; }

.gallery { max-width: 1100px; }
.gallery-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 60px; }
.gallery-heading .section-number { align-self: flex-start; }
.gallery-grid { display: grid; grid-template-columns: 1.05fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 16px; }
.gallery-photo { position: relative; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; color: white; overflow: hidden; }
.gallery-photo::after { content: "♡"; position: absolute; right: -10px; bottom: -35px; font: 120px "Italiana"; opacity: .2; }
.gallery-photo span { font: 12px "DM Sans"; letter-spacing: .15em; }
.gallery-photo p { font-family: "Petit Formal Script"; font-size: 19px; margin: 0; }
.gallery-photo.tall { grid-row: 1 / 3; background: linear-gradient(145deg, #b4a8b8, #dcc8cc); }
.gallery-photo.warm { background: linear-gradient(145deg, #c99e92, #e8c9bb); }
.gallery-photo.soft { background: linear-gradient(145deg, #b5bba8, #d8d7c5); }
.gallery-photo.wide { grid-column: 2 / 4; background: linear-gradient(100deg, #c5a7ad, #e6ceca); }
.swap-note { text-align: center; color: #a18388; font-size: 12px; margin-top: 24px; }

.question { min-height: 760px; display: grid; place-items: center; padding: 100px 24px; position: relative; overflow: hidden; background: linear-gradient(135deg, #f4dadd, #f9eee8 55%, #e8e0ef); }
.question-card, .celebration { text-align: center; background: rgba(255,253,249,.88); width: min(700px, 100%); padding: 75px 55px; border-radius: 220px 220px 24px 24px; box-shadow: 0 22px 65px rgba(111,61,72,.13); }
.mini-hearts { color: var(--rose); margin-bottom: 25px; letter-spacing: .3em; }
.question h2 { font-size: clamp(54px, 8vw, 92px); }
.question-copy { color: #80666b; margin: 20px 0 35px; }
.answer-buttons { display: flex; justify-content: center; gap: 14px; }
.answer { border: 0; border-radius: 50px; padding: 15px 28px; font: 600 13px "DM Sans"; cursor: pointer; transition: transform .25s, box-shadow .25s; }
.answer:hover { transform: translateY(-3px) scale(1.03); }
.answer.yes { background: var(--rose); color: white; box-shadow: 0 10px 22px rgba(184,92,110,.25); }
.answer.absolutely { background: var(--pink); color: var(--rose); }
.fine-print { font-size: 10px; color: #aa8d92; margin-top: 18px; }
.celebration { display: none; position: relative; z-index: 2; }
.celebration h2 { color: var(--rose); }
.celebration p:not(.script) { color: #80666b; }
.celebration button { border: 0; background: transparent; color: var(--rose); border-bottom: 1px solid #d4a7af; padding: 7px; cursor: pointer; }
.question.answered .question-card { display: none; }
.question.answered .celebration { display: block; animation: pop .65s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: scale(.8) rotate(-2deg); } }

.confetti { position: absolute; top: -30px; z-index: 1; animation: fall var(--duration) linear forwards; font-size: var(--size); color: var(--color); }
@keyframes fall { to { transform: translate(var(--drift), 850px) rotate(720deg); opacity: .2; } }
.floating-heart { position: fixed; bottom: -20px; z-index: 0; color: rgba(184,92,110,.18); animation: floatUp linear forwards; pointer-events: none; }
@keyframes floatUp { to { transform: translateY(-110vh) rotate(25deg); opacity: 0; } }

footer { background: var(--deep); color: #eedde0; display: flex; justify-content: center; align-items: center; gap: 30px; padding: 32px; font-size: 10px; text-transform: uppercase; letter-spacing: .13em; text-align: center; }
.footer-heart { color: #e99baa; font-size: 16px; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { transform: scale(1.2); } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 800px) {
  .reason-grid { grid-template-columns: 1fr; max-width: 430px; margin: auto; }
  .reason-card { min-height: 270px; }
  .memory-layout { grid-template-columns: 1fr; }
  .memory-copy { text-align: center; }
  .memory-copy > p:not(.script) { margin-inline: auto; }
  .polaroids { transform: scale(.88); margin-inline: -35px; }
  .letter { padding: 70px 30px 50px; }
  .letter-stamp { opacity: .5; }
  .gallery-heading { display: block; text-align: center; }
  .gallery-heading .section-number { margin-bottom: 30px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 270px 200px 220px; }
  .gallery-photo.tall { grid-row: 1; grid-column: 1 / 3; }
  .gallery-photo.wide { grid-column: 1 / 3; }
}

@media (max-width: 520px) {
  .section-wrap { padding: 90px 20px; }
  .music-toggle { top: 14px; right: 14px; }
  .music-label { display: none; }
  .hero { padding-inline: 18px; }
  h1 { font-size: 56px; }
  .flower-one { left: 5%; }
  .flower-two { right: 5%; }
  .polaroids { min-height: 660px; transform: none; margin: 0; }
  .polaroid { width: 205px; }
  .photo-placeholder { height: 205px; }
  .p-one { left: 0; }
  .p-two { right: 0; top: 200px; }
  .p-three { left: 6%; bottom: 0; }
  .question-card, .celebration { padding: 60px 22px; border-radius: 150px 150px 20px 20px; }
  .answer-buttons { flex-direction: column; }
  .answer { width: 100%; }
  footer { flex-direction: column; gap: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}
