*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  background: #faf8f5;
  font-family: 'Playfair Display', Georgia, serif;
}

/* ── Scene: fixed overlay, copre tutto ── */
.scene {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  perspective: 1000px;
  background: #faf8f5;
  transition: opacity 0.35s ease;
}

.scene--hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Card chiusa ── */
.card {
  position: relative;
  width: min(360px, 90vw);
  background: #fff;
  border-radius: 4px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.10);
  overflow: hidden;
  transform-origin: left center;
  transition: transform 0.85s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.85s ease;
}

.card--open {
  transform: rotateY(-90deg);
  opacity: 0;
}

/* ── Nastro diagonale bordeaux ── */
.ribbon {
  position: absolute;
  top: 28px;
  right: -52px;
  width: 180px;
  height: 32px;
  background: #8B1A2E;
  transform: rotate(45deg);
  z-index: 10;
  box-shadow: 0 2px 6px rgba(139, 26, 46, 0.35);
  transition: transform 0.55s cubic-bezier(0.4, 0, 1, 1),
    opacity 0.45s ease;
}

.ribbon--exit {
  transform: rotate(45deg) translateX(220px);
  opacity: 0;
}

/* ── Contenuto card ── */
.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 28px 44px;
}

.draw-img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 40px;
}

/* ── CTA button ── */
.cta-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px;
  -webkit-tap-highlight-color: transparent;
}

.twerking-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.07);
  }
}

.cta-label {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1rem;
  color: #555;
  letter-spacing: 0.02em;
}

/* ── Partecipazione aperta (scrollabile, z-index sotto la scene) ── */
.invitation {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  background: #fff;
  /* transizione attivata via JS con doppio rAF */
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.invitation--visible {
  opacity: 1;
  transform: scale(1);
}

.page-img {
  width: 100%;
  max-width: 480px;
  height: auto;
  display: block;
}

@media (min-width: 480px) {
  .card {
    width: 380px;
  }
}