:root {
  --pink-50:  #fff0f6;
  --pink-100: #ffe1ec;
  --pink-300: #ffa8c5;
  --pink-500: #ff5c93;
  --pink-700: #c93072;
  --gold:     #f7c873;
  --gold-2:   #e8a83a;
  --cream:    #fff8f0;
  --ink:      #2b1d2b;
  --shadow:   0 20px 60px rgba(201, 48, 114, .18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Quicksand', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #ffd3e2 0%, transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, #ffe9c1 0%, transparent 55%),
    linear-gradient(180deg, var(--cream) 0%, #ffeef4 100%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

#confetti-canvas {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
}

.invite { position: relative; z-index: 2; max-width: 980px; margin: 0 auto; padding: 40px 20px 80px; }

/* HERO */
.hero { text-align: center; padding: 40px 12px 20px; }

.celebrant-photo {
  position: relative;
  width: clamp(120px, 17vw, 160px);
  height: clamp(150px, 22vw, 205px);
  margin: 38px auto 36px;
  border-radius: 50% / 50%;
  padding: 5px;
  background:
    repeating-conic-gradient(from 0deg,
      var(--pink-500) 0deg 18deg,
      var(--gold-2)   18deg 36deg,
      var(--pink-700) 36deg 54deg,
      var(--gold)     54deg 72deg);
  box-shadow:
    var(--shadow),
    0 0 0 6px rgba(255, 255, 255, .85),
    0 0 0 8px var(--gold),
    0 0 0 14px rgba(255, 255, 255, .8),
    0 0 22px rgba(255, 92, 147, .35);
  animation: float-photo 4.5s ease-in-out infinite, frame-spin 18s linear infinite;
}
.celebrant-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50% / 50%;
  display: block;
  border: 3px solid white;
  animation: counter-spin 18s linear infinite;
}

/* Festive decorations */
.celebrant-photo .deco {
  position: absolute;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.18));
  animation: counter-spin 18s linear infinite;
}
.celebrant-photo .crown {
  top: -28px; left: 50%;
  transform-origin: 50% 80%;
  font-size: 1.7rem;
  color: var(--gold-2);
  animation: counter-spin 18s linear infinite, crown-bob 2.4s ease-in-out infinite;
  margin-left: -.85rem;
  text-shadow: 0 0 12px rgba(247, 200, 115, .9);
}
.celebrant-photo .balloon-l {
  top: 12%; left: -22px;
  font-size: 1.1rem;
  color: var(--pink-500);
  animation: counter-spin 18s linear infinite, wobble-l 3s ease-in-out infinite;
}
.celebrant-photo .balloon-r {
  top: 18%; right: -22px;
  font-size: 1rem;
  color: var(--pink-700);
  animation: counter-spin 18s linear infinite, wobble-r 3.4s ease-in-out infinite;
}
.celebrant-photo .confetti-tl,
.celebrant-photo .confetti-tr,
.celebrant-photo .confetti-bl,
.celebrant-photo .confetti-br {
  font-size: .8rem;
}
.celebrant-photo .confetti-tl { top: -2px;  left: 8%;   color: var(--gold-2);  animation: counter-spin 18s linear infinite, twinkle 1.6s ease-in-out infinite; }
.celebrant-photo .confetti-tr { top: 4px;   right: 6%;  color: var(--pink-500); animation: counter-spin 18s linear infinite, twinkle 1.9s ease-in-out infinite .4s; }
.celebrant-photo .confetti-bl { bottom: 8%; left: -8px; color: var(--pink-700); animation: counter-spin 18s linear infinite, twinkle 2.1s ease-in-out infinite .8s; }
.celebrant-photo .confetti-br { bottom: 4%; right: -6px; color: var(--gold-2);  animation: counter-spin 18s linear infinite, twinkle 1.7s ease-in-out infinite .2s; }

/* Ribbon banner under the photo */
.celebrant-photo .ribbon {
  position: absolute;
  z-index: 2;
  bottom: -18px; left: 50%;
  width: 88%;
  height: 22px;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--pink-500), var(--pink-700));
  clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%, 8% 50%);
  box-shadow: 0 6px 14px rgba(201, 48, 114, .35);
  animation: counter-spin 18s linear infinite;
}
.celebrant-photo .ribbon::before {
  content: 'CELEBRANT';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}

@keyframes float-photo {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes frame-spin {
  to { background: repeating-conic-gradient(from 360deg,
        var(--pink-500) 0deg 18deg,
        var(--gold-2)   18deg 36deg,
        var(--pink-700) 36deg 54deg,
        var(--gold)     54deg 72deg); }
}
@keyframes counter-spin {
  /* Keep inner content visually still while frame "rotates" via gradient.
     Using transform rotation isn't needed since conic gradient pseudo-rotates
     by virtue of @keyframes above; this rule mainly anchors the elements. */
  from { }
  to   { }
}
@keyframes crown-bob {
  0%, 100% { transform: translateY(0)    rotate(-4deg); }
  50%      { transform: translateY(-3px) rotate(4deg); }
}
@keyframes wobble-l {
  0%, 100% { transform: translate(0, 0)   rotate(-6deg); }
  50%      { transform: translate(-3px, -4px) rotate(6deg); }
}
@keyframes wobble-r {
  0%, 100% { transform: translate(0, 0)  rotate(6deg); }
  50%      { transform: translate(3px, -4px) rotate(-6deg); }
}
@keyframes twinkle {
  0%, 100% { opacity: .35; transform: scale(.7) rotate(0); }
  50%      { opacity: 1;   transform: scale(1.25) rotate(35deg); }
}
.kicker {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  color: var(--pink-700);
  margin: 0 0 8px;
}
.celebrant {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-style: italic;
  margin: 0;
  font-size: clamp(3.4rem, 9vw, 6rem);
  line-height: 1.05;
  background: linear-gradient(135deg, var(--pink-500) 0%, var(--gold-2) 50%, var(--pink-700) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 6px 30px rgba(201, 48, 114, .15);
}
.celebrant .amp {
  display: inline-block;
  font-family: 'Great Vibes', cursive;
  font-size: .55em;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 .15em;
  vertical-align: middle;
}
.occasion { margin: 14px 0 24px; }
.age-badge {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink-500), var(--pink-700));
  color: white;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .85rem;
  box-shadow: 0 10px 30px rgba(201, 48, 114, .35);
}

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 26px auto 30px;
  max-width: 720px;
}
.meta-card {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,168,197,.5);
  padding: 16px 18px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: left;
}
.meta-card i { font-size: 1.6rem; color: var(--pink-500); }
.meta-card small { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: #99728a; }
.meta-card strong { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--ink); display: block; }
.meta-card .meta-sub { display: block; font-size: .82rem; color: #946079; margin-top: 2px; }
.meta-card-wide { grid-column: 1 / -1; }
@media (min-width: 720px) {
  .meta-card-wide { grid-column: span 2; justify-self: center; min-width: 320px; }
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 520px;
  margin: 8px auto 30px;
}
.countdown > div {
  background: linear-gradient(180deg, white, #fff5fa);
  border-radius: 14px;
  padding: 14px 6px;
  box-shadow: var(--shadow);
  border: 1px solid #ffe1ec;
}
.countdown span {
  display: block;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--pink-700);
  line-height: 1;
}
.countdown small { color: #946079; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }

.btn-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px;
  background: linear-gradient(135deg, var(--pink-500), var(--pink-700));
  color: white;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: .04em;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 18px 40px rgba(201, 48, 114, .35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 22px 50px rgba(201,48,114,.45); }

/* MESSAGE CARD */
.message { padding: 30px 0; }
.card {
  position: relative;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,168,197,.5);
  border-radius: 24px;
  padding: 36px 30px;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.quote { font-size: 1.6rem; color: var(--pink-300); position: absolute; top: 18px; left: 22px; }
.card p {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.7;
  color: #4a3242;
  margin: 6px 0 18px;
}
.card .signature {
  font-family: 'Great Vibes', cursive;
  font-size: 1.6rem;
  color: var(--pink-700);
}

/* RSVP */
.rsvp { padding: 50px 12px 20px; }
.rsvp header { text-align: center; margin-bottom: 22px; }
.rsvp h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 6vw, 3rem);
  margin: 0;
  background: linear-gradient(135deg, var(--pink-700), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rsvp header p { color: #946079; margin: 6px 0 0; }

.rsvp-form {
  background: white;
  border-radius: 24px;
  padding: 30px;
  max-width: 720px;
  margin: 20px auto 0;
  box-shadow: var(--shadow);
  border: 1px solid #ffe1ec;
}
.field { display: flex; flex-direction: column; margin-bottom: 16px; }
.field label {
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 6px;
  color: #5d3a4f;
}
.field label small { color: #a78296; font-weight: 500; }
.field .req { color: var(--pink-500); }
.field input {
  font-family: inherit;
  font-size: 1rem;
  padding: 14px 16px;
  border: 1.5px solid #ffd3e2;
  border-radius: 12px;
  background: #fffafd;
  transition: border-color .2s, box-shadow .2s, transform .1s;
  color: var(--ink);
}
.field input:focus {
  outline: none;
  border-color: var(--pink-500);
  box-shadow: 0 0 0 4px rgba(255, 92, 147, .15);
  background: white;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row .field { margin-bottom: 16px; }
.field.small { max-width: 140px; }
.field.grow { flex: 1; }
@media (max-width: 600px) {
  .row { grid-template-columns: 1fr; }
  .field.small { max-width: none; }
}

.btn-submit {
  width: 100%;
  position: relative;
  margin-top: 6px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: linear-gradient(135deg, var(--pink-500), var(--pink-700));
  color: white;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(201, 48, 114, .3);
  transition: transform .1s, box-shadow .2s;
}
.btn-submit:hover { transform: translateY(-1px); }
.btn-submit:disabled { opacity: .7; cursor: wait; }
.btn-submit .loading { display: none; }
.btn-submit.loading .label { display: none; }
.btn-submit.loading .loading { display: inline-flex; align-items: center; gap: 8px; }

.form-msg { text-align: center; margin: 14px 0 0; min-height: 1.2em; font-weight: 600; }
.form-msg.error { color: #c43f5d; }
.form-msg.success { color: #1b8a4d; }

.footer { text-align: center; padding: 30px 10px 0; color: #946079; font-size: .9rem; }
.footer .fa-heart { color: var(--pink-500); }

/* MODAL */
.modal {
  position: fixed; inset: 0;
  background: rgba(43,29,43,.6);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal.open { display: flex; }
.modal-card {
  background: white;
  border-radius: 24px;
  padding: 40px 30px;
  text-align: center;
  max-width: 440px;
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
}
.modal-card .big-icon {
  font-size: 3.4rem;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.modal-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin: 0 0 8px;
  color: var(--pink-700);
}
.modal-card p { color: #5d3a4f; line-height: 1.6; margin: 0 0 22px; }

/* BALLOONS */
.balloons {
  position: fixed; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.balloon {
  position: absolute;
  width: 50px; height: 62px;
  border-radius: 50% 50% 48% 48% / 55% 55% 45% 45%;
  bottom: -100px;
  opacity: .85;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.1));
  animation: float-up 14s linear infinite;
}
.balloon::after {
  content: '';
  position: absolute;
  bottom: -18px; left: 50%;
  width: 1px; height: 18px;
  background: rgba(0,0,0,.25);
}
.balloon::before {
  content: '';
  position: absolute;
  bottom: -22px; left: calc(50% - 4px);
  width: 8px; height: 6px;
  background: inherit;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.b1 { background: #ff5c93; left: 5%;  animation-delay: 0s;  animation-duration: 16s; }
.b2 { background: #f7c873; left: 18%; animation-delay: 3s;  animation-duration: 13s; }
.b3 { background: #ffa8c5; left: 32%; animation-delay: 6s;  animation-duration: 18s; }
.b4 { background: #c93072; left: 50%; animation-delay: 1s;  animation-duration: 15s; }
.b5 { background: #f7c873; left: 65%; animation-delay: 4s;  animation-duration: 17s; }
.b6 { background: #ff5c93; left: 80%; animation-delay: 7s;  animation-duration: 14s; }
.b7 { background: #ffa8c5; left: 92%; animation-delay: 2s;  animation-duration: 19s; }

@keyframes float-up {
  0%   { transform: translateY(0)     translateX(0)    rotate(-3deg); opacity: 0; }
  10%  { opacity: .85; }
  50%  { transform: translateY(-55vh) translateX(30px) rotate(4deg); }
  100% { transform: translateY(-115vh) translateX(-20px) rotate(-3deg); opacity: 0; }
}

/* Pulse on focus for inputs */
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-2deg); }
  75% { transform: rotate(2deg); }
}
