:root {
  --bg: #1a0b12;
  --bg-2: #24101a;
  --ink: #f6e9e4;
  --ink-soft: #cdb3b4;
  --rose: #e8798f;
  --rose-deep: #b8435d;
  --gold: #e9c58f;
  --paper: #f7eee6;
  --paper-ink: #3a1a24;
  --display: "Fraunces", Georgia, serif;
  --body: "Manrope", system-ui, sans-serif;
  --hand: "Caveat", cursive;
  --gutter: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 60% at 50% 0%, #3a1424 0%, transparent 60%),
    radial-gradient(80% 50% at 100% 100%, #2c0f1d 0%, transparent 70%);
}
#petals {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}
main, footer { position: relative; z-index: 1; }

section { padding: 96px var(--gutter); }

em {
  font-style: italic;
  color: var(--rose);
  font-variation-settings: "SOFT" 100;
}

.kicker {
  margin: 0 0 18px;
  font: 500 12px/1.4 var(--body);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; }
h2 {
  font-size: clamp(34px, 9vw, 64px);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: 48px;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding-top: 72px; padding-bottom: 96px;
  position: relative;
}
.hero h1 {
  font-size: clamp(54px, 16vw, 132px);
  line-height: .95;
  letter-spacing: -.035em;
  font-variation-settings: "SOFT" 60, "opsz" 144;
}
.hero h1 .line { display: block; }
.hero h1 em { font-weight: 300; }

.heart-btn {
  margin-top: 44px;
  width: 92px; height: 92px;
  border: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, rgba(232,121,143,.22), rgba(232,121,143,0) 70%);
  display: grid; place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.heart-btn svg {
  width: 58px; height: 58px;
  fill: var(--rose);
  filter: drop-shadow(0 6px 22px rgba(232,121,143,.55));
  animation: beat 1.4s ease-in-out infinite;
  transform-origin: center;
}
.heart-btn:active svg { transform: scale(.85); }
.heart-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
@keyframes beat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.16); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  70% { transform: scale(1); }
}
.hint {
  margin: 10px 0 0;
  font: 500 22px/1 var(--hand);
  color: var(--ink-soft);
}

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%;
  width: 26px; height: 42px;
  margin-left: -13px;
  border: 1.5px solid rgba(246,233,228,.35);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute; top: 8px; left: 50%;
  width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px;
  background: var(--ink);
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Carta ---------- */
.letter { display: flex; justify-content: center; }
.paper {
  position: relative;
  max-width: 640px; width: 100%;
  background: var(--paper);
  color: var(--paper-ink);
  padding: 44px 28px 40px;
  border-radius: 4px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), 0 2px 0 rgba(255,255,255,.4) inset;
  transform: rotate(-.8deg);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.7;
  font-variation-settings: "opsz" 14;
}
.paper::before {
  content: "";
  position: absolute; top: -14px; left: 50%;
  width: 110px; height: 28px; margin-left: -55px;
  background: rgba(232,121,143,.55);
  transform: rotate(2deg);
}
.paper p { margin: 0 0 1.1em; }
.paper .salute {
  font: 600 38px/1 var(--hand);
  color: var(--rose-deep);
  margin-bottom: .7em;
}
.paper .sign {
  margin: 1.6em 0 0;
  text-align: right;
  font-style: italic;
}
.paper .sign span {
  display: inline-block;
  margin-top: 4px;
  font: 600 44px/1 var(--hand);
  font-style: normal;
  color: var(--rose-deep);
}

/* ---------- Lista ---------- */
.loves { max-width: 860px; margin: 0 auto; }
.love-list { list-style: none; margin: 0; padding: 0; }
.love-list li {
  display: flex; gap: 20px; align-items: baseline;
  padding: 22px 0;
  border-top: 1px solid rgba(246,233,228,.12);
}
.love-list li:last-child { border-bottom: 1px solid rgba(246,233,228,.12); }
.love-list .n {
  flex: none;
  font: italic 300 15px/1 var(--display);
  color: var(--gold);
  width: 28px;
}
.love-list p {
  margin: 0;
  font: 400 clamp(21px, 5.4vw, 30px)/1.3 var(--display);
  letter-spacing: -.01em;
}

/* ---------- Promessas ---------- */
.promises { max-width: 1080px; margin: 0 auto; }
.cards { display: grid; gap: 16px; }
.card {
  padding: 30px 26px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(232,121,143,.12), rgba(232,121,143,.03));
  border: 1px solid rgba(232,121,143,.22);
}
.card svg {
  width: 30px; height: 30px;
  fill: none; stroke: var(--rose);
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { font-size: 26px; margin: 16px 0 8px; }
.card p { margin: 0; color: var(--ink-soft); }

/* ---------- Pergunta ---------- */
.question { text-align: center; }
.question h2 { margin-bottom: 36px; }
.answers {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  position: relative; min-height: 56px;
}
.btn {
  font: 600 16px/1 var(--body);
  padding: 18px 30px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn-yes { background: var(--rose); color: #2a0d17; }
.btn-yes:hover { background: #f08ea2; }
.btn-no { background: transparent; color: var(--ink-soft); border: 1px solid rgba(246,233,228,.25); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.answer-msg {
  min-height: 2.6em;
  margin: 28px auto 0;
  max-width: 420px;
  font: 500 28px/1.25 var(--hand);
  color: var(--gold);
}

/* ---------- Fim ---------- */
.ending { text-align: center; padding-top: 72px; padding-bottom: 120px; }
.forever {
  margin: 0;
  font: 600 clamp(40px, 11vw, 84px)/1 var(--hand);
  color: var(--rose);
  transform: rotate(-3deg);
}
.names {
  margin: 28px 0 0;
  font: 400 clamp(20px, 5vw, 28px)/1.2 var(--display);
  letter-spacing: .04em;
}
.names span { font-style: italic; color: var(--gold); padding: 0 .2em; }

footer {
  padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid rgba(246,233,228,.1);
}
footer strong { color: var(--ink); font-weight: 600; }

/* ---------- Botão de música ---------- */
.sound {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top)); right: 14px;
  z-index: 40;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(232,121,143,.35);
  background: rgba(26,11,18,.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: grid; place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sound[hidden] { display: none; }
.sound:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sound .bars { display: flex; gap: 3px; align-items: flex-end; height: 16px; }
.sound i {
  display: block; width: 3px; height: 4px;
  border-radius: 2px;
  background: var(--rose);
  transition: height .3s;
}
.sound.on i { animation: eq 1s ease-in-out infinite; }
.sound.on i:nth-child(2) { animation-delay: -.3s; }
.sound.on i:nth-child(3) { animation-delay: -.6s; }
.sound.on i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 16px; } }

/* ---------- Coraçõezinhos do toque ---------- */
.burst {
  position: fixed;
  pointer-events: none;
  z-index: 50;
  width: 22px; height: 22px;
  fill: var(--rose);
  will-change: transform, opacity;
}

/* ---------- Revelação ao rolar ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.2,.8,.2,1);
}
.js .reveal.in { opacity: 1; transform: none; }
.js .paper.reveal { transform: translateY(26px) rotate(-.8deg); }
.js .paper.reveal.in { transform: rotate(-.8deg); }

/* ---------- Telas maiores ---------- */
@media (min-width: 720px) {
  section { padding-top: 140px; padding-bottom: 140px; }
  .paper { padding: 64px 64px 56px; font-size: 20px; }
  .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .card { padding: 36px 30px; }
  .love-list li { gap: 36px; padding: 28px 0; }
  .love-list .n { width: 40px; font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .heart-btn svg, .scroll-cue span { animation: none; }
  .js .reveal, .js .paper.reveal { opacity: 1; transform: none; transition: none; }
  .js .paper.reveal { transform: rotate(-.8deg); }
}
