@font-face {
  font-family: "Pinyon Script";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local("Pinyon Script");
}
* {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Cormorant Garamond", serif;
  color: #4A3527;
  background-color: #F7EFE1;
  overflow-x: hidden;
  position: relative;
  transition: background-color 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.5), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
body.tema-menina {
  background-color: #F3D6D9;
}
body.tema-menino {
  background-color: #D3E4EE;
}

.palco, .cena-revelacao, .confete, .modal {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.palco {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.75rem 1rem;
  position: relative;
}

.poeira {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.poeira span {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #B98B4E;
  opacity: 0.5;
  animation: flutuar 7s ease-in-out infinite;
}
.poeira span:nth-child(1) {
  left: 7.1428571429%;
  top: 37%;
  animation-delay: 0.4s;
  transform: scale(0.5);
}
.poeira span:nth-child(2) {
  left: 14.2857142857%;
  top: 74%;
  animation-delay: 0.8s;
  transform: scale(0.6);
}
.poeira span:nth-child(3) {
  left: 21.4285714286%;
  top: 11%;
  animation-delay: 1.2s;
  transform: scale(0.7);
}
.poeira span:nth-child(4) {
  left: 28.5714285714%;
  top: 48%;
  animation-delay: 1.6s;
  transform: scale(0.8);
}
.poeira span:nth-child(5) {
  left: 35.7142857143%;
  top: 85%;
  animation-delay: 2s;
  transform: scale(0.9);
}
.poeira span:nth-child(6) {
  left: 42.8571428571%;
  top: 22%;
  animation-delay: 2.4s;
  transform: scale(0.4);
}
.poeira span:nth-child(7) {
  left: 50%;
  top: 59%;
  animation-delay: 2.8s;
  transform: scale(0.5);
}
.poeira span:nth-child(8) {
  left: 57.1428571429%;
  top: 96%;
  animation-delay: 3.2s;
  transform: scale(0.6);
}
.poeira span:nth-child(9) {
  left: 64.2857142857%;
  top: 33%;
  animation-delay: 3.6s;
  transform: scale(0.7);
}
.poeira span:nth-child(10) {
  left: 71.4285714286%;
  top: 70%;
  animation-delay: 4s;
  transform: scale(0.8);
}
.poeira span:nth-child(11) {
  left: 78.5714285714%;
  top: 7%;
  animation-delay: 4.4s;
  transform: scale(0.9);
}
.poeira span:nth-child(12) {
  left: 85.7142857143%;
  top: 44%;
  animation-delay: 4.8s;
  transform: scale(0.4);
}
.poeira span:nth-child(13) {
  left: 92.8571428571%;
  top: 81%;
  animation-delay: 5.2s;
  transform: scale(0.5);
}
.poeira span:nth-child(14) {
  left: 100%;
  top: 18%;
  animation-delay: 5.6s;
  transform: scale(0.6);
}

@keyframes flutuar {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.35;
  }
  50% {
    transform: translateY(-22px) translateX(6px);
    opacity: 0.75;
  }
}
.visualmente-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #8C6530;
  outline-offset: 3px;
}

.cena-envelope {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
  transition: opacity 600ms cubic-bezier(0.65, 0, 0.35, 1), transform 600ms cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 1;
}
.cena-envelope .chamada {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #8A7461;
  margin: 0;
}
.cena-envelope .assinatura {
  font-family: "Pinyon Script", cursive;
  font-size: 2.75rem;
  color: #8C6530;
  margin: 0;
  line-height: 1;
}
.cena-envelope .instrucao {
  font-size: 0.95rem;
  color: #8A7461;
  margin-top: 0.5rem;
  animation: pulsar 2.4s ease-in-out infinite;
}

body.envelope-aberto .cena-envelope {
  opacity: 0;
  transform: translateY(-24px) scale(0.96);
  pointer-events: none;
}

@keyframes pulsar {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}
.envelope {
  position: relative;
  width: min(78vw, 300px);
  aspect-ratio: 3/2;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  perspective: 1200px;
}
.envelope:hover .envelope__corpo {
  transform: translateY(-4px);
}

.envelope__corpo {
  position: absolute;
  inset: 0;
  background: #FFFCF6;
  border-radius: 10px;
  box-shadow: 0 20px 60px -20px rgba(74, 53, 39, 0.35);
  transition: transform 400ms cubic-bezier(0.65, 0, 0.35, 1);
}
.envelope__corpo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: 1px solid rgba(185, 139, 78, 0.4);
  margin: 8px;
  pointer-events: none;
}

.envelope__carta {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  top: 18%;
  background: linear-gradient(180deg, #fff 0%, #FFFCF6 100%);
  border-radius: 6px;
  box-shadow: 0 -6px 18px rgba(140, 101, 48, 0.12);
  transition: transform 900ms cubic-bezier(0.65, 0, 0.35, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.envelope__carta .envelope__marca {
  font-family: "Pinyon Script", cursive;
  font-size: 1.8rem;
  color: #B98B4E;
}

.envelope__aba {
  position: absolute;
  background: linear-gradient(135deg, #fff, rgb(100%, 96.8235294118%, 90.4705882353%));
  border: 1px solid rgba(185, 139, 78, 0.25);
}

.envelope__aba--esquerda,
.envelope__aba--direita {
  top: 0;
  bottom: 0;
  width: 52%;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.envelope__aba--esquerda {
  left: 0;
  border-radius: 10px 0 0 10px;
}

.envelope__aba--direita {
  right: 0;
  transform: scaleX(-1);
  border-radius: 10px 0 0 10px;
}

.envelope__aba--topo {
  top: 0;
  left: 0;
  right: 0;
  height: 62%;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 900ms cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 3;
  display: flex;
  justify-content: center;
}
.envelope__aba--topo .envelope__selo {
  margin-top: 28%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgb(79.350639041%, 65.7810589823%, 47.7866158609%), #8C6530 75%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFCF6;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.3rem;
  box-shadow: 0 3px 8px rgba(140, 101, 48, 0.5);
  transition: opacity 300ms ease;
}

body.envelope-aberto .envelope__aba--topo {
  transform: rotateX(180deg);
}
body.envelope-aberto .envelope__aba--topo .envelope__selo {
  opacity: 0;
}
body.envelope-aberto .envelope__carta {
  transform: translateY(-58%);
}
body.envelope-aberto .envelope__corpo {
  box-shadow: 0 30px 70px -25px rgba(140, 101, 48, 0.4);
}

.envelope__legenda {
  font-size: 0.8rem;
  color: #8A7461;
  margin-top: 0.5rem;
}

.cena-revelacao {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  text-align: center;
  padding: 2.75rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 2;
}
.cena-revelacao .pergunta {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-style: italic;
  color: #8A7461;
  letter-spacing: 0.03em;
}
.cena-revelacao .resposta {
  font-family: "Pinyon Script", cursive;
  font-size: 4.2rem;
  line-height: 1;
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  transition: opacity 700ms cubic-bezier(0.65, 0, 0.35, 1), transform 700ms cubic-bezier(0.65, 0, 0.35, 1);
}
.cena-revelacao .continuar {
  margin-top: 1.75rem;
  opacity: 0;
  transition: opacity 600ms ease 200ms;
}

body.envelope-aberto .cena-revelacao {
  opacity: 1;
  pointer-events: auto;
  transition-delay: 495ms;
}

body.avancou .cena-revelacao {
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}

body.revelado .cena-revelacao .resposta,
body.revelado .cena-revelacao .continuar {
  opacity: 1;
  transform: none;
}

body.tema-menina .resposta {
  color: #C97B8B;
}

body.tema-menino .resposta {
  color: #5F8FAE;
}

.confete {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 400ms ease;
}
.confete span {
  position: absolute;
  top: -5%;
  width: 8px;
  height: 14px;
  opacity: 0.85;
  animation: cair 3.6s linear infinite;
}
body.tema-menina .confete span {
  background: #C97B8B;
}
body.tema-menino .confete span {
  background: #5F8FAE;
}
.confete span:nth-child(1) {
  left: 4.2%;
  animation-delay: 0.15s;
  transform: rotate(23deg);
}
.confete span:nth-child(2) {
  left: 8.4%;
  animation-delay: 0.3s;
  transform: rotate(46deg);
}
.confete span:nth-child(3) {
  left: 12.6%;
  animation-delay: 0.45s;
  transform: rotate(69deg);
}
.confete span:nth-child(4) {
  left: 16.8%;
  animation-delay: 0.6s;
  transform: rotate(92deg);
}
.confete span:nth-child(5) {
  left: 21%;
  animation-delay: 0.75s;
  transform: rotate(115deg);
}
.confete span:nth-child(6) {
  left: 25.2%;
  animation-delay: 0.9s;
  transform: rotate(138deg);
}
.confete span:nth-child(7) {
  left: 29.4%;
  animation-delay: 1.05s;
  transform: rotate(161deg);
}
.confete span:nth-child(8) {
  left: 33.6%;
  animation-delay: 1.2s;
  transform: rotate(184deg);
}
.confete span:nth-child(9) {
  left: 37.8%;
  animation-delay: 1.35s;
  transform: rotate(207deg);
}
.confete span:nth-child(10) {
  left: 42%;
  animation-delay: 1.5s;
  transform: rotate(230deg);
}
.confete span:nth-child(11) {
  left: 46.2%;
  animation-delay: 1.65s;
  transform: rotate(253deg);
}
.confete span:nth-child(12) {
  left: 50.4%;
  animation-delay: 1.8s;
  transform: rotate(276deg);
}
.confete span:nth-child(13) {
  left: 54.6%;
  animation-delay: 1.95s;
  transform: rotate(299deg);
}
.confete span:nth-child(14) {
  left: 58.8%;
  animation-delay: 2.1s;
  transform: rotate(322deg);
}
.confete span:nth-child(15) {
  left: 63%;
  animation-delay: 2.25s;
  transform: rotate(345deg);
}
.confete span:nth-child(16) {
  left: 67.2%;
  animation-delay: 2.4s;
  transform: rotate(368deg);
}
.confete span:nth-child(17) {
  left: 71.4%;
  animation-delay: 2.55s;
  transform: rotate(391deg);
}
.confete span:nth-child(18) {
  left: 75.6%;
  animation-delay: 2.7s;
  transform: rotate(414deg);
}
.confete span:nth-child(19) {
  left: 79.8%;
  animation-delay: 2.85s;
  transform: rotate(437deg);
}
.confete span:nth-child(20) {
  left: 84%;
  animation-delay: 3s;
  transform: rotate(460deg);
}
.confete span:nth-child(21) {
  left: 88.2%;
  animation-delay: 3.15s;
  transform: rotate(483deg);
}
.confete span:nth-child(22) {
  left: 92.4%;
  animation-delay: 3.3s;
  transform: rotate(506deg);
}
.confete span:nth-child(23) {
  left: 96.6%;
  animation-delay: 3.45s;
  transform: rotate(529deg);
}
.confete span:nth-child(24) {
  left: 0.8%;
  animation-delay: 3.6s;
  transform: rotate(552deg);
}

body.revelado .confete {
  opacity: 1;
}

body.avancou .confete {
  opacity: 0;
  transition: opacity 800ms ease;
}

@keyframes cair {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(115vh) rotate(340deg);
  }
}
.botao-continuar {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  color: #FFFCF6;
  background: #8C6530;
  border: none;
  padding: 0.75em 1.8em;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(140, 101, 48, 0.6);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.botao-continuar:hover {
  transform: translateY(-2px);
}

.cena-convite {
  width: min(100%, 460px);
  background: #FFFCF6;
  border-radius: 18px;
  box-shadow: 0 20px 60px -20px rgba(74, 53, 39, 0.35);
  padding: 2.75rem 1.75rem;
  margin-top: 100vh;
  position: relative;
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 700ms cubic-bezier(0.65, 0, 0.35, 1), transform 700ms cubic-bezier(0.65, 0, 0.35, 1);
}
.cena-convite::before, .cena-convite::after {
  content: "";
  position: absolute;
  left: 1.75rem;
  right: 1.75rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, #B98B4E, transparent);
}
.cena-convite::before {
  top: 1.75rem;
}
.cena-convite::after {
  bottom: 1.75rem;
}

body.revelado .cena-convite {
  opacity: 1;
  transform: none;
}

.convite__titulo {
  font-family: "Pinyon Script", cursive;
  font-size: 2.6rem;
  color: #8C6530;
  margin: 0 0 1rem;
}

.convite__texto {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #4A3527;
  max-width: 34ch;
  margin: 0 auto 1.75rem;
}

.convite__nomes {
  font-family: "Pinyon Script", cursive;
  font-size: 2.3rem;
  margin: 1rem 0;
}
.convite__nomes .ou {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.1rem;
  color: #8A7461;
  margin: 0 0.4em;
}
body.tema-menina .convite__nomes .nome--revelado {
  color: #C97B8B;
}
body.tema-menino .convite__nomes .nome--revelado {
  color: #5F8FAE;
}

.convite__data {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 1rem;
  color: #8A7461;
  border-top: 1px solid rgba(185, 139, 78, 0.3);
  border-bottom: 1px solid rgba(185, 139, 78, 0.3);
  padding: 1rem 0;
  margin: 1.75rem 0;
}
.convite__data strong {
  font-size: 1.7rem;
  color: #4A3527;
  font-weight: 500;
  display: block;
}

.convite__acoes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.75rem 0;
}
.convite__acoes button, .convite__acoes a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  background: none;
  border: none;
  font-family: "Cormorant Garamond", serif;
  font-size: 0.82rem;
  color: #4A3527;
  text-decoration: none;
  cursor: pointer;
}
.convite__acoes .icone {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F7EFE1;
  border: 1px solid rgba(185, 139, 78, 0.4);
  color: #8C6530;
  transition: transform 200ms ease, background 200ms ease;
}
.convite__acoes button:hover .icone,
.convite__acoes a:hover .icone {
  background: #B98B4E;
  color: #FFFCF6;
  transform: translateY(-3px);
}

.convite__clima {
  margin-top: 2.75rem;
}
.convite__clima p {
  color: #8A7461;
  font-size: 0.95rem;
}

.paleta {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.paleta span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.convite__rodape {
  margin-top: 2.75rem;
  font-size: 0.75rem;
  color: #8A7461;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(74, 53, 39, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
  z-index: 10;
}
.modal.aberto {
  opacity: 1;
  pointer-events: auto;
}

.modal__painel {
  width: min(100%, 460px);
  background: #FFFCF6;
  border-radius: 24px 24px 0 0;
  padding: 2.75rem 1.75rem;
  text-align: center;
  transform: translateY(16px);
  transition: transform 300ms cubic-bezier(0.65, 0, 0.35, 1);
}
.modal.aberto .modal__painel {
  transform: none;
}
.modal__painel h2 {
  font-family: "Pinyon Script", cursive;
  color: #8C6530;
  font-size: 1.9rem;
  margin-top: 0;
}
.modal__painel ul {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.7em;
}
.modal__painel li {
  background: #F7EFE1;
  border-radius: 999px;
  padding: 0.75em 1.4em;
  font-size: 0.95rem;
}
.modal__painel .modal__fechar {
  background: none;
  border: none;
  color: #8A7461;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
}
