/* ==========================================================================
   invitation.css — Invitation section + the "paper" invitation card
   Gold border lines draw in once when the card is revealed (reveal.js adds
   .is-revealed to the .invite wrapper). Transform-only animation.
   ========================================================================== */

.invitation {
  /* Ivory with a very soft blush vignette */
  background: radial-gradient(ellipse 85% 75% at 50% 45%, var(--color-ivory) 0%, var(--color-ivory) 55%, rgba(243, 220, 212, 0.55) 100%);
}

.invite {
  max-width: 720px;
  margin-inline: auto;
}

.invite-card {
  --paper: #FFFBF4;
  position: relative;
  overflow: visible;
  padding: clamp(3rem, 9vw, 4.75rem) clamp(2rem, 9vw, 5rem) clamp(2.5rem, 7vw, 4rem);
  background: var(--paper);
  border-radius: 4px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

/* ---------- Double inset gold border (10px and 16px from the edge) ---------- */
.invite-card__frame {
  position: absolute;
  inset: 10px;
  pointer-events: none;
}

.invite-card__frame--inner {
  inset: 16px;
}

.invite-card__frame i {
  position: absolute;
  background: var(--color-gold);
}

.invite-card__frame--inner i {
  opacity: 0.7;
}

.invite-card__frame i:nth-child(1) { top: 0;    left: 0;  right: 0;  height: 1px; transform-origin: left; }
.invite-card__frame i:nth-child(2) { top: 0;    right: 0; bottom: 0; width: 1px;  transform-origin: top; }
.invite-card__frame i:nth-child(3) { bottom: 0; left: 0;  right: 0;  height: 1px; transform-origin: right; }
.invite-card__frame i:nth-child(4) { top: 0;    left: 0;  bottom: 0; width: 1px;  transform-origin: bottom; }

/* Draw-in: hidden until the wrapper is revealed, then each side draws in turn */
.js .invite .invite-card__frame i:nth-child(odd)  { transform: scaleX(0); }
.js .invite .invite-card__frame i:nth-child(even) { transform: scaleY(0); }

.js .invite.is-revealed .invite-card__frame i {
  transform: none;
  transition: transform 1.1s var(--ease-elegant);
}

.js .invite.is-revealed .invite-card__frame i:nth-child(1) { transition-delay: 0.3s; }
.js .invite.is-revealed .invite-card__frame i:nth-child(2) { transition-delay: 0.5s; }
.js .invite.is-revealed .invite-card__frame i:nth-child(3) { transition-delay: 0.7s; }
.js .invite.is-revealed .invite-card__frame i:nth-child(4) { transition-delay: 0.9s; }
.js .invite.is-revealed .invite-card__frame--inner i:nth-child(1) { transition-delay: 0.6s; }
.js .invite.is-revealed .invite-card__frame--inner i:nth-child(2) { transition-delay: 0.8s; }
.js .invite.is-revealed .invite-card__frame--inner i:nth-child(3) { transition-delay: 1s; }
.js .invite.is-revealed .invite-card__frame--inner i:nth-child(4) { transition-delay: 1.2s; }

/* ---------- Ornaments ---------- */
.invite-card__corner {
  position: absolute;
  width: 30px;
  height: 30px;
  color: var(--color-gold);
  pointer-events: none;
}

.invite-card__corner--tl { top: 22px;    left: 22px; }
.invite-card__corner--tr { top: 22px;    right: 22px;  transform: scaleX(-1); }
.invite-card__corner--bl { bottom: 22px; left: 22px;   transform: scaleY(-1); }
.invite-card__corner--br { bottom: 22px; right: 22px;  transform: scale(-1, -1); }

/* Lotus centred on the top border, with a paper patch that breaks the lines behind it */
.invite-card__lotus {
  position: absolute;
  top: 13px;
  left: 50%;
  width: 72px;
  height: 36px;
  padding: 3px 12px;
  transform: translate(-50%, -50%);
  background: var(--paper);
  color: var(--color-gold);
  box-sizing: border-box;
  pointer-events: none;
}

/* Faint quarter mandalas in two opposite corners (the card clips the rest) */
.invite-card__mandala {
  position: absolute;
  width: 300px;
  height: 300px;
  color: var(--color-gold);
  opacity: 0.13;
  pointer-events: none;
}

.invite-card__mandala--tr { top: -150px;    right: -150px; }
.invite-card__mandala--bl { bottom: -150px; left: -150px; }

/* ---------- Content ---------- */
.invite-card__content {
  position: relative;
  z-index: 1;
}

.invitation__blessing {
  margin: 0 0 var(--space-md);
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--color-rose-gold-deep);
}

.invitation__tagline {
  margin: 0 0 var(--space-md);
  font-size: var(--fs-sm);
  font-weight: 700;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.3em;
  color: var(--color-gold-deep);
}

.invitation__message {
  max-width: 38ch;
  margin: 0 auto var(--space-md);
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 1.02rem + 0.65vw, 1.45rem);
  font-style: italic;
  line-height: 1.7;
  color: var(--color-text);
}

.invite-card .divider {
  margin-block: var(--space-md);
}

.invitation__signature {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 9.6vw, 3.5rem); /* Pinyon Script is wider: keeps the signature on one line */
  line-height: 1.2;
  color: var(--color-maroon);
}

/* ---------- Mobile ---------- */
@media (max-width: 479.98px) {
  .invite-card {
    padding: 2.75rem 1.6rem 2.25rem;
  }
  .invite-card__mandala {
    display: none; /* crowded at this width */
  }
  .invite-card__corner {
    width: 22px;
    height: 22px;
    top: auto;
  }
  .invite-card__corner--tl,
  .invite-card__corner--tr { top: 21px; }
  .invite-card__corner--bl,
  .invite-card__corner--br { bottom: 21px; }
}

/* ---------- Reduced motion: static card ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .invite .invite-card__frame i,
  .js .invite.is-revealed .invite-card__frame i {
    transform: none;
    transition: none;
  }
}

.invite-card__decor { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
