:root {
  --verde: #2f5d46; --verde-claro: #cfe8d5; --rosa: #e8a5b8; --creme: #fff9ef; --ouro: #c9a54c; --texto: #2b3a31;
}
* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh; color: var(--texto);
  font-family: 'Quicksand', system-ui, sans-serif; line-height: 1.5; text-align: center;
  background: #cfe8d5;
  -webkit-tap-highlight-color: transparent;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, #f6e4f0 0%, #e4f1e6 38%, #c4e2cd 72%, #a9d3b6 100%);
}
body::after {
  content: ''; position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 0; pointer-events: none;
  width: min(100%, 560px); aspect-ratio: 400 / 160;
  background: url('/img/colinas.svg') bottom center / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}
main { max-width: 560px; margin: 0 auto; padding: 24px 20px 150px; }
h1, h2, .ola { font-family: 'Playfair Display', serif; font-weight: 500; color: var(--verde); }
h1 { font-size: clamp(2.2rem, 9vw, 3.2rem); margin: .2em 0; line-height: 1.1; }
h2 { font-size: 1.5rem; margin: 0 0 .4em; }
.script { font-family: 'Dancing Script', cursive; font-size: 1.9rem; color: #b5577a; margin: 0; }
.pequeno { font-size: .95rem; opacity: .8; margin: 0; }
.destaque { font-size: 1.25rem; font-weight: 600; margin: .2em 0; }
.loading { margin-top: 40vh; }



.bloco {
  background: rgba(255, 249, 239, .9); border: 1px solid rgba(201, 165, 76, .5);
  border-radius: 24px; padding: 28px 22px; margin: 78px 0 0; box-shadow: 0 6px 24px rgba(47, 93, 70, .12);
  position: relative; backdrop-filter: blur(2px);
}
.bloco.hero { margin-top: 70px; }
h2::after { content: ''; display: block; height: 20px; margin: 6px auto 4px; background: url('/img/divisor.svg') center / contain no-repeat; }
.msg { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--ouro); font-style: italic; }
ul { list-style: none; padding: 0; margin: 0; }
li { margin: .5em 0; }
li::before { content: '🌿 '; }

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 600;
  background: var(--verde); color: #fff; padding: 12px 24px; border-radius: 999px; margin-top: 12px;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(47, 93, 70, .25); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn.sec { background: transparent; color: var(--verde); border: 2px solid var(--verde); }
.acoes { display: flex; flex-direction: column; gap: 4px; align-items: center; }
input { font: inherit; width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid #9bb8a5; background: #fff; }
input:focus { outline: 2px solid var(--rosa); border-color: var(--verde); }
input.invalido { border-color: #b3261e; }
.pessoa { text-align: left; margin: 14px 0; padding: 12px; border-radius: 16px; background: rgba(207, 232, 213, .45); }
.pessoa .rotulo { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; font-weight: 600; color: var(--verde); margin-bottom: 6px; }
.pessoa > input { margin-bottom: 8px; }
.duas { display: grid; grid-template-columns: 1fr 90px; gap: 8px; }
.remover { border: 0; background: none; color: #b3261e; cursor: pointer; font: inherit; font-size: .85rem; }
.btn.texto { background: none; color: var(--verde); text-decoration: underline; padding: 8px 12px; margin-top: 4px; }
.btn.texto:hover { box-shadow: none; }
#rsvp-resumo ul { margin: 10px 0; }
#rsvp-resumo li::before { content: '🌸 '; }
#rsvp-status { margin-top: 14px; font-weight: 600; color: var(--verde); }
#rsvp-status.erro { color: #b3261e; }

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

.fireflies { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
main { position: relative; z-index: 1; }
.fly {
  position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #fff3b0;
  box-shadow: 0 0 12px 4px rgba(255, 230, 120, .8); opacity: 0;
  animation: voar var(--d) ease-in-out infinite; animation-delay: var(--dl);
}
@keyframes voar {
  0% { opacity: 0; transform: translate(0, 0); }
  20%, 80% { opacity: .9; }
  50% { transform: translate(var(--x), -60px); }
  100% { opacity: 0; transform: translate(calc(var(--x) * -1), -120px); }
}
@keyframes balanco { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes entrar { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .fly { display: none; }
}

/* ---- capa ---- */
.capa { min-height: 90vh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; animation: entrar .9s ease both; transition: opacity .5s, transform .5s; }
.capa.saindo { opacity: 0; transform: scale(1.06); }
.moldura { position: relative; width: min(78vw, 320px); aspect-ratio: 1; margin-bottom: 8px; }
.moldura > img { position: absolute; }
.coroa { inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 8px rgba(47, 93, 70, .2)); }
.cervo { left: 17%; top: 15%; width: 66%; animation: flutua 5s ease-in-out infinite; }
.brilho-fundo { position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, #fff 0%, rgba(255, 244, 200, .9) 35%, rgba(255, 244, 200, 0) 70%); animation: pulsa 4s ease-in-out infinite; }
.ola { font-size: 2.1rem; margin: 0; }
.chamada { margin: 0 0 6px; max-width: 18em; }
.btn.grande { font-size: 1.1rem; padding: 14px 32px; box-shadow: 0 6px 18px rgba(47, 93, 70, .3); animation: respira 2.4s ease-in-out infinite; }
@keyframes flutua { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes pulsa { 0%, 100% { opacity: .7; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes respira { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }

/* ---- animais ---- */
.bicho { position: absolute; bottom: calc(100% - 7px); border: 0; padding: 0; background: none; cursor: pointer; transform-origin: bottom center; z-index: 2;
  opacity: 0; transform: scale(.4) translateY(24px); transition: opacity .5s .3s, transform .7s cubic-bezier(.3, 1.6, .5, 1) .3s; }
.bicho img { display: block; width: 100%; height: auto; pointer-events: none; }
.visivel > .bicho { opacity: 1; transform: none; }
.bicho.dir { right: 16px; } .bicho.esq { left: 16px; }
.coruja { width: 104px; } .esquilo { width: 84px; } .coelho { width: 70px; } .filhote { width: 88px; }
.bicho.pula { animation: pula .7s ease; }
@keyframes pula { 0% { transform: none; } 28% { transform: translateY(-20px) scale(.95, 1.07); } 55% { transform: scale(1.07, .92); } 75% { transform: translateY(-6px); } 100% { transform: none; } }
.fala { position: absolute; bottom: calc(100% + 4px); width: max-content; max-width: 168px; padding: 8px 12px; border-radius: 14px; background: #fff; color: var(--texto);
  font-size: .85rem; font-weight: 600; line-height: 1.3; box-shadow: 0 4px 14px rgba(47, 93, 70, .2); opacity: 0; transform: translateY(6px) scale(.9); transition: opacity .25s, transform .25s; pointer-events: none; }
.dir .fala { right: 0; } .esq .fala { left: 0; }
.fala::after { content: ''; position: absolute; top: 100%; width: 10px; height: 10px; background: #fff; transform: translateY(-5px) rotate(45deg); }
.dir .fala::after { right: 26px; } .esq .fala::after { left: 26px; }
.bicho.fala-on .fala { opacity: 1; transform: none; }

.rodape { margin-top: 36px; }
.rodape img { width: 150px; }
.rodape p { margin: 4px 0 0; font-family: 'Dancing Script', cursive; font-size: 1.6rem; color: var(--verde); }
.hero h1::before, .hero h1::after { content: '✦'; position: absolute; color: var(--ouro); font-size: 1rem; animation: brilha 2.6s ease-in-out infinite; }
.hero h1 { position: relative; }
.hero h1::before { left: 4%; top: -4px; } .hero h1::after { right: 2%; top: -8px; animation-delay: 1.2s; }
@keyframes brilha { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.2); } }

/* ---- ambiente ---- */
.bokeh, .efeitos { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.bokeh { z-index: 0; }
.efeitos { z-index: 3; }
.bokeh span { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 70%); animation: deriva 18s ease-in-out infinite; }
.bokeh span:nth-child(1) { width: 180px; height: 180px; left: -40px; top: 8%; }
.bokeh span:nth-child(2) { width: 120px; height: 120px; right: -20px; top: 28%; animation-delay: -5s; }
.bokeh span:nth-child(3) { width: 220px; height: 220px; left: 30%; top: 55%; animation-delay: -9s; background: radial-gradient(circle, rgba(255, 224, 240, .6), rgba(255, 224, 240, 0) 70%); }
.bokeh span:nth-child(4) { width: 90px; height: 90px; left: 12%; top: 78%; animation-delay: -3s; }
.bokeh span:nth-child(5) { width: 150px; height: 150px; right: 6%; top: 70%; animation-delay: -12s; }
@keyframes deriva { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(24px, -30px); } }

.petala { position: absolute; top: -24px; background: var(--rosa); border-radius: 80% 0 80% 0; opacity: .85; animation: cair var(--d) linear infinite; animation-delay: var(--dl); }
@keyframes cair {
  0% { transform: translate3d(0, 0, 0) rotate(0); }
  50% { transform: translate3d(var(--x), 55vh, 0) rotate(200deg); }
  100% { transform: translate3d(calc(var(--x) * -.6), 112vh, 0) rotate(380deg); }
}
.borboleta { position: absolute; left: 0; width: 38px; animation: voo var(--d) linear infinite; animation-delay: var(--dl); }
@keyframes voo {
  0% { transform: translate(-60px, 0) rotate(10deg); } 20% { transform: translate(22vw, -34px) rotate(-8deg); }
  45% { transform: translate(48vw, 22px) rotate(12deg); } 70% { transform: translate(76vw, -26px) rotate(-6deg); } 100% { transform: translate(112vw, 16px) rotate(8deg); }
}
.particula { position: fixed; left: 0; top: 0; font-size: var(--s, 18px); line-height: 1; pointer-events: none; z-index: 10; animation: estoura var(--t, .9s) cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes estoura {
  0% { transform: translate(calc(var(--x0) - 50%), calc(var(--y0) - 50%)) scale(.4); opacity: 1; }
  100% { transform: translate(calc(var(--x0) + var(--dx) - 50%), calc(var(--y0) + var(--dy) - 50%)) scale(1) rotate(var(--r, 0deg)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .petala, .borboleta, .bokeh span { display: none; }
  .bicho { opacity: 1; transform: none; }
}

.bloco > p:last-child { margin-bottom: 0; }
#rsvp-status:empty { display: none; }
.coruja .fala { bottom: 45%; right: calc(100% - 6px); }
.coruja .fala::after { top: auto; bottom: 10px; right: -4px; transform: rotate(45deg); }
