:root {
  --cream: #fffaf6;
  --warm-white: #fffefe;
  --rose-light: #fce5e9;
  --rose: #e99aa8;
  --rose-dark: #ae596c;
  --text: #5c3e45;
  --muted: #8d7077;
  --shadow: 0 14px 40px rgba(174, 89, 108, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--cream);
  font-family: "Nunito", sans-serif;
}

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

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

h2 {
  margin-bottom: 14px;
  color: var(--rose-dark);
  font-size: clamp(2.35rem, 9vw, 4.6rem);
  line-height: 0.98;
}

.heart-particles {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  bottom: -50px;
  color: rgba(233, 154, 168, 0.32);
  animation: rise linear infinite;
}

main {
  position: relative;
  z-index: 1;
}

.music-button {
  position: fixed;
  z-index: 8;
  top: 18px;
  right: 18px;
  display: grid;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(174, 89, 108, 0.18);
  border-radius: 50%;
  place-items: center;
  color: var(--rose-dark);
  background: rgba(255, 254, 254, 0.76);
  box-shadow: 0 8px 20px rgba(174, 89, 108, 0.13);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 180ms ease, background 180ms ease;
}

.music-button:hover {
  transform: translateY(-2px);
  background: var(--warm-white);
}

.music-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.music-button__pause,
.music-button.playing .music-button__play {
  display: none;
}

.music-button.playing .music-button__pause {
  display: block;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  padding: 40px 24px;
  text-align: center;
  background: radial-gradient(circle at top, #fff 0%, #fff8f6 42%, #fce8eb 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 750px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--rose-dark);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 20px;
  color: var(--rose-dark);
  font-size: clamp(4rem, 17vw, 7.8rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.78;
}

h1 em {
  color: var(--text);
  font-size: 0.66em;
  font-weight: 500;
}

.hero__subtitle {
  max-width: 470px;
  margin: 0 auto 30px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-block;
  padding: 14px 24px;
  font: inherit;
  font-size: 0.83rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-3px);
}

.button--primary {
  color: white;
  background: var(--rose-dark);
  box-shadow: 0 10px 22px rgba(174, 89, 108, 0.24);
}

.button--primary:hover {
  background: #9d4b5e;
  box-shadow: 0 14px 28px rgba(174, 89, 108, 0.28);
}

.button--ghost {
  color: var(--rose-dark);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 0 0 1px rgba(174, 89, 108, 0.2);
}

.hero__hearts span {
  position: absolute;
  color: rgba(233, 154, 168, 0.35);
  font-size: 1rem;
  animation: float 5s ease-in-out infinite;
}

.hero__hearts span:nth-child(1) { top: 19%; left: 12%; }
.hero__hearts span:nth-child(2) { top: 30%; right: 11%; animation-delay: -1s; font-size: 1.5rem; }
.hero__hearts span:nth-child(3) { bottom: 28%; left: 18%; animation-delay: -2.5s; font-size: 0.75rem; }
.hero__hearts span:nth-child(4) { bottom: 22%; right: 20%; animation-delay: -0.7s; }
.hero__hearts span:nth-child(5) { top: 12%; right: 34%; animation-delay: -3.3s; font-size: 0.7rem; }

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  width: 22px;
  height: 34px;
  border: 1px solid rgba(174, 89, 108, 0.45);
  border-radius: 99px;
  transform: translateX(-50%);
}

.scroll-hint span {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rose-dark);
  animation: scrollDown 1.8s ease-in-out infinite;
}

.section {
  padding: 92px 22px;
}

.section__inner {
  max-width: 1040px;
  margin: 0 auto;
}

.section-heading {
  max-width: 560px;
  margin: 0 auto 36px;
  text-align: center;
}

.section-heading > p:last-child,
.final__content > p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.7;
}

.section--apology {
  text-align: center;
  background: var(--warm-white);
}

.section--apology .section__inner {
  max-width: 720px;
}

.apology-note {
  position: relative;
  margin-top: 28px;
  padding: 30px 24px 22px;
  border-radius: 20px;
  background: #fff8f7;
  box-shadow: var(--shadow);
}

.apology-note p {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.9;
}

.quote-mark {
  position: absolute;
  top: -20px;
  left: 18px;
  color: var(--rose);
  font-family: "Cormorant Garamond", serif;
  font-size: 5rem;
  line-height: 1;
}

.section--memories {
  background: #fdf3f2;
}

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

.memory-card {
  margin: 0;
  padding: 8px 8px 12px;
  border-radius: 14px;
  background: white;
  box-shadow: 0 7px 22px rgba(130, 80, 89, 0.08);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.memory-card:hover {
  transform: translateY(-7px) rotate(-1deg);
  box-shadow: 0 16px 26px rgba(130, 80, 89, 0.15);
}

.memory-card:nth-child(even):hover {
  transform: translateY(-7px) rotate(1deg);
}

.memory-card__image {
  aspect-ratio: 0.92;
  overflow: hidden;
  border-radius: 9px;
  background: #f8dce0;
}

.memory-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.memory-card:hover .memory-card__image img {
  transform: scale(1.06);
}

.memory-card p {
  margin: 11px 3px 0;
  color: var(--text);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.08;
}

.section--promises {
  background: var(--warm-white);
}

.promise-grid {
  display: grid;
  gap: 12px;
}

.promise-card {
  display: flex;
  align-items: center;
  min-height: 86px;
  padding: 17px 20px;
  border: 1px solid rgba(233, 154, 168, 0.18);
  border-radius: 16px;
  background: var(--cream);
}

.promise-card span {
  margin-right: 16px;
  color: var(--rose);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
}

.promise-card h3 {
  margin: 0;
  color: var(--text);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 600;
}

.final {
  display: grid;
  min-height: 82svh;
  place-items: center;
  padding-inline: 20px;
  overflow: hidden;
  text-align: center;
  background: radial-gradient(circle, #fff9f7, #f9dde2);
}

.final__content {
  max-width: 700px;
}

.final h2 {
  font-size: clamp(3.7rem, 15vw, 7rem);
}

.final__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  min-height: 50px;
  margin-top: 27px;
}

#runawayButton {
  transition: transform 150ms ease;
}

.modal {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  padding: 22px;
  place-items: center;
  visibility: hidden;
  background: rgba(92, 62, 69, 0.28);
  opacity: 0;
  transition: opacity 250ms ease, visibility 250ms ease;
}

.modal.open {
  visibility: visible;
  opacity: 1;
}

.modal__card {
  position: relative;
  width: min(100%, 440px);
  padding: 34px 24px 26px;
  border-radius: 22px;
  text-align: center;
  background: var(--warm-white);
  box-shadow: var(--shadow);
  transform: translateY(16px) scale(0.96);
  transition: transform 250ms ease;
}

.modal.open .modal__card {
  transform: none;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 1.6rem;
}

.modal__heart {
  display: block;
  color: var(--rose);
  font-size: 3.4rem;
}

.modal h2 {
  margin-bottom: 10px;
  font-size: 2.7rem;
}

.modal p {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.65;
}

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

.reveal.visible {
  opacity: 1;
  transform: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-18px) rotate(8deg); }
}

@keyframes rise {
  from { transform: translateY(0) rotate(0); opacity: 0; }
  15% { opacity: 1; }
  to { transform: translateY(-115vh) rotate(55deg); opacity: 0; }
}

@keyframes scrollDown {
  0% { transform: translate(-50%, 0); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translate(-50%, 13px); opacity: 0; }
}

@media (min-width: 620px) {
  .section {
    padding: 120px 34px;
  }

  .apology-note {
    padding: 38px 42px 30px;
  }

  .memory-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .memory-card {
    padding: 10px 10px 15px;
  }

  .memory-card p {
    margin: 14px 5px 0;
    font-size: 1.32rem;
  }

  .promise-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .promise-card {
    min-height: 112px;
    padding: 22px 25px;
  }
}

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