/* Wax-seal invitation gate + persistent wedding soundtrack shell.
   Kept isolated from the recovered Wix styles for easy review/removal. */

:root {
  --bbg-rose: #D3B3B8;
  --bbg-rose-deep: #B9828C;
  --bbg-ink: #292325;
  --bbg-paper: #FFFDFB;
  --bbg-ivory: #F7F1EE;
}

/* Hidden native player. */
#bbg-wedding-audio {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Initial invitation layer. It sits above the existing white/rose/S intro. */
.bbg-invitation-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(211,179,184,.14), transparent 42%),
    linear-gradient(180deg, #fff 0%, var(--bbg-ivory) 100%);
  transition: opacity 420ms ease, visibility 0s linear 420ms;
}

.bbg-invitation-gate::before,
.bbg-invitation-gate::after {
  content: "";
  position: absolute;
  width: min(62vw, 520px);
  height: min(62vw, 520px);
  border: 1px solid rgba(211,179,184,.18);
  border-radius: 50%;
  pointer-events: none;
}
.bbg-invitation-gate::before {
  top: -35%;
  left: -18%;
}
.bbg-invitation-gate::after {
  right: -20%;
  bottom: -38%;
}

.bbg-invitation-letter {
  position: relative;
  width: min(78vw, 560px);
  min-height: min(62vh, 430px);
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(42px, 7vw, 72px) clamp(30px, 7vw, 76px) clamp(68px, 9vw, 90px);
  box-sizing: border-box;
  color: var(--bbg-ink);
  text-align: center;
  background:
    linear-gradient(145deg, rgba(255,255,255,.96), rgba(252,248,246,.98)),
    var(--bbg-paper);
  border: 1px solid rgba(41,35,37,.08);
  box-shadow:
    0 30px 70px rgba(41,35,37,.10),
    0 4px 12px rgba(41,35,37,.05);
  transform: translateY(0) scale(1);
  transition:
    transform 680ms cubic-bezier(.22,1,.36,1),
    opacity 500ms ease,
    filter 500ms ease;
}

.bbg-invitation-letter::before,
.bbg-invitation-letter::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185,130,140,.38), transparent);
}
.bbg-invitation-letter::before { top: 25px; }
.bbg-invitation-letter::after { bottom: 25px; }

.bbg-invitation-kicker {
  margin: 0 0 18px;
  font-family: cinzel, Georgia, serif;
  font-size: clamp(10px, 1.5vw, 13px);
  line-height: 1.2;
  letter-spacing: .22em;
  color: rgba(41,35,37,.62);
}

.bbg-invitation-names {
  color: #1F4D3A;
  margin: 0;
  max-width: 100%;
  font-family: wfont_f61af8_1b7afc90f48a4aae9bd20dacdb863439,wf_1b7afc90f48a4aae9bd20dacd,"Didot","Bodoni MT",Georgia,serif;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.02em;
}

.bbg-invitation-date {
  margin: 20px 0 0;
  font-family: avenir-lt-w01_35-light1475496,Arial,sans-serif;
  font-size: clamp(12px, 1.8vw, 15px);
  letter-spacing: .08em;
  color: rgba(41,35,37,.72);
}

/* The secret play control. */
.bbg-wax-seal {
  position: absolute;
  left: 50%;
  bottom: -38px;
  width: 82px;
  height: 82px;
  margin: 0;
  padding: 0;
  display: grid;
  place-items: center;
  transform: translateX(-50%) rotate(-3deg);
  border: 0;
  border-radius: 48% 52% 46% 54% / 53% 45% 55% 47%;
  color: #fff;
  background:
    radial-gradient(circle at 36% 29%, rgba(255,255,255,.26), transparent 18%),
    radial-gradient(circle at 50% 55%, #C999A2 0%, var(--bbg-rose-deep) 72%, #A96F79 100%);
  box-shadow:
    inset 0 0 0 3px rgba(255,255,255,.12),
    inset 0 0 0 7px rgba(83,42,49,.08),
    0 9px 20px rgba(81,45,52,.18);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.bbg-wax-seal::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
}

.bbg-wax-seal span {
  position: relative;
  z-index: 1;
  margin-top: -2px;
  font-family: wfont_f61af8_1b7afc90f48a4aae9bd20dacdb863439,wf_1b7afc90f48a4aae9bd20dacd,"Didot","Bodoni MT",Georgia,serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
}

.bbg-wax-seal:hover {
  filter: saturate(1.05);
  transform: translateX(-50%) rotate(-1deg) scale(1.035);
  box-shadow:
    inset 0 0 0 3px rgba(255,255,255,.12),
    inset 0 0 0 7px rgba(83,42,49,.08),
    0 12px 28px rgba(81,45,52,.22);
}

.bbg-wax-seal:focus-visible {
  outline: 2px solid var(--bbg-ink);
  outline-offset: 6px;
}

.bbg-wax-seal:active {
  transform: translateX(-50%) rotate(-1deg) scale(.96);
}

.bbg-invitation-gate.bbg-opening .bbg-wax-seal {
  transform: translateX(-50%) scale(.90);
}

.bbg-invitation-gate.bbg-opening .bbg-invitation-letter {
  transform: translateY(-18px) scale(.975);
  opacity: 0;
  filter: blur(2px);
}

.bbg-invitation-gate.bbg-opening {
  opacity: 0;
  visibility: hidden;
}

/* Minimal audio control appears only after playback actually starts. */
.bbg-audio-toggle {
  position: fixed;
  right: 16px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 100000;
  width: 38px;
  height: 38px;
  display: none;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(41,35,37,.10);
  border-radius: 50%;
  color: var(--bbg-ink);
  background: rgba(255,253,251,.88);
  box-shadow: 0 6px 20px rgba(41,35,37,.09);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.bbg-audio-toggle.bbg-audio-active {
  display: grid;
}

.bbg-audio-toggle span {
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1;
  transform: translateY(-1px);
}

.bbg-audio-toggle[aria-pressed="true"] span {
  opacity: .42;
}

.bbg-audio-toggle:focus-visible {
  outline: 2px solid var(--bbg-rose-deep);
  outline-offset: 3px;
}

html.bbg-page-loading #PAGES_CONTAINER {
  opacity: .55;
  transition: opacity 140ms ease;
}

@media (max-width: 720px) {
  .bbg-invitation-letter {
    width: min(84vw, 460px);
    min-height: min(54vh, 390px);
    padding: 42px 26px 70px;
  }

  .bbg-wax-seal {
    width: 76px;
    height: 76px;
    bottom: -35px;
  }

  .bbg-wax-seal span {
    font-size: 39px;
  }

  .bbg-audio-toggle {
    right: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bbg-invitation-gate,
  .bbg-invitation-letter,
  .bbg-wax-seal,
  html.bbg-page-loading #PAGES_CONTAINER {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}


/* Invitation refinement: portrait stationery, envelope depth, and restrained charm. */
.bbg-invitation-stage {
  position: relative;
  width: min(86vw, 610px);
  display: grid;
  place-items: center;
  perspective: 1200px;
}

.bbg-envelope-back {
  position: absolute;
  width: 92%;
  height: 78%;
  bottom: -18px;
  border-radius: 4px;
  background:
    linear-gradient(145deg, #EADBDD 0%, #D7B8BE 100%);
  box-shadow: 0 22px 55px rgba(41,35,37,.10);
  transform: rotate(-1.25deg);
}

.bbg-envelope-back::before,
.bbg-envelope-back::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.bbg-envelope-back::before {
  background:
    linear-gradient(145deg, transparent 49.5%, rgba(255,255,255,.38) 50%, transparent 50.5%),
    linear-gradient(215deg, transparent 49.5%, rgba(93,57,63,.08) 50%, transparent 50.5%);
  opacity: .7;
}
.bbg-envelope-back::after {
  inset: 12px;
  border: 1px solid rgba(255,255,255,.35);
}

.bbg-invitation-letter {
  width: min(74vw, 500px);
  min-height: min(72vh, 620px);
  padding: clamp(56px, 8vw, 84px) clamp(34px, 7vw, 66px) clamp(92px, 11vw, 118px);
  background:
    linear-gradient(180deg, rgba(255,255,255,.985), rgba(252,248,246,.985)),
    var(--bbg-paper);
  border: 1px solid rgba(41,35,37,.10);
  box-shadow:
    0 34px 80px rgba(41,35,37,.13),
    0 10px 28px rgba(41,35,37,.06);
}

.bbg-invitation-letter::before {
  inset: 18px;
  left: 18px;
  right: 18px;
  top: 18px;
  bottom: 18px;
  height: auto;
  border: 1px solid rgba(185,130,140,.28);
  background: none;
  pointer-events: none;
}
.bbg-invitation-letter::after {
  left: 38px;
  right: 38px;
  top: auto;
  bottom: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(185,130,140,.35), transparent);
}

.bbg-invitation-monogram {
  margin: 0 0 20px;
  font-family: cinzel, Georgia, serif;
  font-size: 12px;
  letter-spacing: .22em;
  color: rgba(185,130,140,.95);
}
.bbg-invitation-monogram span {
  display: inline-block;
  margin: 0 .3em;
  font-size: .8em;
}

.bbg-invitation-kicker {
  margin: 0 0 20px;
  font-size: clamp(9px, 1.35vw, 12px);
  letter-spacing: .28em;
}

.bbg-invitation-names {
  font-size: clamp(38px, 6.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -.025em;
}

.bbg-invitation-divider {
  width: min(120px, 36%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 26px 0 22px;
}
.bbg-invitation-divider::before,
.bbg-invitation-divider::after {
  content: "";
  height: 1px;
  background: rgba(185,130,140,.38);
}
.bbg-invitation-divider span {
  width: 7px;
  height: 7px;
  border: 1px solid rgba(185,130,140,.55);
  transform: rotate(45deg);
  box-sizing: border-box;
}

.bbg-invitation-date {
  margin: 0;
  font-size: clamp(12px, 1.8vw, 15px);
  letter-spacing: .12em;
}
.bbg-invitation-place {
  margin: 8px 0 0;
  font-family: avenir-lt-w01_35-light1475496,Arial,sans-serif;
  font-size: clamp(10px, 1.45vw, 12px);
  letter-spacing: .18em;
  color: rgba(41,35,37,.56);
}

.bbg-seal-hint {
  position: absolute;
  left: 50%;
  bottom: 44px;
  margin: 0;
  transform: translateX(-50%);
  font-family: avenir-lt-w01_35-light1475496,Arial,sans-serif;
  font-size: 9px;
  letter-spacing: .22em;
  color: rgba(41,35,37,.42);
  white-space: nowrap;
}

.bbg-card-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  opacity: .55;
  pointer-events: none;
}
.bbg-card-corner::before,
.bbg-card-corner::after {
  content: "";
  position: absolute;
  background: rgba(185,130,140,.42);
}
.bbg-card-corner::before {
  width: 22px;
  height: 1px;
  top: 0;
  left: 0;
}
.bbg-card-corner::after {
  width: 1px;
  height: 22px;
  top: 0;
  left: 0;
}
.bbg-card-corner--tl { top: 30px; left: 30px; }
.bbg-card-corner--tr { top: 30px; right: 30px; transform: scaleX(-1); }
.bbg-card-corner--bl { bottom: 30px; left: 30px; transform: scaleY(-1); }
.bbg-card-corner--br { bottom: 30px; right: 30px; transform: scale(-1); }

.bbg-wax-seal {
  bottom: -42px;
  width: 88px;
  height: 88px;
  box-shadow:
    inset 0 0 0 3px rgba(255,255,255,.11),
    inset 0 0 0 8px rgba(83,42,49,.09),
    0 12px 24px rgba(81,45,52,.20);
}

.bbg-wax-seal::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(116,69,77,.16);
  transform: rotate(8deg);
}

@media (max-width: 720px) {
  .bbg-invitation-stage {
    width: min(92vw, 500px);
  }

  .bbg-envelope-back {
    width: 90%;
    height: 80%;
    bottom: -12px;
  }

  .bbg-invitation-letter {
    width: min(82vw, 430px);
    min-height: min(66vh, 560px);
    padding: 54px 26px 96px;
  }

  .bbg-card-corner--tl { top: 24px; left: 24px; }
  .bbg-card-corner--tr { top: 24px; right: 24px; }
  .bbg-card-corner--bl { bottom: 24px; left: 24px; }
  .bbg-card-corner--br { bottom: 24px; right: 24px; }

  .bbg-invitation-names {
    font-size: clamp(36px, 10vw, 52px);
  }

  .bbg-invitation-divider {
    margin-top: 22px;
    margin-bottom: 20px;
  }

  .bbg-seal-hint {
    bottom: 50px;
    font-size: 8px;
    letter-spacing: .18em;
  }

  .bbg-wax-seal {
    width: 82px;
    height: 82px;
    bottom: -38px;
  }
}
