* {
  box-sizing: border-box;
}

:root {
  --rosa-fundo: #f9e7ea;
  --rosa: #d66f73;
  --rosa-claro: #f5b4b7;
  --dourado: #d39400;
  --dourado-escuro: #bd7d00;
  --texto: #5f4747;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 20%, #fff7f8 0, var(--rosa-fundo) 45%, #f4dfe3 100%);
  display: flex;
  justify-content: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--texto);
}

button {
  font: inherit;
}

.convite {
  width: min(100%, 560px);
  margin: 0 auto;
  overflow: hidden;
  box-shadow: 0 0 45px rgba(145, 87, 93, 0.16);
  background: var(--rosa-fundo);
}

.pagina {
  position: relative;
  width: 100%;
  overflow: hidden;

  /* Mantém a proporção original da arte enviada: 499 x 2047,
     dividida em duas páginas de aproximadamente 499 x 1024. */
  aspect-ratio: 499 / 1024;

  background-image: url("./convite.png");
  background-repeat: no-repeat;
  background-size: 100% auto;
}

/* Primeira metade da arte */
.pagina-1 {
  background-position: center top;
}

/* Segunda metade da arte */
.pagina-2 {
  aspect-ratio: 499 / 1023;
  background-position: center bottom;
}

/* -------------------------------------------------
   ÁREA PIX
   ------------------------------------------------- */

.pix-interacao {
  position: absolute;
  left: 14%;
  top: 75.2%;
  width: 72%;
  height: 17.8%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 22px;

  /*
   * A arte original possui o QR Code nessa área.
   * O painel cobre somente essa região e cria uma área
   * limpa para o botão, sem alterar o restante da arte.
   */
  background: rgba(250, 231, 234, 0.93);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);

  z-index: 5;
}

.pix-card {
  width: 88%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(7px, 1.4vw, 12px);
}

.pix-label {
  color: var(--dourado-escuro);
  font-size: clamp(16px, 3.2vw, 21px);
  line-height: 1;
  font-weight: 600;
}

.btn-pix {
  appearance: none;
  border: 1px solid rgba(189, 125, 0, 0.7);
  background: linear-gradient(135deg, #d99a17, #c78600);
  color: white;
  border-radius: 999px;
  padding: clamp(9px, 2.2vw, 14px) clamp(17px, 4vw, 28px);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(16px, 3.8vw, 21px);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow:
    0 7px 18px rgba(173, 107, 0, 0.25),
    inset 0 1px rgba(255, 255, 255, .35);
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    filter .2s ease;
}

.btn-pix:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow:
    0 10px 24px rgba(173, 107, 0, 0.3),
    inset 0 1px rgba(255, 255, 255, .35);
}

.btn-pix:active {
  transform: translateY(0) scale(.98);
}

.pix-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 5px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 13px;
}

.pix-status {
  min-height: 16px;
  color: #7c5c00;
  font-family: Arial, sans-serif;
  font-size: clamp(10px, 2.3vw, 13px);
  font-weight: 600;
}

/* -------------------------------------------------
   BOTÕES DA SEGUNDA PARTE
   ------------------------------------------------- */

.acao {
  position: absolute;
  z-index: 5;
  border: 0;
  background: transparent;
  padding: 0;
}

/*
 * As posições abaixo foram calculadas sobre a arte original.
 * Como tudo está em %, elas acompanham a imagem em qualquer largura.
 */

.acao-localizacao {
  left: 8.5%;
  top: 39.5%;
  width: 34%;
  height: 17%;
  cursor: pointer;
}

.acao-presente {
  right: 8.5%;
  top: 39.5%;
  width: 34%;
  height: 17%;
  cursor: pointer;
}

.acao-whatsapp {
  left: 33%;
  top: 55%;
  width: 34%;
  height: 17%;
  cursor: pointer;
}

.acao-presente,
.acao-whatsapp,
.acao-localizacao {
  transition: transform .2s ease;
}

.acao-presente:hover,
.acao-whatsapp:hover,
.acao-localizacao:hover {
  transform: translateY(-3px) scale(1.025);
}

.acao-presente:active,
.acao-whatsapp:active,
.acao-localizacao:active {
  transform: scale(.97);
}

.icone-coracao {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/*
 * Esses elementos funcionam como uma pequena camada de interação
 * sobre os ícones já presentes na arte. O visual principal continua
 * sendo o do convite original.
 */
.pin,
.presente-icone,
.whatsapp-icone,
.localizacao-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40%;
  aspect-ratio: 1;
  color: var(--dourado);
  font-family: Arial, sans-serif;
  font-size: clamp(22px, 7vw, 40px);
  opacity: 0.001;
}

/* Foco acessível sem modificar o design normalmente */
.acao-presente:focus-visible,
.acao-whatsapp:focus-visible,
.acao-localizacao:focus-visible,
.btn-pix:focus-visible {
  outline: 3px solid rgba(211, 148, 0, .65);
  outline-offset: 4px;
  border-radius: 999px;
}

/* -------------------------------------------------
   TOAST
   ------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;

  padding: 11px 18px;
  border-radius: 999px;

  background: rgba(68, 48, 48, .94);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-align: center;

  box-shadow: 0 8px 25px rgba(0, 0, 0, .18);
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* -------------------------------------------------
   MOBILE
   ------------------------------------------------- */

@media (max-width: 480px) {
  body {
    background: var(--rosa-fundo);
  }

  .convite {
    width: 100%;
    box-shadow: none;
  }

  .pix-interacao {
    border-radius: 18px;
  }
}

/* Telas muito pequenas */
@media (max-width: 350px) {
  .pix-interacao {
    left: 11%;
    width: 78%;
  }

  .pix-label {
    font-size: 15px;
  }
}

/* Redução de movimento */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}