:root {
  --pink: #f4c2c8;
  --pink-deep: #e8a4ad;
  --blue: #b7d7ea;
  --blue-deep: #8ec0db;
  --gold: #d4af37;
  --gold-soft: #e8c872;
  --cream: #fffaf4;
  --ink: #7a4e3a;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #1c1410;
  font-family: "Cormorant Garamond", serif;
}

.stage {
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 12%, rgba(255, 248, 225, 0.72) 0%, transparent 42%),
    radial-gradient(ellipse at 18% 78%, rgba(244, 194, 200, 0.42) 0%, transparent 52%),
    radial-gradient(ellipse at 84% 74%, rgba(183, 215, 234, 0.44) 0%, transparent 52%),
    linear-gradient(180deg, #fff9f2 0%, #f8ebe6 36%, #eef5f9 70%, #fbf3ea 100%);
  aspect-ratio: 9 / 16;
  height: min(100dvh, calc(100vw * 16 / 9));
  width: min(100vw, calc(100dvh * 9 / 16));
}

.stage::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(201, 162, 39, 0.42);
  border-radius: 18px;
  pointer-events: none;
  z-index: 6;
  box-shadow: inset 0 0 0 6px rgba(255, 250, 244, 0.28);
}

.stage::after {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px dashed rgba(201, 162, 39, 0.28);
  border-radius: 14px;
  pointer-events: none;
  z-index: 6;
}

.layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

canvas.layer {
  width: 100%;
  height: 100%;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
  opacity: 0.58;
  animation: drift 13s ease-in-out infinite;
}

.glow-gold {
  width: 58%;
  height: 30%;
  left: 21%;
  top: 6%;
  background: rgba(243, 227, 163, 0.78);
}

.glow-pink {
  width: 48%;
  height: 36%;
  left: -10%;
  bottom: 10%;
  background: rgba(244, 194, 200, 0.7);
  animation-delay: -4s;
}

.glow-blue {
  width: 48%;
  height: 36%;
  right: -10%;
  bottom: 8%;
  background: rgba(183, 215, 234, 0.7);
  animation-delay: -7s;
}

.balloons { z-index: 1; }

.balloon {
  position: absolute;
  width: 48px;
  height: 62px;
  border-radius: 50% 50% 48% 48%;
  opacity: 0.9;
  animation: floatY linear infinite;
  filter: drop-shadow(0 10px 12px rgba(90, 60, 40, 0.14));
}

.balloon::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: inherit;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 78px;
  background: linear-gradient(180deg, rgba(180, 150, 90, 0.5), transparent);
  transform: translateX(-50%);
}

.balloon.gold { background: radial-gradient(circle at 32% 28%, #fff8dc, #e8c56a 48%, #c9a227); }
.balloon.pink { background: radial-gradient(circle at 32% 28%, #fff, #f7cdd3 50%, #efb0b8); }
.balloon.blue { background: radial-gradient(circle at 32% 28%, #fff, #cfe6f3 50%, #a9d0e6); }

.content {
  position: relative;
  z-index: 4;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 11% 11% 9%;
  text-align: center;
}

.kicker {
  font-family: "Cinzel", serif;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  font-size: clamp(9px, 2.35vw, 12px);
  color: #b0893e;
  margin-bottom: 2.4%;
  opacity: 0;
  animation: fadeRise 13s ease-in-out infinite;
}

.mark-wrap {
  position: relative;
  width: min(40vw, 158px);
  height: min(56vw, 220px);
  margin-bottom: 3.2%;
}

.mark {
  width: 100%;
  height: 100%;
  fill: url(#goldFill);
  stroke: url(#goldStroke);
  stroke-width: 2.2;
  transform-origin: 50% 50%;
  animation: markPulse 13s ease-in-out infinite;
}

.mark-body {
  transform-origin: 100px 140px;
  animation: markOpen 13s ease-in-out infinite;
}

.mark-burst {
  position: absolute;
  inset: 16% 8%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 46%, rgba(244, 194, 200, 0.7), transparent 58%),
    radial-gradient(circle at 64% 54%, rgba(183, 215, 234, 0.7), transparent 58%),
    radial-gradient(circle, rgba(255, 246, 216, 0.45), transparent 62%);
  filter: blur(12px);
  opacity: 0;
  animation: burst 13s ease-in-out infinite;
}

.question {
  font-family: "Great Vibes", cursive;
  font-size: clamp(32px, 9.4vw, 50px);
  color: var(--ink);
  min-height: 1.15em;
  line-height: 1.15;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.invite {
  margin-top: 1.4%;
  font-size: clamp(15px, 4.2vw, 21px);
  font-style: italic;
  color: #8a6a58;
  min-height: 1.4em;
  letter-spacing: 0.02em;
}

.names {
  margin-top: 4.6%;
  font-family: "Great Vibes", cursive;
  font-size: clamp(28px, 8.2vw, 42px);
  background: linear-gradient(180deg, #f3e3a3 0%, #d4af37 48%, #b8860b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 8px rgba(201, 162, 39, 0.28));
  opacity: 0;
  animation: namesIn 13s ease-in-out infinite;
}

.details {
  margin-top: 5.5%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  animation: detailsLoop 13s ease-in-out infinite;
}

.detail {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 2px;
  border-bottom: 1px dashed rgba(201, 162, 39, 0.36);
}

.label {
  font-family: "Cinzel", serif;
  font-size: clamp(10px, 2.5vw, 12px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b0893e;
}

.value {
  flex: 1;
  text-align: right;
  color: #8d6e5a;
  font-size: clamp(13px, 3.3vw, 16px);
  letter-spacing: 0.08em;
}

.ornament {
  color: #d4af37;
  font-size: 9px;
  opacity: 0.72;
  line-height: 1;
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(10px, -14px, 0) scale(1.07); }
}

@keyframes floatY {
  0% { transform: translate3d(0, 118%, 0) rotate(-7deg); }
  100% { transform: translate3d(10px, -132%, 0) rotate(9deg); }
}

@keyframes fadeRise {
  0%, 4% { opacity: 0; transform: translateY(10px); }
  14%, 92% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0.2; transform: translateY(-4px); }
}

@keyframes markPulse {
  0%, 16% { transform: scale(1); filter: brightness(1); }
  26% { transform: scale(1.1); filter: brightness(1.22); }
  38% { transform: scale(1.02); filter: brightness(1.06); }
  100% { transform: scale(1); filter: brightness(1); }
}

@keyframes markOpen {
  0%, 16% { transform: scaleX(1); }
  24% { transform: scaleX(0.12); }
  32% { transform: scaleX(1.1); }
  42%, 100% { transform: scaleX(1); }
}

@keyframes burst {
  0%, 20% { opacity: 0; transform: scale(0.35); }
  28% { opacity: 1; transform: scale(1.2); }
  46% { opacity: 0.32; transform: scale(1.65); }
  68%, 100% { opacity: 0; transform: scale(1.9); }
}

@keyframes namesIn {
  0%, 40% { opacity: 0; transform: translateY(8px); }
  50%, 90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0.25; transform: translateY(-4px); }
}

@keyframes detailsLoop {
  0%, 48% { opacity: 0; transform: translateY(8px); }
  58%, 90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0.2; transform: translateY(-4px); }
}

@media (min-aspect-ratio: 9/16) {
  .stage {
    height: 100dvh;
    width: calc(100dvh * 9 / 16);
  }
}
