@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;1,500;1,600&display=swap');

:root {
  --pink: #e99ab4;
  --deep-pink: #c96f91;
  --soft-pink: #fff0f5;
  --paper: #fffdfd;
  --ink: #71515d;
  --muted: #a98591;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: radial-gradient(circle at 50% 15%, #fff 0, #fff7fa 38%, #fce8ef 100%);
  font-family: "DM Sans", sans-serif;
}
button { font: inherit; }
.page {
  position: relative;
  z-index: 1;
  width: min(100% - 32px, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ambient {
  position: fixed;
  width: 270px;
  height: 270px;
  border-radius: 50%;
  filter: blur(65px);
  opacity: .35;
  pointer-events: none;
}
.ambient-one { background: #f4c5d5; top: 8%; left: -130px; }
.ambient-two { background: #f7d7e2; right: -130px; bottom: 5%; }
.top-note, footer {
  color: #bd91a0;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.top-note { margin-bottom: auto; }
footer { margin-top: auto; padding-top: 36px; }
.intro, .letter-section, .question-section, .answer-section {
  width: 100%;
  padding: 50px 0 30px;
  animation: appear .8s ease both;
}
.eyebrow {
  color: var(--deep-pink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
}
h1, h2 {
  margin: 16px 0;
  color: #815968;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  line-height: 1.17;
}
h1 { font-size: clamp(36px, 7vw, 58px); }
h2 { font-size: clamp(34px, 6.5vw, 52px); }
h2 em { color: var(--deep-pink); font-weight: 500; }
.intro-copy, .question-copy {
  max-width: 390px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.envelope-button {
  position: relative;
  display: block;
  width: 250px;
  height: 205px;
  margin: 38px auto 14px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.envelope-hint {
  position: absolute;
  top: -17px;
  left: 0;
  width: 100%;
  color: #bd91a0;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  animation: pulse 1.8s infinite;
}
.envelope {
  position: absolute;
  left: 10px;
  bottom: 0;
  width: 230px;
  height: 145px;
  filter: drop-shadow(0 15px 18px rgba(177, 108, 133, .16));
  transition: transform .5s ease;
}
.envelope-button:hover .envelope { transform: translateY(-7px) rotate(-1deg); }
.envelope-back, .envelope-front, .envelope-flap, .letter-peek {
  position: absolute;
  inset: 0;
  border-radius: 9px;
}
.envelope-back { background: #e9a9bd; }
.letter-peek {
  z-index: 1;
  left: 17px;
  top: -4px;
  width: 196px;
  height: 125px;
  background: #fffdfd;
  display: grid;
  place-items: start center;
  padding-top: 20px;
  color: #d889a5;
  font-family: Georgia, serif;
  font-size: 25px;
  transition: transform .7s ease;
}
.envelope-front {
  z-index: 2;
  background: linear-gradient(145deg, #f6cbd8, #e9a9bd);
  clip-path: polygon(0 0, 50% 58%, 100% 0, 100% 100%, 0 100%);
}
.envelope-flap {
  z-index: 3;
  background: #f9d8e2;
  clip-path: polygon(0 0, 100% 0, 50% 66%);
  transform-origin: top;
  transition: transform .7s ease, z-index .1s .35s;
}
.seal {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 58%;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: white;
  background: #cf7897;
  box-shadow: 0 3px 8px #b96e8b55;
}
.envelope-button.opened .envelope-flap { transform: rotateX(180deg); z-index: 0; }
.envelope-button.opened .letter-peek { transform: translateY(-105px); }
.envelope-button.opened .seal { opacity: 0; }
.tiny-note, .small-print {
  color: #bd9aa5;
  font-size: 11px;
  letter-spacing: .04em;
}
.hidden { display: none !important; }
.letter-card {
  width: min(100%, 560px);
  margin: 25px auto 0;
  padding: 0 30px;
  overflow: hidden;
  border: 1px solid #f3dce4;
  border-radius: 5px;
  background: var(--paper);
  box-shadow: 0 18px 55px rgba(176, 112, 137, .12);
  text-align: left;
}
.letter-top, .letter-bottom {
  padding: 19px 0;
  color: #c18c9e;
  font-size: 10px;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
}
.letter-top { border-bottom: 1px solid #f6e7ec; }
.letter-bottom { border-top: 1px solid #f6e7ec; }
.letter-content { padding: 28px 5px 34px; }
.salutation, .letter-text, .signature {
  color: #80616d;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  line-height: 1.95;
}
.letter-text { min-height: 170px; white-space: pre-line; }
.signature { margin-top: 28px; text-align: right; font-style: italic; }
.signature span { display: block; color: var(--deep-pink); font-size: 22px; }
.continue-button, .yes-button {
  margin-top: 25px;
  padding: 14px 25px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #e8a2b9, #cc7896);
  box-shadow: 0 8px 22px #d58ba755;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.continue-button:hover, .yes-button:hover { transform: translateY(-2px); box-shadow: 0 11px 25px #d58ba777; }
.question-heart, .big-heart {
  color: #d985a2;
  font-size: 52px;
  animation: heartbeat 1.5s infinite;
}
.question-copy { margin-top: 14px; }
.yes-button { padding: 16px 32px; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.answer-section > p:last-of-type {
  max-width: 420px;
  margin: 15px auto;
  color: var(--muted);
  line-height: 1.8;
}
.big-heart { font-size: 76px; }
.float-heart {
  position: fixed;
  z-index: 5;
  bottom: -30px;
  color: #dc8da8;
  pointer-events: none;
  animation: floatUp 3.8s ease-in forwards;
}
@keyframes appear { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } }
@keyframes floatUp { to { transform: translateY(-110vh) rotate(25deg); opacity: 0; } }
@media (max-width: 520px) {
  .page { width: min(100% - 24px, 760px); }
  .intro, .letter-section, .question-section, .answer-section { padding-top: 42px; }
  .letter-card { padding: 0 18px; }
  .letter-content { padding: 22px 2px 26px; }
  .letter-text { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
