/*
 * Burgundy Moody: candlelit dark romance. Deep wine velvet sections alternate with warm ivory linen ones;
 * Dutch still-life roses (public-domain paintings, see img/CREDITS.md) hang in the corners and sway gently;
 * client photos sit behind deep wine gradients; gold hairlines and arches.
 * Colors from the variant: --inv-primary, --inv-accent, --inv-background, --inv-text, --inv-surface,
 * --inv-rose, --inv-leaf. Light sections (.bm-light) swap the roles locally. All classes start with "bm-".
 * Motion: the cover photo fades in with a slight zoom once + staggered text, flowers sway slowly, six petals
 * drift once on "Buka Undangan", gentle fade-up on scroll. All off with "reduce motion".
 */

:root {
    --inv-primary: #6d1428;
    --inv-accent: #d6ad5f;
    --inv-background: #1b0a10;
    --inv-text: #f7ece1;
    --inv-surface: #2e101a;
    --inv-rose: #9e1b36;
    --inv-leaf: #3d4a33;
    --inv-radius: 14px;

    --bm-w: 460px;
    --bm-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --bm-script: 'Pinyon Script', 'Brush Script MT', cursive;
    --bm-sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* the variant's dark roles, kept so a dark block inside a light section can restore them */
    --bm-d-text: var(--inv-text);
    --bm-d-bg: var(--inv-background);
    --bm-d-surface: var(--inv-surface);
    --bm-d-accent: var(--inv-accent);
    /* warm ivory linen and the dark ink used on it */
    --bm-paper: color-mix(in srgb, var(--inv-text) 92%, var(--inv-accent));
    --bm-paper-ink: color-mix(in srgb, var(--inv-background) 82%, var(--inv-primary));
    --bm-gold: linear-gradient(135deg, color-mix(in srgb, var(--inv-accent) 62%, #fff) 0%, var(--inv-accent) 48%, color-mix(in srgb, var(--inv-accent) 68%, #000) 100%);
    --bm-wine: linear-gradient(160deg, color-mix(in srgb, var(--inv-primary) 88%, #fff 12%), var(--inv-primary) 45%, color-mix(in srgb, var(--inv-primary) 60%, #000));
}

/* derived tones, declared again in every scope so they follow the local roles */
:root, .bm-light, .bm-dark, .bm-light .bm-event, .bm-light .bm-quote {
    --bm-line: color-mix(in srgb, var(--inv-accent) 55%, transparent);
    --bm-line-soft: color-mix(in srgb, var(--inv-accent) 24%, transparent);
    --bm-muted: color-mix(in srgb, var(--inv-text) 84%, transparent);
    --bm-ink: color-mix(in srgb, var(--inv-background) 80%, #000);
    --bm-label: var(--inv-accent);
}

/* ivory linen: dark ink, wine labels, a deeper bronze-gold for small gold text */
.bm-light {
    --inv-text: var(--bm-paper-ink);
    --inv-background: var(--bm-paper);
    --inv-surface: color-mix(in srgb, var(--bm-paper) 55%, #fff);
    --inv-accent: color-mix(in srgb, var(--bm-d-accent) 44%, #2a1400);
    --bm-label: var(--inv-primary);
}
/* dark blocks inside a light section keep the dark roles */
.bm-dark, .bm-light .bm-event, .bm-light .bm-quote {
    --inv-text: var(--bm-d-text);
    --inv-background: var(--bm-d-bg);
    --inv-surface: var(--bm-d-surface);
    --inv-accent: var(--bm-d-accent);
    --bm-label: var(--bm-d-accent);
    color: var(--inv-text);
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--inv-background); scroll-behavior: smooth; }

body.bm-body {
    margin: 0;
    background: var(--inv-background);
    color: var(--inv-text);
    font: 500 1.125rem/1.65 var(--bm-serif);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: inherit; }

.bm-icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- backdrop (wide screens) and the column ---------- */

.bm-backdrop {
    position: fixed; inset: 0; z-index: 0; overflow: hidden;
    background:
        radial-gradient(60% 50% at 50% 40%, color-mix(in srgb, var(--inv-primary) 45%, transparent), transparent 75%),
        var(--inv-background);
}
.bm-backdrop::before {
    content: ''; position: absolute; inset: -60px;
    background: var(--bm-photo, none) center / cover no-repeat;
    filter: blur(30px) saturate(.8) brightness(.4);
}
.bm-backdrop::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at center, transparent 30%, color-mix(in srgb, var(--inv-background) 85%, #000) 100%),
        color-mix(in srgb, var(--inv-primary) 24%, transparent);
}

.bm-page {
    position: relative; z-index: 1;
    width: min(100%, var(--bm-w)); min-height: 100vh; margin: 0 auto;
    background: var(--inv-background);
    overflow-x: clip;
}

@media (min-width: 520px) {
    .bm-page { box-shadow: 0 0 0 1px var(--bm-line-soft), 0 0 90px rgb(0 0 0 / .65); }
}
@media (max-width: 519px) {
    .bm-backdrop { display: none; }
}

.bm-preview {
    position: fixed; z-index: 60; top: 0; left: 0; right: 0;
    width: min(100%, var(--bm-w)); margin: 0 auto; padding: .35rem .75rem;
    background: var(--inv-accent); color: var(--bm-ink);
    font: 500 .7rem/1.3 var(--bm-sans); text-align: center; letter-spacing: .03em;
}

/* ---------- still-life flowers: placed with transform, swaying with the separate "rotate" property ---------- */

.bm-flora {
    position: absolute; z-index: 0; display: block; height: auto; max-width: none;
    pointer-events: none; user-select: none;
    animation: bm-sway 9s ease-in-out infinite alternate;
    filter: drop-shadow(0 14px 18px rgb(0 0 0 / .35));
}
@keyframes bm-sway {
    from { rotate: -1.6deg; }
    to { rotate: 1.8deg; }
}

/* candle-like warm glow */
.bm-glow {
    position: absolute; z-index: 0; pointer-events: none; border-radius: 50%;
    background: radial-gradient(circle,
        color-mix(in srgb, var(--inv-accent) 30%, transparent) 0%,
        color-mix(in srgb, var(--inv-primary) 30%, transparent) 38%,
        transparent 68%);
    animation: bm-flicker 5s ease-in-out infinite;
}
.bm-glow--cover { width: 150%; aspect-ratio: 1; left: -25%; top: 6%; }
.bm-glow--hero { width: 130%; aspect-ratio: 1; left: -15%; top: 10%; }
.bm-glow--soft { width: 120%; aspect-ratio: 1; left: -10%; top: 0; opacity: .7; }

@keyframes bm-flicker {
    0%, 100% { opacity: .78; }
    30% { opacity: .95; }
    55% { opacity: .72; }
    78% { opacity: 1; }
}

/* divider: hairlines fading out from a gold rosette */
.bm-divider { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: .8rem auto 0; }
.bm-divider__line { display: block; width: 5rem; height: 1px; background: linear-gradient(90deg, transparent, var(--inv-accent)); }
.bm-divider__line--end { transform: scaleX(-1); }
.bm-divider__rose { flex: none; width: 2.2rem; height: 2.2rem; color: var(--inv-accent); }
html.inv-anim [data-reveal] .bm-divider__line { transition: transform 1.2s .3s cubic-bezier(.2, .7, .2, 1); }
html.inv-anim [data-reveal]:not(.is-revealed) .bm-divider__line { transform: scaleX(.2); }
html.inv-anim [data-reveal]:not(.is-revealed) .bm-divider__line--end { transform: scaleX(-.2); }

/* small-caps label */
.bm-kicker {
    position: relative; z-index: 2;
    font: 500 .74rem/1.4 var(--bm-sans); letter-spacing: .38em; text-transform: uppercase;
    color: var(--inv-accent);
}

/* ---------- buttons (shared components) ---------- */

.inv-button {
    gap: .55rem; padding: .85rem 1.55rem;
    background: var(--bm-gold); color: var(--bm-ink);
    font: 600 .76rem/1.2 var(--bm-sans); letter-spacing: .14em; text-transform: uppercase;
    box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--inv-accent) 75%, transparent), inset 0 1px 0 rgb(255 255 255 / .35);
}
.inv-button--outline {
    background: color-mix(in srgb, var(--inv-background) 40%, transparent); color: var(--inv-accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 70%, transparent);
}
.inv-button--outline:hover { background: color-mix(in srgb, var(--inv-accent) 12%, transparent); }
.inv-button .bm-icon { width: 1.15rem; height: 1.15rem; }
/* on ivory the solid buttons turn wine */
.bm-light .inv-button:not(.inv-button--outline) { background: var(--bm-wine); color: var(--bm-d-text); box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--inv-primary) 90%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--bm-d-accent) 45%, transparent); }
.bm-light .bm-event .inv-button:not(.inv-button--outline) { background: var(--bm-gold); color: var(--bm-ink); }

.bm-pill {
    display: inline-flex; align-items: center; gap: .45rem; margin-top: .9rem; padding: .5rem 1.05rem;
    border-radius: 999px; color: var(--inv-accent); text-decoration: none;
    box-shadow: inset 0 0 0 1px var(--bm-line);
    font: 500 .8rem/1 var(--bm-sans); letter-spacing: .05em;
    transition: background .25s ease;
}
.bm-pill:hover { background: color-mix(in srgb, var(--inv-accent) 12%, transparent); }

/* ---------- petals: six drift down once after "Buka Undangan", then stop ---------- */

.bm-drift { display: none; position: fixed; top: 0; left: 50%; z-index: 35; width: min(100%, var(--bm-w)); height: 100vh; transform: translateX(-50%); overflow: hidden; pointer-events: none; }
html.inv-anim .bm-drift { display: block; }
.bm-drift i {
    position: absolute; top: -30px; left: var(--x); width: 14px; height: 18px; opacity: 0;
    border-radius: 80% 10% 80% 20%;
    background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--inv-rose) 55%, #fff), var(--inv-rose) 55%, color-mix(in srgb, var(--inv-rose) 55%, #000));
    box-shadow: 0 4px 8px rgb(0 0 0 / .3);
}
.bm-drift.is-go i { animation: bm-petal var(--d) cubic-bezier(.3, .2, .5, 1) var(--delay) forwards; }
.bm-drift i:nth-child(1) { --x: 10%; --d: 4.8s; --delay: .1s; }
.bm-drift i:nth-child(2) { --x: 28%; --d: 5.6s; --delay: .5s; width: 11px; height: 14px; }
.bm-drift i:nth-child(3) { --x: 47%; --d: 4.4s; --delay: .25s; }
.bm-drift i:nth-child(4) { --x: 63%; --d: 5.2s; --delay: .75s; width: 12px; height: 15px; }
.bm-drift i:nth-child(5) { --x: 79%; --d: 4.9s; --delay: .35s; }
.bm-drift i:nth-child(6) { --x: 92%; --d: 5.8s; --delay: .95s; width: 10px; height: 13px; }
@keyframes bm-petal {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
    10% { opacity: .9; }
    50% { transform: translate3d(-24px, 52vh, 0) rotate(200deg); }
    85% { opacity: .75; }
    100% { transform: translate3d(18px, 108vh, 0) rotate(380deg); opacity: 0; }
}

/* ---------- cover ---------- */

.bm-cover {
    position: fixed; inset: 0; z-index: 30;
    width: min(100%, var(--bm-w)); margin: 0 auto;
    display: flex; overflow-x: hidden; overflow-y: auto;
    background: var(--inv-background); color: var(--inv-text);
}
.bm-cover__photo { position: absolute; inset: 0; overflow: hidden; }
.bm-cover__photo::before {
    content: ''; position: absolute; inset: 0;
    background: var(--bm-photo, none) center 30% / cover no-repeat;
    filter: saturate(.85) sepia(.12);
}
/* the photo's one opening moment: a fade with a slight zoom */
html.inv-anim .bm-cover__photo::before { animation: bm-cover-in 2.2s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes bm-cover-in { from { opacity: 0; transform: scale(1.1); } to { opacity: 1; transform: scale(1); } }
.bm-cover__photo::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(70% 38% at 50% 40%, color-mix(in srgb, var(--inv-background) 50%, transparent), transparent 100%),
        linear-gradient(180deg,
            color-mix(in srgb, var(--inv-background) 84%, transparent) 0%,
            color-mix(in srgb, var(--inv-primary) 52%, rgb(0 0 0 / .45)) 34%,
            color-mix(in srgb, var(--inv-background) 72%, transparent) 58%,
            color-mix(in srgb, var(--inv-background) 94%, transparent) 80%,
            var(--inv-background) 100%);
}
/* without a photo: deep wine velvet */
.bm-cover__photo--empty::before {
    background:
        radial-gradient(80% 50% at 50% 38%, color-mix(in srgb, var(--inv-primary) 85%, transparent), transparent 75%),
        linear-gradient(160deg, var(--inv-surface), var(--inv-background));
}
.bm-cover__frame {
    position: absolute; inset: 12px; z-index: 1; pointer-events: none;
    border: 1px solid var(--bm-line-soft); border-radius: 2px;
}

.bm-flora--cover-tl { width: min(76%, 340px); top: -4%; left: -24%; transform: rotate(-4deg); transform-origin: 20% 20%; }
.bm-flora--cover-br { width: min(68%, 300px); bottom: -5%; right: -26%; transform: rotate(-14deg); transform-origin: 80% 90%; animation-duration: 10.5s; animation-delay: -3s; }
.bm-flora--cover-bl { width: min(27%, 120px); bottom: 3%; left: -7%; transform: rotate(22deg); transform-origin: 0 100%; animation-duration: 8s; animation-delay: -5s; }
.bm-flora--cover-tr { width: min(26%, 115px); top: 1%; right: -9%; transform: scaleX(-1) rotate(6deg); transform-origin: 50% 50%; animation-duration: 8.5s; animation-delay: -2s; }

.bm-cover__inner {
    position: relative; z-index: 2;
    width: 100%; margin: auto; padding: 4.6rem 2rem 3.4rem;
    display: flex; flex-direction: column; align-items: center; gap: .85rem;
    text-align: center;
}

/* the gold arch around the title block */
.bm-crest {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: .7rem;
    width: min(100%, 19.5rem); padding: 2.4rem 1rem 1.1rem;
}
.bm-crest::before, .bm-crest::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    border: 1px solid var(--bm-line); border-bottom: 0; border-radius: 999px 999px 0 0;
    -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
.bm-crest::after { inset: 6px -6px 0; border-color: var(--bm-line-soft); }

.bm-mono {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-width: 4.4rem; height: 4.4rem; padding: 0 .9rem;
    border-radius: 999px; border: 1px solid var(--bm-line);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--inv-primary) 45%, transparent), 0 0 0 5px var(--bm-line-soft), 0 10px 30px -10px rgb(0 0 0 / .7);
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--inv-primary) 90%, #fff 10%), color-mix(in srgb, var(--inv-primary) 60%, #000));
    font: 500 1.45rem/1 var(--bm-serif); color: var(--inv-accent);
}
.bm-mono__sep { width: 1px; height: 1.4rem; background: var(--inv-accent); transform: rotate(22deg); opacity: .8; }

.bm-cover__names {
    display: flex; flex-direction: column; align-items: center;
    font: 400 clamp(3rem, 15vw, 4.1rem)/1.02 var(--bm-script);
    color: var(--inv-text);
    text-shadow: 0 2px 24px rgb(0 0 0 / .7), 0 0 40px color-mix(in srgb, var(--inv-primary) 60%, transparent);
}
.bm-cover__amp { font-size: .7em; line-height: 1.1; color: var(--inv-accent); }

.bm-cover__date {
    display: flex; align-items: center; gap: .75rem;
    font: 500 .76rem/1.4 var(--bm-sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
    text-shadow: 0 1px 10px rgb(0 0 0 / .7);
}
.bm-cover__date::before, .bm-cover__date::after { content: ''; width: 1.6rem; height: 1px; background: var(--bm-line); }

.bm-cover__quote {
    max-width: 20rem;
    font: italic 500 1rem/1.5 var(--bm-serif); color: color-mix(in srgb, var(--inv-text) 92%, transparent);
    text-shadow: 0 1px 10px rgb(0 0 0 / .8);
}

.bm-guest {
    position: relative; width: min(100%, 19rem); margin-top: .2rem; padding: 1rem 1.25rem .95rem;
    border: 1px solid var(--bm-line); border-radius: 14px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 62%, transparent), color-mix(in srgb, var(--inv-surface) 86%, transparent));
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: 0 20px 40px -24px rgb(0 0 0 / .9);
}
.bm-guest__label { font: 500 .7rem/1.4 var(--bm-sans); letter-spacing: .3em; text-transform: uppercase; color: var(--inv-accent); }
.bm-guest__name { margin-top: .3rem; font: 600 1.4rem/1.25 var(--bm-serif); overflow-wrap: anywhere; }
.bm-guest__note { margin-top: .4rem; font: italic 500 .9rem/1.45 var(--bm-serif); color: var(--bm-muted); }

.bm-open { margin-top: .4rem; }
/* no breathing pulse on the button: one calm opening moment */
html.inv-anim .inv-open-button.bm-open.inv-enter { animation: inv-enter 1.1s cubic-bezier(.2, .7, .2, 1) var(--enter-delay, 0s) both; }

.bm-cover--leave { transition: transform 1.1s cubic-bezier(.7, 0, .3, 1), opacity 1.1s ease; }
.bm-cover--gone { transform: translateY(-100%); opacity: 0; }

/* ---------- hero (top of the page after opening) ---------- */

.bm-hero {
    position: relative; overflow: hidden;
    min-height: min(100vh, 900px); min-height: min(100svh, 900px); padding: 5.5rem 1.5rem 3.5rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    background:
        radial-gradient(100% 60% at 50% 32%, color-mix(in srgb, var(--inv-primary) 62%, transparent), transparent 78%),
        linear-gradient(180deg, var(--inv-background), color-mix(in srgb, var(--inv-surface) 70%, var(--inv-background)));
}
.bm-flora--hero-tl { width: min(52%, 230px); top: -3%; left: -16%; transform: rotate(-10deg); transform-origin: 15% 15%; }
.bm-flora--hero-br { width: min(50%, 230px); bottom: -5%; right: -18%; transform: scaleX(-1) rotate(-24deg); transform-origin: 50% 50%; animation-delay: -4s; }

.bm-arch {
    position: relative; z-index: 2;
    width: min(66%, 250px); aspect-ratio: 3 / 4.1; margin: 1.3rem auto 1.4rem; padding: 7px;
    border: 1px solid var(--bm-line); border-radius: 999px 999px 6px 6px;
}
.bm-arch::after {
    content: ''; position: absolute; inset: -9px; pointer-events: none;
    border: 1px solid var(--bm-line-soft); border-radius: 999px 999px 10px 10px;
}
.bm-arch__photo {
    position: relative; width: 100%; height: 100%; display: grid; place-items: center;
    border-radius: 999px 999px 3px 3px;
    background: var(--bm-photo, none) center / cover no-repeat, linear-gradient(160deg, var(--inv-surface), var(--inv-primary));
    box-shadow: inset 0 -70px 60px -30px rgb(0 0 0 / .55), 0 24px 50px -24px rgb(0 0 0 / .8);
}
.bm-arch__mono { display: flex; gap: .4rem; font: 400 4rem/1 var(--bm-script); color: var(--inv-accent); }
.bm-arch__rose { position: absolute; z-index: 3; width: 38%; right: -16%; bottom: -10%; transform: rotate(-12deg); transform-origin: 50% 90%; animation: bm-sway 8s ease-in-out infinite alternate; filter: drop-shadow(0 12px 16px rgb(0 0 0 / .5)); pointer-events: none; }

.bm-hero__names {
    position: relative; z-index: 2;
    display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .55rem;
    font: 400 clamp(2.8rem, 13vw, 3.6rem)/1.15 var(--bm-script);
    text-shadow: 0 2px 18px rgb(0 0 0 / .5);
}
.bm-hero__amp { font-size: .85em; color: var(--inv-accent); }
.bm-hero__date {
    position: relative; z-index: 2; margin-top: .4rem;
    font: 500 .78rem/1.4 var(--bm-sans); letter-spacing: .22em; text-transform: uppercase; color: var(--bm-muted);
}

.bm-scroll { position: relative; z-index: 2; width: 1px; height: 3rem; margin-top: 1.8rem; background: var(--bm-line-soft); overflow: hidden; }
.bm-scroll span { position: absolute; left: 0; top: -1rem; width: 1px; height: 1rem; background: var(--inv-accent); animation: bm-drip 2.2s ease-in-out infinite; }
@keyframes bm-drip { to { transform: translateY(4rem); } }

/* ---------- sections: dark (default), velvet, ivory linen, photo band ---------- */

.bm-main { position: relative; }
/* revealed blocks keep their ornaments that hang outside (quote mark, roses): no clipping */
html.inv-anim .bm-main [data-reveal]:not([data-reveal="wipe"]) { clip-path: none; }

.bm-section {
    position: relative; overflow: hidden; isolation: isolate;
    padding: 4.5rem 1.5rem;
    text-align: center;
    color: var(--inv-text);
    background:
        radial-gradient(90% 50% at 50% 0%, color-mix(in srgb, var(--inv-primary) 34%, transparent), transparent 75%),
        var(--inv-background);
}
.bm-section > * { position: relative; z-index: 1; }
.bm-section > .bm-glow, .bm-section > .bm-flora, .bm-section > .bm-bgphoto, .bm-section > .bm-closing__bg { position: absolute; }
.bm-section > .bm-glow, .bm-section > .bm-bgphoto, .bm-section > .bm-closing__bg { z-index: 0; }
.bm-section > .bm-flora { z-index: 0; }

/* wine velvet: deep folds of light */
.bm-velvet {
    background:
        radial-gradient(70% 40% at 15% 0%, color-mix(in srgb, var(--inv-primary) 80%, transparent), transparent 70%),
        radial-gradient(60% 45% at 100% 100%, color-mix(in srgb, var(--inv-primary) 55%, transparent), transparent 70%),
        repeating-linear-gradient(100deg, rgb(255 255 255 / 0) 0 38px, rgb(255 255 255 / .018) 52px, rgb(255 255 255 / 0) 70px),
        linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 42%, var(--inv-background)), var(--inv-background));
}

/* ivory linen: a fine woven texture and a blush glow */
.bm-light {
    background:
        radial-gradient(80% 32% at 50% 0%, color-mix(in srgb, var(--inv-rose) 14%, transparent), transparent 75%),
        repeating-linear-gradient(0deg, rgb(80 40 20 / .03) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgb(80 40 20 / .025) 0 1px, transparent 1px 4px),
        var(--inv-background);
}
/* a thin gold band where ivory meets velvet */
.bm-light::before, .bm-light::after {
    content: ''; position: absolute; left: 0; right: 0; height: 4px; z-index: 1;
    background: linear-gradient(90deg, transparent, var(--bm-d-accent) 20%, color-mix(in srgb, var(--bm-d-accent) 60%, #fff) 50%, var(--bm-d-accent) 80%, transparent);
    opacity: .55;
}
.bm-light::before { top: 0; }
.bm-light::after { bottom: 0; }

/* photo band: a client photo under a deep wine gradient */
.bm-band { background: linear-gradient(170deg, color-mix(in srgb, var(--inv-primary) 70%, var(--inv-background)), var(--inv-background)); }
.bm-bgphoto { inset: 0; overflow: hidden; }
.bm-bgphoto img { position: absolute; left: 0; top: -48px; width: 100%; height: calc(100% + 96px); max-width: none; object-fit: cover; filter: saturate(.85) sepia(.12); }
.bm-bgphoto::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(70% 45% at 50% 46%, color-mix(in srgb, var(--inv-background) 40%, transparent), transparent 100%),
        linear-gradient(180deg,
            color-mix(in srgb, var(--inv-background) 92%, transparent) 0%,
            color-mix(in srgb, var(--inv-primary) 62%, rgb(0 0 0 / .3)) 26%,
            color-mix(in srgb, var(--inv-primary) 46%, rgb(0 0 0 / .3)) 55%,
            color-mix(in srgb, var(--inv-primary) 66%, rgb(0 0 0 / .35)) 78%,
            color-mix(in srgb, var(--inv-background) 94%, transparent) 100%);
}
.bm-band .bm-heading__title, .bm-band .bm-heading__label, .bm-band .bm-countdown__date, .bm-band p { text-shadow: 0 1px 3px rgb(0 0 0 / .6), 0 2px 16px rgb(0 0 0 / .6); }

/* section flowers */
.bm-flora--side-tl { width: min(44%, 200px); top: -2rem; left: -14%; transform: rotate(-12deg); transform-origin: 10% 10%; opacity: .95; }
.bm-flora--side-tr { width: min(44%, 200px); top: -2rem; right: -14%; transform: scaleX(-1) rotate(-12deg); transform-origin: 50% 50%; opacity: .95; animation-delay: -3s; }
.bm-flora--bottom-l { width: min(52%, 240px); bottom: -2.5rem; left: -18%; transform: scaleX(-1) rotate(14deg); transform-origin: 50% 50%; animation-delay: -2s; }
.bm-flora--bottom-r { width: min(52%, 240px); bottom: -2.5rem; right: -18%; transform: rotate(-14deg); transform-origin: 80% 90%; animation-delay: -5s; }
.bm-flora--light-tl { width: min(30%, 130px); top: 1.2rem; left: -7%; transform: rotate(-20deg); transform-origin: 0 0; filter: drop-shadow(0 10px 14px rgb(60 10 20 / .25)); }
.bm-flora--light-tr { width: min(30%, 130px); top: 1.2rem; right: -7%; transform: scaleX(-1) rotate(-20deg); transform-origin: 50% 50%; filter: drop-shadow(0 10px 14px rgb(60 10 20 / .25)); animation-delay: -4s; }
.bm-flora--open-tr { width: min(34%, 150px); top: 1rem; right: -8%; transform: scaleX(-1) rotate(-16deg); transform-origin: 50% 50%; filter: drop-shadow(0 10px 14px rgb(60 10 20 / .25)); }

.bm-heading { margin-bottom: 2.2rem; }
.bm-heading__label { font: 600 .72rem/1.4 var(--bm-sans); letter-spacing: .34em; text-transform: uppercase; color: var(--bm-label); }
.bm-heading__title { margin-top: .4rem; font: 500 clamp(2.3rem, 10.5vw, 2.85rem)/1.1 var(--bm-serif); letter-spacing: .01em; color: var(--inv-text); }
.bm-heading__title em { font-style: italic; color: var(--inv-accent); }
.bm-light .bm-heading__title em { color: var(--inv-primary); }

.bm-lead { max-width: 24rem; margin: -.6rem auto 1.6rem; color: var(--bm-muted); font-size: 1.05rem; }

.bm-card {
    background: linear-gradient(170deg, color-mix(in srgb, var(--inv-surface) 94%, transparent), color-mix(in srgb, var(--inv-surface) 72%, var(--inv-background)));
    border: 1px solid var(--bm-line-soft); border-radius: 16px;
    box-shadow: 0 26px 50px -30px rgb(0 0 0 / .9), inset 0 1px 0 color-mix(in srgb, var(--inv-accent) 14%, transparent);
}
.bm-light .bm-card { box-shadow: 0 26px 50px -32px color-mix(in srgb, var(--inv-primary) 55%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--bm-d-accent) 30%, transparent); }

/* opening (ivory): the quote sits on a deep wine panel */
.bm-arabic { font: 400 1.75rem/1.8 'Amiri', serif; color: var(--inv-primary); margin-bottom: 1rem; }
.bm-opening { padding-top: 5rem; }
.bm-opening.bm-light {
    background:
        radial-gradient(80% 32% at 50% 0%, color-mix(in srgb, var(--inv-rose) 18%, transparent), transparent 75%),
        radial-gradient(70% 40% at 0% 100%, color-mix(in srgb, var(--inv-primary) 12%, transparent), transparent 75%),
        linear-gradient(180deg, var(--inv-background), color-mix(in srgb, var(--inv-background) 88%, var(--inv-rose)));
}
/* ivory linen over a faint photo: the paper is strongest behind the text column; the linen weave stays on top */
.bm-bgphoto--soft img { filter: saturate(.75) sepia(.18) blur(1px); opacity: .42; }
.bm-bgphoto--soft::after {
    background:
        repeating-linear-gradient(0deg, rgb(80 40 20 / .03) 0 1px, transparent 1px 3px),
        repeating-linear-gradient(90deg, rgb(80 40 20 / .025) 0 1px, transparent 1px 4px),
        radial-gradient(60% 30% at 50% 24%, color-mix(in srgb, var(--inv-background) 78%, transparent), transparent 100%),
        linear-gradient(180deg, color-mix(in srgb, var(--inv-background) 40%, transparent), color-mix(in srgb, var(--inv-background) 10%, transparent) 55%, color-mix(in srgb, var(--inv-background) 40%, transparent));
}
.bm-opening__greeting { font: italic 600 1.35rem/1.4 var(--bm-serif); color: var(--inv-primary); }
.bm-opening__message { max-width: 23rem; margin: 1rem auto 0; color: var(--bm-muted); }
.bm-quote {
    position: relative; max-width: 24rem; margin: 2.6rem auto .4rem; padding: 3.1rem 1.5rem 1.7rem;
    border-radius: 50% 50% 14px 14px / 4.2rem 4.2rem 14px 14px;
    background:
        radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--inv-primary) 70%, #fff 6%), transparent 80%),
        linear-gradient(170deg, var(--inv-primary), color-mix(in srgb, var(--inv-primary) 55%, #000));
    box-shadow: 0 30px 50px -28px color-mix(in srgb, var(--inv-primary) 90%, #000), inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 45%, transparent), inset 0 0 0 7px color-mix(in srgb, var(--inv-primary) 80%, #000), inset 0 0 0 8px color-mix(in srgb, var(--inv-accent) 22%, transparent);
}
.bm-quote > * { position: relative; z-index: 1; }
.bm-flora--quote { position: absolute; z-index: 2 !important; width: 40%; left: -19%; bottom: -24%; transform: rotate(4deg); transform-origin: 0 100%; }
.bm-quote__mark {
    position: absolute; top: .7rem; left: 50%; transform: translateX(-50%);
    font: 500 3.6rem/1 var(--bm-serif); color: var(--inv-accent);
}
.bm-quote blockquote { margin: 0; font: italic 500 1.12rem/1.6 var(--bm-serif); }
.bm-quote figcaption { margin-top: .9rem; font: 500 .72rem/1.4 var(--bm-sans); letter-spacing: .24em; text-transform: uppercase; color: var(--inv-accent); }

/* couple (velvet) */
.bm-person { display: flex; flex-direction: column; align-items: center; }
.bm-person__frame {
    position: relative; width: min(62%, 220px); aspect-ratio: 3 / 4; padding: 6px;
    border: 1px solid var(--bm-line); border-radius: 999px 999px 999px 999px;
}
.bm-person__frame::after {
    content: ''; position: absolute; inset: -8px; pointer-events: none;
    border: 1px solid var(--bm-line-soft); border-radius: 999px;
}
.bm-person__photo {
    display: block; width: 100%; height: 100%; object-fit: cover;
    border-radius: 999px;
    box-shadow: 0 24px 50px -24px rgb(0 0 0 / .85);
}
.bm-person__photo--empty {
    display: grid; place-items: center;
    background: linear-gradient(160deg, var(--inv-surface), var(--inv-primary));
    font: 400 4.5rem/1 var(--bm-script); color: var(--inv-accent);
}
.bm-person__rose { position: absolute; z-index: 2; width: 42%; height: auto; left: -12%; bottom: -8%; transform: rotate(-14deg); transform-origin: 30% 90%; animation: bm-sway 8.5s ease-in-out infinite alternate; filter: drop-shadow(0 12px 16px rgb(0 0 0 / .5)); }
.bm-person:nth-of-type(2) .bm-person__rose { left: auto; right: -12%; transform: scaleX(-1) rotate(-14deg); transform-origin: 50% 50%; animation-delay: -4s; }
.bm-person__nick { margin-top: 1.6rem; font: 400 2.9rem/1.1 var(--bm-script); color: var(--inv-accent); }
.bm-person__name { margin-top: .25rem; font: 600 1.3rem/1.3 var(--bm-serif); letter-spacing: .06em; text-transform: uppercase; }
.bm-person__parents { margin-top: .6rem; font-size: 1rem; color: var(--bm-muted); }
.bm-person__parents strong { color: var(--inv-text); font-weight: 600; }

.bm-amp { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 2.2rem 0 2.4rem; }
.bm-amp::before, .bm-amp::after { content: ''; width: 3.5rem; height: 1px; background: linear-gradient(90deg, transparent, var(--bm-line)); }
.bm-amp::after { transform: scaleX(-1); }
.bm-amp span { font: 400 4rem/1 var(--bm-script); color: var(--inv-accent); }

/* countdown (photo band) */
.bm-countdown { padding-top: 5rem; padding-bottom: 5rem; }
.bm-countdown__date { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.5rem; font: 500 .82rem/1.4 var(--bm-sans); letter-spacing: .12em; text-transform: uppercase; }
.bm-countdown__date .bm-icon { color: var(--inv-accent); width: 1.2rem; height: 1.2rem; }
.inv-countdown { gap: .55rem; }
.inv-countdown__item {
    flex: 1; max-width: 5rem; min-width: 0; padding: 1.15rem .25rem .8rem;
    border-radius: 999px 999px 12px 12px;
    background: linear-gradient(170deg, color-mix(in srgb, var(--inv-surface) 85%, transparent), color-mix(in srgb, var(--inv-primary) 70%, var(--inv-surface)));
    border: 1px solid var(--bm-line);
    box-shadow: 0 18px 30px -20px rgb(0 0 0 / .9), inset 0 0 0 3px color-mix(in srgb, var(--inv-background) 50%, transparent), inset 0 0 0 4px var(--bm-line-soft);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.inv-countdown__value { font: 600 2rem/1.1 var(--bm-serif); color: var(--inv-accent); }
.inv-countdown__label { margin-top: .2rem; font: 500 .6rem/1.2 var(--bm-sans); letter-spacing: .16em; text-transform: uppercase; }
.inv-countdown__done { font-style: italic; color: var(--bm-muted); }
.inv-countdown__actions { margin-top: 1.5rem; }
.inv-countdown__actions .inv-button { padding: .7rem 1.05rem; font-size: .64rem; letter-spacing: .1em; }

/* events: photo on top (arched top corner), a velvet panel below, the name in a vertical wine strip beside it */
.bm-event { position: relative; margin: 0 auto 2.6rem; max-width: 24rem; box-shadow: 0 30px 50px -30px rgb(0 0 0 / .9); text-align: center; }
.bm-light .bm-event { box-shadow: 0 34px 50px -30px color-mix(in srgb, var(--inv-primary) 80%, #000); }
.bm-event:last-child { margin-bottom: 0; }
.bm-event__photo {
    position: relative; height: 15rem; overflow: hidden;
    border: 1px solid var(--bm-line); border-bottom: 0; border-radius: 9rem 0 0 0;
    background: var(--bm-photo) center 35% / cover no-repeat;
}
.bm-event--flip .bm-event__photo { border-radius: 0 9rem 0 0; }
.bm-event__photo::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 22%, transparent) 0%, transparent 40%, color-mix(in srgb, var(--inv-surface) 80%, transparent) 100%);
}
.bm-event__body { display: grid; grid-template-columns: minmax(0, 1fr) 3.3rem; border: 1px solid var(--bm-line); }
.bm-event--flip .bm-event__body { grid-template-columns: 3.3rem minmax(0, 1fr); }
.bm-event__panel {
    display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.5rem 1rem 1.7rem;
    background: linear-gradient(175deg, var(--inv-surface), color-mix(in srgb, var(--inv-surface) 60%, var(--inv-background)));
}
.bm-event__date { font: 600 1.3rem/1.3 var(--bm-serif); color: var(--inv-text); }
.bm-event__time { display: inline-flex; align-items: center; gap: .4rem; font: 500 .8rem/1.5 var(--bm-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--inv-accent); }
.bm-event__time .bm-icon, .bm-event__dress .bm-icon { width: 1.05rem; height: 1.05rem; flex: none; color: var(--inv-accent); }
.bm-event__pin { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; margin: .9rem 0 .25rem; border-radius: 50%; border: 1px solid var(--bm-line); color: var(--inv-accent); }
.bm-event__pin .bm-icon { width: 1.2rem; height: 1.2rem; }
.bm-event__venue { font: 700 1.15rem/1.35 var(--bm-serif); letter-spacing: .02em; }
.bm-event__address { font-size: .98rem; line-height: 1.5; color: var(--bm-muted); }
.bm-event__dress { display: inline-flex; align-items: center; gap: .4rem; margin-top: .5rem; font-style: italic; color: var(--inv-accent); }
.bm-event .inv-maps { margin-top: 1rem; }
.bm-event__name {
    display: grid; place-items: center; margin: 0; padding: 1.2rem 0;
    border-left: 1px solid var(--bm-line);
    background: linear-gradient(180deg, var(--inv-primary), color-mix(in srgb, var(--inv-primary) 60%, var(--inv-background)));
}
.bm-event--flip .bm-event__name { order: -1; border-left: 0; border-right: 1px solid var(--bm-line); }
.bm-event__name span {
    writing-mode: vertical-rl; white-space: nowrap;
    font: 600 1.05rem/1 var(--bm-serif); letter-spacing: .42em; text-transform: uppercase; color: var(--inv-accent);
}
/* the vertical name slides down into place after the card has tilted in */
html.inv-anim .bm-event .bm-event__name span { opacity: 0; transform: translateY(-1.2rem); transition: opacity .9s .55s ease, transform 1.1s .55s cubic-bezier(.2, .7, .2, 1); }
html.inv-anim .bm-event.is-revealed .bm-event__name span { opacity: 1; transform: none; }
.inv-maps { display: flex; justify-content: center; }

/* love story: a zig-zag programme around a center line. Odd moments: text left, date + photo right; even: swapped. */
.bm-story { padding-left: 1rem; padding-right: 1rem; }
.bm-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.bm-timeline::before {
    content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; transform: translateX(-50%);
    background: linear-gradient(180deg, transparent, var(--inv-accent) 8%, var(--inv-accent) 92%, transparent);
    opacity: .55;
}
.bm-moment {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 1fr) 1.7rem minmax(0, 1fr); column-gap: .6rem; align-items: start;
    grid-template-areas: "text dot meta";
}
.bm-moment + .bm-moment { margin-top: 2rem; }
.bm-moment:nth-child(even) { grid-template-areas: "meta dot text"; }

.bm-moment__dot {
    grid-area: dot; justify-self: center; margin-top: .15rem;
    display: grid; place-items: center; width: 1.7rem; height: 1.7rem;
    border-radius: 50%; border: 1px solid var(--bm-line);
    background: var(--inv-background); color: var(--inv-accent);
    box-shadow: 0 0 0 4px var(--inv-background), 0 0 16px color-mix(in srgb, var(--inv-accent) 30%, transparent);
}
.bm-moment__dot .bm-icon { width: .8rem; height: .8rem; fill: color-mix(in srgb, var(--inv-rose) 70%, transparent); }

/* the text leans toward the line */
.bm-moment__text { grid-area: text; min-width: 0; text-align: right; }
.bm-moment:nth-child(even) .bm-moment__text { text-align: left; }
.bm-moment__title { font: 700 1.12rem/1.25 var(--bm-serif); color: var(--inv-text); overflow-wrap: anywhere; }
.bm-moment__rule {
    display: block; width: 72%; margin: .45rem 0 .5rem auto;
    border-top: 1px dotted color-mix(in srgb, var(--inv-accent) 70%, transparent);
}
.bm-moment:nth-child(even) .bm-moment__rule { margin-left: 0; margin-right: auto; }
.bm-moment__story { font-size: .9rem; line-height: 1.5; color: var(--bm-muted); overflow-wrap: anywhere; }

/* the other side: the date and a small photo */
.bm-moment__meta { grid-area: meta; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; text-align: left; }
.bm-moment:nth-child(even) .bm-moment__meta { align-items: flex-end; text-align: right; }
.bm-moment__date { font: italic 600 1.3rem/1.2 var(--bm-serif); color: var(--inv-accent); overflow-wrap: anywhere; }
.bm-moment__photo {
    display: block; width: min(5.5rem, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
    padding: 3px; border: 1px solid var(--bm-line);
    box-shadow: 0 14px 26px -16px rgb(0 0 0 / .9);
}
/* no date and no photo: a small rose ornament keeps the empty side from looking unfinished */
.bm-moment--bare .bm-moment__meta::before {
    content: '\2766'; margin-top: .1rem; font: 400 1.2rem/1 var(--bm-serif); color: var(--inv-accent); opacity: .55;
}

/* gallery: the first photo wide; a lonely last photo is wide too */
.inv-gallery { gap: .55rem; }
.inv-gallery__item {
    border-radius: 12px;
    box-shadow: 0 0 0 1px var(--bm-line-soft), 0 16px 30px -22px rgb(0 0 0 / .9);
}
.inv-gallery__item:first-child,
.inv-gallery__item:first-child ~ .inv-gallery__item:last-child:nth-child(even) { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.inv-gallery__play { background: color-mix(in srgb, var(--inv-background) 70%, transparent); color: var(--inv-accent); }

/* live streaming */
.bm-live__card { max-width: 24rem; margin: 0 auto; padding: 1.7rem 1.4rem; }
.bm-live__badge {
    display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem;
    border-radius: 999px; background: color-mix(in srgb, var(--inv-rose) 55%, transparent);
    font: 500 .7rem/1 var(--bm-sans); letter-spacing: .2em;
}
.bm-live__badge span { width: .45rem; height: .45rem; border-radius: 50%; background: #ff5a6a; animation: bm-blink 1.4s ease-in-out infinite; }
@keyframes bm-blink { 50% { opacity: .25; } }
.bm-live__text { margin: 1rem 0 .5rem; }
.bm-live__note { margin-bottom: 1.2rem; font: italic 400 1rem/1.5 var(--bm-serif); color: var(--inv-accent); }
.bm-live__card .inv-button { margin-top: .6rem; }

/* gift: accounts as compact bank cards, two per row (a lonely last card spans both) */
.inv-gift { display: grid; gap: .9rem; max-width: 22rem; margin: 0 auto; }
.inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.inv-gift__account {
    position: relative; overflow: hidden; isolation: isolate; min-width: 0;
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: .45rem;
    grid-template-areas: "chip bank" "number number" "holder holder" "button button";
    margin: 0; padding: .8rem .8rem .75rem;
    border-radius: 12px; text-align: left; color: #fbf3ea;
    background:
        radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--inv-accent) 28%, transparent), transparent 55%),
        linear-gradient(135deg, color-mix(in srgb, var(--inv-primary) 92%, #fff 8%), color-mix(in srgb, var(--inv-primary) 52%, #000));
    box-shadow: 0 18px 30px -20px rgb(0 0 0 / .9), inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 38%, transparent);
}
.inv-gift__account + .inv-gift__account { margin-top: 0; }
.inv-gift__account::before {
    content: ''; grid-area: chip; width: 1.7rem; height: 1.3rem; border-radius: .3rem;
    background:
        linear-gradient(90deg, transparent 31%, rgb(0 0 0 / .28) 31% 33%, transparent 33% 67%, rgb(0 0 0 / .28) 67% 69%, transparent 69%),
        linear-gradient(0deg, transparent 47%, rgb(0 0 0 / .28) 47% 53%, transparent 53%),
        var(--bm-gold);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2);
}
.inv-gift__account::after {
    content: ''; position: absolute; z-index: -1; right: -2.5rem; bottom: -2.8rem; width: 7rem; height: 7rem;
    border-radius: 50%; border: 1px solid color-mix(in srgb, var(--inv-accent) 35%, transparent);
    box-shadow: 0 0 0 .8rem color-mix(in srgb, var(--inv-accent) 7%, transparent), 0 0 0 1.6rem color-mix(in srgb, var(--inv-accent) 4%, transparent);
}
.inv-gift__bank {
    grid-area: bank; justify-self: end; min-width: 0; max-width: 100%; margin: 0;
    font: 600 .7rem/1.2 var(--bm-sans); letter-spacing: .06em; text-transform: uppercase; text-align: right; overflow-wrap: anywhere;
}
.inv-gift__logo { height: 1.5rem; max-width: 100%; padding: .2rem .45rem; border-radius: .35rem; }
.inv-gift__logo img { max-width: 4.6rem; }
.inv-gift__number {
    grid-area: number; margin: .75rem 0 .15rem;
    font: 500 1rem/1.25 var(--bm-sans); font-variant-numeric: tabular-nums; letter-spacing: .08em; color: #fff;
    text-shadow: 0 1px 0 rgb(0 0 0 / .35); overflow-wrap: anywhere;
}
.inv-gift__holder { grid-area: holder; margin: 0; font: 500 .6rem/1.35 var(--bm-sans); letter-spacing: .1em; text-transform: uppercase; opacity: .9; overflow-wrap: anywhere; }
.inv-gift__account .inv-button {
    grid-area: button; justify-self: start; margin-top: .6rem; padding: .35rem .7rem;
    font-size: .65rem; letter-spacing: .06em; color: #fff; background: rgb(255 255 255 / .1);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .5);
}

/* the gift address stays a plain card */
.inv-gift__account.inv-gift__address {
    display: block; min-height: 0; padding: 1.5rem 1.3rem; text-align: center; color: var(--inv-text);
    background: color-mix(in srgb, var(--inv-surface) 85%, transparent);
    box-shadow: inset 0 0 0 1px var(--bm-line-soft), 0 20px 40px -28px rgb(0 0 0 / .9);
}
.inv-gift__address::before, .inv-gift__address::after { content: none; }
.inv-gift__address .inv-gift__bank { justify-self: auto; text-align: center; font: 500 .72rem/1.4 var(--bm-sans); letter-spacing: .3em; color: var(--inv-accent); }
.inv-gift__address .inv-gift__holder { margin: .6rem 0 .2rem; font: 600 1.15rem/1.3 var(--bm-serif); letter-spacing: .02em; text-transform: none; }
.inv-gift__address p:not([class]) { color: var(--bm-muted); }
.inv-gift__address .inv-button {
    margin-top: 1rem; color: var(--inv-accent); background: transparent;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 70%, transparent);
}

/* rsvp & wishes forms */
.bm-form { max-width: 24rem; margin: 0 auto; padding: 1.5rem 1.25rem; text-align: left; }
.inv-form { gap: .9rem; }
.inv-form label, .inv-form__choices legend { font: 500 .8rem/1.4 var(--bm-sans); letter-spacing: .04em; color: var(--bm-muted); }
.inv-form input:not([type=radio]):not([type=checkbox]), .inv-form select, .inv-form textarea {
    padding: .7rem .85rem; border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--inv-accent) 32%, transparent);
    background: color-mix(in srgb, var(--inv-background) 65%, transparent); color: var(--inv-text);
    font: 500 1.05rem/1.4 var(--bm-serif);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.inv-form input::placeholder, .inv-form textarea::placeholder { color: color-mix(in srgb, var(--inv-text) 45%, transparent); }
.inv-form input:focus, .inv-form select:focus, .inv-form textarea:focus {
    outline: none; border-color: var(--inv-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-accent) 20%, transparent);
}
.inv-form option { background: var(--inv-surface); color: var(--inv-text); }
.inv-form input[type=radio], .inv-form input[type=checkbox] { accent-color: var(--inv-accent); }
.inv-form__choices label { color: var(--inv-text); font-size: .9rem; }
.inv-form__notice { color: var(--inv-text); background: color-mix(in srgb, var(--inv-accent) 14%, transparent); border: 1px solid var(--bm-line-soft); }
.inv-form .inv-button { justify-self: stretch; margin-top: .3rem; }
.inv-rsvp__deadline { font-style: italic; color: var(--inv-accent); }

/* wishes: compact cards in a scroll box of about three */
.inv-wishes { --inv-wishes-height: 20rem; }
.inv-wishes__list { gap: .6rem; margin-top: 1.4rem; }
.inv-wishes:not(.inv-wishes--paged) .inv-wishes__list {
    padding: .5rem .45rem .5rem .5rem; border-radius: 12px;
    background: color-mix(in srgb, var(--inv-background) 35%, transparent);
    box-shadow: inset 0 0 0 1px var(--bm-line-soft), inset 0 -14px 16px -14px rgb(0 0 0 / .7);
    scrollbar-color: color-mix(in srgb, var(--inv-accent) 45%, transparent) transparent;
}
.inv-wishes__empty { text-align: center; font-style: italic; }
.inv-wish {
    padding: .65rem .8rem; border-radius: 10px;
    background: color-mix(in srgb, var(--inv-background) 55%, transparent);
    border: 1px solid var(--bm-line-soft); border-left: 2px solid var(--inv-accent);
}
.inv-wish__name { font: 600 .92rem/1.3 var(--bm-serif); color: var(--inv-accent); }
.inv-wish__message { font-size: .88rem; line-height: 1.45; }
.inv-wish__time { margin-top: .25rem; font: 400 .7rem/1.3 var(--bm-sans); letter-spacing: .05em; }
.inv-wish__reply { margin-top: .5rem; padding: .45rem .65rem; background: color-mix(in srgb, var(--inv-accent) 10%, transparent); }
.inv-wish__reply-text { font-size: .86rem; }

/* closing: a full-bleed photo fading into deep wine; the words in a gold-lined arch panel framed by roses */
.bm-closing { padding: 7.5rem 1.25rem 2.4rem; background: linear-gradient(180deg, var(--inv-background), color-mix(in srgb, var(--inv-primary) 75%, var(--inv-background)) 55%, var(--inv-primary)); }
.bm-closing--photo { padding-top: 22rem; background: var(--inv-primary); }
.bm-section > .bm-closing__bg { inset: 0 0 auto; height: 34rem; overflow: hidden; }
.bm-closing__bg img { position: absolute; left: 0; top: -48px; width: 100%; height: calc(100% + 96px); max-width: none; object-fit: cover; object-position: center 30%; filter: saturate(.85) sepia(.1); }
.bm-closing__bg::after {
    content: ''; position: absolute; inset: 0;
    background:
        linear-gradient(180deg,
            var(--inv-background) 0%,
            color-mix(in srgb, var(--inv-background) 30%, transparent) 16%,
            color-mix(in srgb, var(--inv-primary) 22%, transparent) 42%,
            color-mix(in srgb, var(--inv-primary) 80%, transparent) 72%,
            var(--inv-primary) 100%);
}
.bm-closing__panel {
    position: relative; max-width: 23rem; margin: 0 auto; padding: 3.2rem 1.4rem 1.9rem;
    border-radius: 50% 50% 18px 18px / 5.5rem 5.5rem 18px 18px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 55%, transparent), color-mix(in srgb, var(--inv-primary) 40%, #000 30%));
    box-shadow: inset 0 0 0 1px var(--bm-line), inset 0 0 0 7px color-mix(in srgb, var(--inv-primary) 60%, transparent), inset 0 0 0 8px var(--bm-line-soft), 0 30px 60px -30px rgb(0 0 0 / .9);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.bm-closing__panel > .bm-flora { position: absolute; z-index: 2; }
.bm-flora--close-tl { width: 56%; top: -4.6rem; left: -22%; transform: rotate(-16deg); transform-origin: 15% 15%; }
.bm-flora--close-br { width: 62%; bottom: -3.6rem; right: -24%; transform: scaleX(-1) rotate(-22deg); transform-origin: 50% 50%; animation-delay: -4s; }
.bm-closing__body { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; }
.bm-closing__label { font: 600 .7rem/1.4 var(--bm-sans); letter-spacing: .34em; text-transform: uppercase; color: var(--inv-accent); }
.bm-closing__thanks { margin-top: .35rem; font: 500 clamp(2.5rem, 11vw, 3rem)/1.1 var(--bm-serif); color: var(--inv-text); text-shadow: 0 2px 14px rgb(0 0 0 / .6); }
.bm-closing__thanks em { font-style: italic; color: var(--inv-accent); }
.bm-closing__names { margin-top: .7rem; font: 400 clamp(2.5rem, 11.5vw, 3.1rem)/1.15 var(--bm-script); color: var(--inv-text); text-shadow: 0 2px 16px rgb(0 0 0 / .6); }
.bm-closing__names span { color: var(--inv-accent); font-size: .75em; }
.bm-closing__message { max-width: 20rem; margin: .9rem auto 0; color: color-mix(in srgb, var(--inv-text) 94%, transparent); text-shadow: 0 1px 10px rgb(0 0 0 / .5); }
.bm-closing__sign { margin-top: 1.3rem; font: 600 .72rem/1.4 var(--bm-sans); letter-spacing: .28em; text-transform: uppercase; color: var(--inv-accent); }

/* ---------- shared components: nav, music, branding, check-in ---------- */

.inv-nav {
    --inv-nav-bg: color-mix(in srgb, var(--inv-surface) 90%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--inv-text) 78%, transparent);
    --inv-nav-active: var(--inv-accent);
    border-color: var(--bm-line-soft);
    box-shadow: 0 14px 34px -12px rgb(0 0 0 / .8);
    font-family: var(--bm-sans);
}
.inv-nav__item.is-active { color: var(--bm-ink); }

.inv-music { right: max(1rem, calc((100vw - var(--bm-w)) / 2 + 1rem)); }
.inv-music__button { background: var(--bm-gold); color: var(--bm-ink); box-shadow: 0 8px 22px -8px rgb(0 0 0 / .8), 0 0 0 1px color-mix(in srgb, var(--inv-accent) 40%, transparent); }

.bm-branding { position: relative; z-index: 1; color: var(--inv-text); font-family: var(--bm-sans); background: var(--inv-primary); }

.inv-checkin { color: #2a1a1d; }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .bm-flora, .bm-arch__rose, .bm-person__rose, .bm-glow, .bm-scroll span, .bm-live__badge span, .bm-cover__photo::before { animation: none !important; }
    .bm-drift { display: none !important; }
    .bm-cover--leave { transition: opacity .3s ease; }
    .bm-cover--gone { transform: none; }
}

/* ---------- fit: the whole cover (names → "Buka Undangan") on one phone screen ---------- */

.bm-cover__inner {
    min-height: 100vh; min-height: 100svh; margin: 0 auto;
    justify-content: space-evenly; padding-top: 3.4rem; padding-bottom: 2.6rem;
}

@media (max-height: 760px) {
    .bm-cover__inner { gap: .55rem; padding: 2.6rem 2rem 2.2rem; }
    .bm-crest { gap: .5rem; padding-top: 2rem; }
    .bm-mono { min-width: 3.8rem; height: 3.8rem; font-size: 1.25rem; }
    .bm-cover__names { font-size: clamp(2.6rem, 13vw, 3.3rem); }
    .bm-cover__quote { font-size: .95rem; line-height: 1.42; }
    .bm-guest { padding: .8rem 1.1rem .75rem; }
}
@media (max-height: 660px) {
    .bm-cover__inner { gap: .4rem; padding: 2rem 1.8rem 1.9rem; }
    .bm-crest { gap: .35rem; padding: 1.6rem .8rem .6rem; }
    .bm-mono { min-width: 3.2rem; height: 3.2rem; font-size: 1.05rem; }
    .bm-mono__sep { height: 1rem; }
    .bm-cover__names { font-size: 2.55rem; line-height: 1; }
    .bm-cover__date { font-size: .7rem; }
    .bm-cover__quote { font-size: .88rem; line-height: 1.38; }
    .bm-guest { margin-top: .1rem; padding: .6rem 1rem .55rem; }
    .bm-guest__name { font-size: 1.2rem; }
    .bm-guest__note { margin-top: .2rem; font-size: .8rem; line-height: 1.33; }
    .bm-open { margin-top: .1rem; }
}
@media (max-height: 580px) {
    .bm-cover__inner { gap: .3rem; padding: 1.4rem 1.6rem 1.5rem; }
    .bm-crest { padding-top: 1.2rem; }
    .bm-mono { display: none; }
    .bm-cover__names { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 0 .45rem; font-size: 2.4rem; }
    .bm-cover__quote { max-width: 19rem; font-size: .84rem; }
    .bm-guest__note { display: none; }
}
