/* Burgundy Wedding: the velvet-and-gold mockup as one vertical invitation.
   A phone-width paper column (.bw-site) sits on velvet; on phones it fills the
   screen. Class prefix: bw-. Without JavaScript the cover shows the envelope
   already open (see "scripting: none" at the end of the cover block). */

@font-face { font-display: swap; font-family: "Cinzel"; font-style: normal; font-weight: 400 900; src: url("fonts/cinzel-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "Cinzel"; font-style: normal; font-weight: 400 900; src: url("fonts/cinzel-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; src: url("fonts/cormorant-garamond-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-ext-wght-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: normal; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; src: url("fonts/cormorant-garamond-cyrillic-wght-italic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-ext-wght-italic.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "Cormorant Garamond"; font-style: italic; font-weight: 300 700; src: url("fonts/cormorant-garamond-latin-wght-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-display: swap; font-family: "Pinyon Script"; font-style: normal; font-weight: 400; src: url("fonts/pinyon-script-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-display: swap; font-family: "Pinyon Script"; font-style: normal; font-weight: 400; src: url("fonts/pinyon-script-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: light;
  --wine-900: #22050a;
  --wine-800: #350914;
  --wine-700: #4f0e1c;
  --wine-600: #6b1424;
  --wine-500: #861d31;
  --wine-ink: #4a1219;
  --ivory: #f6efe4;
  --paper: #f3eadb;
  --ink: #3b231e;
  --ink-soft: #5e4640;
  --line: #d9c7aa;
  --gold: #b8924f;
  --gold-light: #e3c78f;
  --gold-dark: #8a6631;
  --error: #a3263a;
  --f-display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --f-body: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --f-script: "Pinyon Script", "Snell Roundhand", "Cormorant Garamond", cursive;
  --gutter: 20px;
  --col: 480px;
  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .32 0 0 0 0 .22 0 0 0 .55 -.18'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--wine-900); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background-color: var(--wine-900);
  background-image:
    radial-gradient(90% 60% at 50% 0%, rgb(140 30 50 / 35%), transparent 70%),
    linear-gradient(rgb(10 0 3 / 55%), rgb(10 0 3 / 55%)),
    url("img/velvet.webp");
  background-size: auto, auto, 256px 192px;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.45;
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { display: block; height: auto; max-width: 100%; }
p, h1, h2, h3, figure, fieldset { margin: 0; }
h1, h2, h3 { font-weight: 500; }
ul, ol { list-style: none; margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; padding: 0; }
button, input, select, textarea { color: inherit; font: inherit; }
a { color: inherit; }
button, a, input, label { -webkit-tap-highlight-color: transparent; }
::selection { background: #ecd3b0; color: var(--wine-ink); }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--wine-600); outline-offset: 3px; }
.bw-velvet :focus-visible, .bw-cover :focus-visible, .bw-fab:focus-visible { outline-color: var(--gold-light); }
main:focus, .bw-sec:focus { outline: none; }

.visually-hidden, .sr-only { border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; white-space: nowrap; width: 1px; }
.skip-link { background: var(--ivory); border-radius: 8px; color: var(--wine-ink); font-family: var(--f-display); font-size: 14px; left: 1rem; padding: .8rem 1rem; position: fixed; top: -8rem; z-index: 80; }
.skip-link:focus { top: 1rem; }

.bw-defs { height: 0; overflow: hidden; position: absolute; width: 0; }
.bw-ic { fill: none; flex: none; height: 1em; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; width: 1em; }

/* ---------- the page column ---------- */
.bw-site { background: var(--paper); margin: 0 auto; max-width: var(--col); overflow-x: clip; position: relative; width: 100%; }
@media (min-width: 560px) {
  .bw-site { box-shadow: 0 0 0 1px rgb(227 199 143 / 15%), 0 0 90px rgb(0 0 0 / 65%); }
}
.bw-paper { background-color: var(--paper); background-image: var(--noise); }
.bw-velvet {
  background-color: var(--wine-700);
  background-image:
    radial-gradient(120% 60% at 50% 0%, rgb(255 130 150 / 13%), transparent 65%),
    linear-gradient(180deg, rgb(79 14 28 / 30%), rgb(30 2 8 / 45%)),
    url("img/velvet.webp");
  background-size: auto, auto, 256px 192px;
  color: var(--ivory);
}

/* ==========================================================
   1 · cover
   ========================================================== */
.bw-cover {
  /* the envelope width drives the whole composition */
  --ew: min(80vw, 340px, 42vh);
  background: var(--wine-800);
  color: var(--ivory);
  display: grid;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  padding: calc(env(safe-area-inset-top) + 16px) var(--gutter) calc(env(safe-area-inset-bottom) + 16px);
  place-items: center;
  position: relative;
}
@supports (height: 1svh) {
  .bw-cover { --ew: min(80vw, 340px, 42svh); min-height: 100svh; }
}
.bw-cover__scene { inset: 0; overflow: hidden; pointer-events: none; position: absolute; z-index: -2; }
.bw-cover__img { display: block; height: 100%; max-width: none; object-fit: cover; object-position: center 40%; width: 100%; }
.bw-cover__shade {
  background: linear-gradient(180deg, rgb(30 3 9 / 50%) 0%, rgb(30 3 9 / 0%) 12%, rgb(30 3 9 / 0%) 55%, rgb(30 3 9 / 50%) 74%, rgb(30 3 9 / 85%) 100%);
  inset: 0;
  position: absolute;
  transition: background-color 1.2s ease;
  z-index: -1;
}
.bw-cover.is-open .bw-cover__shade { background-color: rgb(30 3 9 / 12%); }

/* rose petals drifting down once, settling with the ones on the stage floor */
.bw-petals i {
  animation: bw-petal var(--t, 7s) cubic-bezier(.35, .1, .55, 1) var(--d, 0s) both;
  background: radial-gradient(120% 90% at 30% 30%, #b3243c, #7a1024 55%, #4a0712);
  border-radius: 70% 0 70% 0 / 60% 0 60% 0;
  box-shadow: inset 0 0 3px rgb(0 0 0 / 35%);
  height: calc(var(--s, 18px) * .78);
  left: var(--x, 50%);
  opacity: 0;
  position: absolute;
  top: -5%;
  width: var(--s, 18px);
}
.bw-petals i:nth-child(1)  { --x: 12%; --s: 20px; --d: .2s;  --t: 6.4s; --r: 20deg;  --sway: 34px; }
.bw-petals i:nth-child(2)  { --x: 28%; --s: 15px; --d: 1.1s; --t: 7.2s; --r: 80deg;  --sway: -28px; }
.bw-petals i:nth-child(3)  { --x: 44%; --s: 22px; --d: .6s;  --t: 6.8s; --r: 140deg; --sway: 40px; }
.bw-petals i:nth-child(4)  { --x: 63%; --s: 17px; --d: 1.6s; --t: 7.6s; --r: 200deg; --sway: -36px; }
.bw-petals i:nth-child(5)  { --x: 80%; --s: 21px; --d: .4s;  --t: 6.2s; --r: 260deg; --sway: -22px; }
.bw-petals i:nth-child(6)  { --x: 90%; --s: 14px; --d: 2.2s; --t: 7.8s; --r: 320deg; --sway: -40px; }
.bw-petals i:nth-child(7)  { --x: 6%;  --s: 16px; --d: 2.8s; --t: 7.4s; --r: 40deg;  --sway: 30px; }
.bw-petals i:nth-child(8)  { --x: 36%; --s: 19px; --d: 3.4s; --t: 6.6s; --r: 110deg; --sway: -24px; }
.bw-petals i:nth-child(9)  { --x: 54%; --s: 13px; --d: 2.5s; --t: 8s;   --r: 170deg; --sway: 26px; }
.bw-petals i:nth-child(10) { --x: 72%; --s: 18px; --d: 3.9s; --t: 6.9s; --r: 230deg; --sway: 32px; }
.bw-petals i:nth-child(11) { --x: 20%; --s: 12px; --d: 4.4s; --t: 7.1s; --r: 290deg; --sway: -18px; }
.bw-petals i:nth-child(12) { --x: 86%; --s: 16px; --d: 4.9s; --t: 6.5s; --r: 350deg; --sway: -30px; }
@keyframes bw-petal {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(var(--r, 0deg)); }
  8%   { opacity: .95; }
  50%  { transform: translate3d(var(--sway, 20px), 52vh, 0) rotate(calc(var(--r, 0deg) + 220deg)) rotateY(50deg); }
  85%  { opacity: .9; }
  100% { opacity: 0; transform: translate3d(calc(var(--sway, 20px) * -.4), 104vh, 0) rotate(calc(var(--r, 0deg) + 420deg)); }
}

/* stage: room for the opened state; the eyebrow sits above the envelope, the hint below */
.bw-stage { height: calc(var(--ew) * 1.3); margin: 58px 0 146px; position: relative; width: var(--ew); }

.bw-cover__top {
  bottom: 100%;
  left: 50%;
  margin-bottom: 18px;
  position: absolute;
  text-align: center;
  /* closed: right above the envelope, which sits .3ew lower than the stage top */
  translate: -50% calc(var(--ew) * .3);
  width: max-content;
  max-width: calc(100vw - 2 * var(--gutter));
  z-index: 2;
}
.bw-cover.is-open .bw-cover__top { animation: bw-eyebrow-hop 2.6s ease both; translate: -50% 0; }
.bw-cover__eyebrow, .bw-tap-hint {
  background: rgb(40 5 12 / 62%);
  border: 1px solid rgb(227 199 143 / 45%);
  border-radius: 999px;
  color: var(--ivory);
}
.bw-cover__eyebrow {
  animation: bw-fade-down .9s var(--ease-out) 1.2s both;
  display: inline-block;
  font-family: var(--f-display);
  font-size: 12px;
  letter-spacing: .26em;
  line-height: 1.3;
  padding: 10px 18px 10px calc(18px + .26em);
  text-transform: uppercase;
}
.bw-rule {
  background: linear-gradient(90deg, transparent, var(--gold-light) 40%, transparent 42%, transparent 58%, var(--gold-light) 60%, transparent) center / 100% 1px no-repeat;
  display: block;
  height: 9px;
  margin: 10px auto 0;
  opacity: .9;
  position: relative;
  width: 120px;
}
.bw-rule::after { background: var(--gold-light); content: ""; height: 6px; left: 50%; margin: -3px 0 0 -3px; position: absolute; top: 50%; transform: rotate(45deg); width: 6px; }

.bw-env-wrap {
  animation: bw-env-in 1.1s var(--ease-out) .6s both;
  bottom: 0;
  height: calc(var(--ew) * .7);
  left: 0;
  position: absolute;
  right: 0;
  /* closed: centred in the stage */
  transform: translateY(-42.857%);
  transition: transform 1.3s var(--ease-out) .95s;
}
.bw-cover.is-open .bw-env-wrap { transform: none; }
.bw-env-ground {
  animation: bw-ground 4.5s ease-in-out infinite;
  background: radial-gradient(50% 50% at 50% 50%, rgb(20 0 5 / 55%), rgb(20 0 5 / 0%) 72%);
  bottom: -9%;
  height: 18%;
  left: 6%;
  position: absolute;
  right: 6%;
}
.bw-env-float { animation: bw-float 4.5s ease-in-out infinite; inset: 0; position: absolute; }
.bw-cover.is-open .bw-env-float, .bw-cover.is-open .bw-env-ground { animation-play-state: paused; }

.bw-envelope { color: inherit; cursor: pointer; display: block; height: 100%; inset: 0; position: absolute; text-decoration: none; touch-action: manipulation; width: 100%; }
.bw-cover.is-open .bw-envelope { cursor: default; }
.bw-envelope:focus-visible { border-radius: 6px; outline-offset: 10px; }
.bw-env-layer { display: block; inset: 0; position: absolute; }
.bw-env-layer > svg { display: block; height: 100%; overflow: visible; width: 100%; }

.bw-env-back {
  background:
    linear-gradient(180deg, rgb(0 0 0 / 55%), rgb(0 0 0 / 25%) 45%, rgb(0 0 0 / 35%)),
    url("img/velvet.webp") 0 0 / calc(var(--ew) * .64) auto;
  border-radius: 4px;
  box-shadow: inset 0 calc(var(--ew) * .04) calc(var(--ew) * .06) rgb(0 0 0 / 45%);
  z-index: 1;
}
/* top flap: hinges on its top edge, flips over and drops behind the card at 90° */
.bw-env-flap { transform-origin: 50% 0; transition: transform .45s var(--ease-out); z-index: 6; }
.bw-flap-in { opacity: 0; }
.bw-cover.is-open .bw-env-flap { animation: bw-flap-open .95s .32s both, bw-flap-z .95s .32s both; }
.bw-cover.is-open .bw-flap-out { animation: bw-hide-late .95s .32s both; }
.bw-cover.is-open .bw-flap-in { animation: bw-show-late .95s .32s both; }
.bw-env-flap-shadow { transition: opacity .3s ease .3s; z-index: 5; }
.bw-cover.is-open .bw-env-flap-shadow { opacity: 0; }
.bw-env-pocket { pointer-events: none; z-index: 4; }
/* card slot: clipped only at the envelope's bottom edge, so the card can rise above it */
.bw-env-slot { clip-path: inset(-400% -30% 3% -30%); z-index: 3; }

.bw-card {
  filter: drop-shadow(0 -2px 6px rgb(30 0 8 / 18%)) drop-shadow(0 12px 22px rgb(30 0 8 / 30%));
  height: calc(var(--ew) * 1.02);
  left: 5.5%;
  position: absolute;
  top: 3%;
  transform: translateY(0);
  transition: transform 1.3s var(--ease-out) .95s;
  width: 89%;
}
.bw-cover.is-open .bw-card { transform: translateY(-60.8%); }
.bw-card__paper {
  --r: calc(var(--ew) * .045);
  align-items: center;
  background: var(--noise), linear-gradient(172deg, #fcf8f0 0%, #f4ead9 55%, #ecdfc8 100%);
  display: flex;
  flex-direction: column;
  inset: 0;
  -webkit-mask:
    radial-gradient(circle at 0 0, #0000 var(--r), #000 calc(var(--r) + .5px)) 0 0 / 51% 51% no-repeat,
    radial-gradient(circle at 100% 0, #0000 var(--r), #000 calc(var(--r) + .5px)) 100% 0 / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%, #0000 var(--r), #000 calc(var(--r) + .5px)) 0 100% / 51% 51% no-repeat,
    radial-gradient(circle at 100% 100%, #0000 var(--r), #000 calc(var(--r) + .5px)) 100% 100% / 51% 51% no-repeat;
  mask:
    radial-gradient(circle at 0 0, #0000 var(--r), #000 calc(var(--r) + .5px)) 0 0 / 51% 51% no-repeat,
    radial-gradient(circle at 100% 0, #0000 var(--r), #000 calc(var(--r) + .5px)) 100% 0 / 51% 51% no-repeat,
    radial-gradient(circle at 0 100%, #0000 var(--r), #000 calc(var(--r) + .5px)) 0 100% / 51% 51% no-repeat,
    radial-gradient(circle at 100% 100%, #0000 var(--r), #000 calc(var(--r) + .5px)) 100% 100% / 51% 51% no-repeat;
  padding: calc(var(--ew) * .085) calc(var(--ew) * .07) 0;
  position: absolute;
}
.bw-card__frame { height: 100%; inset: 0; position: absolute; width: 100%; }
.bw-card__frame path { vector-effect: non-scaling-stroke; }
.bw-card__mono { align-items: center; display: flex; gap: calc(var(--ew) * .005); height: calc(var(--ew) * .2); justify-content: center; }
.bw-card__mono img { height: calc(var(--ew) * .17); opacity: .95; width: auto; }
.bw-card__letters, .bw-card__names, .bw-card__title {
  -webkit-background-clip: text;
  background: linear-gradient(170deg, #c49d5c 10%, #9c7238 55%, #b88f50 90%);
  background-clip: text;
  color: transparent;
  font-family: var(--f-script);
  font-weight: 400;
}
.bw-card__letters { font-size: calc(var(--ew) * .13); line-height: 1; padding: 0 .08em .08em; }
.bw-card__letters span { margin-left: -.18em; }
.bw-card__heart { fill: #a47b3c; height: calc(var(--ew) * .07); margin: 0 calc(var(--ew) * .03); width: calc(var(--ew) * .07); }
.bw-card__names { display: flex; flex-direction: column; font-size: calc(var(--ew) * .155); line-height: 1.02; margin-top: calc(var(--ew) * .025); width: 100%; }
.bw-card__names span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 .1em .08em; }
.bw-card__names span:first-child { align-self: flex-start; padding-left: 8%; }
.bw-card__names span:last-child { align-self: flex-end; padding-right: 5%; }
.bw-card__names.is-long { font-size: calc(var(--ew) * .11); }
.bw-card__title {
  -webkit-box-orient: vertical;
  display: -webkit-box;
  font-size: calc(var(--ew) * .13);
  -webkit-line-clamp: 3;
  line-height: 1.08;
  margin-top: calc(var(--ew) * .03);
  overflow: hidden;
  overflow-wrap: anywhere;
  padding-bottom: .08em;
  text-align: center;
}
.bw-card__title.is-long { font-size: calc(var(--ew) * .085); }
.bw-card__sub { color: #8a6a45; font-family: var(--f-display); font-size: calc(var(--ew) * .033); letter-spacing: .24em; margin-top: calc(var(--ew) * .03); padding-left: .24em; text-transform: uppercase; }

/* wax seal */
.bw-seal { aspect-ratio: 211 / 220; left: 50%; position: absolute; top: 57%; transform: translate(-50%, -50%); width: 27%; z-index: 7; }
.bw-seal__inner { display: block; inset: 0; position: absolute; }
.bw-seal img { filter: drop-shadow(0 4px 5px rgb(25 0 6 / 55%)); height: 100%; user-select: none; -webkit-user-drag: none; width: 100%; }
.bw-seal__mono {
  color: #5b0d18;
  display: grid;
  font-family: var(--f-script);
  font-size: calc(var(--ew) * .085);
  inset: 0;
  line-height: 1;
  padding: 0 4% 6% 0;
  place-items: center;
  position: absolute;
  text-shadow: 0 1px 0 rgb(255 180 180 / 30%), 0 -1px 1px rgb(0 0 0 / 55%);
}
.bw-seal__heart { fill: #5b0d18; filter: drop-shadow(0 1px 0 rgb(255 180 180 / 30%)); height: 30%; left: 35%; position: absolute; top: 32%; width: 30%; }
/* "tap me" ripple */
.bw-seal::before, .bw-seal::after {
  animation: bw-ripple 2.4s 2.2s ease-out infinite;
  border: 1.5px solid rgb(240 214 160 / 85%);
  border-radius: 50%;
  content: "";
  inset: -6%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
}
.bw-seal::after { animation-delay: 3.4s; }
.bw-cover.is-open .bw-seal::before, .bw-cover.is-open .bw-seal::after { animation: none; opacity: 0; }
.bw-cover.is-open .bw-seal__inner { animation: bw-seal-pop .75s cubic-bezier(.3, .7, .3, 1) both; }

/* gold sparks thrown from the seal on open (added by invitation.js) */
.bw-sparks { height: 0; left: 50%; pointer-events: none; position: absolute; top: 50%; width: 0; }
.bw-sparks i {
  animation: bw-spark 1.1s var(--d, 0s) cubic-bezier(.15, .7, .3, 1) both;
  background: radial-gradient(circle, #fff6dc 0%, #f0d08f 45%, rgb(214 170 90 / 0%) 70%);
  border-radius: 50%;
  height: var(--s, 6px);
  left: 0;
  margin: calc(var(--s, 6px) / -2);
  position: absolute;
  top: 0;
  width: var(--s, 6px);
}
.bw-sparks i.is-star { background: #f6dfa6; border-radius: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }

@media (hover: hover) {
  .bw-cover:not(.is-open) .bw-envelope:hover .bw-env-flap { transform: perspective(1000px) rotateX(16deg); }
}

/* hint under the closed envelope → date and "Enter invitation" under the open one */
.bw-tap-hint {
  align-items: center;
  animation: bw-fade-up .9s var(--ease-out) 1.7s both;
  display: inline-flex;
  font-size: 18px;
  font-style: italic;
  gap: 10px;
  left: 50%;
  padding: 10px 20px 10px 16px;
  position: absolute;
  top: calc(100% - var(--ew) * .3 + 22px);
  translate: -50% 0;
  white-space: nowrap;
  z-index: 2;
}
.bw-cover.is-open .bw-tap-hint { animation: bw-hide .35s ease both; visibility: hidden; transition: visibility 0s .35s; }
.bw-tap-hint .bw-ic { animation: bw-tap 2.4s 2.6s ease-in-out infinite; color: var(--gold-light); font-size: 20px; }

.bw-cover__after {
  left: 50%;
  opacity: 0;
  position: absolute;
  text-align: center;
  top: calc(100% + 20px);
  transform: translateY(14px);
  translate: -50% 0;
  visibility: hidden;
  width: max-content;
  z-index: 2;
}
.bw-cover.is-open .bw-cover__after {
  opacity: 1;
  transform: none;
  transition: opacity .9s ease 1.7s, transform .9s var(--ease-out) 1.7s, visibility 0s 1.7s;
  visibility: visible;
}
.bw-cover__date { color: var(--ivory); font-family: var(--f-display); font-size: 26px; letter-spacing: .2em; padding-left: .2em; text-shadow: 0 2px 14px rgb(20 0 6 / 90%), 0 0 3px rgb(20 0 6 / 60%); }
.bw-cover__after .bw-rule { margin: 8px auto 16px; }

/* a link straight to a section, a reply with an error, or reduced motion: open at once */
.bw-cover.is-offscreen *, .bw-cover.is-offscreen *::before, .bw-cover.is-offscreen *::after { animation-play-state: paused !important; }
.bw-cover.is-instant *, .bw-cover.is-instant *::before, .bw-cover.is-instant *::after { animation-delay: 0s !important; animation-duration: 0s !important; transition-delay: 0s !important; transition-duration: 0s !important; }
.bw-cover.is-instant .bw-petals { display: none; }

/* No JavaScript: the envelope cannot open, so show it open from the start. */
@media (scripting: none) {
  .bw-cover .bw-env-wrap { transform: none; }
  .bw-cover .bw-card { transform: translateY(-60.8%); }
  .bw-cover .bw-env-flap { transform: perspective(1000px) rotateX(180deg); z-index: 2; }
  .bw-cover .bw-flap-out, .bw-cover .bw-env-flap-shadow { opacity: 0; }
  .bw-cover .bw-flap-in { opacity: 1; }
  .bw-cover .bw-seal::before, .bw-cover .bw-seal::after, .bw-cover .bw-tap-hint { display: none; }
  .bw-cover .bw-cover__top { translate: -50% 0; }
  .bw-cover .bw-cover__after { opacity: 1; transform: none; visibility: visible; }
  .bw-cover .bw-cover__shade { background-color: rgb(30 3 9 / 12%); }
}

/* ==========================================================
   Shared components
   ========================================================== */
.bw-btn {
  align-items: center;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--f-display);
  font-size: 14px;
  font-weight: 500;
  gap: 12px;
  justify-content: center;
  letter-spacing: .14em;
  line-height: 1.25;
  min-height: 52px;
  padding: 8px 28px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.bw-btn:active { transform: scale(.98); }
.bw-btn .bw-ic { font-size: 17px; }
.bw-btn--ghost { background: rgb(40 5 12 / 58%); border-radius: 999px; box-shadow: inset 0 0 0 1px rgb(227 199 143 / 75%); color: var(--ivory); }
.bw-btn--ghost:hover { background: rgb(60 8 18 / 55%); }
.bw-btn--wine { background: linear-gradient(180deg, #84202f, #5c0f1c); box-shadow: inset 0 0 0 1px rgb(227 199 143 / 55%), 0 8px 20px rgb(60 5 18 / 28%); color: var(--ivory); }
.bw-btn--wine:hover { box-shadow: inset 0 0 0 1px rgb(227 199 143 / 85%), 0 10px 26px rgb(60 5 18 / 38%); }
.bw-btn--outline { background: transparent; box-shadow: inset 0 0 0 1.5px var(--wine-600); color: var(--wine-ink); }
.bw-btn--outline:hover { background: rgb(107 20 36 / 6%); }
.bw-btn--block { width: 100%; }
.bw-btn--compact { font-size: 13px; min-height: 46px; padding: 6px 20px; }

.bw-link {
  align-items: center;
  background: none;
  border: 0;
  color: var(--wine-600);
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  font-style: italic;
  gap: 6px;
  min-height: 44px;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.bw-link .bw-ic { font-size: 16px; }
.bw-link--light { color: var(--gold-light); }

.bw-alert { background: #fbf3ea; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); font-size: 17px; line-height: 1.4; margin-bottom: 16px; padding: 10px 14px; }
.bw-alert strong { font-weight: 600; }
.bw-alert--error { background: #fbebed; border-color: #d48a95; color: #7d1c2c; }
.bw-note { color: var(--ink-soft); font-size: 16px; font-style: italic; text-align: center; }

/* ==========================================================
   Sections
   ========================================================== */
.bw-sec { padding: 76px var(--gutter) 72px; position: relative; scroll-margin-top: 0; }
/* A title's size follows the room it has, not the screen: with a scrollbar a long word such as
   "Celebration" would otherwise break in two. */
.bw-head { container-type: inline-size; margin-bottom: 34px; text-align: center; width: 100%; }
.bw-title { color: var(--wine-ink); font-family: var(--f-display); font-weight: 500; line-height: 1; text-transform: uppercase; }
.bw-title__kicker { color: var(--ink); display: block; font-size: 15px; letter-spacing: .55em; margin-bottom: 4px; padding-left: .55em; }
.bw-title__main { display: block; font-size: clamp(38px, 11.5vw, 48px); font-size: clamp(30px, 12.6cqi, 48px); letter-spacing: .04em; overflow-wrap: anywhere; }
.bw-title--xl .bw-title__main { font-size: clamp(46px, 14vw, 58px); letter-spacing: .08em; }
.bw-head--light .bw-title, .bw-head--light .bw-title__kicker { color: var(--ivory); }
.bw-divider { height: auto; margin: 14px auto 0; width: 150px; }

.bw-lead { color: var(--ink-soft); margin: 0 auto; max-width: 340px; overflow-wrap: anywhere; text-align: center; }
.bw-deco { opacity: .85; pointer-events: none; position: absolute; }

/* ---------- 2 · story ---------- */
.bw-deco--story { right: -26px; top: 36px; transform: rotate(8deg); width: 120px; }
.bw-collage { margin: 0 auto 28px; max-width: 380px; position: relative; }
.bw-collage--stack { margin-bottom: 104px; }
.bw-photo { background: radial-gradient(90% 80% at 30% 25%, #e8d9c2, #c9ae8e 70%, #b39477); margin: 0; overflow: hidden; position: relative; }
.bw-photo img { height: 100%; max-width: none; object-fit: cover; width: 100%; }
.bw-photo::after { border: 1px solid rgb(255 250 240 / 55%); content: ""; inset: 8px; pointer-events: none; position: absolute; }
.bw-photo--main { aspect-ratio: 4 / 3.3; border-radius: 3px; box-shadow: 0 14px 30px rgb(60 25 15 / 22%); }
.bw-photo--polaroid { aspect-ratio: 1 / 1.08; border: 7px solid #fbf8f2; border-bottom-width: 22px; bottom: -78px; box-shadow: 0 12px 26px rgb(60 25 15 / 28%); position: absolute; width: 47%; z-index: 2; }
.bw-photo--polaroid::after { inset: 4px; }
.bw-photo--left { left: -4px; transform: rotate(-6deg); }
.bw-photo--right { right: -4px; transform: rotate(5deg); }
.bw-collage__heart { bottom: -76px; fill: none; left: 50%; position: absolute; stroke: var(--gold); stroke-linecap: round; stroke-width: 1.4; transform: translateX(-50%); width: 24px; }
.bw-story__art { margin: -8px auto 18px; width: 190px; }
.bw-story__bouquet { filter: drop-shadow(0 14px 18px rgb(60 25 15 / 25%)); }
.bw-greeting { color: var(--wine-ink); font-family: var(--f-display); font-size: 17px; letter-spacing: .14em; margin-bottom: 12px; overflow-wrap: anywhere; text-align: center; text-transform: uppercase; }
.bw-story__text { font-size: 20px; white-space: pre-line; }

/* ---------- 3 · celebration ---------- */
.bw-celebration { padding-top: 0; }
.bw-band {
  border-radius: 0 0 50% 50% / 0 0 26px 26px;
  box-shadow: 0 10px 24px rgb(60 10 20 / 18%);
  margin: 0 calc(var(--gutter) * -1);
  padding: 72px var(--gutter) 60px;
  text-align: center;
}
.bw-band .bw-head { margin-bottom: 22px; }
.bw-band__sub { color: var(--gold-light); font-family: var(--f-display); font-size: 13px; letter-spacing: .3em; padding-left: .3em; text-transform: uppercase; }
.bw-band__ido { font-family: var(--f-display); font-size: 32px; font-style: italic; letter-spacing: .14em; margin-top: 6px; text-transform: uppercase; }

.bw-date { align-items: center; display: flex; gap: 10px; justify-content: center; margin: 40px auto 26px; text-align: center; }
.bw-date img { flex: none; width: 36px; }
.bw-date time { display: block; }
.bw-date__day { color: var(--ink); display: block; font-family: var(--f-display); font-size: 14px; letter-spacing: .32em; padding-left: .32em; text-transform: uppercase; }
.bw-date__main { color: var(--wine-ink); display: block; font-family: var(--f-display); font-size: clamp(20px, 6.4vw, 25px); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.bw-date__main b { font-size: 1.6em; font-weight: 500; margin-right: 4px; vertical-align: -3px; }

.bw-countdown { display: grid; gap: 8px; grid-template-columns: repeat(4, 1fr); margin: 0 auto; max-width: 340px; }
.bw-countdown__cell {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: center / 100% 100% no-repeat;
  display: flex;
  filter: drop-shadow(0 4px 8px rgb(80 40 20 / 12%));
  flex-direction: column;
  justify-content: center;
}
.bw-countdown__cell:nth-child(1) { background-image: url("img/card-1.webp"); }
.bw-countdown__cell:nth-child(2) { background-image: url("img/card-2.webp"); }
.bw-countdown__cell:nth-child(3) { background-image: url("img/card-3.webp"); }
.bw-countdown__cell:nth-child(4) { background-image: url("img/card-4.webp"); }
.bw-countdown__cell b { color: var(--wine-ink); font-family: var(--f-display); font-size: clamp(20px, 6.4vw, 28px); font-variant-numeric: tabular-nums; font-weight: 500; line-height: 1.1; }
.bw-countdown__cell span { color: var(--ink-soft); font-family: var(--f-display); font-size: 10px; letter-spacing: .2em; padding-left: .2em; text-transform: uppercase; }

.bw-schedule { margin: 44px auto 0; max-width: 360px; position: relative; }
.bw-schedule::before { background: linear-gradient(var(--gold), var(--gold-dark)); bottom: 34px; content: ""; left: 28px; position: absolute; top: 34px; width: 1px; }
.bw-ev { align-items: center; display: grid; gap: 18px; grid-template-columns: 56px minmax(0, 1fr); padding: 11px 0; }
.bw-ev__icon { filter: drop-shadow(0 4px 8px rgb(80 10 20 / 20%)); position: relative; width: 56px; }
.bw-ev__time { color: var(--wine-ink); font-family: var(--f-display); font-size: 23px; font-variant-numeric: lining-nums; line-height: 1.1; }
.bw-ev__title { color: var(--wine-600); font-family: var(--f-display); font-size: 13.5px; letter-spacing: .16em; margin-top: 2px; overflow-wrap: anywhere; text-transform: uppercase; }
.bw-ev__note { color: var(--ink-soft); font-size: 18px; font-style: italic; line-height: 1.3; overflow-wrap: anywhere; }
.bw-celebration__tz { margin-top: 14px; }

.bw-still { align-items: flex-end; display: flex; height: 170px; justify-content: center; margin: 40px auto -20px; position: relative; }
.bw-still::before { background: radial-gradient(50% 50% at 50% 50%, rgb(80 30 20 / 22%), transparent 70%); bottom: -6px; content: ""; height: 26px; left: 6%; position: absolute; right: 6%; }
.bw-still img { position: relative; }
.bw-still__candle { margin-right: -18px; width: 72px; z-index: 1; }
.bw-still__roses { width: 200px; z-index: 2; }
.bw-still__glasses { margin-left: -22px; width: 104px; z-index: 1; }

/* ---------- 4 · venue ---------- */
.bw-venue__stage {
  aspect-ratio: 4 / 3.1;
  background:
    radial-gradient(60% 55% at 50% 62%, rgb(255 236 200 / 95%), rgb(232 196 150 / 55%) 45%, rgb(110 30 35 / 0%) 75%),
    linear-gradient(180deg, #5d1220, #2f0710);
  box-shadow: inset 0 -30px 40px -20px rgb(20 0 5 / 40%);
  margin: 0 calc(var(--gutter) * -1);
  overflow: hidden;
  position: relative;
}
.bw-venue__arch { bottom: 0; filter: drop-shadow(0 10px 20px rgb(0 0 0 / 45%)); height: 96%; left: 50%; max-width: none; position: absolute; transform: translateX(-50%); width: auto; }
.bw-venue__candle { bottom: 4%; filter: drop-shadow(0 6px 10px rgb(0 0 0 / 40%)); position: absolute; width: 15%; }
.bw-venue__candle--l { left: 9%; }
.bw-venue__candle--r { right: 9%; }
.bw-venue__name { color: var(--wine-ink); font-family: var(--f-script); font-size: clamp(46px, 14vw, 60px); line-height: 1.1; margin: 30px 0 6px; overflow-wrap: anywhere; text-align: center; }
.bw-venue__name.is-long { font-size: clamp(32px, 9vw, 40px); line-height: 1.2; }
.bw-venue__name--tba { font-family: var(--f-body); font-size: 24px; font-style: italic; }
.bw-venue__address { align-items: flex-start; color: var(--ink-soft); display: flex; font-size: 19px; gap: 8px; justify-content: center; line-height: 1.35; margin: 0 auto; max-width: 340px; overflow-wrap: anywhere; }
.bw-venue__address .bw-ic { color: var(--wine-600); font-size: 20px; margin-top: 2px; }

.bw-map {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgb(80 40 20 / 14%);
  display: block;
  height: 190px;
  margin: 26px auto 18px;
  max-width: 380px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}
.bw-map > svg { display: block; height: 100%; width: 100%; }
.bw-map__pulse { animation: bw-pulse 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.bw-map__label { align-items: center; background: rgb(251 246 238 / 92%); border-radius: 999px; bottom: 12px; box-shadow: 0 4px 12px rgb(60 25 15 / 15%); color: var(--wine-ink); display: inline-flex; font-family: var(--f-display); font-size: 11px; gap: 6px; letter-spacing: .14em; padding: 7px 12px; position: absolute; right: 12px; text-transform: uppercase; }
.bw-venue__directions { display: flex; margin: 0 auto; max-width: 380px; }

/* ---------- 5 · details ---------- */
.bw-deco--details { left: -30px; top: 30px; transform: scaleX(-1) rotate(-10deg); width: 108px; }
.bw-info-list { display: grid; gap: 26px; margin: 0 auto; max-width: 380px; }
.bw-info { align-items: start; display: grid; gap: 16px; grid-template-columns: 48px minmax(0, 1fr); }
.bw-medal { filter: drop-shadow(0 3px 6px rgb(80 10 20 / 20%)); height: 48px; object-fit: contain; width: 48px; }
.bw-medal--drawn {
  background: radial-gradient(circle at 35% 30%, #8d2234, #5e0f1c 70%);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px #c9a35f, inset 0 0 0 3px rgb(80 10 20 / 60%), 0 3px 6px rgb(80 10 20 / 25%);
  color: var(--gold-light);
  display: grid;
  filter: none;
  height: 44px;
  margin: 2px;
  place-items: center;
  width: 44px;
}
.bw-medal--drawn .bw-ic { font-size: 21px; stroke-width: 1.5; }
.bw-info__title { color: var(--wine-ink); font-family: var(--f-display); font-size: 15px; letter-spacing: .16em; margin: 4px 0; text-transform: uppercase; }
.bw-info p { color: var(--ink-soft); line-height: 1.38; overflow-wrap: anywhere; }
.bw-info p b { color: var(--ink); font-weight: 600; }
.bw-info .bw-info__em { color: var(--ink); font-size: 21px; font-style: italic; }
.bw-wish-art { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 26px auto; max-width: 380px; }
.bw-wish-art span { aspect-ratio: 1 / 1; background: center / 100% 100% no-repeat; display: grid; filter: drop-shadow(0 6px 12px rgb(80 40 20 / 14%)); min-width: 0; padding: 15%; place-items: center; }
.bw-wish-art span:nth-child(1) { background-image: url("img/card-1.webp"); }
.bw-wish-art span:nth-child(2) { background-image: url("img/card-2.webp"); }
.bw-wish-art span:nth-child(3) { background-image: url("img/card-3.webp"); }
.bw-wish-art img { height: 100%; object-fit: contain; width: 100%; }
.bw-details__wishlist { display: flex; margin: 0 auto; max-width: 380px; }

/* ---------- 6 · gallery ---------- */
.bw-gallery .photo-gallery { display: grid; gap: 10px; grid-auto-rows: 140px; grid-template-columns: 1fr 1fr; margin: 0 auto; max-width: 400px; }
.bw-gallery .photo-gallery__item:first-child { grid-column: 1 / -1; grid-row: span 2; }
.bw-gallery .photo-gallery__item:nth-child(n+2):last-child:nth-child(even) { grid-column: 1 / -1; }
.bw-gallery .photo-gallery__link { background: #e8d9c2; border: 6px solid #fbf8f2; box-shadow: 0 8px 18px rgb(60 25 15 / 20%); display: block; height: 100%; overflow: hidden; }
.bw-gallery .photo-gallery__link img { height: 100%; max-width: none; object-fit: cover; transition: transform 1.2s var(--ease-out); width: 100%; }
.bw-gallery .photo-gallery__link:hover img { transform: scale(1.05); }

/* photo viewer (added by invitation.js) */
.bw-viewer { background: rgb(26 3 8 / 96%); border: 0; color: var(--ivory); height: 100%; max-height: none; max-width: none; padding: max(12px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom)); width: 100%; }
.bw-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; }
.bw-viewer::backdrop { background: rgb(10 0 3 / 70%); }
.bw-viewer__close, .bw-viewer__nav { align-items: center; background: none; border: 1px solid rgb(227 199 143 / 50%); border-radius: 50%; color: var(--ivory); cursor: pointer; display: grid; height: 44px; justify-items: center; width: 44px; }
.bw-viewer__close { justify-self: end; }
.bw-viewer svg { fill: none; height: 22px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; width: 22px; }
.bw-viewer__img { height: 100%; max-height: 100%; max-width: min(100%, 64rem); object-fit: contain; width: 100%; }
.bw-viewer__bar { align-items: center; display: flex; gap: 28px; margin-top: 14px; }
.bw-viewer__count { font-family: var(--f-display); font-size: 14px; letter-spacing: .2em; min-width: 4rem; text-align: center; }

/* ---------- 7 · RSVP ---------- */
.bw-rsvp { padding-bottom: 84px; text-align: center; }
.bw-rsvp .bw-head { margin-bottom: 18px; }
.bw-rsvp__lead { color: var(--ivory); font-family: var(--f-display); font-size: 14px; letter-spacing: .2em; line-height: 1.75; text-transform: uppercase; }
.bw-rsvp__by { color: var(--gold-light); font-style: italic; margin-top: 8px; }
.bw-rsvp__note { color: rgb(246 239 228 / 82%); font-size: 17px; font-style: italic; margin: 22px auto 4px; max-width: 340px; }

.bw-form-card {
  background: var(--noise), linear-gradient(176deg, #fbf6ee, #f1e7d6);
  border-radius: 14px;
  box-shadow: 0 26px 50px rgb(10 0 3 / 45%);
  color: var(--ink);
  margin: 30px auto 0;
  max-width: 400px;
  padding: 28px 20px 22px;
  position: relative;
  text-align: left;
}
.bw-form-card::before { border: 1px solid rgb(184 146 79 / 45%); border-radius: 9px; content: ""; inset: 7px; pointer-events: none; position: absolute; }
.bw-form-card :focus-visible { outline-color: var(--wine-600); }
.bw-form-card__guest { color: var(--ink-soft); font-size: 17px; margin-bottom: 14px; overflow-wrap: anywhere; position: relative; text-align: center; }
.bw-form-card__guest strong { color: var(--wine-ink); font-weight: 600; }
.bw-form { position: relative; }
.bw-field { margin: 0 0 18px; }
.bw-label, .bw-form .rsvp-extra__label { color: var(--ink); display: block; font-size: 18px; font-weight: 600; line-height: 1.25; margin-bottom: 8px; padding: 0; }
.bw-choices { display: grid; gap: 8px; }
.bw-choice {
  align-items: center;
  background: #fffcf6;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  font-size: 18px;
  gap: 12px;
  min-height: 50px;
  padding: 10px 14px;
  transition: border-color .2s ease, background-color .2s ease;
}
.bw-choice:hover { border-color: #c39aa0; }
.bw-choice:has(input:checked) { background: #fbefed; border-color: var(--wine-500); }
.bw-choice input {
  -webkit-appearance: none;
  appearance: none;
  background: #fff;
  border: 1.5px solid var(--wine-600);
  border-radius: 50%;
  display: grid;
  flex: none;
  height: 21px;
  margin: 0;
  place-content: center;
  width: 21px;
}
.bw-choice input::before { background: var(--wine-600); border-radius: 50%; content: ""; height: 11px; transform: scale(0); transition: transform .18s ease; width: 11px; }
.bw-choice input:checked::before { transform: scale(1); }
.bw-choice input:focus-visible { outline: 2px solid var(--wine-600); outline-offset: 2px; }

/* shared reply fields: number of people and a note */
.bw-form .rsvp-extra { display: grid; gap: 18px; margin-bottom: 20px; }
.bw-form .rsvp-extra__field { transition: opacity .3s ease; }
.bw-form .rsvp-extra__optional { color: var(--ink-soft); font-style: italic; font-weight: 500; }
.bw-form .rsvp-extra__help { color: var(--ink-soft); font-size: 16px; font-style: italic; line-height: 1.35; margin-top: 6px; }
.bw-form .rsvp-extra__input {
  -webkit-appearance: none;
  appearance: none;
  background: #fffcf6;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  display: block;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
  min-height: 50px;
  padding: 11px 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
  width: 100%;
}
.bw-form .rsvp-extra__input:focus { border-color: var(--wine-500); box-shadow: 0 0 0 3px rgb(134 29 49 / 14%); outline: none; }
.bw-form .rsvp-extra__number { font-family: var(--f-display); font-size: 19px; text-align: center; width: 120px; -moz-appearance: textfield; }
.bw-form .rsvp-extra__textarea { min-height: 96px; resize: vertical; }
.bw-stepper { background: #fffcf6; border: 1px solid var(--line); border-radius: 9px; display: inline-grid; grid-template-columns: 50px 64px 50px; overflow: hidden; }
.bw-stepper__button { background: transparent; border: 0; color: var(--wine-600); cursor: pointer; display: grid; font-family: var(--f-display); font-size: 22px; height: 50px; place-items: center; }
.bw-stepper__button:active { background: rgb(107 20 36 / 7%); }
.bw-stepper__button:disabled { color: #c9b9aa; cursor: default; }
.bw-stepper .rsvp-extra__number { background: transparent; border: 0; border-left: 1px solid var(--line); border-radius: 0; border-right: 1px solid var(--line); min-height: 50px; padding: 0; width: 100%; }
.bw-stepper .rsvp-extra__number:focus { background: #fbefed; box-shadow: none; }
.bw-stepper .rsvp-extra__number::-webkit-inner-spin-button, .bw-stepper .rsvp-extra__number::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bw-form.is-declining .rsvp-extra__field--party { opacity: .45; }
.bw-form .bw-btn--wine { margin-top: 6px; }
.bw-form__flourish { margin: 20px auto 0; opacity: .9; width: 120px; }

/* ---------- 8 · wishlist ---------- */
.bw-wishlist .bw-lead { margin-bottom: 26px; }
.bw-wishlist .wishlist { margin: 0 auto; max-width: 400px; }
.bw-wishlist .wishlist-items { display: grid; gap: 16px; }
.bw-wishlist .wishlist-item {
  background: var(--noise), linear-gradient(176deg, #fbf6ee, #f1e7d6);
  border: 1px solid rgb(184 146 79 / 45%);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgb(80 40 20 / 10%);
  display: grid;
  gap: 14px;
  padding: 20px;
  scroll-margin-top: 1rem;
}
.bw-wishlist .wishlist-item--mine { border-color: var(--wine-500); box-shadow: inset 0 0 0 1px var(--wine-500), 0 10px 22px rgb(80 40 20 / 12%); }
.bw-wishlist .wishlist-item--taken { opacity: .72; }
.bw-wishlist .wishlist-item__title { color: var(--wine-ink); font-family: var(--f-display); font-size: 17px; letter-spacing: .08em; line-height: 1.3; margin: 0; overflow-wrap: anywhere; text-transform: uppercase; }
.bw-wishlist .wishlist-item__description { color: var(--ink-soft); line-height: 1.4; margin-top: 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.bw-wishlist .wishlist-item__status { color: var(--ink-soft); font-size: 17px; font-style: italic; margin-top: 6px; }
.bw-wishlist .wishlist-item__status strong { color: var(--wine-600); font-style: normal; font-weight: 600; }
.bw-wishlist .wishlist-item__actions { display: grid; gap: 10px; }
.bw-wishlist .wishlist-item__form { align-items: end; display: flex; flex-wrap: wrap; gap: 10px; }
.bw-wishlist .wishlist-item__form .bw-btn { flex: 1 1 160px; }
.bw-wishlist .wishlist-item__quantity { color: var(--ink-soft); display: grid; font-size: 16px; gap: 4px; }
.bw-wishlist .wishlist-item__quantity input { background: #fffcf6; border: 1px solid var(--line); border-radius: 9px; font-family: var(--f-display); font-size: 17px; min-height: 46px; padding: 6px 10px; text-align: center; width: 84px; }
.bw-wishlist .wishlist-item__quantity input:focus { border-color: var(--wine-500); box-shadow: 0 0 0 3px rgb(134 29 49 / 14%); outline: none; }
.bw-wishlist .wishlist-item__cancel .bw-btn { width: 100%; }
.bw-wishlist .wishlist-notice, .bw-wishlist .wishlist-error { border: 1px solid; border-radius: 9px; font-size: 17px; margin-bottom: 16px; padding: 10px 14px; }
.bw-wishlist .wishlist-notice { background: #f1f0e3; border-color: #a6a66e; color: #3f4120; }
.bw-wishlist .wishlist-error { background: #fbebed; border-color: #d48a95; color: #7d1c2c; }
.bw-wishlist .wishlist-help { color: var(--ink-soft); font-size: 16px; font-style: italic; margin-top: 18px; text-align: center; }

/* ---------- closing and footer ---------- */
.bw-closing { border-top: 1px solid rgb(227 199 143 / 20%); padding: 46px var(--gutter) 40px; text-align: center; }
.bw-closing__bouquet { filter: drop-shadow(0 10px 16px rgb(0 0 0 / 40%)); margin: 0 auto 6px; width: 112px; }
.bw-closing__names { color: var(--ivory); font-family: var(--f-script); font-size: 48px; line-height: 1.15; overflow-wrap: anywhere; }
.bw-closing__names.is-long { font-size: 34px; }
.bw-closing__date { color: var(--gold-light); font-family: var(--f-display); font-size: 13px; letter-spacing: .28em; margin-top: 4px; overflow-wrap: anywhere; padding-left: .28em; }
.bw-closing .bw-divider { width: 120px; }
.bw-closing__note { color: rgb(246 239 228 / 78%); font-size: 17px; font-style: italic; margin-top: 14px; }
.bw-footer { background: var(--wine-900); padding: 18px var(--gutter) calc(env(safe-area-inset-bottom) + 90px); }
.bw-footer__brand { background: var(--ivory); border-radius: 0.375rem; display: block; height: auto; margin-inline: auto; padding: 0.125rem 0.25rem; width: 6.25rem; }

/* floating RSVP button (shown by invitation.js between the cover and the RSVP section) */
.bw-fab {
  align-items: center;
  background: linear-gradient(180deg, #84202f, #5c0f1c);
  border-radius: 999px;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  box-shadow: inset 0 0 0 1px rgb(227 199 143 / 70%), 0 10px 24px rgb(30 0 8 / 40%);
  color: var(--ivory);
  display: inline-flex;
  font-family: var(--f-display);
  font-size: 14px;
  height: 46px;
  justify-content: center;
  letter-spacing: .2em;
  min-width: 92px;
  opacity: 0;
  padding: 0 20px 0 calc(20px + .2em);
  position: fixed;
  right: max(16px, calc(50vw - var(--col) / 2 + 16px));
  text-decoration: none;
  transform: translateY(14px);
  transition: opacity .35s ease, transform .35s var(--ease-out), visibility 0s .35s;
  visibility: hidden;
  z-index: 50;
}
.bw-fab.is-visible { opacity: 1; transform: none; transition-delay: 0s; visibility: visible; }

/* the floating group: RSVP, with the wishlist pill beside it; the group fades in as one */
.bw-fabs {
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  display: flex;
  gap: 8px;
  opacity: 0;
  position: fixed;
  right: max(16px, calc(50vw - var(--col) / 2 + 16px));
  transform: translateY(14px);
  transition: opacity .35s ease, transform .35s var(--ease-out), visibility 0s .35s;
  visibility: hidden;
  z-index: 50;
}
.bw-fabs.is-visible { opacity: 1; transform: none; transition-delay: 0s; visibility: visible; }
.bw-fabs .bw-fab { bottom: auto; opacity: 1; position: static; right: auto; transform: none; visibility: visible; }
.bw-fab--wish { background: rgb(40 5 12 / 80%); box-shadow: inset 0 0 0 1px rgb(227 199 143 / 70%), 0 10px 24px rgb(30 0 8 / 40%); padding-left: 20px; }
.bw-fab--wish:hover { background: rgb(60 8 18 / 90%); }

/* background music toggle: bottom left, shown only once invitation.js runs */
.bw-sound {
  background: rgb(40 5 12 / 78%);
  border: 1px solid rgb(227 199 143 / 60%);
  border-radius: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  color: var(--ivory);
  cursor: pointer;
  display: grid;
  height: 46px;
  left: max(16px, calc(50vw - var(--col) / 2 + 16px));
  place-items: center;
  position: fixed;
  transition: background-color .3s ease, border-color .3s ease;
  width: 46px;
  z-index: 55;
}
.bw-sound:hover { background: rgb(60 8 18 / 75%); }
.bw-sound .bw-ic { font-size: 20px; }
/* aria-pressed="true" = music is playing: show the sound icon; otherwise the muted icon */
.bw-sound__on { display: none; }
.bw-sound[aria-pressed="true"] .bw-sound__on { display: block; }
.bw-sound[aria-pressed="true"] .bw-sound__off { display: none; }
.bw-sound[aria-pressed="true"] { border-color: rgb(227 199 143 / 90%); }
.bw-audio { display: none; }

/* scroll reveal (only once invitation.js is running) */
.bw-js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s var(--ease-out); transition-delay: var(--rd, 0s); }
.bw-js [data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================
   Response saved
   ========================================================== */
.bw-thanks { align-content: center; display: grid; justify-items: center; min-height: 100vh; min-height: 100svh; padding: calc(env(safe-area-inset-top) + 64px) var(--gutter) 64px; text-align: center; }
.bw-thanks__art { margin: 0 auto 8px; position: relative; width: 150px; }
.bw-thanks__art img { filter: drop-shadow(0 10px 18px rgb(0 0 0 / 35%)); width: 100%; }
.bw-thanks__art i { animation: bw-twinkle 2.4s ease-in-out infinite; background: radial-gradient(circle, #fff6dc, #e9c57f 60%, transparent 70%); border-radius: 50%; height: 5px; position: absolute; width: 5px; }
.bw-thanks__art i:nth-of-type(1) { left: -14px; top: 10px; }
.bw-thanks__art i:nth-of-type(2) { animation-delay: .3s; height: 4px; left: 8px; top: -12px; width: 4px; }
.bw-thanks__art i:nth-of-type(3) { animation-delay: .8s; left: 46%; top: -22px; }
.bw-thanks__art i:nth-of-type(4) { animation-delay: 1.1s; height: 7px; right: 4px; top: -8px; width: 7px; }
.bw-thanks__art i:nth-of-type(5) { animation-delay: .5s; right: -18px; top: 24px; }
.bw-thanks__art i:nth-of-type(6) { animation-delay: 1.4s; height: 4px; left: -24px; top: 54px; width: 4px; }
.bw-thanks__art i:nth-of-type(7) { animation-delay: 1.8s; right: -26px; top: 70px; }
.bw-thanks__art i:nth-of-type(8) { animation-delay: 2s; height: 3px; left: 30%; top: 4px; width: 3px; }
.bw-thanks__title { color: var(--ivory); font-family: var(--f-display); font-size: clamp(28px, 8.6vw, 34px); letter-spacing: .08em; line-height: 1.15; text-transform: uppercase; text-wrap: balance; }
.bw-thanks__text { color: rgb(246 239 228 / 92%); font-size: 20px; margin-top: 10px; }
.bw-thanks__check { display: block; fill: none; height: 54px; margin: 22px auto 18px; stroke: var(--ivory); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.4; width: 54px; }
.bw-thanks__check circle { animation: bw-draw .9s .35s ease forwards; stroke-dasharray: 132; stroke-dashoffset: 132; }
.bw-thanks__check path { animation: bw-draw .5s 1.1s ease forwards; stroke-dasharray: 30; stroke-dashoffset: 30; }
.bw-thanks__divider { margin-bottom: 18px; margin-top: 18px; }
.bw-thanks__event { color: var(--gold-light); font-family: var(--f-display); font-size: 14px; letter-spacing: .14em; line-height: 1.5; max-width: 360px; overflow-wrap: anywhere; text-transform: uppercase; }
.bw-thanks__party { color: rgb(246 239 228 / 88%); font-size: 18px; font-style: italic; margin-top: 6px; }
.bw-thanks__when { color: rgb(246 239 228 / 88%); font-size: 18px; line-height: 1.45; margin-top: 10px; max-width: 360px; overflow-wrap: anywhere; }
.bw-actions { display: grid; gap: 12px; margin-top: 28px; width: min(100%, 320px); }
.bw-thanks .bw-link { margin-top: 12px; }

/* ==========================================================
   Keyframes
   ========================================================== */
@keyframes bw-flap-open {
  0%   { animation-timing-function: cubic-bezier(.55, .05, .85, .45); transform: perspective(1000px) rotateX(0deg); }
  50%  { animation-timing-function: cubic-bezier(.15, .55, .35, 1); transform: perspective(1000px) rotateX(90deg); }
  100% { transform: perspective(1000px) rotateX(180deg); }
}
@keyframes bw-flap-z    { 0%, 49.9% { z-index: 6; } 50%, 100% { z-index: 2; } }
@keyframes bw-hide-late { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes bw-show-late { 0%, 49.9% { opacity: 0; } 50%, 100% { opacity: 1; } }
@keyframes bw-seal-pop {
  0%   { transform: scale(1) rotate(0); }
  28%  { transform: scale(1.14) rotate(-7deg); }
  58%  { transform: scale(.95) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes bw-ripple { 0% { opacity: .9; transform: scale(.9); } 80%, 100% { opacity: 0; transform: scale(1.6); } }
@keyframes bw-spark { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 12% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0); } }
@keyframes bw-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes bw-ground { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .75; transform: scale(.92); } }
@keyframes bw-env-in { from { opacity: 0; scale: .9; } to { opacity: 1; scale: 1; } }
@keyframes bw-eyebrow-hop {
  0%       { opacity: 1; translate: -50% calc(var(--ew) * .3); }
  11%      { opacity: 0; translate: -50% calc(var(--ew) * .3); }
  12%, 65% { opacity: 0; translate: -50% 0; }
  100%     { opacity: 1; translate: -50% 0; }
}
@keyframes bw-tap { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-3px) rotate(-8deg); } 90% { transform: translateY(1px); } }
@keyframes bw-fade-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes bw-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes bw-hide { from { opacity: 1; } to { opacity: 0; transform: translateY(8px); } }
@keyframes bw-pulse { 0% { opacity: .45; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes bw-twinkle { 0%, 100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes bw-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-delay: 0s !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  .bw-petals { display: none; }
  .bw-js [data-reveal] { opacity: 1; transform: none; }
}

/* wishlist: product link */
.bw-wishlist .wishlist-item__link { margin-top: 6px; }
.bw-wishlist .wishlist-item__link a { color: var(--wine-600); font-size: 17px; font-style: italic; text-underline-offset: 4px; }

/* ---------- RSVP: named companions ---------- */
.bw-companions { border: 0; margin: 0 0 18px; min-width: 0; padding: 0; }
.bw-companions .bw-label { margin-bottom: 4px; }
.bw-companions__help { color: var(--ink-soft); font-size: 16px; font-style: italic; line-height: 1.35; margin: 0 0 12px; }
.bw-companions__rows { display: grid; gap: 12px; }
.bw-companion {
  background: #fffcf6;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  padding: 12px;
  position: relative;
}
/* Bottom-aligned: where one label takes two lines, both inputs keep one height and one line. */
.bw-companion__field { align-content: end; display: grid; gap: 4px; min-width: 0; }
.bw-companion__label { color: var(--ink); font-size: 15px; }
.bw-companion__label b { color: var(--wine-500); font-weight: 600; }
.bw-companion input, .bw-companion select, .bw-input {
  background: #fffcf6;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  min-height: 46px;
  padding: 8px 12px;
  width: 100%;
}
.bw-companion input:focus, .bw-companion select:focus, .bw-input:focus { border-color: var(--wine-500); box-shadow: 0 0 0 3px rgb(134 29 49 / 14%); outline: none; }
.bw-companion__choice { grid-column: 1 / -1; }
.bw-companion__toggle { display: grid; gap: 8px; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
.bw-companion__option {
  align-items: center;
  background: linear-gradient(180deg, #fbf8f2, #efe8dc);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 2px 0 #d9cfbf;
  color: #8a8078;
  cursor: pointer;
  display: flex;
  font-family: var(--f-body);
  font-size: 17px;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 8px 10px;
}
.bw-companion__option .bw-ic { font-size: 18px; }
.bw-companion__option[aria-pressed="true"] { color: var(--ivory); background: linear-gradient(180deg, #84202f, #5c0f1c); border-color: #5c0f1c; box-shadow: 0 2px 0 #3a0912; }
.bw-companion__option--not_attending[aria-pressed="true"] { background: linear-gradient(180deg, #7a2a2a, #4a1212); }
/* On the card's corner: inside the card it would cover the end of "Last name (optional)" on a phone. */
.bw-companion__remove {
  background: #fffcf6;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  cursor: pointer;
  height: 30px;
  padding: 0;
  position: absolute;
  right: -12px;
  top: -12px;
  width: 30px;
}
.bw-companion__remove .bw-ic { font-size: 16px; }
.bw-companions__count { color: var(--ink-soft); font-size: 15px; font-style: italic; margin: 10px 0 0; text-align: center; }
.bw-companions__add { display: none; margin: 10px auto 0; width: 100%; }
.bw-js .bw-companions__add { display: flex; }
.bw-js .bw-companion__remove { display: grid; place-items: center; }
.bw-companion__remove { display: none; }
.bw-js .bw-companion__remove { display: grid; }
.bw-companion__choice.is-enhanced { display: none; }
.bw-companion select { display: block; }
.bw-optional { color: var(--ink-soft); font-style: italic; font-weight: 500; }

