/* =====================================================================
   "Tap to open" welcome screen and the music button.
   The invitation animation waits (paused) until the guest taps.
   ===================================================================== */
.gated {
  overflow: hidden;
}
.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ivory);
  text-align: center;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cg fill='none' stroke='%23c9a45c' stroke-opacity='0.13' stroke-width='0.8'%3E%3Cpath d='M22 0 L44 22 L22 44 L0 22 Z'/%3E%3C/g%3E%3Cpath d='M22 25.2 C18 22.6 18.4 19 20.8 19.2 C21.5 19.3 22 20 22 20 C22 20 22.5 19.3 23.2 19.2 C25.6 19 26 22.6 22 25.2Z' fill='%23c9a45c' fill-opacity='0.16'/%3E%3C/svg%3E"),
    radial-gradient(60% 60% at 50% 45%, rgb(31 107 80 / 0.7), transparent 75%),
    linear-gradient(180deg, #0f4a38, var(--forest));
  background-size: 44px 44px, auto, auto;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.gate.opened {
  opacity: 0;
  visibility: hidden;
}
.gate-inner {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 46px 40px 40px;
  border: 1px solid rgb(201 164 92 / 0.55);
  outline: 1px solid rgb(201 164 92 / 0.25);
  outline-offset: 6px;
  animation: gate-in 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
@keyframes gate-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.gate-mono {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgb(201 164 92 / 0.7);
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}
.gate-kicker {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}
.gate-names {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
}
.gate-names em {
  color: var(--gold);
}
.gate-date {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #e6d3a6;
}
.gate-open {
  margin-top: 10px;
  padding: 13px 30px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  animation: gate-pulse 2.4s ease-in-out 1.2s infinite;
  transition: background 0.2s, color 0.2s;
}
.gate-open:hover {
  background: var(--gold);
  color: var(--forest);
}
@keyframes gate-pulse {
  50% {
    box-shadow: 0 0 0 6px rgb(201 164 92 / 0.15);
  }
}
.gate-note {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgb(247 245 236 / 0.55);
}

/* The invitation waits until the gate is opened, then plays its animation. */
.gated .invite,
.gated .invite::before,
.gated .invite::after,
.gated .invite-photo,
.gated .corner,
.gated .edge-gem,
.gated .watermark,
.gated .invite-text > * {
  animation-play-state: paused !important;
}

/* Small gold music button, bottom right. */
.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--forest);
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.25);
}
.music-toggle.playing span {
  animation: music-beat 1.2s ease-in-out infinite;
}
.music-toggle.muted {
  opacity: 0.7;
}
.music-toggle.muted::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 1.5px;
  background: var(--gold);
  transform: rotate(-45deg);
}
@keyframes music-beat {
  50% {
    transform: scale(1.15);
  }
}
@media (prefers-reduced-motion: reduce) {
  .gate-inner,
  .gate-open,
  .music-toggle.playing span {
    animation: none;
  }
}

/* Keep the hearts away from the words: a soft emerald pool behind the welcome text. */
.gate-inner {
  background: radial-gradient(closest-side, rgb(15 74 56 / 0.97) 70%, rgb(15 74 56 / 0.85));
}
