/* ===== Invitation card (shared by designer preview, landing page & invite page) ===== */
.card {
  --bg1: #ff7eb3; --bg2: #ff9a5a; --text: #fff; --accent: #fff3b0;
  --font-title: 'Pacifico', cursive; --font-body: 'Poppins', sans-serif;
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  border-radius: 20px;
  background: linear-gradient(160deg, var(--bg1), var(--bg2));
  color: var(--text);
  font-family: var(--font-body);
  text-align: center;
  box-shadow: 0 24px 60px -18px rgba(30, 10, 60, .45), 0 2px 6px rgba(0, 0, 0, .08);
  overflow: hidden;
  isolation: isolate;
  transition: background .4s;
}
.card::before { /* background pattern */
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
}
.card::after { /* inner frame */
  content: ''; position: absolute; inset: 12px; border: 1.5px solid var(--accent); border-radius: 13px;
  opacity: .55; pointer-events: none;
}
.pattern-dots::before {
  background-image: radial-gradient(circle, rgba(255, 255, 255, .28) 2px, transparent 2.6px);
  background-size: 22px 22px;
}
.pattern-confetti::before {
  background-image:
    radial-gradient(circle at 8% 12%, var(--accent) 0 4px, transparent 5px),
    radial-gradient(circle at 22% 78%, #ffffff 0 3px, transparent 4px),
    radial-gradient(circle at 88% 18%, #ffffff 0 4px, transparent 5px),
    radial-gradient(circle at 92% 64%, var(--accent) 0 5px, transparent 6px),
    radial-gradient(circle at 12% 46%, #ffffff 0 2px, transparent 3px),
    radial-gradient(circle at 78% 90%, var(--accent) 0 3px, transparent 4px),
    radial-gradient(circle at 50% 6%, #ffffff 0 3px, transparent 4px),
    radial-gradient(circle at 6% 94%, var(--accent) 0 4px, transparent 5px),
    radial-gradient(circle at 96% 40%, #ffffff 0 2px, transparent 3px),
    radial-gradient(circle at 70% 4%, var(--accent) 0 2px, transparent 3px);
}
.pattern-stars::before {
  background-image:
    radial-gradient(circle at 10% 15%, #fff 0 1.5px, transparent 2px), radial-gradient(circle at 30% 85%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 85% 12%, #fff 0 2px, transparent 2.5px), radial-gradient(circle at 90% 70%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 60% 92%, #fff 0 1.5px, transparent 2px), radial-gradient(circle at 5% 60%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 45% 4%, #fff 0 1px, transparent 1.5px), radial-gradient(circle at 75% 40%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 20% 35%, #fff 0 1px, transparent 1.5px), radial-gradient(circle at 96% 92%, #fff 0 1.5px, transparent 2px);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .8; } }

.card-inner { position: relative; padding: 40px 34px 38px; }
.card-graphic { width: 140px; height: 140px; margin: 0 auto 10px; }
.card-graphic svg { width: 100%; height: 100%; display: block; overflow: visible; }
.card-graphic.is-empty { display: none; }
.card-graphic:has(img) { width: 100%; height: auto; }
.card-graphic img { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }

.card-tagline { font-size: .8rem; letter-spacing: .28em; text-transform: uppercase; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.card-tagline:empty { display: none; }
.card-title { font-family: var(--font-title); font-weight: 600; font-size: clamp(1.8rem, 6vw, 2.5rem); line-height: 1.15; margin: 6px 0 8px; word-wrap: break-word; }
.card-host { font-size: .95rem; opacity: .9; }
.card-divider { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px auto; max-width: 220px; }
.card-divider::before, .card-divider::after { content: ''; flex: 1; height: 1px; background: var(--accent); opacity: .7; }
.card-divider span { width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); }
.card-when { font-weight: 600; font-size: 1.02rem; }
.card-where { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.card-where strong { font-weight: 600; }
.card-where span { font-size: .9rem; opacity: .85; }
.card-desc { margin: 16px auto 0; max-width: 34ch; line-height: 1.55; font-size: .97rem; }
.card-desc:empty, .card-host:empty, .card-rsvpby:empty, .card-where strong:empty, .card-where span:empty, .card-when:empty { display: none; }
.card-rsvpby { margin-top: 18px; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }

/* graphic animations */
.anim-float .card-graphic > * { animation: g-float 4s ease-in-out infinite; }
.anim-pulse .card-graphic > * { animation: g-pulse 2.2s ease-in-out infinite; }
.anim-swing .card-graphic > * { animation: g-swing 3s ease-in-out infinite; transform-origin: 50% 0; }
.anim-spin  .card-graphic > svg { animation: g-spin 18s linear infinite; }
@keyframes g-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes g-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes g-swing { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes g-spin  { to { transform: rotate(360deg); } }
.card-graphic .flames path { transform-origin: center bottom; transform-box: fill-box; animation: flicker .5s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scaleY(1) rotate(-3deg); } to { transform: scaleY(1.15) rotate(3deg); } }

@media (prefers-reduced-motion: reduce) {
  .card *, .card::before { animation: none !important; }
}
