:root {
  --ivory: #fffaf4;
  --paper: #fffdf9;
  --wine: #7a2037;
  --rose: #c94f6d;
  --blush: #f4c4cc;
  --ink: #3e2630;
  --muted: #80656e;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ivory);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: Arial, Helvetica, sans-serif;
}

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

button:focus-visible {
  outline: 3px solid rgba(122, 32, 55, 0.3);
  outline-offset: 4px;
}

.love-page {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(150deg, #fff8f1 0%, #fffdf9 46%, #faeee8 100%);
}

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

.ambient-glow {
  position: fixed;
  z-index: 0;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(24px);
  pointer-events: none;
}

.ambient-glow-one {
  top: -150px;
  left: -140px;
  background: rgba(238, 164, 177, 0.2);
}

.ambient-glow-two {
  right: -160px;
  bottom: -160px;
  background: rgba(201, 79, 109, 0.14);
}

.intro {
  position: relative;
  z-index: 3;
  display: flex;
  width: min(100%, 760px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 44px 24px 34px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  transition: opacity 0.45s ease, transform 0.65s cubic-bezier(.22, 1, .36, 1), visibility 0.65s;
}

.is-revealed .intro {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97) translateY(-18px);
  pointer-events: none;
}

.eyebrow,
.message-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--wine);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow-line {
  width: 28px;
  height: 1px;
  background: var(--blush);
}

.sealed-heart {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  margin: 42px 0 30px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #a63855, var(--wine));
  box-shadow: 0 16px 30px rgba(122, 32, 55, 0.22), inset 0 0 0 2px rgba(255,255,255,.24);
  animation: soft-pulse 2.6s ease-in-out infinite;
}

.sealed-heart::before,
.sealed-heart::after {
  position: absolute;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(201, 79, 109, 0.2);
  border-radius: 50%;
  content: "";
  animation: ripple 2.6s ease-out infinite;
}

.sealed-heart::after {
  animation-delay: 1.3s;
}

.sealed-heart span {
  font-size: 28px;
  transform: translateY(-1px);
}

.intro h1,
.message-card h2 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(43px, 8vw, 70px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.intro h1::first-line {
  color: var(--wine);
}

.intro-copy {
  max-width: 430px;
  margin: 25px auto 32px;
  color: var(--muted);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
  line-height: 1.65;
}

.button-wrap {
  position: relative;
}

.reveal-button,
.again-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  min-height: 56px;
  padding: 0 25px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  border: 0;
  border-radius: 999px;
  background: var(--wine);
  box-shadow: 0 14px 28px rgba(122, 32, 55, 0.2);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.reveal-button:hover,
.again-button:hover {
  background: #962f4b;
  box-shadow: 0 17px 32px rgba(122, 32, 55, 0.27);
  transform: translateY(-2px);
}

.reveal-button:active,
.again-button:active {
  transform: translateY(1px) scale(0.98);
}

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

.tap-hint {
  margin: 19px 0 0;
  color: #ad9098;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.floating-hearts {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.floating-hearts span {
  position: absolute;
  bottom: -45px;
  color: rgba(201, 79, 109, 0.18);
  animation: float-up linear infinite;
}

.surprise {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(1160px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: 58px clamp(22px, 5vw, 76px) 35px;
  grid-template-columns: minmax(270px, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(42px, 7vw, 92px);
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition: opacity 0.7s 0.28s ease, transform 0.8s 0.28s cubic-bezier(.22, 1, .36, 1), visibility 0.8s 0.28s;
}

.is-revealed .surprise {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.photo-stage {
  position: relative;
  justify-self: center;
  transform: rotate(-2deg);
}

.photo-frame {
  position: relative;
  width: min(100%, 388px);
  padding: 15px 15px 23px;
  background: #fff;
  border: 1px solid rgba(90, 54, 64, 0.09);
  box-shadow: 0 25px 58px rgba(82, 50, 58, 0.18);
}

.photo-frame::before {
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(122, 32, 55, 0.08);
  content: "";
  pointer-events: none;
}

.photo-frame img {
  display: block;
  width: 100%;
  height: clamp(390px, 61vh, 590px);
  object-fit: cover;
  object-position: center 53%;
  filter: saturate(0.9) contrast(1.02) sepia(0.05);
}

.photo-frame p {
  margin: 19px 7px 0;
  color: #765d66;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

.tape {
  position: absolute;
  z-index: 2;
  top: -15px;
  width: 74px;
  height: 30px;
  background: rgba(241, 214, 186, 0.72);
  box-shadow: inset 0 0 12px rgba(152, 114, 82, 0.08);
}

.tape-left {
  left: 23px;
  transform: rotate(-8deg);
}

.tape-right {
  right: 20px;
  transform: rotate(8deg);
}

.photo-note {
  position: absolute;
  z-index: 3;
  padding: 10px 14px;
  color: var(--wine);
  background: #fff6d9;
  box-shadow: 0 9px 18px rgba(62, 38, 48, 0.14);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-style: italic;
}

.note-one {
  top: 12%;
  left: -34px;
  transform: rotate(-7deg);
}

.note-two {
  right: -28px;
  bottom: 18%;
  transform: rotate(7deg);
}

.message-card {
  position: relative;
  max-width: 530px;
}

.message-kicker {
  margin: 0 0 26px;
}

.message-card h2 {
  color: var(--wine);
  font-size: clamp(45px, 6vw, 72px);
}

.ornament {
  display: flex;
  margin: 28px 0 24px;
  align-items: center;
  gap: 12px;
  color: var(--rose);
  font-size: 12px;
}

.ornament span {
  width: 42px;
  height: 1px;
  background: var(--blush);
}

.love-message {
  max-width: 500px;
  margin: 0;
  color: #6c555e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.85;
}

.signature {
  margin: 25px 0 30px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-style: italic;
}

.again-button {
  min-height: 48px;
  padding-inline: 20px;
  color: var(--wine);
  border: 1px solid rgba(122, 32, 55, 0.22);
  background: rgba(255, 255, 255, 0.62);
  box-shadow: none;
  font-size: 12px;
}

.again-button:hover {
  color: #fff;
  background: var(--wine);
}

.footer-note {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: #a48790;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

.heart-burst {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.heart-burst span {
  --angle: 0deg;
  --distance: 120px;
  position: absolute;
  color: var(--rose);
  font-size: 14px;
  opacity: 0;
  animation: heart-pop 1.15s cubic-bezier(.2, .8, .3, 1) forwards;
  transform: rotate(var(--angle)) translateX(0) rotate(calc(-1 * var(--angle)));
}

.final-burst {
  top: calc(100% - 24px);
  left: 155px;
}

@keyframes soft-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes ripple {
  from { opacity: 0.55; transform: scale(0.75); }
  to { opacity: 0; transform: scale(1.45); }
}

@keyframes float-up {
  0% { opacity: 0; transform: translateY(0) rotate(-8deg); }
  12% { opacity: 1; }
  88% { opacity: 0.9; }
  100% { opacity: 0; transform: translateY(-112vh) rotate(20deg); }
}

@keyframes heart-pop {
  0% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(0) rotate(calc(-1 * var(--angle))) scale(0.4);
  }
  18% { opacity: 1; }
  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(var(--distance)) rotate(calc(-1 * var(--angle))) scale(1.25);
  }
}

@media (max-width: 760px) {
  .intro {
    padding-top: 30px;
  }

  .sealed-heart {
    margin-top: 34px;
  }

  .surprise {
    min-height: auto;
    padding-top: 54px;
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .photo-stage {
    width: min(88vw, 370px);
  }

  .photo-frame img {
    height: min(128vw, 570px);
  }

  .message-card {
    padding: 0 5px;
    text-align: center;
  }

  .message-kicker,
  .ornament {
    justify-content: center;
  }

  .message-card h2 {
    font-size: clamp(45px, 14vw, 64px);
  }

  .love-message {
    font-size: 17px;
  }

  .footer-note {
    margin-top: 14px;
    padding-bottom: 24px;
  }

  .final-burst {
    left: 50%;
  }
}

@media (max-width: 420px) {
  .intro h1 {
    font-size: 42px;
  }

  .intro-copy {
    font-size: 16px;
  }

  .note-one {
    left: -12px;
  }

  .note-two {
    right: -10px;
  }
}

@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;
  }
}
