/*
 * Template "Signature Botanica" — botanical quiet luxury. Mobile-first.
 * Colors from the chosen variant: --inv-primary (ink: headings, buttons), --inv-accent
 * (soft blush/blue/clay tint), --inv-background (warm paper), --inv-text, --inv-secondary (wax seal).
 * Fonts from the client's choice: --inv-font-display (script names), --inv-font-heading (titles).
 */

:root {
    --bt-display: var(--inv-font-display, 'Great Vibes', cursive);
    --bt-heading: var(--inv-font-heading, 'Cormorant Garamond', Georgia, serif);
    --bt-sans: 'Mulish', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --bt-paper: color-mix(in srgb, var(--inv-background) 55%, #fff);
    --bt-tint: color-mix(in srgb, var(--inv-accent) 22%, var(--inv-background));
    --bt-tint-deep: color-mix(in srgb, var(--inv-accent) 38%, var(--inv-background));
    --bt-vellum: color-mix(in srgb, var(--inv-background) 62%, transparent);
    --bt-ink: var(--inv-primary);
    --bt-flora: color-mix(in srgb, var(--inv-primary) 86%, var(--inv-accent));
    --bt-line: color-mix(in srgb, var(--inv-primary) 34%, transparent);
    --bt-muted: color-mix(in srgb, var(--inv-text) 80%, var(--inv-background));
    --bt-deep: color-mix(in srgb, var(--inv-primary) 72%, #000);
    --bt-cream: color-mix(in srgb, var(--inv-background) 70%, #fff);
    --bt-seal: var(--inv-secondary, color-mix(in srgb, var(--inv-accent) 55%, var(--inv-primary)));
    --bt-shadow: color-mix(in srgb, var(--inv-primary) 22%, transparent);
    --bt-column: 520px;
    --bt-pebble-a: 58% 42% 47% 53% / 46% 52% 48% 54%;
    --bt-pebble-b: 44% 56% 60% 40% / 55% 45% 55% 45%;
    --bt-pebble-c: 52% 48% 40% 60% / 60% 50% 50% 40%;
    /* paper grain: a tiny noise texture, colourless so it fits every variant */
    --bt-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --inv-radius: 18px;
}

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

html { background: var(--inv-background); }

body {
    margin: 0;
    background: var(--inv-background) var(--bt-grain);
    color: var(--inv-text);
    font-family: var(--bt-sans);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }
p { margin: 0 0 .75rem; }
h1, h2, h3 { margin: 0; font-weight: 400; }

.bt-preview {
    position: sticky; top: 0; z-index: 60; padding: .5rem 1rem; text-align: center;
    background: #fff4d6; color: #6b4e00; font-size: .8125rem;
}

/* ================= shared pieces ================= */

.bt-display { font-family: var(--bt-display); font-weight: 400; line-height: 1.15; }
.bt-display span { font-size: .6em; color: var(--bt-seal); }

.bt-kicker {
    margin: 0 0 .35rem;
    font-family: var(--bt-heading); font-size: .74rem; font-weight: 500;
    letter-spacing: .32em; text-transform: uppercase; color: var(--bt-muted);
}

.bt-heading { position: relative; isolation: isolate; margin-bottom: 2rem; text-align: center; }
/* a soft blush wash behind every section title, like watercolour bleeding into the paper */
.bt-heading::before {
    content: ''; position: absolute; z-index: -1; left: 50%; top: 52%; width: min(88%, 300px); height: 96px; translate: -50% -50%;
    border-radius: 48% 52% 46% 54% / 55% 45% 55% 45%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--inv-accent) 42%, transparent), color-mix(in srgb, var(--inv-accent) 14%, transparent) 70%, transparent);
    rotate: -4deg;
}
.bt-title {
    font-family: var(--bt-display); font-size: 2.9rem; line-height: 1.1;
    color: var(--bt-ink);
}
.bt-divider { display: block; width: 170px; height: auto; margin: .5rem auto 0; color: var(--bt-flora); }

.bt-lead { font-size: 1rem; }
.bt-muted { color: var(--bt-muted); font-size: .9rem; }

.bt-empty-photo {
    display: block; width: 100%; height: 100%;
    background:
        radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--inv-accent) 45%, transparent), transparent 60%),
        linear-gradient(160deg, var(--bt-tint-deep), color-mix(in srgb, var(--inv-primary) 35%, var(--inv-background)));
}

/* deckled paper sheet: the paper is a pseudo element with a rough mask on top and bottom,
   the shadow comes from a drop-shadow on the sheet so it follows the rough edge */
.bt-sheet {
    position: relative; isolation: isolate;
    padding: 2.25rem 1.5rem;
    filter: drop-shadow(0 10px 18px var(--bt-shadow)) drop-shadow(0 1px 1px color-mix(in srgb, var(--inv-primary) 12%, transparent));
}
.bt-sheet::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: var(--bt-paper) var(--bt-grain);
    -webkit-mask:
        linear-gradient(#000 0 0) center / 100% calc(100% - 8px) no-repeat,
        radial-gradient(4.5px 3.4px at 50% 100%, #000 96%, #0000) top / 9px 4px repeat-x,
        radial-gradient(3px 4px at 50% 100%, #000 96%, #0000) 3px 0 / 13px 4px repeat-x,
        radial-gradient(4.5px 3.4px at 50% 0, #000 96%, #0000) bottom / 11px 4px repeat-x,
        radial-gradient(3px 4px at 50% 0, #000 96%, #0000) 5px 100% / 7px 4px repeat-x;
    mask:
        linear-gradient(#000 0 0) center / 100% calc(100% - 8px) no-repeat,
        radial-gradient(4.5px 3.4px at 50% 100%, #000 96%, #0000) top / 9px 4px repeat-x,
        radial-gradient(3px 4px at 50% 100%, #000 96%, #0000) 3px 0 / 13px 4px repeat-x,
        radial-gradient(4.5px 3.4px at 50% 0, #000 96%, #0000) bottom / 11px 4px repeat-x,
        radial-gradient(3px 4px at 50% 0, #000 96%, #0000) 5px 100% / 7px 4px repeat-x;
}

/* wax seal: an uneven blob of wax with a pressed ring and the monogram */
.bt-seal {
    --s: 70px;
    position: relative; display: grid; place-items: center;
    width: var(--s); height: var(--s); flex: none;
    border-radius: 47% 53% 51% 49% / 52% 47% 53% 48%;
    background: radial-gradient(circle at 34% 28%,
        color-mix(in srgb, var(--bt-seal) 55%, #fff) 0,
        var(--bt-seal) 36%,
        color-mix(in srgb, var(--bt-seal) 72%, #000) 100%);
    box-shadow:
        calc(var(--s) * .05) calc(var(--s) * .03) 0 calc(var(--s) * -.02) color-mix(in srgb, var(--bt-seal) 85%, #000),
        calc(var(--s) * -.04) calc(var(--s) * .05) 0 calc(var(--s) * -.025) color-mix(in srgb, var(--bt-seal) 90%, #000),
        calc(var(--s) * -.03) calc(var(--s) * -.045) 0 calc(var(--s) * -.03) var(--bt-seal),
        0 calc(var(--s) * .1) calc(var(--s) * .2) rgb(0 0 0 / .28);
    color: color-mix(in srgb, var(--bt-seal) 30%, #fff);
}
.bt-seal::before {
    content: ''; position: absolute; inset: 15%; border-radius: 50%;
    box-shadow:
        inset 1px 1px 2px rgb(0 0 0 / .4),
        inset -1px -1px 1px rgb(255 255 255 / .22),
        0 0 0 1px rgb(255 255 255 / .12);
    background: radial-gradient(circle at 60% 70%, color-mix(in srgb, var(--bt-seal) 85%, #000), var(--bt-seal) 70%);
}
.bt-seal::after {
    content: ''; position: absolute; inset: 21%; border-radius: 50%;
    border: 1px dotted color-mix(in srgb, var(--bt-seal) 35%, #fff);
    opacity: .55;
}
.bt-seal__mono {
    position: relative; z-index: 1;
    font-family: var(--bt-heading); font-size: calc(var(--s) * .26); font-weight: 500; letter-spacing: .02em;
    line-height: 1; white-space: nowrap;
    text-shadow: -1px -1px 0 rgb(0 0 0 / .3), 1px 1px 0 rgb(255 255 255 / .18);
}
.bt-seal__mono i { margin: 0 .08em; font-family: var(--bt-display); font-style: normal; font-size: .8em; }
.bt-seal--lg { --s: 104px; }

/* line-art botanicals; stroke drawing ("bloom") only when motion is allowed */
.bt-bloom { display: block; color: var(--bt-flora); overflow: visible; pointer-events: none; }
html.inv-anim .bt-bloom :is(path, ellipse) {
    stroke-dasharray: 1 1; stroke-dashoffset: 1;
    transition: stroke-dashoffset 2.6s cubic-bezier(.45, .05, .25, 1) var(--bloom-delay, .25s);
}
html.inv-anim .bt-bloom :is(path, ellipse):nth-child(3n + 2) { transition-delay: calc(var(--bloom-delay, .25s) + .35s); }
html.inv-anim .bt-bloom :is(path, ellipse):nth-child(3n) { transition-delay: calc(var(--bloom-delay, .25s) + .7s); }
html.inv-anim .is-revealed .bt-bloom :is(path, ellipse),
html.inv-anim .bt-bloom.is-revealed :is(path, ellipse),
html.inv-opened.inv-anim .bt-intro .bt-bloom :is(path, ellipse),
html.inv-opened.inv-anim .bt-aside .bt-bloom :is(path, ellipse),
html.inv-opened.inv-anim .bt-flora .bt-bloom :is(path, ellipse) { stroke-dashoffset: 0; }
@keyframes bt-draw { to { stroke-dashoffset: 0; } }

/* real painted botanicals (_art): a soft shadow lifts them off the paper; a slow sway when motion is allowed */
.bt-art { display: block; height: auto; max-width: none; pointer-events: none; user-select: none; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .16)); }
@keyframes bt-sway { from { rotate: var(--bt-tilt, 0deg); } to { rotate: calc(var(--bt-tilt, 0deg) + 2.2deg); } }
html.inv-anim .bt-art { animation: bt-sway 6.5s ease-in-out infinite alternate; }
html.inv-anim .bt-cover .bt-bloom :is(path, ellipse) { animation: bt-draw 3s cubic-bezier(.45, .05, .25, 1) var(--bloom-delay, .3s) forwards; }

.bt-icon-link {
    display: inline-flex; align-items: center; gap: .4rem; margin-top: .35rem; padding: .35rem .85rem;
    border: 1px solid var(--bt-line); border-radius: 999px;
    color: var(--bt-ink); font-size: .78rem; text-decoration: none; letter-spacing: .03em;
    transition: background-color .3s ease, color .3s ease;
}
.bt-icon-link:hover { background: var(--bt-ink); color: var(--bt-paper); }

/* buttons of the shared components */
.inv-button {
    padding: .8rem 1.5rem; border-radius: 999px;
    background: var(--bt-ink); color: var(--bt-paper);
    font-family: var(--bt-sans); font-weight: 600; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
    transition: transform .3s ease, box-shadow .3s ease, background-color .3s ease;
}
.inv-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px var(--bt-shadow); }
.inv-button--outline { background: transparent; color: var(--bt-ink); box-shadow: inset 0 0 0 1px var(--bt-line); }
.inv-button--outline:hover { background: color-mix(in srgb, var(--inv-primary) 8%, transparent); }

/* ================= wide-screen frame (hidden on phones) ================= */

.bt-aside, .bt-flora { display: none; }

/* ================= cover ================= */

.bt-cover {
    position: fixed; inset: 0; z-index: 30; overflow: hidden auto;
    display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
    background: var(--inv-primary);
    transition: opacity 1.5s cubic-bezier(.75, 0, .9, .35);
}
.bt-cover--gone { opacity: 0; }
.bt-cover__photo {
    position: fixed; inset: 0; z-index: -1;
    background-color: var(--inv-primary);
    background-image:
        linear-gradient(to bottom, rgb(0 0 0 / .3), transparent 32%),
        var(--bt-photo, linear-gradient(160deg, var(--bt-tint-deep), var(--inv-primary)));
    background-size: cover; background-position: center 30%;
    filter: saturate(1.1) contrast(1.05);
    transition: transform 1.8s cubic-bezier(.2, .7, .2, 1);
}
.bt-cover--leave .bt-cover__photo { transform: scale(1.08); }
/* the one opening moment: the photo fades in while settling from a slight zoom */
@keyframes bt-photo-in { from { opacity: 0; scale: 1.08; } to { opacity: 1; scale: 1; } }
html.inv-anim .bt-cover__photo { animation: bt-photo-in 2.2s cubic-bezier(.2, .7, .2, 1) both; }

/* die-cut arch outline on the photo */
.bt-cover__window {
    position: fixed; top: max(1.25rem, env(safe-area-inset-top)); left: 50%; z-index: -1;
    width: min(76vw, 340px); height: 58vh; translate: -50% 0;
    border: 1.5px solid rgb(255 255 255 / .85); border-radius: 999px 999px 0 0; border-bottom: 0;
    box-shadow: inset 0 0 0 6px transparent, inset 0 0 0 7px rgb(255 255 255 / .45), 0 0 24px rgb(0 0 0 / .12);
}

/* vellum envelope: frosted, translucent paper with an arched die-cut top */
.bt-envelope {
    position: relative; width: 100%; max-width: 520px; margin-top: 34vh;
    padding: 4.75rem 1.75rem calc(2.5rem + env(safe-area-inset-bottom));
    text-align: center; color: var(--inv-text);
    transition: transform 1.15s cubic-bezier(.7, 0, .3, 1);
}
.bt-vellum {
    position: absolute; inset: 0; z-index: -1;
    border-radius: 50% 50% 0 0 / 88px 88px 0 0;
    background:
        radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent 70%),
        linear-gradient(to bottom, color-mix(in srgb, var(--inv-background) 76%, transparent), color-mix(in srgb, var(--inv-background) 94%, transparent) 50%),
        var(--bt-grain);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    backdrop-filter: blur(14px) saturate(1.1);
    box-shadow: 0 -12px 40px rgb(0 0 0 / .18), inset 0 1px 0 rgb(255 255 255 / .6);
}
/* a pressed line following the arch, like a die-cut fold */
.bt-vellum::before {
    content: ''; position: absolute; inset: 12px 12px auto; height: 140px;
    border: 1px solid color-mix(in srgb, var(--inv-primary) 45%, transparent); border-bottom: 0;
    border-radius: 50% 50% 0 0 / 78px 78px 0 0;
    -webkit-mask: linear-gradient(#000 40%, transparent);
    mask: linear-gradient(#000 40%, transparent);
}
.bt-cover__seal { position: absolute; top: 0; left: 50%; translate: -50% -42%; --s: 78px; transition: transform .7s cubic-bezier(.5, 0, .3, 1), opacity .5s ease; }
.bt-cover__corner { position: absolute; width: 132px; height: auto; top: 52px; color: var(--bt-flora); opacity: .9; }
.bt-cover__corner--l { left: -8px; }
.bt-cover__corner--r { right: -8px; transform: scaleX(-1); }
/* painted eucalyptus hanging from the top corner over the photo; a peony resting on the vellum's shoulder */
.bt-cover__euc {
    position: fixed; z-index: -1; top: -14px; left: -26px; width: min(46vw, 210px);
    transform-origin: 10% 0; --bt-tilt: -4deg; rotate: -4deg;
    filter: drop-shadow(0 8px 14px rgb(0 0 0 / .28)) saturate(1.1);
}
.bt-cover__peony {
    position: absolute; z-index: 2; top: -88px; left: -4px; width: 118px;
    transform-origin: 50% 90%; --bt-tilt: -14deg; rotate: -14deg;
    filter: drop-shadow(0 10px 14px rgb(0 0 0 / .22));
    -webkit-mask: linear-gradient(#000 58%, transparent 86%); mask: linear-gradient(#000 58%, transparent 86%);
}
html.inv-anim .bt-cover__peony { animation: bt-art-in 1.4s .5s cubic-bezier(.2, .8, .2, 1) both, bt-sway 6.5s 1.9s ease-in-out infinite alternate; }
html.inv-anim .bt-cover__euc { animation: bt-art-in 1.6s .2s cubic-bezier(.2, .8, .2, 1) both, bt-sway 7s 1.8s ease-in-out infinite alternate; }
@keyframes bt-art-in { from { opacity: 0; translate: 0 -10px; } to { opacity: 1; translate: 0 0; } }

.bt-envelope__inner { position: relative; max-width: 380px; margin: 0 auto; }
.bt-envelope__inner .bt-kicker { color: var(--bt-ink); font-weight: 600; }
.bt-cover__names { margin: .2rem 0 .5rem; font-size: 3.5rem; color: var(--bt-ink); text-shadow: 0 1px 0 rgb(255 255 255 / .6); }
.bt-cover__date { margin: 0 0 1.6rem; font-family: var(--bt-heading); font-size: 1.02rem; font-weight: 600; letter-spacing: .12em; color: var(--inv-text); }
.bt-cover__guest { margin: 0 auto 1.4rem; padding: .9rem 0 0; border-top: 1px solid var(--bt-line); max-width: 300px; }
.bt-cover__guest p { margin: 0 0 .15rem; font-size: .74rem; letter-spacing: .06em; color: var(--bt-muted); }
.bt-cover__guest-name { display: block; font-family: var(--bt-heading); font-size: 1.45rem; font-weight: 500; color: var(--bt-ink); }
.bt-open { padding-inline: 1.75rem; }

/* opening: the seal lifts first, then the vellum slides down and the cover fades */
.bt-cover--leave .bt-cover__seal { transform: translateY(-30px) rotate(-14deg) scale(1.1); opacity: 0; }
.bt-cover--leave .bt-envelope { transform: translateY(105%); transition-delay: .2s; }

/* ================= page column + intro ================= */

.bt-page { position: relative; max-width: var(--bt-column); margin: 0 auto; overflow: hidden; }

/* the first screen after opening: a full-bleed photo, a paper mist from the bottom, the names over it */
.bt-intro { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 100svh; overflow: hidden; text-align: center; }
.bt-intro__photo { position: absolute; inset: -48px 0; z-index: -2; --inv-parallax: 40px; }
.bt-intro__photo img, .bt-intro__photo .bt-empty-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.bt-intro__mist {
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, transparent 34%, color-mix(in srgb, var(--inv-background) 45%, transparent) 50%, color-mix(in srgb, var(--inv-background) 88%, transparent) 66%, var(--inv-background) 88%);
}
.bt-intro__text { position: relative; width: 100%; display: grid; justify-items: center; gap: .3rem; padding: 0 1.5rem 2.4rem; }
.bt-intro .bt-kicker { margin: .6rem 0 0; color: var(--inv-text); }
.bt-intro .bt-seal { margin-bottom: .2rem; }
.bt-intro__sprig { position: absolute; z-index: 2; color: var(--bt-flora); }
.bt-intro__sprig--l { width: 78px; left: -14px; top: -1.5rem; rotate: -12deg; }
.bt-intro__sprig--r { width: 130px; right: -40px; top: -2.5rem; rotate: -64deg; }
.bt-intro__names { margin: 0; font-size: clamp(2.8rem, 12vw, 3.4rem); color: var(--bt-ink); }
.bt-intro__date { margin: 0; font-family: var(--bt-heading); font-size: 1rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.bt-intro__countdown { margin-top: .7rem; }
.bt-intro__countdown .inv-countdown { gap: .45rem; }
.bt-intro__countdown .inv-countdown__item {
    width: 3.9rem; flex: none; padding: .55rem .1rem .45rem; border-radius: 999px 999px 10px 10px;
    background: color-mix(in srgb, var(--bt-paper) 88%, transparent);
    box-shadow: inset 0 0 0 1px var(--bt-line), 0 10px 20px -14px var(--bt-shadow);
}
.bt-intro__countdown .inv-countdown__value { font-family: var(--bt-heading); font-size: 1.4rem; font-weight: 600; color: var(--bt-seal); }
.bt-intro__countdown .inv-countdown__label { font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bt-muted); }
.bt-intro__quote { max-width: 30ch; margin: .8rem 0 0; font-family: var(--bt-heading); font-style: italic; font-size: 1rem; color: var(--bt-muted); }
/* the text comes into focus once the cover is gone (opacity/transform only) */
html.inv-anim .bt-intro__text > :not(.bt-bloom) { opacity: 0; transform: translateY(16px); transition: opacity .9s ease, transform 1s cubic-bezier(.2, .8, .2, 1); }
html.inv-anim .bt-intro.is-open .bt-intro__text > :not(.bt-bloom) { opacity: 1; transform: none; }
html.inv-anim .bt-intro.is-open .bt-intro__text > :nth-child(n+5) { transition-delay: .2s; }
html.inv-anim .bt-intro.is-open .bt-intro__text > :nth-child(n+6) { transition-delay: .4s; }

/* ================= sections ================= */

.bt-section { position: relative; padding: 3.25rem 1.5rem; text-align: center; }

/* opening */
.bt-opening { padding-top: 2.5rem; isolation: isolate; }
/* the photo behind the letter: soft and slightly blurred, under a mist of the paper color that is thickest at the
   top (seamless with the intro above) and lets the photo show most at the sides and low behind the quote */
.bt-opening__bg {
    position: absolute; inset: 0; z-index: -3; overflow: hidden; pointer-events: none;
    background:
        radial-gradient(120% 60% at 15% 70%, color-mix(in srgb, var(--inv-accent) 42%, transparent), transparent 70%),
        radial-gradient(90% 50% at 90% 35%, color-mix(in srgb, var(--inv-primary) 16%, transparent), transparent 70%),
        var(--bt-tint);
}
.bt-opening__bg img {
    position: absolute; left: 0; top: -40px; width: 100%; height: calc(100% + 80px); max-width: none;
    object-fit: cover; object-position: 50% 35%; opacity: .5; filter: blur(1.5px) saturate(.85); --inv-parallax: 30px;
}
.bt-opening__bg::after {
    content: ''; position: absolute; inset: 0;
    background:
        linear-gradient(180deg, var(--inv-background) 0, color-mix(in srgb, var(--inv-background) 55%, transparent) 16%, color-mix(in srgb, var(--inv-background) 30%, transparent) 60%, color-mix(in srgb, var(--inv-background) 55%, transparent) 88%, var(--inv-background) 100%),
        radial-gradient(70% 45% at 50% 30%, color-mix(in srgb, var(--inv-background) 50%, transparent), transparent 80%);
}
.bt-opening__letter { padding: 3rem 1.6rem 2.5rem; rotate: .8deg; }
.bt-opening__letter::after {
    /* a second sheet tucked behind */
    content: ''; position: absolute; inset: 10px -6px -8px 8px; z-index: -2;
    background: var(--bt-tint); rotate: -3deg; border-radius: 2px;
}
.bt-opening__peony {
    position: absolute; z-index: 2; width: 92px; top: -46px; right: -14px; transform-origin: 50% 80%; --bt-tilt: 12deg; rotate: 12deg;
    -webkit-mask: linear-gradient(#000 55%, transparent 84%); mask: linear-gradient(#000 55%, transparent 84%);
}
.bt-arabic { margin-bottom: 1rem; font-family: 'Amiri', serif; font-size: 1.6rem; line-height: 1.8; color: var(--bt-ink); }
.bt-opening__greeting { font-family: var(--bt-heading); font-size: 1.15rem; font-style: italic; color: var(--bt-ink); }
.bt-quote {
    position: relative; margin: -.75rem .75rem 0; padding: 2.75rem 1.5rem 1.75rem; rotate: -1.4deg;
    border-radius: 4px;
    background: color-mix(in srgb, var(--inv-accent) 22%, transparent);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .5), 0 10px 26px -18px var(--bt-shadow);
}
.bt-quote__sprig { position: absolute; width: 130px; top: -24px; left: 50%; translate: -50% 0; }
.bt-quote blockquote { margin: 0; font-family: var(--bt-heading); font-style: italic; font-size: 1.12rem; line-height: 1.6; color: var(--inv-text); }
.bt-quote figcaption { margin-top: .75rem; font-size: .72rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--bt-ink); }

/* couple */
.bt-person { position: relative; display: flex; flex-direction: column; align-items: center; }
.bt-person__frame { position: relative; width: 236px; aspect-ratio: 4 / 5; }
.bt-person__frame::before {
    content: ''; position: absolute; inset: -10px; border: 1px solid var(--bt-line);
    border-radius: var(--bt-pebble-b); rotate: -6deg;
}
.bt-person__photo { width: 100%; height: 100%; object-fit: cover; border-radius: var(--bt-pebble-a); box-shadow: 0 18px 34px -20px var(--bt-shadow); }
.bt-person__sprig { position: absolute; z-index: 3; width: 92px; bottom: 6px; left: -44px; rotate: -16deg; }
.bt-person--bride .bt-person__frame::before { rotate: 7deg; border-radius: var(--bt-pebble-c); }
.bt-person--bride .bt-person__photo { border-radius: var(--bt-pebble-b); }
.bt-person--bride .bt-person__sprig { left: auto; right: -44px; rotate: 16deg; transform: scaleX(-1); }

.bt-person__card {
    position: relative; z-index: 2; width: min(100%, 330px); margin-top: -2.75rem; padding: 1.5rem 1.25rem 1.4rem;
    border-radius: 6px; background: var(--bt-paper) var(--bt-grain);
    box-shadow: 0 14px 30px -18px var(--bt-shadow), 0 1px 2px color-mix(in srgb, var(--inv-primary) 10%, transparent);
    rotate: -1.5deg;
}
.bt-person--bride .bt-person__card { rotate: 1.5deg; }
.bt-person__nickname { margin: 0; font-size: 2.6rem; color: var(--bt-ink); }
.bt-person__name { margin: .1rem 0 .55rem; font-family: var(--bt-heading); font-size: 1.22rem; font-weight: 500; letter-spacing: .03em; }
.bt-person__parents { margin: 0; font-size: .86rem; color: var(--bt-muted); }
.bt-person__parents strong { font-weight: 600; color: var(--inv-text); }
.bt-couple__amp { margin: 1.25rem 0; font-size: 4rem; color: var(--bt-seal); line-height: 1; }

/* countdown */
.bt-countdown { padding: 0; color: var(--bt-cream); }
.bt-wave { display: block; width: 100%; height: 28px; color: var(--inv-primary); }
.bt-wave--top { margin-bottom: -1px; }
.bt-wave--bottom { margin-top: -1px; }
.bt-countdown__body { position: relative; isolation: isolate; overflow: hidden; padding: 2.5rem 1.5rem 3rem; background: var(--inv-primary); }
/* the photo under a deep gradient of the primary color, with a soft blush glow at the top */
.bt-countdown__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bt-countdown__bg img { position: absolute; left: 0; top: -40px; width: 100%; height: calc(100% + 80px); max-width: none; object-fit: cover; object-position: center 40%; --inv-parallax: 30px; }
.bt-countdown__bg::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(70% 40% at 50% 0%, color-mix(in srgb, var(--inv-accent) 26%, transparent), transparent 72%),
        linear-gradient(180deg, var(--inv-primary) 0%, color-mix(in srgb, var(--inv-primary) 78%, transparent) 30%, color-mix(in srgb, var(--bt-deep) 84%, transparent) 70%, var(--inv-primary) 100%);
}
.bt-countdown__sprig { width: 140px; margin: 0 auto .75rem; color: color-mix(in srgb, var(--inv-accent) 70%, #fff); }
.bt-countdown .bt-kicker { color: color-mix(in srgb, var(--inv-accent) 55%, #fff); }
.bt-countdown .bt-title { color: #fff; text-shadow: 0 2px 14px rgb(0 0 0 / .3); }
.bt-countdown__date { margin: .4rem 0 1.75rem; font-family: var(--bt-heading); font-size: 1.35rem; font-weight: 500; letter-spacing: .3em; color: var(--bt-cream); }
.bt-countdown .inv-countdown { gap: .6rem; }
.bt-countdown .inv-countdown__item {
    min-width: 0; width: 4.4rem; padding: 1.1rem .25rem .7rem;
    border-radius: 999px 999px 10px 10px; background: var(--bt-paper);
    box-shadow: inset 0 0 0 1px var(--bt-line), 0 10px 20px -14px var(--bt-shadow);
}
.bt-countdown .inv-countdown__value { font-family: var(--bt-heading); font-size: 1.9rem; font-weight: 500; color: var(--bt-ink); }
.bt-countdown .inv-countdown__label { margin-top: .1rem; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; opacity: 1; color: var(--bt-muted); }
.bt-countdown .inv-countdown__actions { margin-top: 1.5rem; }
.bt-countdown .inv-countdown__actions .inv-button { background: var(--bt-paper); color: var(--bt-ink); box-shadow: 0 8px 18px -8px rgb(0 0 0 / .4); }

/* events: the couple's photo under a paper veil; rounded cards with a coloured header band */
.bt-events {
    background:
        linear-gradient(180deg, var(--inv-background) 0, color-mix(in srgb, var(--inv-background) 80%, transparent) 12%, color-mix(in srgb, var(--inv-background) 74%, transparent) 50%, color-mix(in srgb, var(--inv-background) 80%, transparent) 88%, var(--inv-background) 100%),
        var(--bt-photo, none) center 30% / cover no-repeat;
}
.bt-event {
    position: relative; max-width: 380px; margin: 0 auto 2rem; overflow: hidden; border-radius: 2.4rem;
    background: color-mix(in srgb, var(--bt-paper) 94%, transparent);
    box-shadow: 0 22px 44px -24px var(--bt-shadow), inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 10%, transparent);
}
.bt-event:last-child { margin-bottom: 0; }
.bt-event__band {
    padding: 1.1rem 1rem 2.9rem;
    background: linear-gradient(140deg, var(--inv-primary), color-mix(in srgb, var(--inv-primary) 70%, var(--bt-seal)));
}
.bt-event__name { margin: 0; word-spacing: .15em; font-size: 2.5rem; color: color-mix(in srgb, var(--inv-background) 85%, #fff); }
.bt-event__body { position: relative; z-index: 1; display: grid; justify-items: center; padding: 0 1.25rem 1.6rem; }
.bt-event__pebble {
    width: 8.5rem; aspect-ratio: 1; margin: -2.4rem 0 .9rem; padding: 5px; border-radius: var(--bt-pebble-a);
    background: var(--bt-paper); box-shadow: 0 12px 24px -14px var(--bt-shadow);
}
.bt-event:nth-child(odd) .bt-event__pebble { border-radius: var(--bt-pebble-b); }
.bt-event__pebble img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.bt-event__time { margin: 0; font-family: var(--bt-heading); font-size: 1.2rem; font-weight: 600; letter-spacing: .03em; color: var(--bt-seal); }
.bt-event__date { margin: .1rem 0 0; font-family: var(--bt-heading); font-size: 1.08rem; font-weight: 500; }
.bt-event .bt-divider { width: 120px; margin: .8rem auto; }
.bt-event__venue { margin: 0 0 .25rem; font-family: var(--bt-heading); font-size: 1.15rem; font-weight: 700; color: var(--bt-ink); letter-spacing: .02em; }
.bt-event__address { font-size: .88rem; color: var(--bt-muted); }
.bt-event__dress { display: inline-block; margin: .1rem 0 1rem; padding: .3rem .9rem; border-radius: 999px; border: 1px dashed var(--bt-line); font-size: .8rem; }
.bt-event__dress span { font-weight: 600; letter-spacing: .1em; text-transform: uppercase; font-size: .66rem; margin-right: .3rem; color: var(--bt-ink); }
.bt-event .inv-maps { margin-top: .35rem; }
/* the band unrolls from the top when the card comes in */
html.inv-anim .bt-event__band { clip-path: inset(0 0 100% 0); transition: clip-path .9s .2s cubic-bezier(.2, .8, .2, 1); }
html.inv-anim .bt-event.is-revealed .bt-event__band { clip-path: inset(0 0 0 0); }

/* love story: a compact zig-zag on a thin stem, numbered circles on the line */
.bt-chapters { position: relative; margin: 0; padding: .3rem 0; list-style: none; display: grid; gap: 1.9rem; }
.bt-chapters::before {
    content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; margin-left: -.5px;
    background: linear-gradient(to bottom, transparent, var(--bt-flora) 6%, var(--bt-flora) 94%, transparent); opacity: .55;
}
.bt-chapter { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 1.9rem minmax(0, 1fr); column-gap: .5rem; align-items: start; }
.bt-chapter__text { grid-column: 1; grid-row: 1; text-align: right; }
.bt-chapter__num { grid-column: 2; grid-row: 1; }
.bt-chapter__side { grid-column: 3; grid-row: 1; display: grid; justify-items: start; gap: .45rem; text-align: left; }
.bt-chapter--flip .bt-chapter__text { grid-column: 3; text-align: left; }
.bt-chapter--flip .bt-chapter__side { grid-column: 1; justify-items: end; text-align: right; }
.bt-chapter__num {
    display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; justify-self: center;
    background: var(--inv-background); color: var(--bt-ink); box-shadow: inset 0 0 0 1px var(--bt-flora), 0 0 0 4px var(--inv-background);
    font: 600 .68rem/1 var(--bt-sans); letter-spacing: .04em;
}
.bt-chapter h3 { margin: 0; font-family: var(--bt-heading); font-size: 1.2rem; font-weight: 600; line-height: 1.2; color: var(--bt-ink); overflow-wrap: anywhere; }
.bt-chapter__rule { display: block; width: 3rem; margin: .4rem 0 .45rem auto; border-top: 1px dotted var(--bt-seal); }
.bt-chapter--flip .bt-chapter__rule { margin-left: 0; margin-right: auto; }
.bt-chapter p { margin: 0; font-size: .85rem; line-height: 1.5; color: var(--bt-muted); overflow-wrap: anywhere; }
.bt-chapter__date { display: block; font-size: 1.55rem; line-height: 1.1; color: var(--bt-seal); overflow-wrap: anywhere; }
.bt-chapter__photo {
    display: block; width: min(calc(100% - 10px), 6.5rem); aspect-ratio: 1; object-fit: cover; margin: 0 5px; border-radius: var(--bt-pebble-a);
    box-shadow: 0 0 0 4px var(--bt-paper), 0 0 0 5px var(--bt-line), 0 12px 22px -14px var(--bt-shadow);
}
.bt-chapter--flip .bt-chapter__photo { border-radius: var(--bt-pebble-c); }

/* gallery: the shared slider, pebble thumbs and an arched stage */
.bt-gallery .inv-gallery-slider { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.bt-gallery .inv-gallery-slider__thumb { width: 3.8rem; aspect-ratio: 1; border-radius: var(--bt-pebble-a); border-width: 2px; }
.bt-gallery .inv-gallery-slider__thumb:nth-child(even) { border-radius: var(--bt-pebble-c); }
.bt-gallery .inv-gallery-slider__thumb.is-active { border-color: var(--inv-primary); }
.bt-gallery .inv-gallery-slider__arrow { background: var(--bt-paper); color: var(--bt-ink); box-shadow: inset 0 0 0 1px var(--bt-line); }
.bt-gallery .inv-gallery-slider__stage { border-radius: 50% 50% 14px 14px / 24% 24% 14px 14px; box-shadow: 0 0 0 6px var(--bt-paper), 0 0 0 7px var(--bt-line), 0 24px 44px -24px var(--bt-shadow); margin: 7px; }
.bt-gallery .inv-gallery-slider__count { background: color-mix(in srgb, var(--inv-primary) 85%, transparent); font-family: var(--bt-sans); }

/* live streaming */
.bt-stream__card { max-width: 380px; margin: 0 auto; rotate: -.8deg; }
.bt-stream__icon { display: block; margin: 0 auto .5rem; color: var(--bt-seal); }
.bt-stream .bt-title { margin-bottom: .75rem; }

/* a painted eucalyptus branch hanging into the gift heading from the left edge */
.bt-gift__euc { position: absolute; z-index: 1; width: 88px; top: -3.4rem; left: -2.6rem; transform-origin: 15% 0; --bt-tilt: -6deg; rotate: -6deg; }

/* gift: small letterpress cards, two per row (the last one full width when the count is odd); the address below */
.bt-gift .inv-gift { display: grid; gap: 1rem; margin-top: 1.5rem; }
.bt-gift .inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.bt-gift .inv-gift__accounts .inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.bt-gift .inv-gift__account {
    position: relative; overflow: hidden; min-width: 0; margin: 0; padding: 1.6rem 1.25rem 1.4rem;
    border-radius: 8px; background: var(--bt-paper) var(--bt-grain);
    box-shadow: 0 14px 28px -18px var(--bt-shadow), inset 0 0 0 7px var(--bt-paper), inset 0 0 0 8px color-mix(in srgb, var(--inv-primary) 16%, transparent);
}
.bt-gift .inv-gift__accounts .inv-gift__account {
    padding: .95rem .8rem .85rem;
    box-shadow: 0 12px 22px -16px var(--bt-shadow), inset 0 0 0 4px var(--bt-paper), inset 0 0 0 5px color-mix(in srgb, var(--inv-primary) 16%, transparent);
}
.bt-gift .inv-gift__accounts .inv-gift__account:nth-child(odd) { rotate: -.6deg; }
.bt-gift .inv-gift__accounts .inv-gift__account:nth-child(even) { rotate: .6deg; }
.bt-gift .inv-gift__address { rotate: -.6deg; }
.bt-gift .inv-gift__account::after {
    /* small wax dot in the corner */
    content: ''; position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; border-radius: 48% 52% 50% 50%;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--bt-seal) 55%, #fff), var(--bt-seal) 45%, color-mix(in srgb, var(--bt-seal) 70%, #000));
    box-shadow: 0 2px 4px rgb(0 0 0 / .2);
}
.bt-gift .inv-gift__accounts .inv-gift__account::after { top: 10px; right: 10px; width: 14px; height: 14px; }
.bt-gift .inv-gift__bank { margin: 0 0 .35rem; font-size: .7rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--bt-ink); }
.bt-gift .inv-gift__accounts .inv-gift__bank { min-height: 1.5rem; margin: 0 1rem .4rem 0; font-size: .62rem; letter-spacing: .14em; overflow-wrap: anywhere; }
.bt-gift .inv-gift__accounts .inv-gift__logo { height: 1.5rem; padding: .2rem .4rem; border-radius: .35rem; }
.bt-gift .inv-gift__accounts .inv-gift__logo img { max-width: 4rem; }
.bt-gift .inv-gift__number {
    margin: 0; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 1rem; font-weight: 500; line-height: 1.3; letter-spacing: .03em; color: var(--inv-text); overflow-wrap: anywhere;
}
.bt-gift .inv-gift__holder { margin: .2rem 0 .6rem; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bt-muted); overflow-wrap: anywhere; }
.bt-gift .inv-gift__accounts .inv-button { padding: .35rem .7rem; font-size: .62rem; letter-spacing: .1em; }
.bt-gift .inv-gift__address .inv-gift__holder { margin-bottom: .2rem; font-size: .86rem; letter-spacing: normal; text-transform: none; }

/* rsvp + wishes panels */
.bt-panel { margin-top: 1.25rem; padding: 2rem 1.35rem; text-align: left; }
.bt-panel::after {
    content: ''; position: absolute; inset: 12px -6px -10px 6px; z-index: -2;
    background: var(--bt-tint); rotate: 2deg; border-radius: 2px;
}
.bt-wishes .bt-panel::after { rotate: -2deg; inset: 12px 6px -10px -6px; }
.bt-panel .inv-form label, .bt-panel .inv-form__choices legend {
    font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--bt-ink);
}
.bt-panel .inv-form input:not([type=radio]):not([type=checkbox]), .bt-panel .inv-form select, .bt-panel .inv-form textarea {
    padding: .6rem .1rem; border: 0; border-bottom: 1px solid var(--bt-line); border-radius: 0;
    background: transparent; color: var(--inv-text); font-family: var(--bt-sans); font-size: .95rem; letter-spacing: normal; text-transform: none;
}
.bt-panel .inv-form :is(input, select, textarea):focus { outline: none; border-bottom-color: var(--bt-ink); }
.bt-panel .inv-form__choices label {
    padding: .4rem .85rem; border: 1px solid var(--bt-line); border-radius: 999px;
    font-size: .8rem; font-weight: 400; letter-spacing: .02em; text-transform: none; color: var(--inv-text);
}
.bt-panel .inv-form__choices label:has(input:checked) { background: var(--bt-tint); border-color: var(--bt-ink); }
.bt-panel .inv-form .inv-button { justify-self: center; margin-top: .5rem; }
.bt-panel .inv-form__notice { background: var(--bt-tint); }
.bt-panel .inv-rsvp__deadline { font-size: .82rem; color: var(--bt-muted); text-align: center; }

.bt-panel .inv-wishes { --inv-wishes-height: 20rem; }
.bt-panel .inv-wishes__list { gap: .6rem; margin-top: 1.5rem; padding: 0 .25rem .25rem 0; scrollbar-color: var(--bt-line) transparent; }
.bt-panel .inv-wish {
    position: relative; padding: .65rem .8rem .6rem .9rem; border-radius: 4px 14px 14px 4px;
    background: color-mix(in srgb, var(--inv-accent) 14%, var(--bt-paper));
    border-left: 2px solid var(--bt-seal);
}
.bt-panel .inv-wish__name { font-family: var(--bt-heading); font-size: .98rem; font-weight: 600; color: var(--bt-ink); }
.bt-panel .inv-wish__message { font-size: .88rem; line-height: 1.45; }
.bt-panel .inv-wish__time { font-size: .7rem; }

/* closing (dark): the photo fades into the primary color under the die-cut arch line; painted botanicals
   frame the thank-you; without a photo a color gradient with a blush glow */
.bt-closing {
    position: relative; isolation: isolate; overflow: hidden; margin-top: 2rem; padding: 0 1.5rem 2.5rem;
    background: var(--inv-primary); color: var(--bt-cream);
}
.bt-closing__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bt-closing__bg img { position: absolute; left: 0; top: -40px; width: 100%; height: min(78%, 560px); max-width: none; object-fit: cover; object-position: center 30%; --inv-parallax: 28px; }
.bt-closing__bg::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(80% 30% at 50% 0%, color-mix(in srgb, var(--inv-accent) 30%, transparent), transparent 70%),
        linear-gradient(180deg, color-mix(in srgb, var(--inv-background) 18%, transparent) 0%, transparent 14%, color-mix(in srgb, var(--inv-primary) 30%, transparent) 30%, color-mix(in srgb, var(--inv-primary) 88%, transparent) 50%, var(--inv-primary) 62%, var(--bt-deep) 100%);
}
/* the die-cut arch outline from the cover, standing over the photo */
.bt-closing__window {
    display: block; width: min(76%, 320px); height: 260px; margin: 2.75rem auto 0;
    border: 1.5px solid rgb(255 255 255 / .8); border-bottom: 0; border-radius: 999px 999px 0 0;
    box-shadow: inset 0 0 0 6px transparent, inset 0 0 0 7px rgb(255 255 255 / .4);
    -webkit-mask: linear-gradient(#000 55%, transparent); mask: linear-gradient(#000 55%, transparent);
}
.bt-closing:not(:has(.bt-closing__bg img)) .bt-closing__window { height: 120px; }
.bt-closing__card { position: relative; width: min(100%, 380px); margin: -5.5rem auto 0; padding: 2.5rem 1rem 3.6rem; }
/* a paper wave on the top edge, so the dark photo section starts softly like the countdown band */
.bt-closing__wave { position: absolute; top: -1px; left: 0; z-index: 1; color: var(--inv-background); }
.bt-closing__peony {
    position: absolute; width: 104px; top: -66px; right: -22px; transform-origin: 50% 80%; --bt-tilt: 14deg; rotate: 14deg;
    filter: drop-shadow(0 10px 16px rgb(0 0 0 / .35));
    -webkit-mask: linear-gradient(#000 56%, transparent 84%); mask: linear-gradient(#000 56%, transparent 84%);
}
/* the smaller peony, mirrored, a little lower on the left */
.bt-closing__peony--l { width: 78px; top: -18px; right: auto; left: -20px; transform: scaleX(-1); --bt-tilt: 10deg; rotate: 10deg; }
.bt-closing__title { margin-bottom: .2rem; font-size: 3.5rem; color: #fff; text-shadow: 0 2px 18px rgb(0 0 0 / .35); }
.bt-closing__divider { color: color-mix(in srgb, var(--inv-accent) 70%, #fff); margin-bottom: 1rem; }
.bt-closing__message { font-size: .95rem; font-weight: 400; color: var(--bt-cream); }
.bt-closing__signature { margin: 1.1rem 0 0; font-size: .7rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: color-mix(in srgb, var(--inv-accent) 55%, #fff); }
.bt-closing__names { margin: .15rem 0 0; font-size: 2.6rem; color: #fff; }
.bt-closing__names span { color: color-mix(in srgb, var(--inv-accent) 75%, #fff); }
.bt-closing__seal { position: absolute; bottom: 0; left: 50%; translate: -50% 0; }

/* a few leaves and petals drift down once when the invitation is opened, then stop */
.bt-drift { display: none; position: fixed; top: 0; left: 50%; z-index: 35; width: min(100vw, var(--bt-column)); height: 100vh; transform: translateX(-50%); overflow: hidden; pointer-events: none; }
html.inv-anim .bt-drift { display: block; }
.bt-drift i {
    position: absolute; top: -30px; left: var(--x); width: 12px; height: 17px; opacity: 0;
    border-radius: 50%; background: linear-gradient(140deg, color-mix(in srgb, var(--bt-c, var(--inv-primary)) 70%, #fff), var(--bt-c, var(--inv-primary)));
    box-shadow: 0 2px 4px rgb(0 0 0 / .15);
}
.bt-drift i:nth-child(even) { --bt-c: var(--inv-accent); width: 14px; height: 16px; border-radius: 80% 0 80% 0; }
.bt-drift.is-go i { animation: bt-fall var(--d) cubic-bezier(.3, .2, .5, 1) var(--delay) forwards; }
.bt-drift i:nth-child(1) { --x: 9%; --d: 4.8s; --delay: .1s; }
.bt-drift i:nth-child(2) { --x: 27%; --d: 5.4s; --delay: .5s; }
.bt-drift i:nth-child(3) { --x: 47%; --d: 4.4s; --delay: .25s; }
.bt-drift i:nth-child(4) { --x: 64%; --d: 5s; --delay: .7s; }
.bt-drift i:nth-child(5) { --x: 80%; --d: 4.9s; --delay: .35s; }
.bt-drift i:nth-child(6) { --x: 92%; --d: 5.6s; --delay: .9s; }
@keyframes bt-fall {
    0% { opacity: 0; transform: translate(0, 0) rotate(0); }
    12% { opacity: .9; }
    85% { opacity: .85; }
    100% { opacity: 0; transform: translate(-40px, 105vh) rotate(300deg); }
}

/* menu and back to top, inside the column */
.inv-nav.bt-nav {
    --inv-nav-bg: color-mix(in srgb, var(--bt-paper) 92%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--inv-text) 75%, transparent);
    --inv-nav-active: var(--inv-primary);
    max-width: min(calc(100vw - 1.5rem), calc(var(--bt-column) - 1.5rem));
    border-color: var(--bt-line); font-family: var(--bt-sans);
}
.inv-to-top.bt-to-top {
    left: max(1rem, calc(50vw - var(--bt-column) / 2 + 1rem)); border-radius: var(--bt-pebble-a);
    background: var(--bt-paper); color: var(--bt-ink); box-shadow: inset 0 0 0 1px var(--bt-line), 0 6px 14px -6px var(--bt-shadow);
}
.bt-page .inv-music, body .inv-music { right: max(1rem, calc(50vw - var(--bt-column) / 2 + 1rem)); }

/* check-in QR, branding, music */
.inv-checkin { background: var(--bt-paper); }
.inv-checkin__title { color: var(--bt-ink); }
.inv-branding { padding-top: 3rem; color: var(--bt-muted); }
.inv-music__button {
    border-radius: 47% 53% 51% 49% / 52% 47% 53% 48%;
    background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--bt-seal) 55%, #fff), var(--bt-seal) 40%, color-mix(in srgb, var(--bt-seal) 72%, #000));
    color: color-mix(in srgb, var(--bt-seal) 25%, #fff);
    box-shadow: 0 6px 14px rgb(0 0 0 / .25), inset 0 0 0 5px color-mix(in srgb, var(--bt-seal) 85%, #000), inset 0 0 0 6px rgb(255 255 255 / .2);
}
.inv-lightbox { background: color-mix(in srgb, var(--inv-primary) 35%, rgb(0 0 0 / .92)); }

/* ================= small phones ================= */

@media (max-width: 370px) {
    .bt-cover__names { font-size: 3rem; }
    .bt-title { font-size: 2.5rem; }
    .bt-countdown .inv-countdown__item { width: 3.9rem; }
    .bt-countdown .inv-countdown__value { font-size: 1.6rem; }
    .bt-cover__corner { width: 110px; }
}

/* short phones: keep the vellum content on screen */
@media (max-height: 700px) {
    .bt-envelope { margin-top: 18vh; padding-top: 4rem; }
    .bt-cover__names { font-size: 3rem; }
    .bt-cover__peony { width: 90px; top: -62px; }
}

/* ================= wide screens ================= */

@media (min-width: 768px) {
    body { background-color: color-mix(in srgb, var(--inv-background) 90%, var(--inv-primary)); }
    .bt-page {
        background: var(--inv-background) var(--bt-grain);
        box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-primary) 8%, transparent), 0 30px 80px -30px var(--bt-shadow);
    }
    .bt-envelope { margin-top: 30vh; padding-inline: 2.5rem; }
    .bt-cover__window { width: 400px; height: 62vh; }
    .bt-cover__corner { width: 160px; }
}

@media (min-width: 1100px) {
    .bt-aside, .bt-flora {
        position: fixed; top: 0; bottom: 0; z-index: 0; display: grid; place-items: center;
        width: calc(50% - var(--bt-column) / 2);
    }
    .bt-aside { left: 0; padding: 2rem; text-align: center; }
    .bt-aside__inner { display: grid; justify-items: center; gap: .25rem; max-width: 320px; }
    .bt-aside__names { margin: 1.25rem 0 .25rem; font-size: 3.6rem; color: var(--bt-ink); }
    .bt-aside__date { margin: 0; font-family: var(--bt-heading); font-size: 1rem; letter-spacing: .2em; text-transform: uppercase; }
    .bt-aside__sprig { width: 180px; margin-top: 1.25rem; }
    .bt-flora { right: 0; overflow: hidden; }
    .bt-flora__a { position: absolute; top: -10px; right: -10px; width: min(360px, 90%); transform: scaleX(-1); opacity: .8; }
    .bt-flora__b { position: absolute; bottom: -20px; left: 12%; width: 150px; opacity: .7; rotate: 12deg; }
    .bt-page { z-index: 1; }
}
@media (min-width: 1100px) and (max-height: 640px) {
    .bt-aside__sprig { display: none; }
}

/* ================= motion ================= */

@media (prefers-reduced-motion: reduce) {
    .bt-cover, .bt-envelope, .bt-cover__photo, .bt-cover__seal { transition: none !important; }
}
