#abertura {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  color: var(--tinta);
  background: var(--rosa-bebe);
}
html:has(#abertura[open]) { overflow: hidden }
.ceu {
  position: relative;
  display: grid;
  min-height: 100%;
  place-items: center;
  overflow: hidden;
  padding: 1.5rem;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 0% 95%, #d3f3e5, transparent 50%),
    radial-gradient(ellipse at 100% 8%, #fff1cc, transparent 45%),
    linear-gradient(130deg, #ffd3d4, #ffeae9 56%, #dff6f8);
}
/* Florzinhas da logo espalhadas pelo fundo, mais fortes nas bordas */
.ceu::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .75;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cdefs%3E%3Cg id='f'%3E%3Cg fill='%23ffbfc0'%3E%3Ccircle cx='0' cy='-5' r='4'/%3E%3Ccircle cx='4.8' cy='-1.5' r='4'/%3E%3Ccircle cx='3' cy='4' r='4'/%3E%3Ccircle cx='-3' cy='4' r='4'/%3E%3Ccircle cx='-4.8' cy='-1.5' r='4'/%3E%3C/g%3E%3Ccircle r='2.3' fill='%23fbd75b'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23f' x='22' y='26'/%3E%3Cuse href='%23f' transform='translate(112 58) scale(.7) rotate(20)'/%3E%3Cuse href='%23f' transform='translate(58 122) scale(1.15) rotate(-12)'/%3E%3Ccircle cx='136' cy='134' r='2' fill='%23f9ab13' opacity='.6'/%3E%3Ccircle cx='84' cy='14' r='1.6' fill='%2372e9f1'/%3E%3Ccircle cx='12' cy='86' r='1.6' fill='%23c8281c' opacity='.35'/%3E%3C/svg%3E") 0 0 / 160px 160px;
  -webkit-mask: radial-gradient(ellipse 48% 52% at center, transparent 40%, #000 95%);
          mask: radial-gradient(ellipse 48% 52% at center, transparent 40%, #000 95%);
}
.ceu::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid #f2b3b5;
  outline: 1px dashed #f2b3b5;
  outline-offset: -5px;
  border-radius: 18px;
  pointer-events: none;
}
/* Convite: cartão de papel preso com fita adesiva */
/* Mesa: o convite com o bloquinho e os cadernos da logo encaixados atrás, um de cada lado */
.mesa { position: relative; width: min(100%, 30rem) }
.peca { position: absolute; z-index: 0; height: auto; pointer-events: none; filter: drop-shadow(0 6px 8px #6e2a3a26); animation: espiar .8s cubic-bezier(.2, .8, .3, 1.2) both }
/* Na logo a agenda é cortada pela borda do círculo (lado esquerdo e de baixo):
   girada, esse lado fica escondido atrás do convite. */
.peca-bloquinho { left: 6%; top: -50px; width: clamp(118px, 31%, 152px); rotate: 30deg; animation-delay: .55s }
/* Fitinha rosa colando a agenda na mesa, por cima do lado cortado */
.mesa::before {
  content: ""; position: absolute; z-index: 1; left: calc(6% - 30px); top: -14px; width: 62px; height: 20px; rotate: 78deg;
  background: repeating-linear-gradient(-45deg, #ffc9cbe6 0 6px, #ffe3e4e6 6px 12px);
  box-shadow: 0 1px 2px #6e2a3a1f; animation: espiar .8s cubic-bezier(.2, .8, .3, 1.2) .65s both;
}
.peca-cadernos { right: 0; top: -64px; width: clamp(132px, 35%, 172px); rotate: 6deg; animation-delay: .7s }
@keyframes espiar { from { opacity: 0; translate: 0 40px } }
.convite {
  text-align: center; position: relative; z-index: 1; width: 100%;
  padding: clamp(1.6rem, 4.5vh, 2.8rem) clamp(1rem, 4vw, 2.2rem) clamp(1.2rem, 3vh, 1.8rem);
  background: #fffaf1; border: 6px solid #fffaf1; border-radius: 45% 45% 1.6rem 1.6rem / 15% 15% 1.6rem 1.6rem;
  outline: 1px dashed #f2a4a8; outline-offset: -11px;
  box-shadow: 5px 7px 0 #ffc9cb, 10px 12px 0 #bfeedb, 10px 18px 30px #a0484229;
  animation: chegar .8s cubic-bezier(.2, .8, .3, 1.15) both;
}
.convite::before {
  content: ""; position: absolute; left: 50%; top: -18px; width: 132px; height: 32px; translate: -50% 0; rotate: -4deg;
  background: repeating-linear-gradient(-45deg, #bfeedbd9 0 8px, #e3f7eed9 8px 16px);
  clip-path: polygon(0 8%, 4% 0, 8% 10%, 12% 0, 88% 0, 92% 9%, 96% 0, 100% 10%, 100% 92%, 96% 100%, 92% 90%, 88% 100%, 12% 100%, 8% 91%, 4% 100%, 0 90%);
}
/* Tachinhas da logo ao lado de "Boas-vindas" */
.convite .chamada::before, .convite .chamada::after { content: ""; display: inline-block; width: 16px; height: 24px; vertical-align: -6px; background: var(--tachinha) center / contain no-repeat }
.convite .chamada::before { margin-right: .5rem; rotate: -12deg }
.convite .chamada::after { margin-left: .5rem; background-image: var(--tachinha-amarela); width: 20px; rotate: 10deg }
.selo {
  width: clamp(92px, 16vh, 140px); height: auto; border-radius: 50%; box-shadow: 0 0 0 5px #fff, 0 6px 16px #a0484233;
  animation: carimbar .7s .35s cubic-bezier(.3, 1.6, .5, 1) both;
}
.convite .chamada { margin: .9rem 0 0; font: 800 .74rem/1.4 var(--texto); letter-spacing: .16em; text-transform: uppercase; color: var(--dourado-texto) }
.convite h2 { font: 500 clamp(2.6rem, 5.6vw, 4.6rem)/.98 var(--titulo); color: var(--vermelho); letter-spacing: -.03em; margin: .2em 0 .25em }
.convite em { display: block; font-style: italic; font-weight: 400; color: var(--dourado-texto) }
.convite .frase { max-width: 34ch; text-wrap: balance; margin: 0 auto 1.3rem; line-height: 1.55; color: var(--tinta-suave) }
.convite :is(.chamada, h2, .frase, .acoes, .dica-voo) { animation: surgir .6s ease-out both }
.convite .chamada { animation-delay: .45s }
.convite h2 { animation-delay: .55s }
.convite .frase { animation-delay: .65s }
.convite .acoes { animation-delay: .75s }
.convite .dica-voo { animation-delay: 1.1s }
.acoes { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .6rem; margin: 0 }
.dica-voo { display: flex; align-items: center; justify-content: center; gap: .45rem; color: var(--tinta-suave); font-size: .88rem; margin: 1.2rem 0 0 }
.dica-voo::before { content: ""; width: 18px; height: 21px; background: var(--borboleta) center / contain no-repeat }
.entrar, .rever, .ver-modelos { cursor: pointer; border-radius: 2rem; padding: .8rem 1.6rem; font: 800 1rem var(--texto); transition: transform .15s, box-shadow .15s, background-color .15s }
.entrar { color: white; background: var(--vermelho); border: 0; box-shadow: 0 4px 0 var(--vermelho-forte) }
.entrar:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--vermelho-forte) }
.ver-modelos { color: var(--vinho); background: white; border: 1px solid var(--linha); text-decoration: none; padding: .75rem 1.3rem }
.ver-modelos:hover { background: var(--rosa-bebe) }

/* Fotos das caixinhas presas no fundo */
.fotos-convite { position: absolute; inset: 0; pointer-events: none }
.polaroid {
  position: absolute; margin: 0; width: clamp(150px, 15vw, 225px); padding: 9px 9px 0; background: #fffdf8;
  box-shadow: 0 2px 3px #6e2a3a1f, 0 12px 26px #6e2a3a24; rotate: var(--giro);
  animation: pousar .9s cubic-bezier(.2, .8, .3, 1.1) both; animation-delay: var(--atraso);
}
.polaroid img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; object-position: var(--foco, 62%) 50% }
.polaroid figcaption { font: italic 500 clamp(.95rem, 1.2vw, 1.15rem)/1 var(--titulo); color: var(--vinho); text-align: center; padding: .7rem 0 .8rem }
.polaroid::before {
  content: ""; position: absolute; left: 50%; top: -12px; width: 64px; height: 22px; translate: -50% 0; rotate: var(--fita, 5deg); z-index: 1;
  background: repeating-linear-gradient(90deg, #ffc9cbd0 0 6px, #ffe3e4d0 6px 12px);
}
.polaroid.p1 { --giro: -8deg; --atraso: .5s; left: 6%; top: 47% }
.polaroid.p2 { --giro: 7deg; --atraso: .65s; --foco: 55%; --fita: -6deg; right: 7%; top: 12% }
.polaroid.p3 { --giro: -4deg; --atraso: .8s; --foco: 50%; --fita: 3deg; right: 15%; bottom: 7%; width: clamp(130px, 12vw, 185px) }
.polaroid.p2::before { background: repeating-linear-gradient(90deg, #bfeedbd0 0 6px, #e3f7eed0 6px 12px) }
.polaroid.p3::before { background: repeating-linear-gradient(90deg, #fff1ccd9 0 6px, #ffe3a8d9 6px 12px) }

@keyframes chegar { from { opacity: 0; transform: translateY(34px) rotate(-2deg) } }
@keyframes carimbar { from { opacity: 0; transform: scale(.4) rotate(-25deg) } }
@keyframes surgir { from { opacity: 0; transform: translateY(10px) } }
@keyframes pousar { from { opacity: 0; transform: translateY(-40px) scale(1.08); rotate: 0deg } }
.rever { margin: 1.4rem 0 0; color: var(--piscina-tinta); background: var(--piscina-claro); border: 1px solid #a9e5ea; font-size: .92rem; padding: .6rem 1.2rem }
.voo { position: absolute; inset: 0; pointer-events: none }
.ave { position: absolute; display: block; pointer-events: auto; background: transparent; border: 0; padding: 0; border-radius: 40%; width: clamp(65px, 14vw, 205px); aspect-ratio: 1.4; filter: drop-shadow(2px 5px 3px #2a8f9c33) }
.ave:is(:hover,:focus-visible) { animation-play-state: paused }
/* Revoada de borboletas da logo: a colorida da papelaria e a de contorno do "y" do logotipo */
.borboleta { --tam: clamp(56px, 8vw, 120px); width: var(--tam); aspect-ratio: 102 / 116; rotate: var(--giro, 0deg); animation: flutuar var(--dur, 3.6s) ease-in-out var(--atraso, 0s) infinite alternate }
.borboleta::before { content: ""; position: absolute; inset: 0; background: var(--borboleta) center / contain no-repeat; transform-origin: 46% 50%; animation: pulsar var(--asas, .7s) ease-in-out var(--atraso, 0s) infinite }
.borboleta.contorno { aspect-ratio: 185 / 171; filter: drop-shadow(0 3px 4px #2a8f9c40) }
.borboleta.contorno::before { background-image: var(--borboleta-y); transform-origin: 40% 62% }
.b1 { left: 9%; top: 18%; --tam: clamp(70px, 11vw, 150px); --giro: -14deg }
.b2 { left: 71%; top: 3%; --tam: clamp(44px, 5.5vw, 80px); --giro: 10deg; --dur: 4.2s; --atraso: -2s; --asas: .55s }
.b3 { right: 3%; top: 50%; --tam: clamp(64px, 10vw, 140px); --giro: 12deg; --atraso: -.6s }
.b4 { left: 24%; top: 80%; --tam: clamp(42px, 5.5vw, 84px); --giro: -18deg; --atraso: -1s; --asas: .6s }
.b4::before { scale: -1 1 }
.b5 { left: 24%; top: 6%; --tam: clamp(40px, 5vw, 72px); --giro: -6deg; --dur: 4.8s; --atraso: -3s; --asas: .5s }
.b6 { left: 87%; top: 82%; --tam: clamp(38px, 4.5vw, 64px); --giro: 22deg; --dur: 3.2s; --atraso: -1.8s; --asas: .65s }
.b6::before { scale: -1 1 }
@keyframes flutuar {
  0% { transform: translate(1vw, 1vh) rotate(-12deg) }
  35% { transform: translate(-1.8vw, -.5vh) rotate(8deg) }
  68% { transform: translate(-.4vw, -2.8vh) rotate(-9deg) }
  100% { transform: translate(1.2vw, -3.6vh) rotate(15deg) }
}
@keyframes pulsar { 0%, 100% { transform: scaleX(1) } 50% { transform: scaleX(.55) } }
.flores { position: absolute; pointer-events: none; z-index: 2 }
.flores i { position: absolute; left: 0; top: 0; width: 34px; height: 33px; margin: -17px 0 0 -17px; animation: espalhar 1.7s cubic-bezier(.18, .9, .3, 1) both; filter: drop-shadow(0 3px 3px #6e2a3a22) }
.flores .flor { background: var(--flor) center / contain no-repeat }
.flores .coracao { width: 24px; height: 24px; margin: -12px 0 0 -12px; background: var(--coracao) center / contain no-repeat }
.flores .simbolo { font: 1.9rem/33px Georgia, serif; text-align: center; color: #3cbfcf }
.flores .simbolo:nth-child(4n+3) { color: var(--amarelo) }
.flores .estalo { position: absolute; left: -45px; top: -45px; width: 90px; height: 90px; border-radius: 50%; border: 3px dashed #ffb4b6; animation: estalar .6s ease-out both }
@keyframes espalhar {
  0% { opacity: 0; transform: translate(0, 0) scale(0) rotate(0) }
  14% { opacity: 1 }
  45% { transform: translate(var(--x), var(--y)) scale(calc(var(--s) * 1.25)) rotate(calc(var(--r) * .7)) }
  60% { transform: translate(var(--x), calc(var(--y) + 6px)) scale(var(--s)) rotate(var(--r)) }
  80% { opacity: 1 }
  100% { opacity: 0; transform: translate(calc(var(--x) * 1.08), calc(var(--y) + 46px)) scale(calc(var(--s) * .8)) rotate(calc(var(--r) + 40deg)) }
}
@keyframes estalar { from { opacity: 1; transform: scale(.2) } to { opacity: 0; transform: scale(1.7) } }
@media(max-width: 850px) {
  .ceu { padding: 96px 1.2rem 84px }
  .fotos-convite { display: none }
  .b1 { left: 4%; top: auto; bottom: 3%; --tam: 62px }
  .b2 { left: 70%; top: 1.5%; --tam: 44px }
  .b3 { right: 6%; top: auto; bottom: 3%; --tam: 66px }
  .b5 { left: 6%; top: 1.5%; --tam: 40px }
  .b4, .b6 { display: none }
  .polaroid { width: 104px; padding: 6px 6px 0 }
  .polaroid figcaption { font-size: .72rem; padding: .45rem 0 .55rem }
  .polaroid::before { width: 44px; height: 15px; top: -8px }
  .polaroid.p1 { left: 4%; top: 2.2% }
  .polaroid.p2 { right: 5%; top: 3.5% }
  .polaroid.p3 { display: none }
}
@media(max-height: 700px) and (max-width: 850px) {
  .fotos-convite { display: none }
  .ceu { padding-top: 40px }
}
@media(prefers-reduced-motion: reduce) {
  .convite, .convite *, .peca, .polaroid { animation: none !important }
  .voo *, .voo *::before, .voo *::after { animation: none !important }
  .flores i { animation: none; transform: translate(var(--x),var(--y)) scale(var(--s)) }
  .flores .estalo { display: none }
}
