/*
 * Maroon Glam: Hollywood evening glamour.
 * Deep maroon / oxblood sections (.mg-dark) on real satin (img/satin.webp, CC0, laid over the maroon with "screen")
 * alternate with blush ivory ones (.mg-light). Rose gold is a metallic gradient (.mg-metal); black lacquer is the
 * accent (countdown tiles, time pills, bank cards). Satin + pearls + rose gold: satin drapes tied back with pearls,
 * pearl swags and pearl strands (SVG dots: .mg-pearls), a Hollywood-Regency mirror frame around the photos (_mirror),
 * a rose-gold monogram crest with a satin bow (_crest), spotlight glows (.mg-spot), sparkles that twinkle once.
 * Colors from the variant: --inv-primary (maroon), --inv-accent (rose gold), --inv-background (blush ivory),
 * --inv-text, --inv-surface (card ivory), --inv-deep (oxblood), --inv-foil (rose-gold highlight), --inv-blush,
 * --inv-ink (black lacquer). All classes start with "mg-".
 */

:root {
    --inv-primary: #6d1229;
    --inv-accent: #d99a82;
    --inv-background: #fbf0eb;
    --inv-text: #2b0b14;
    --inv-surface: #fffaf7;
    --inv-deep: #33060f;
    --inv-foil: #f9d6c6;
    --inv-blush: #f2d2cb;
    --inv-ink: #150a0d;
    --inv-radius: 14px;

    --mg-w: 460px;
    /* distance from the viewport edge to the column (0 on phones) */
    --mg-edge: max(0px, calc((100vw - var(--mg-w)) / 2));
    --mg-script: 'Imperial Script', 'Pinyon Script', 'Brush Script MT', cursive;
    --mg-display: 'Bodoni Moda', 'Didot', 'Bodoni MT', Georgia, serif;
    --mg-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --mg-rg-deep: color-mix(in srgb, var(--inv-accent) 52%, var(--inv-deep));
    --mg-enamel-hi: color-mix(in srgb, var(--inv-primary) 82%, var(--inv-foil));
    --mg-on-dark: color-mix(in srgb, var(--inv-foil) 22%, #fffaf7);
    --mg-on-dark-soft: color-mix(in srgb, var(--mg-on-dark) 88%, transparent);
    /* rose gold dark enough to read on ivory */
    --mg-ink-rg: color-mix(in srgb, var(--inv-accent) 38%, var(--inv-primary));
    --mg-muted: color-mix(in srgb, var(--inv-text) 82%, transparent);

    /* rose gold for dark grounds: bright, with a highlight band */
    --mg-metal: linear-gradient(100deg, var(--inv-accent) 0%, var(--inv-foil) 22%, color-mix(in srgb, var(--inv-foil) 50%, #fff) 40%, var(--inv-accent) 58%, var(--inv-foil) 78%, var(--inv-accent) 100%);
    /* deep rose gold for ivory grounds: every stop stays dark enough to read */
    --mg-metal-ink: linear-gradient(100deg, var(--inv-primary) 0%, var(--mg-ink-rg) 30%, color-mix(in srgb, var(--inv-accent) 55%, var(--inv-primary)) 50%, var(--inv-primary) 75%, var(--mg-ink-rg) 100%);
    /* polished rose-gold leaf for buttons, rims and tags */
    --mg-leaf: linear-gradient(125deg, var(--inv-foil), var(--inv-accent) 34%, color-mix(in srgb, var(--inv-foil) 70%, #fff) 54%, var(--mg-rg-deep) 86%, var(--inv-accent));
    --mg-lacquer: linear-gradient(160deg, color-mix(in srgb, var(--inv-ink) 82%, var(--inv-primary)) 0%, var(--inv-ink) 55%, color-mix(in srgb, var(--inv-ink) 90%, #fff) 100%);

    --mg-dark-bg: linear-gradient(172deg, color-mix(in srgb, var(--inv-primary) 92%, var(--inv-accent)) 0%, var(--inv-primary) 38%, var(--inv-deep) 100%);
    --mg-line: color-mix(in srgb, var(--inv-accent) 72%, transparent);
    --mg-line-soft: color-mix(in srgb, var(--inv-accent) 36%, transparent);

    /* pearls: a soft blush-white with a shadowed edge */
    --mg-pearl: color-mix(in srgb, var(--inv-foil) 30%, #f8f1ec);
    --mg-pearl-edge: color-mix(in srgb, var(--inv-foil) 45%, #b9a39d);
    /* a horizontal / vertical string of pearls as a CSS background */
    --mg-pearl-dot: radial-gradient(circle at 40% 38%, #fff 0 16%, var(--mg-pearl) 34%, var(--mg-pearl-edge) 62%, transparent 68%);
}

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

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

body.mg-body {
    margin: 0;
    background: var(--inv-deep);
    color: var(--inv-text);
    font: 400 .97rem/1.7 var(--mg-sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

.mg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.mg-icon { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- satin, metal, pearls, spotlight, sparkle ---------- */

.mg-satin {
    display: block; pointer-events: none;
    background-size: cover; background-position: center;
}
/* decorations are children of revealed sections: keep their own opacity and position (no reveal transform) */
.mg-section > .mg-satin, .mg-section > .mg-spot, .mg-section > .mg-bgphoto, .mg-section > .mg-veilphoto,
.mg-section > .mg-drapes {
    position: absolute; z-index: 0;
    opacity: var(--mg-o, 1) !important; transform: none !important; transition: none !important;
}
.mg-dark__satin { inset: 0; mix-blend-mode: screen; --mg-o: .26; }
.mg-light__satin { inset: 0; mix-blend-mode: soft-light; --mg-o: .55; }

/* rose-gold text */
.mg-metal {
    background: var(--mg-metal) 0 0 / 220% 100%;
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}
.mg-light .mg-metal { background-image: var(--mg-metal-ink); }
html.inv-anim .mg-metal { animation: mg-glint 2.6s cubic-bezier(.4, 0, .2, 1) 1s both; }
@keyframes mg-glint { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* pearls drawn as round dots along an SVG path or circle: shadow, pearl, highlight */
.mg-pearls { --pw: 8; --pg: 11.5; }
.mg-pearls > * { fill: none; stroke-linecap: round; stroke-dasharray: 0 var(--pg); }
.mg-pearls__shade { stroke: rgb(0 0 0 / .4); stroke-width: calc(var(--pw) + 1.2); transform: translate(0, calc(var(--pw) * .16px)); }
.mg-pearls__pearl { stroke: var(--mg-pearl-edge); stroke-width: var(--pw); }
.mg-pearls__hi { stroke: var(--mg-pearl); stroke-width: calc(var(--pw) * .72); transform: translate(calc(var(--pw) * -.1px), calc(var(--pw) * -.12px)); }
.mg-pearls--crest { --pw: 7; --pg: 10.47; }
.mg-pearls--tie { --pw: 9; --pg: 12; }
.mg-pearls--swag { --pw: 7.5; --pg: 10.5; }
.mg-pearls--small { --pw: 6.5; --pg: 9.2; }
.mg-mirror .mg-pearls { --pw: 11; --pg: 15.6; }

/* a spotlight from above with a warm glow where it lands */
.mg-spot {
    position: absolute; z-index: 0; top: 0; left: 50%; width: 170%; height: 100%; translate: -50% 0;
    pointer-events: none; mix-blend-mode: screen;
    background:
        radial-gradient(34% 22% at 50% var(--spot-y, 42%), color-mix(in srgb, var(--inv-foil) 42%, transparent), transparent 72%),
        conic-gradient(from 165deg at 50% -4%, transparent 0deg, color-mix(in srgb, var(--inv-foil) 22%, transparent) 10deg, color-mix(in srgb, var(--inv-foil) 22%, transparent) 20deg, transparent 30deg, transparent 360deg);
    filter: blur(10px);
}

/* sparkles that twinkle once (on the cover mirror), then rest as small glints */
.mg-twinkle { opacity: .85; transform-box: fill-box; transform-origin: center; }
html.inv-anim .mg-twinkle { animation: mg-twinkle 1.2s cubic-bezier(.3, .7, .4, 1) var(--tw-delay, 1s) both; }
@keyframes mg-twinkle {
    0% { opacity: 0; transform: scale(.2) rotate(-30deg); }
    45% { opacity: 1; transform: scale(1.25) rotate(15deg); }
    100% { opacity: .85; transform: scale(1) rotate(0); }
}

/* the sparkle when the invitation opens: ten glints flash once across the screen, then stop */
.mg-sparkle { position: fixed; z-index: 40; inset: 0; width: min(100%, var(--mg-w)); margin: 0 auto; overflow: hidden; pointer-events: none; }
.mg-sparkle svg { position: absolute; left: var(--x); top: var(--y); width: var(--s, 18px); height: var(--s, 18px); opacity: 0; overflow: visible; }
.mg-sparkle.is-go svg { animation: mg-flash 1.3s cubic-bezier(.3, .7, .4, 1) var(--d, 0s) both; }
.mg-sparkle svg:nth-child(1) { --x: 12%; --y: 18%; --s: 22px; --d: .1s; }
.mg-sparkle svg:nth-child(2) { --x: 78%; --y: 12%; --s: 16px; --d: .35s; }
.mg-sparkle svg:nth-child(3) { --x: 58%; --y: 30%; --s: 26px; --d: .2s; }
.mg-sparkle svg:nth-child(4) { --x: 24%; --y: 44%; --s: 14px; --d: .6s; }
.mg-sparkle svg:nth-child(5) { --x: 86%; --y: 48%; --s: 20px; --d: .45s; }
.mg-sparkle svg:nth-child(6) { --x: 40%; --y: 62%; --s: 16px; --d: .8s; }
.mg-sparkle svg:nth-child(7) { --x: 8%; --y: 72%; --s: 18px; --d: .55s; }
.mg-sparkle svg:nth-child(8) { --x: 70%; --y: 76%; --s: 24px; --d: .95s; }
.mg-sparkle svg:nth-child(9) { --x: 30%; --y: 88%; --s: 14px; --d: 1.05s; }
.mg-sparkle svg:nth-child(10) { --x: 90%; --y: 86%; --s: 16px; --d: .7s; }
@keyframes mg-flash {
    0% { opacity: 0; transform: scale(.2) rotate(-40deg); }
    40% { opacity: 1; transform: scale(1.2) rotate(10deg); }
    100% { opacity: 0; transform: scale(.4) rotate(40deg); }
}

/* ---------- the mirror, the crest, the drapes, the swag, the divider ---------- */

.mg-mirror { position: relative; }
.mg-mirror__svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 18px 22px rgb(0 0 0 / .45)); }
.mg-mirror__rim { fill: url(#mg-rg); }
.mg-mirror__line { fill: none; stroke: color-mix(in srgb, var(--inv-foil) 80%, transparent); stroke-width: 1.4; }
.mg-mirror__gloss { fill: rgb(255 255 255 / .1); }
.mg-mirror__bow { filter: drop-shadow(0 4px 4px rgb(0 0 0 / .35)); }
.mg-mirror__fallback {
    position: absolute; left: 50%; top: 53%; translate: -50% -50%; width: 80%; text-align: center;
    font: 400 clamp(2.6rem, 12vw, 3.6rem)/1.1 var(--mg-script); color: var(--inv-foil); overflow-wrap: anywhere;
}

.mg-crest { position: relative; width: 6.2rem; }
.mg-crest__svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 10px 14px rgb(0 0 0 / .45)); }
.mg-crest__letters {
    position: absolute; left: 50%; top: 57.8%; translate: -50% -50%;
    display: flex; align-items: center; gap: .28em;
    font: italic 600 1.45rem/1 var(--mg-display); color: var(--inv-foil); white-space: nowrap;
}
.mg-crest__letters i { display: block; width: 1px; height: .9em; background: var(--inv-accent); transform: rotate(20deg); }

.mg-drapes { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.mg-drape { position: absolute; top: 0; width: min(33%, 155px); height: min(54%, 460px); filter: drop-shadow(6px 10px 14px rgb(0 0 0 / .45)); }
.mg-drape--l { left: 0; }
.mg-drape--r { right: 0; transform: scaleX(-1); }
.mg-drape__cloth {
    position: absolute; inset: 0; clip-path: url(#mg-drape-clip); overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent 98%); mask-image: linear-gradient(180deg, #000 68%, transparent 98%);
    background:
        linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--inv-deep) 70%, transparent)),
        linear-gradient(100deg, var(--inv-deep) 0%, var(--inv-primary) 40%, color-mix(in srgb, var(--inv-primary) 80%, var(--inv-deep)) 100%);
}
.mg-drape__cloth .mg-satin { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .85; background-size: cover; }
.mg-drape--r .mg-satin { background-position: 70% 0; }
.mg-drape__tie { position: absolute; left: -8%; top: 55%; width: 42%; height: auto; overflow: visible; }

.mg-swag { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 4px 4px rgb(0 0 0 / .3)); }

.mg-divider { display: flex; justify-content: center; margin: .8rem auto 0; }
.mg-divider__svg { width: 9.5rem; height: auto; overflow: visible; }
.mg-divider__glint { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--inv-foil) 80%, transparent)); }
.mg-light .mg-divider__glint use, .mg-light .mg-divider__glint { filter: drop-shadow(0 1px 1px rgb(0 0 0 / .35)); }

/* ---------- type ---------- */

.mg-label { font: 600 .68rem/1.5 var(--mg-sans); letter-spacing: .34em; text-transform: uppercase; color: var(--mg-ink-rg); }
.mg-dark .mg-label, .mg-cover .mg-label, .mg-hero .mg-label { color: var(--inv-accent); }

.mg-heading { position: relative; z-index: 1; margin-bottom: 2rem; }
.mg-heading__title {
    margin-top: .3rem;
    font: 500 clamp(2.15rem, 9.8vw, 2.6rem)/1.14 var(--mg-display); letter-spacing: -.01em;
    color: var(--inv-primary); overflow-wrap: anywhere;
}
.mg-heading__title em {
    font-style: italic; padding-right: .06em;
    background: var(--mg-metal-ink); -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}
.mg-dark .mg-heading__title { color: var(--mg-on-dark); }
.mg-dark .mg-heading__title em { background-image: var(--mg-metal); }

.mg-lead { max-width: 24rem; margin: -.6rem auto 1.8rem; color: var(--mg-muted); }
.mg-dark .mg-lead { color: var(--mg-on-dark-soft); }

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

.inv-button {
    gap: .55rem; padding: .85rem 1.55rem;
    background: var(--mg-leaf); color: var(--inv-deep);
    font: 600 .72rem/1.2 var(--mg-sans); letter-spacing: .16em; text-transform: uppercase;
    box-shadow: 0 10px 24px -12px rgb(0 0 0 / .6), inset 0 1px 0 rgb(255 255 255 / .45);
}
.inv-button--outline {
    background: color-mix(in srgb, var(--inv-deep) 30%, transparent); color: var(--inv-foil);
    box-shadow: inset 0 0 0 1px var(--mg-line);
}
.inv-button--outline:hover { background: color-mix(in srgb, var(--inv-accent) 16%, transparent); }
.mg-light .inv-button:not(.inv-button--outline) { background: linear-gradient(135deg, color-mix(in srgb, var(--inv-primary) 88%, #fff 8%), var(--inv-deep)); color: var(--inv-foil); box-shadow: inset 0 0 0 1px var(--inv-accent), 0 10px 22px -12px rgb(0 0 0 / .55); }
.mg-light .inv-button--outline { background: rgb(255 255 255 / .6); color: var(--inv-primary); box-shadow: inset 0 0 0 1px var(--mg-ink-rg); }
.inv-button .mg-icon { width: 1.15rem; height: 1.15rem; }

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

/* ---------- the column ---------- */

.mg-backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(90% 70% at 50% 40%, var(--inv-primary), var(--inv-deep)); }
.mg-backdrop .mg-satin { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .22; }

.mg-page {
    position: relative; z-index: 1;
    width: min(100%, var(--mg-w)); min-height: 100vh; margin: 0 auto;
    background: var(--inv-background);
    overflow-x: clip;
}
@media (min-width: 520px) {
    .mg-page { box-shadow: 0 0 0 1px var(--mg-line-soft), 0 40px 90px -30px rgb(0 0 0 / .6); }
}

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

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

.mg-cover {
    position: fixed; inset: 0; z-index: 30;
    width: min(100%, var(--mg-w)); margin: 0 auto;
    overflow-x: hidden; overflow-y: auto;
    color: var(--mg-on-dark);
    background: var(--mg-dark-bg);
}
.mg-cover__bg { position: absolute; inset: 0; pointer-events: none; }
.mg-cover--photo .mg-cover__bg {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--inv-deep) 70%, transparent), color-mix(in srgb, var(--inv-primary) 80%, transparent) 40%, color-mix(in srgb, var(--inv-deep) 93%, transparent) 76%, var(--inv-deep)),
        var(--mg-photo) center 30% / cover no-repeat;
}
.mg-cover__satin { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .28; }
.mg-cover__spot { --spot-y: 36%; }
.mg-cover__swag { position: absolute; z-index: 3; top: -12px; left: 18%; width: 64%; }

.mg-cover__inner {
    position: relative; z-index: 4;
    min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: safe center;
    gap: .6rem; padding: 3.1rem 1.5rem 1.8rem; text-align: center;
}
.mg-cover__title { margin-bottom: .2rem; }
.mg-cover__portrait { position: relative; width: min(60vw, 33svh, 255px); margin-top: 1.2rem; margin-bottom: 1.6rem; }
.mg-cover__crest { position: absolute; left: 50%; bottom: -1.9rem; width: 31%; translate: -50% 0; }
.mg-cover__crest .mg-crest__letters { font-size: clamp(1rem, 4.6vw, 1.35rem); }

html.inv-anim .mg-cover__mirror .mg-mirror__photo { animation: mg-photo-in 1.6s cubic-bezier(.2, .7, .3, 1) .15s both; transform-box: fill-box; transform-origin: center; }
@keyframes mg-photo-in { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: scale(1); } }
html.inv-anim .mg-cover__spot { animation: mg-spot-in 1.8s ease .1s both; }
@keyframes mg-spot-in { from { opacity: 0; } to { opacity: 1; } }

.mg-cover__names {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: .25em;
    padding: .05em .15em; font: 400 clamp(3rem, 14.5vw, 3.9rem)/1.12 var(--mg-script);
    overflow-wrap: anywhere;
    filter: drop-shadow(0 2px 8px rgb(0 0 0 / .55));
}
.mg-cover__amp { font: italic 500 .5em/1 var(--mg-display); }
.mg-cover__date {
    display: flex; align-items: center; gap: .6rem;
    font: 600 .72rem/1.4 var(--mg-sans); letter-spacing: .22em; text-transform: uppercase; color: var(--mg-on-dark);
}
.mg-cover__date::before, .mg-cover__date::after { content: ''; width: 1.6rem; height: 6px; background: var(--mg-pearl-dot) 0 50% / 6px 6px repeat-x; }
.mg-cover__quote { max-width: 21rem; font: italic 400 .95rem/1.55 var(--mg-display); color: var(--mg-on-dark-soft); }

.mg-guest {
    position: relative; width: min(100%, 20.5rem); margin-top: .2rem; padding: .8rem 1rem .85rem;
    background: linear-gradient(160deg, color-mix(in srgb, var(--inv-ink) 78%, transparent), color-mix(in srgb, var(--inv-deep) 82%, transparent));
    border: 1px solid var(--mg-line); border-radius: 14px;
    box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--inv-ink) 40%, transparent), inset 0 0 0 5px var(--mg-line-soft), 0 14px 28px -16px rgb(0 0 0 / .6);
}
.mg-guest__label { font: 600 .62rem/1.4 var(--mg-sans); letter-spacing: .3em; text-transform: uppercase; color: var(--inv-accent); }
.mg-guest__name { margin-top: .2rem; font: 600 1.2rem/1.3 var(--mg-display); color: var(--mg-on-dark); overflow-wrap: anywhere; }
.mg-guest__note { margin-top: .3rem; font: 400 .8rem/1.5 var(--mg-sans); color: var(--mg-on-dark-soft); }

.mg-open { margin-top: .3rem; }

/* opening: the cover lifts and fades */
.mg-cover--leave { transition: opacity .7s ease, transform .9s cubic-bezier(.5, 0, .2, 1); }
.mg-cover--gone { opacity: 0; transform: translateY(-4%); }

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

.mg-hero {
    position: relative; overflow: hidden;
    min-height: min(100svh, 860px); padding: 4rem 1.5rem 4.2rem;
    display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
    text-align: center; color: var(--mg-on-dark);
    background: var(--mg-dark-bg);
}
.mg-hero__satin { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .26; }
.mg-hero--photo .mg-hero__satin { -webkit-mask-image: linear-gradient(180deg, transparent 55%, #000 90%); mask-image: linear-gradient(180deg, transparent 55%, #000 90%); }
.mg-hero__photo { position: absolute; inset: 0 0 22% 0; overflow: hidden; }
.mg-hero__photo img { width: 100%; height: calc(100% + 40px); object-fit: cover; object-position: center 30%; }
.mg-hero__photo::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-deep) 35%, transparent) 0%, transparent 22%, transparent 48%, color-mix(in srgb, var(--inv-primary) 70%, transparent) 72%, color-mix(in srgb, var(--inv-deep) 94%, transparent) 90%, var(--inv-deep) 100%);
}
.mg-hero.mg-hero--photo { background: var(--inv-deep); }
.mg-hero__spot { --spot-y: 30%; --mg-o: .7; }
.mg-hero--photo .mg-hero__spot { opacity: .3; }
.mg-hero__drapes .mg-drape { height: min(62%, 520px); }
.mg-hero__inner { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.mg-hero__crest { width: 5.6rem; margin-bottom: .5rem; }
.mg-hero__names {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: .25em;
    padding: .05em .15em; font: 400 clamp(3rem, 14.5vw, 3.9rem)/1.12 var(--mg-script); overflow-wrap: anywhere;
    filter: drop-shadow(0 2px 10px rgb(0 0 0 / .5));
}
.mg-hero__amp { font: italic 500 .5em/1 var(--mg-display); }
.mg-hero__date { margin-top: .3rem; font: 600 .74rem/1.4 var(--mg-sans); letter-spacing: .22em; text-transform: uppercase; }

/* ---------- sections ---------- */

.mg-main { position: relative; }

.mg-section {
    position: relative; overflow: hidden; isolation: isolate;
    padding: 4.6rem 1.4rem;
    text-align: center;
}
.mg-section > * { position: relative; z-index: 1; }
.mg-light {
    background:
        radial-gradient(90% 40% at 50% 0%, color-mix(in srgb, var(--inv-blush) 70%, transparent), transparent 70%),
        linear-gradient(180deg, var(--inv-background), color-mix(in srgb, var(--inv-background) 80%, var(--inv-blush)));
    color: var(--inv-text);
}
.mg-dark { background: var(--mg-dark-bg); color: var(--mg-on-dark); }

/* a client photo under a strong maroon gradient */
.mg-section > .mg-bgphoto { inset: 0; overflow: hidden; }
.mg-bgphoto img { width: 100%; height: calc(100% + 40px); object-fit: cover; object-position: center 35%; }
.mg-bgphoto::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-deep) 90%, transparent) 0%, color-mix(in srgb, var(--inv-primary) 74%, transparent) 45%, color-mix(in srgb, var(--inv-deep) 93%, transparent) 100%);
}

/* a client photo through an ivory veil (light sections) */
.mg-section > .mg-veilphoto { inset: 0; overflow: hidden; background: linear-gradient(180deg, var(--inv-background), color-mix(in srgb, var(--inv-blush) 70%, var(--inv-background))); }
.mg-veilphoto img { width: 100%; height: calc(100% + 40px); object-fit: cover; object-position: center 30%; opacity: .6; filter: sepia(.25) saturate(.9); }
.mg-veilphoto::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, var(--inv-background) 0%, color-mix(in srgb, var(--inv-background) 64%, transparent) 22%, color-mix(in srgb, var(--inv-background) 72%, transparent) 70%, var(--inv-background) 100%);
}

/* ---------- opening ---------- */
.mg-arabic { font: 400 1.85rem/1.8 'Amiri', serif; color: var(--inv-primary); }
.mg-opening__greeting { margin-top: .3rem; font: italic 500 1.4rem/1.35 var(--mg-display); color: var(--inv-primary); }
.mg-opening__message { max-width: 24rem; margin: 1rem auto 0; color: var(--mg-muted); }

.mg-quote {
    position: relative; isolation: isolate; max-width: 24rem; margin: 3.6rem auto 0; padding: 3.2rem 1.5rem 1.7rem;
    border-radius: 11rem 11rem 18px 18px / 6rem 6rem 18px 18px;
    background: var(--mg-dark-bg); color: var(--mg-on-dark);
    box-shadow: 0 0 0 1px var(--mg-line), 0 0 0 6px color-mix(in srgb, var(--inv-background) 80%, transparent), 0 0 0 7px var(--mg-line-soft), 0 30px 50px -28px rgb(0 0 0 / .65);
}
.mg-quote__satin { position: absolute; inset: 0; z-index: -1; border-radius: inherit; mix-blend-mode: screen; opacity: .3; }
.mg-quote__swag { position: absolute; top: 1.1rem; left: 12%; width: 76%; }
.mg-quote__bow { position: absolute; top: -2.3rem; left: 50%; width: 5.4rem; height: auto; translate: -50% 0; overflow: visible; filter: drop-shadow(0 6px 6px rgb(0 0 0 / .35)); }
.mg-quote blockquote { position: relative; margin: 0; font: italic 400 1.05rem/1.65 var(--mg-display); }
.mg-quote figcaption { margin-top: 1rem; font: 600 .68rem/1.4 var(--mg-sans); letter-spacing: .26em; text-transform: uppercase; color: var(--inv-accent); }

/* ---------- couple ---------- */
.mg-person {
    display: grid; grid-template-columns: 44% minmax(0, 1fr); column-gap: 1rem; align-items: center;
    text-align: left;
}
.mg-person--right { grid-template-columns: minmax(0, 1fr) 44%; text-align: right; }
.mg-person--right .mg-person__media { order: 2; }
.mg-person__media { position: relative; }
.mg-person__spot { --spot-y: 45%; width: 260%; top: -20%; height: 140%; opacity: .8; }
.mg-person__mirror { position: relative; }
.mg-person__role { font: 600 .62rem/1.4 var(--mg-sans); letter-spacing: .3em; text-transform: uppercase; color: var(--inv-accent); }
.mg-person__nick { display: inline-block; margin-top: .1rem; padding: .05em .15em .05em 0; font: 400 clamp(2.6rem, 12vw, 3.1rem)/1.15 var(--mg-script); }
.mg-person--right .mg-person__nick { padding: .05em 0 .05em .15em; }
.mg-person__name { margin-top: .2rem; font: 600 1rem/1.35 var(--mg-display); letter-spacing: .05em; text-transform: uppercase; color: var(--mg-on-dark); overflow-wrap: anywhere; }
.mg-person__parents { margin-top: .55rem; font-size: .86rem; line-height: 1.55; color: var(--mg-on-dark-soft); }
.mg-person__parents strong { color: var(--mg-on-dark); font-weight: 600; }

.mg-and { display: flex; justify-content: center; margin: 2.2rem 0; }
.mg-and span {
    position: relative; display: grid; place-items: center; width: 4.4rem; height: 4.4rem; border-radius: 50%;
    font: italic 500 2.3rem/1 var(--mg-display); color: var(--inv-foil);
    background: radial-gradient(circle at 38% 30%, var(--mg-enamel-hi), var(--inv-deep) 80%) padding-box, var(--mg-leaf) border-box;
    border: 3px solid transparent;
    box-shadow: 0 14px 24px -12px rgb(0 0 0 / .6);
}
.mg-and span::before {
    content: ''; position: absolute; inset: -12px; border-radius: 50%;
    border: 6px dotted var(--mg-pearl);
    filter: drop-shadow(0 1px 1px rgb(0 0 0 / .5));
}

/* ---------- countdown (light, black lacquer tiles) ---------- */
.mg-bigdate { display: flex; flex-direction: column; align-items: center; margin: -.4rem 0 1.6rem; }
.mg-bigdate__day, .mg-bigdate__month { font: 600 .74rem/1.4 var(--mg-sans); letter-spacing: .28em; text-transform: uppercase; color: var(--mg-ink-rg); }
.mg-bigdate__num {
    display: flex; align-items: center; gap: 1rem;
    font: 500 5.4rem/1 var(--mg-display); color: var(--inv-primary);
}
.mg-bigdate__num::before, .mg-bigdate__num::after { content: ''; width: 3.6rem; height: 9px; background: var(--mg-pearl-dot) 0 50% / 9px 9px repeat-x; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .35)); }

.inv-countdown { gap: .55rem; }
.inv-countdown__item {
    position: relative; overflow: hidden;
    flex: 1; max-width: 5rem; min-width: 0; padding: 1rem .25rem .8rem;
    border-radius: 14px; color: var(--inv-accent);
    background: linear-gradient(118deg, transparent 22%, rgb(255 255 255 / .1) 38%, transparent 54%), var(--mg-lacquer) padding-box, var(--mg-leaf) border-box;
    border: 1.5px solid transparent;
    box-shadow: 0 16px 26px -14px rgb(0 0 0 / .6);
}
.inv-countdown__value {
    font: 500 1.95rem/1.1 var(--mg-display);
    background: var(--mg-metal); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.inv-countdown__label { margin-top: .25rem; font: 600 .56rem/1.2 var(--mg-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--inv-accent); }
.inv-countdown__done { font-style: italic; color: var(--mg-muted); }
.inv-countdown__actions { margin-top: 1.6rem; }
.inv-countdown__actions .inv-button { padding: .7rem 1.05rem; font-size: .62rem; letter-spacing: .1em; }

/* ---------- events: ivory cards with a curved Regency crest ---------- */
.mg-events__list { display: grid; gap: 4rem; padding-top: 1.6rem; }
.mg-ev { position: relative; color: var(--inv-text); filter: drop-shadow(0 26px 30px rgb(0 0 0 / .5)); }
.mg-ev__crest { position: absolute; bottom: calc(100% - 1px); left: 0; width: 100%; height: 2.7rem; overflow: visible; }
.mg-ev__crest path { fill: var(--inv-surface); }
.mg-ev__crest .mg-ev__crest-line { fill: none; stroke: var(--mg-line); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.mg-ev__body {
    position: relative; display: flex; flex-direction: column; align-items: center;
    padding: .2rem 1.3rem 1.8rem; border-radius: 0 0 22px 22px;
    background: linear-gradient(180deg, var(--inv-surface), color-mix(in srgb, var(--inv-surface) 85%, var(--inv-blush)));
}
.mg-ev__body::before {
    content: ''; position: absolute; inset: 0 2.67% 9px; border: 1.2px solid var(--mg-line); border-top: 0;
    border-radius: 0 0 16px 16px; pointer-events: none;
}
.mg-ev__photo {
    position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; margin-top: -.6rem; object-fit: cover;
    border-radius: 9rem 9rem 12px 12px / 4.5rem 4.5rem 12px 12px;
    box-shadow: 0 0 0 3px var(--inv-surface), 0 0 0 4.5px var(--inv-accent);
}
.mg-ev__medal {
    position: relative; display: grid; place-items: center; width: 3.3rem; height: 3.3rem; margin-top: -1.9rem; border-radius: 50%;
    color: var(--inv-foil);
    background: radial-gradient(circle at 38% 30%, var(--mg-enamel-hi), var(--inv-deep) 80%) padding-box, var(--mg-leaf) border-box;
    border: 3px solid transparent;
    box-shadow: 0 0 0 4px var(--inv-surface), 0 10px 18px -8px rgb(0 0 0 / .5);
}
.mg-ev--photo .mg-ev__medal { margin-top: -1.65rem; }
.mg-ev__medal .mg-icon { width: 1.5rem; height: 1.5rem; }
.mg-ev__count { margin-top: .7rem; font: 600 .62rem/1.4 var(--mg-sans); letter-spacing: .3em; text-transform: uppercase; color: var(--mg-ink-rg); }
.mg-ev__name { margin-top: .1rem; font: italic 500 2rem/1.15 var(--mg-display); color: var(--inv-primary); overflow-wrap: anywhere; }
.mg-ev__time {
    display: inline-flex; align-items: center; gap: .45rem; margin-top: .8rem; padding: .5rem 1.05rem;
    border-radius: 999px; color: var(--inv-foil);
    background: var(--mg-lacquer) padding-box, var(--mg-leaf) border-box; border: 1.5px solid transparent;
    font: 600 .82rem/1.2 var(--mg-sans); letter-spacing: .06em;
}
.mg-ev__time .mg-icon { width: 1rem; height: 1rem; color: var(--inv-accent); }
.mg-ev__date { display: inline-flex; align-items: center; gap: .45rem; margin-top: .7rem; font-weight: 600; font-size: .95rem; }
.mg-ev__date .mg-icon, .mg-ev__dress .mg-icon { width: 1rem; height: 1rem; color: var(--mg-ink-rg); }
.mg-ev__rule { display: flex; align-items: center; gap: .6rem; width: 9.5rem; margin: 1.1rem 0 .5rem; color: var(--mg-ink-rg); }
.mg-ev__rule::before, .mg-ev__rule::after { content: ''; flex: 1; height: 6px; background: var(--mg-pearl-dot) 0 50% / 6px 6px repeat-x; filter: drop-shadow(0 1px 0 rgb(0 0 0 / .25)); }
.mg-ev__rule .mg-icon { width: 1.15rem; height: 1.15rem; }
.mg-ev__venue { font: 600 1.12rem/1.35 var(--mg-display); color: var(--inv-text); overflow-wrap: anywhere; }
.mg-ev__address { max-width: 22rem; margin-top: .25rem; font-size: .88rem; line-height: 1.55; color: var(--mg-muted); overflow-wrap: anywhere; }
.mg-ev__dress { display: inline-flex; align-items: center; gap: .4rem; margin-top: .9rem; padding: .35rem .85rem; border-radius: 999px; font: 500 .76rem/1.4 var(--mg-sans); background: color-mix(in srgb, var(--inv-blush) 70%, transparent); }
.mg-ev .inv-maps { margin-top: 1.2rem; }

/* ---------- love story: a zig-zag along a string of pearls ---------- */
.mg-story { padding-left: 1rem; padding-right: 1rem; }
.mg-zig { position: relative; margin: 0; padding: 0; list-style: none; }
.mg-zig::before {
    content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 9px; translate: -50% 0;
    background: var(--mg-pearl-dot) 50% 0 / 9px 9px repeat-y;
    filter: drop-shadow(0 1px 1px rgb(0 0 0 / .3));
}
.mg-zig__item {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 1fr) 2rem minmax(0, 1fr); column-gap: .6rem; align-items: start;
    grid-template-areas: "text dot meta";
}
.mg-zig__item + .mg-zig__item { margin-top: 2.4rem; }
.mg-zig__item.is-flip { grid-template-areas: "meta dot text"; }
.mg-zig__dot {
    grid-area: dot; justify-self: center; display: grid; place-items: center; width: 2rem; height: 2rem;
    border-radius: 50%; color: var(--inv-foil);
    background: radial-gradient(circle at 38% 30%, var(--mg-enamel-hi), var(--inv-deep) 80%) padding-box, var(--mg-leaf) border-box;
    border: 2px solid transparent;
    box-shadow: 0 0 0 4px var(--inv-background), 0 6px 14px -6px rgb(0 0 0 / .45);
}
.mg-zig__dot .mg-icon { width: .9rem; height: .9rem; fill: currentColor; }
.mg-zig__text { grid-area: text; min-width: 0; padding: .9rem .9rem 1rem; border-radius: 16px; text-align: right; background: rgb(255 255 255 / .72); box-shadow: inset 0 0 0 1px var(--mg-line-soft), 0 14px 26px -18px rgb(0 0 0 / .35); }
.is-flip .mg-zig__text { text-align: left; }
.mg-zig__title { font: 600 1.1rem/1.25 var(--mg-display); color: var(--inv-primary); overflow-wrap: anywhere; }
.mg-zig__story { margin-top: .4rem; font-size: .86rem; line-height: 1.55; color: var(--mg-muted); overflow-wrap: anywhere; }
.mg-zig__meta { grid-area: meta; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; text-align: left; }
.is-flip .mg-zig__meta { align-items: flex-end; text-align: right; }
.mg-zig__date { font: italic 600 1.3rem/1.2 var(--mg-display); color: var(--mg-ink-rg); overflow-wrap: anywhere; }
.mg-zig__photo {
    display: block; width: min(6rem, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
    padding: 3px; background: var(--mg-leaf);
    box-shadow: 0 0 0 4px var(--inv-background), 0 0 0 5px var(--mg-line-soft), 0 14px 24px -14px rgb(0 0 0 / .55);
}
.mg-zig__item--bare .mg-zig__meta::before { content: ''; width: 1.2rem; height: 1.2rem; margin-top: .4rem; border-radius: 50%; background: var(--mg-pearl-dot); }

/* ---------- gallery ---------- */
.mg-gallery__spot { --spot-y: 52%; opacity: .7; }
.mg-gallery .inv-gallery-slider { grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.mg-gallery .inv-gallery-slider__thumb { width: 4.3rem; border-radius: 10px; border-color: var(--mg-line-soft); opacity: .55; }
.mg-gallery .inv-gallery-slider__thumb.is-active { opacity: 1; border-color: var(--inv-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--inv-foil) 45%, transparent); }
.mg-gallery .inv-gallery-slider__arrow { background: var(--mg-leaf); color: var(--inv-deep); font-family: var(--mg-display); }
.mg-gallery .inv-gallery-slider__stage {
    border-radius: 10rem 10rem 18px 18px / 6rem 6rem 18px 18px;
    box-shadow: 0 0 0 3px var(--inv-accent), 0 0 0 9px color-mix(in srgb, var(--inv-deep) 70%, transparent), 0 0 0 10px var(--mg-line-soft), 0 26px 44px -24px rgb(0 0 0 / .85);
}
/* a ring of pearls around the stage */
.mg-gallery .inv-gallery-slider__stage { outline: 6px dotted var(--mg-pearl); outline-offset: 7px; }
.mg-gallery .inv-gallery-slider__count { background: color-mix(in srgb, var(--inv-ink) 78%, transparent); color: var(--inv-foil); font-family: var(--mg-sans); }
.inv-gallery__play { background: color-mix(in srgb, var(--inv-deep) 70%, transparent); color: var(--inv-foil); }

/* ---------- live streaming ---------- */
.mg-live__card {
    position: relative; isolation: isolate; max-width: 24rem; margin: 0 auto; padding: 2.4rem 1.4rem 1.8rem;
    border-radius: 10rem 10rem 18px 18px / 5rem 5rem 18px 18px;
    background: var(--mg-dark-bg); color: var(--mg-on-dark);
    box-shadow: 0 0 0 1px var(--mg-line), 0 0 0 6px color-mix(in srgb, var(--inv-background) 80%, transparent), 0 0 0 7px var(--mg-line-soft), 0 28px 46px -26px rgb(0 0 0 / .6);
}
.mg-live__satin { position: absolute; inset: 0; z-index: -1; border-radius: inherit; mix-blend-mode: screen; opacity: .3; }
.mg-live__badge {
    display: inline-flex; align-items: center; gap: .4rem; padding: .32rem .8rem;
    border-radius: 999px; background: var(--inv-ink); color: #fff;
    box-shadow: inset 0 0 0 1px var(--inv-accent);
    font: 700 .66rem/1 var(--mg-sans); letter-spacing: .2em;
}
.mg-live__badge span { width: .45rem; height: .45rem; border-radius: 50%; background: #ff6b7d; animation: mg-blink 1.4s ease-in-out infinite; }
@keyframes mg-blink { 50% { opacity: .25; } }
.mg-live__text { margin: 1rem 0 .5rem; }
.mg-live__note { margin-bottom: 1rem; font: italic 500 1rem/1.5 var(--mg-display); color: var(--inv-foil); }
.mg-live__card .inv-button { margin-top: .6rem; }

/* ---------- gift: black lacquer cards with rose-gold lettering ---------- */
.inv-gift { display: grid; gap: 1rem; max-width: 22rem; margin: 0 auto; }
.inv-gift__accounts { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.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: .6rem;
    grid-template-areas: "chip bank" "number number" "holder holder" "button button";
    margin: 0; padding: 1.05rem 1.15rem 1rem;
    border-radius: 18px; text-align: left; color: var(--inv-foil);
    background: linear-gradient(118deg, transparent 24%, rgb(255 255 255 / .08) 38%, transparent 52%), var(--mg-lacquer) padding-box, var(--mg-leaf) border-box;
    border: 1.5px solid transparent;
    box-shadow: 0 22px 34px -20px rgb(0 0 0 / .8);
}
.inv-gift__account + .inv-gift__account { margin-top: 0; }
.inv-gift__account::before {
    content: ''; grid-area: chip; width: 2rem; height: 1.5rem; border-radius: .35rem;
    background:
        linear-gradient(90deg, transparent 31%, rgb(0 0 0 / .25) 31% 33%, transparent 33% 67%, rgb(0 0 0 / .25) 67% 69%, transparent 69%),
        linear-gradient(0deg, transparent 47%, rgb(0 0 0 / .25) 47% 53%, transparent 53%),
        var(--mg-leaf);
}
/* a strand of pearls across the card's corner */
.inv-gift__account::after {
    content: ''; position: absolute; z-index: -1; right: -1.5rem; bottom: 1.6rem; width: 9rem; height: 8px; rotate: -32deg;
    background: var(--mg-pearl-dot) 0 50% / 8px 8px repeat-x; opacity: .7;
}
.inv-gift__bank {
    grid-area: bank; justify-self: end; min-width: 0; max-width: 100%; margin: 0;
    font: 700 .7rem/1.2 var(--mg-sans); letter-spacing: .1em; text-transform: uppercase; text-align: right; color: var(--inv-foil); overflow-wrap: anywhere;
}
.inv-gift__logo { height: 1.6rem; max-width: 100%; padding: .2rem .45rem; border-radius: .35rem; }
.inv-gift__logo img { max-width: 5rem; }
.inv-gift__number {
    grid-area: number; margin: .9rem 0 .2rem;
    font: 600 1.18rem/1.25 var(--mg-sans); letter-spacing: .08em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
    background: var(--mg-metal); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
.inv-gift__holder { grid-area: holder; margin: 0; font: 600 .66rem/1.35 var(--mg-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--mg-on-dark-soft); overflow-wrap: anywhere; }
.inv-gift__account .inv-button {
    grid-area: button; justify-self: start; margin-top: .8rem; padding: .45rem .85rem;
    font-size: .62rem; letter-spacing: .08em; color: var(--inv-foil); background: transparent;
    box-shadow: inset 0 0 0 1px var(--mg-line);
}

/* the gift address: a blush card */
.inv-gift__account.inv-gift__address {
    display: block; padding: 1.5rem 1.3rem; text-align: center; color: var(--inv-text);
    background: linear-gradient(180deg, var(--inv-surface), color-mix(in srgb, var(--inv-surface) 82%, var(--inv-blush))) padding-box, var(--mg-leaf) border-box;
}
.inv-gift__address::before, .inv-gift__address::after { content: none; }
.inv-gift__address .inv-gift__bank { justify-self: auto; text-align: center; font: 600 .68rem/1.4 var(--mg-sans); letter-spacing: .3em; color: var(--mg-ink-rg); }
.inv-gift__address .inv-gift__holder { margin: .6rem 0 .2rem; font: 600 1.15rem/1.3 var(--mg-display); letter-spacing: .02em; text-transform: none; color: var(--inv-primary); }
.inv-gift__address p:not([class]) { color: var(--mg-muted); }
.inv-gift__address .inv-button { margin-top: 1rem; color: var(--inv-primary); background: transparent; box-shadow: inset 0 0 0 1px var(--mg-ink-rg); }

/* ---------- rsvp & wishes forms ---------- */
.mg-card {
    border-radius: 20px;
    background: linear-gradient(170deg, rgb(255 255 255 / .9), color-mix(in srgb, var(--inv-surface) 80%, transparent)) padding-box, var(--mg-leaf) border-box;
    border: 1.5px solid transparent;
    box-shadow: 0 28px 46px -30px rgb(0 0 0 / .55);
}
.mg-dark .mg-card {
    background: linear-gradient(170deg, color-mix(in srgb, var(--inv-deep) 70%, var(--inv-primary)), var(--inv-deep)) padding-box, var(--mg-leaf) border-box;
}
.mg-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: 600 .76rem/1.4 var(--mg-sans); letter-spacing: .04em; color: var(--mg-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(--mg-ink-rg) 55%, transparent);
    background: #fff; color: var(--inv-text);
    font: 400 1rem/1.4 var(--mg-sans);
    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) 50%, transparent); }
.inv-form input:focus, .inv-form select:focus, .inv-form textarea:focus {
    outline: none; border-color: var(--inv-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-accent) 30%, transparent);
}
.inv-form option { background: #fff; color: var(--inv-text); }
.inv-form input[type=radio], .inv-form input[type=checkbox] { accent-color: var(--inv-primary); }
.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-blush) 60%, transparent); border: 1px solid var(--mg-line-soft); }
.inv-form .inv-button { justify-self: stretch; margin-top: .3rem; }
.inv-rsvp__deadline { font-style: italic; color: var(--mg-ink-rg); }

.mg-dark .inv-form label, .mg-dark .inv-form__choices legend { color: var(--mg-on-dark-soft); }
.mg-dark .inv-form input:not([type=radio]):not([type=checkbox]), .mg-dark .inv-form select, .mg-dark .inv-form textarea {
    background: color-mix(in srgb, var(--inv-ink) 55%, transparent); color: var(--mg-on-dark); border-color: var(--mg-line-soft);
}
.mg-dark .inv-form input::placeholder, .mg-dark .inv-form textarea::placeholder { color: color-mix(in srgb, var(--mg-on-dark) 55%, transparent); }
.mg-dark .inv-form input:focus, .mg-dark .inv-form textarea:focus { border-color: var(--inv-accent); }
.mg-dark .inv-form__choices label, .mg-dark .inv-form__notice { color: var(--mg-on-dark); }

/* 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-ink) 35%, transparent);
    box-shadow: inset 0 0 0 1px var(--mg-line-soft);
    scrollbar-color: color-mix(in srgb, var(--inv-accent) 55%, transparent) transparent;
}
.inv-wishes__empty { text-align: center; font-style: italic; }
.inv-wish {
    padding: .65rem .8rem; border-radius: 10px; color: var(--mg-on-dark);
    background: color-mix(in srgb, var(--inv-primary) 45%, transparent);
    border: 1px solid var(--mg-line-soft); border-left: 3px solid var(--inv-accent);
}
.inv-wish__name { font: italic 600 1rem/1.3 var(--mg-display); color: var(--inv-foil); }
.inv-wish__message { font-size: .9rem; line-height: 1.55; }
.inv-wish__time { margin-top: .25rem; font: 400 .7rem/1.3 var(--mg-sans); letter-spacing: .04em; color: var(--mg-on-dark-soft); }
.inv-wish__reply { margin-top: .5rem; padding: .45rem .65rem; background: color-mix(in srgb, var(--inv-accent) 16%, transparent); }
.inv-wish__reply-text { font-size: .88rem; }
.inv-wishes__page-button { color: var(--inv-foil); }

/* ---------- closing: a full photo melting into maroon ---------- */
.mg-closing { padding-top: 3.6rem; padding-bottom: 1.1rem; }
.mg-closing--photo { padding-top: min(34svh, 270px); }
.mg-section > .mg-closing__bg { position: absolute; top: 0; left: 0; right: 0; height: min(60svh, 460px); z-index: 0; overflow: hidden; }
.mg-closing__bg img { width: 100%; height: calc(100% + 40px); object-fit: cover; object-position: center 25%; }
.mg-closing__bg::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-deep) 25%, transparent) 0%, transparent 18%, transparent 38%, color-mix(in srgb, var(--inv-primary) 72%, transparent) 64%, var(--inv-deep) 96%);
}
.mg-closing { background: linear-gradient(180deg, var(--inv-deep) 0, var(--inv-deep) calc(min(60svh, 460px) - 2px), color-mix(in srgb, var(--inv-primary) 55%, var(--inv-deep)) calc(min(60svh, 460px) + 160px), var(--inv-deep) 100%); }
.mg-closing:not(.mg-closing--photo) { background: var(--mg-dark-bg); }
.mg-closing__spot { --spot-y: 20%; }
.mg-closing__drapes .mg-drape { height: min(44%, 320px); }
.mg-closing__body { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; }
.mg-closing__crest { width: 4.4rem; margin-bottom: .6rem; }
.mg-closing__thanks { margin-top: .15rem; font: 500 clamp(1.9rem, 8.5vw, 2.4rem)/1.15 var(--mg-display); color: var(--mg-on-dark); }
.mg-closing__thanks em {
    font-style: italic; padding-right: .06em;
    background: var(--mg-metal); -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}
.mg-closing__message { max-width: 24rem; margin: .6rem auto 0; font-size: .93rem; line-height: 1.6; color: var(--mg-on-dark-soft); }
.mg-closing__body > .mg-divider { margin: .85rem auto 0; }
.mg-closing__sign { margin-top: .75rem; font: 600 .66rem/1.4 var(--mg-sans); letter-spacing: .26em; text-transform: uppercase; color: var(--inv-accent); }
.mg-closing__names { display: inline-block; margin-top: .1rem; padding: .05em .15em; font: 400 clamp(2.1rem, 9.5vw, 2.6rem)/1.2 var(--mg-script); }
.mg-closing__names span { font: italic 500 .5em/1 var(--mg-display); }
.mg-closing__swag { width: 60%; margin-top: .45rem; }

/* ---------- shared components: nav, music, to-top, QR tab, branding ---------- */

body .mg-nav.inv-nav {
    --inv-nav-bg: color-mix(in srgb, var(--inv-deep) 90%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--mg-on-dark) 78%, transparent);
    --inv-nav-active: var(--mg-leaf);
    border-color: color-mix(in srgb, var(--inv-accent) 45%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    box-shadow: 0 16px 34px -16px rgb(0 0 0 / .6);
    font-family: var(--mg-sans);
}
.mg-nav.inv-nav--icons .inv-nav__item.is-active { color: var(--inv-deep); box-shadow: 0 0 0 2px var(--inv-deep), 0 0 0 3px var(--inv-accent), 0 8px 18px -6px rgb(0 0 0 / .6); }

.inv-music { right: calc(var(--mg-edge) + 1rem); }
.inv-music__button { background: var(--mg-leaf); color: var(--inv-deep); box-shadow: 0 8px 22px -8px rgb(0 0 0 / .6), 0 0 0 2px var(--inv-deep), 0 0 0 3px var(--inv-accent); }
.inv-autoscroll { color: var(--inv-deep); background: var(--inv-surface); border-color: var(--mg-rg-deep); font-family: var(--mg-sans); }
.inv-autoscroll--running { background: var(--inv-deep); color: var(--inv-foil); }

.inv-to-top {
    left: calc(var(--mg-edge) + 1rem); border-radius: 50%;
    background: var(--inv-deep); color: var(--inv-foil);
    box-shadow: inset 0 0 0 1px var(--inv-accent), 0 6px 16px -6px rgb(0 0 0 / .5);
}
.inv-qr-tab {
    right: var(--mg-edge); font-family: var(--mg-sans); color: var(--inv-foil);
    background: var(--inv-deep);
    border-color: color-mix(in srgb, var(--inv-accent) 70%, transparent);
}
.inv-qr-sheet .inv-checkin { font-family: var(--mg-sans); color: var(--inv-deep); }
.inv-checkin__title { color: var(--inv-primary); }

.mg-branding { position: relative; z-index: 1; background: var(--inv-deep); color: var(--mg-on-dark-soft); font-family: var(--mg-sans); }
.mg-branding a { color: var(--inv-accent); }

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .mg-metal, .mg-twinkle, .mg-cover__mirror .mg-mirror__photo, .mg-cover__spot, .mg-live__badge span { animation: none !important; }
    .mg-sparkle { display: none; }
    .mg-cover--leave { transition: opacity .3s ease; }
    .mg-cover--gone { transform: none; }
}

/* ---------- fit: the whole cover on one phone screen ---------- */

@media (max-height: 760px) {
    .mg-cover__inner { gap: .5rem; padding: 2.2rem 1.4rem 1.5rem; }
    .mg-cover__portrait { width: min(52vw, 27svh, 220px); margin-top: .9rem; margin-bottom: 1.3rem; }
    .mg-cover__names { font-size: clamp(2.6rem, 12.6vw, 3.3rem); line-height: 1.05; }
    .mg-cover__quote { font-size: .88rem; line-height: 1.45; }
    .mg-guest { padding: .65rem .9rem .7rem; }
    .mg-guest__note { font-size: .76rem; line-height: 1.42; }
}
@media (max-height: 660px) {
    .mg-cover__inner { gap: .4rem; padding: 1.9rem 1.3rem 1.1rem; }
    .mg-cover__portrait { width: min(48vw, 27svh, 190px); margin-top: .7rem; margin-bottom: 1.1rem; }
    .mg-cover__crest { bottom: -1.5rem; }
    .mg-cover__names { font-size: clamp(2.4rem, 11.4vw, 2.8rem); line-height: 1.02; }
    .mg-cover__date { font-size: .66rem; }
    .mg-cover__quote { font-size: .8rem; line-height: 1.4; }
    .mg-guest { margin-top: 0; padding: .5rem .85rem .55rem; }
    .mg-guest__name { font-size: 1.06rem; }
    .mg-guest__note { font-size: .72rem; }
    .mg-open { margin-top: .1rem; }
}
@media (max-height: 600px) {
    .mg-cover__inner { gap: .32rem; padding: 1.5rem 1.2rem .9rem; }
    .mg-cover__portrait { width: min(40vw, 22svh, 150px); margin-top: .4rem; margin-bottom: 1rem; }
    .mg-cover__crest { bottom: -1.25rem; }
    .mg-cover__names { font-size: clamp(2.2rem, 10.6vw, 2.5rem); }
    .mg-cover__quote { font-size: .76rem; line-height: 1.36; }
    .mg-guest__note { font-size: .7rem; line-height: 1.38; }
}
/* very short screens: the pearl swag would touch the title */
@media (max-height: 600px) {
    .mg-cover__swag { display: none; }
}

/* ======================================================= intro scene "Malam Premiere" (scene.json, sections/_scene) */
.mg-scene-pendant, body.mg-body .inv-scene__card { --mg-scene-pearl: radial-gradient(circle closest-side at 45% 42%, #fff 0 18%, var(--mg-pearl) 42%, var(--mg-pearl-edge) 82%, transparent 96%); }
.mg-scene-stage { position: absolute; inset: 0; background: radial-gradient(70% 55% at 50% 42%, var(--inv-primary), var(--inv-deep) 78%); }
.mg-scene-stage .mg-satin { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .3; }
.mg-scene-spot {
    --spot-y: 46%; width: 100%; filter: blur(12px);
    background:
        radial-gradient(40% 24% at 50% var(--spot-y), color-mix(in srgb, var(--inv-foil) 55%, transparent), transparent 72%),
        conic-gradient(from 166deg at 50% -4%, transparent 0deg, color-mix(in srgb, var(--inv-foil) 34%, transparent) 9deg, color-mix(in srgb, var(--inv-foil) 34%, transparent) 19deg, transparent 28deg, transparent 360deg);
}
.mg-scene-carpet { position: absolute; inset: 0; clip-path: polygon(33% 0, 67% 0, 100% 100%, 0 100%); background: var(--mg-metal); -webkit-mask: linear-gradient(transparent 8%, #000 48%); mask: linear-gradient(transparent 8%, #000 48%); }
.mg-scene-carpet > span { position: absolute; inset: 0; clip-path: polygon(34.4% 0, 65.6% 0, 96% 100%, 4% 100%); background: linear-gradient(180deg, var(--inv-primary), color-mix(in srgb, var(--inv-primary) 82%, var(--inv-accent))); }
.mg-scene-carpet .mg-satin { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .4; transform: rotate(90deg) scale(2); }
.mg-scene-glints { position: absolute; inset: 0; }
.mg-scene-glints svg { position: absolute; aspect-ratio: 1; height: auto; translate: -50% -50%; overflow: visible; opacity: 0; filter: drop-shadow(0 0 4px var(--inv-foil)); }
html.inv-anim .mg-scene-glints svg { animation: mg-flash 1.4s cubic-bezier(.3, .7, .4, 1) both; }
.mg-scene-rope { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 10px rgb(0 0 0 / .4)); }
.mg-scene-curtain {
    position: absolute; inset: 0; box-shadow: 10px 0 24px rgb(0 0 0 / .5);
    background:
        repeating-linear-gradient(90deg, rgb(0 0 0 / .42) 0, transparent 6%, rgb(255 255 255 / .08) 10%, transparent 14%, rgb(0 0 0 / .38) 20%),
        linear-gradient(100deg, var(--inv-deep), var(--inv-primary) 55%, color-mix(in srgb, var(--inv-primary) 80%, var(--inv-deep)));
}
.mg-scene-curtain--r { transform: scaleX(-1); box-shadow: 10px 0 24px rgb(0 0 0 / .5); }
.mg-scene-curtain .mg-satin { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .5; background-size: cover; }
.mg-scene-curtain__tie { position: absolute; right: -4%; top: 54%; width: 16%; height: auto; overflow: visible; filter: drop-shadow(0 3px 3px rgb(0 0 0 / .4)); }
.mg-scene-valance { position: absolute; inset: 0; }
.mg-scene-valance__cloth {
    position: absolute; inset: 0 0 18%; overflow: hidden; filter: drop-shadow(0 8px 10px rgb(0 0 0 / .5));
    background: linear-gradient(180deg, var(--inv-deep), var(--inv-primary));
    -webkit-mask: linear-gradient(#000, #000) top / 100% 55% no-repeat, radial-gradient(50% 100% at 50% 0, #000 97%, transparent) 0 100% / 20% 46% repeat-x;
    mask: linear-gradient(#000, #000) top / 100% 55% no-repeat, radial-gradient(50% 100% at 50% 0, #000 97%, transparent) 0 100% / 20% 46% repeat-x;
}
.mg-scene-valance__cloth .mg-satin { position: absolute; inset: 0; mix-blend-mode: screen; opacity: .6; background-size: cover; }
.mg-scene-valance__swag { position: absolute; left: 6%; bottom: 0; width: 88%; }
.mg-scene-pendant { display: flex; flex-direction: column; align-items: center; height: 100%; }
.mg-scene-pendant__strand { flex: 1; width: 7px; background: var(--mg-scene-pearl) 50% 0 / 7px 8px repeat-y; filter: drop-shadow(0 2px 1px rgb(0 0 0 / .4)); }
.mg-scene-pendant__crest { width: 100%; margin-top: -4%; }
.mg-scene-pendant__crest .mg-crest__letters { font-size: clamp(1.1rem, 5.6vw, 1.5rem); }
/* the card of this scene is the Hollywood-Regency mirror: maroon glass, a polished rose-gold rim and a ring of pearls */
body.mg-body .inv-intro--scene .inv-scene__card {
    aspect-ratio: 3 / 4; padding: 24% 9% 12%; -webkit-backdrop-filter: none; backdrop-filter: none;
    background: linear-gradient(135deg, rgb(255 255 255 / .12) 0 26%, transparent 26.2%), radial-gradient(circle at 42% 32%, var(--mg-enamel-hi), var(--inv-deep) 78%);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400'%3E%3Cpath d='M0 70C0 30 32 16 64 25 94 33 116 13 128 6 140-1 160-1 172 6 184 13 206 33 236 25 268 16 300 30 300 70V350C300 378 278 400 250 400H50C22 400 0 378 0 350Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400'%3E%3Cpath d='M0 70C0 30 32 16 64 25 94 33 116 13 128 6 140-1 160-1 172 6 184 13 206 33 236 25 268 16 300 30 300 70V350C300 378 278 400 250 400H50C22 400 0 378 0 350Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
body.mg-body .inv-scene__card::before, body.mg-body .inv-scene__card::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
body.mg-body .inv-scene__card::before {
    background: var(--mg-leaf);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400' fill='none' stroke='%23000'%3E%3Cpath d='M0 70C0 30 32 16 64 25 94 33 116 13 128 6 140-1 160-1 172 6 184 13 206 33 236 25 268 16 300 30 300 70V350C300 378 278 400 250 400H50C22 400 0 378 0 350Z' stroke-width='14'/%3E%3Cpath d='M0 70C0 30 32 16 64 25 94 33 116 13 128 6 140-1 160-1 172 6 184 13 206 33 236 25 268 16 300 30 300 70V350C300 378 278 400 250 400H50C22 400 0 378 0 350Z' stroke-width='1.4' transform='translate(150 200) scale(.86) translate(-150 -200)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400' fill='none' stroke='%23000'%3E%3Cpath d='M0 70C0 30 32 16 64 25 94 33 116 13 128 6 140-1 160-1 172 6 184 13 206 33 236 25 268 16 300 30 300 70V350C300 378 278 400 250 400H50C22 400 0 378 0 350Z' stroke-width='14'/%3E%3Cpath d='M0 70C0 30 32 16 64 25 94 33 116 13 128 6 140-1 160-1 172 6 184 13 206 33 236 25 268 16 300 30 300 70V350C300 378 278 400 250 400H50C22 400 0 378 0 350Z' stroke-width='1.4' transform='translate(150 200) scale(.86) translate(-150 -200)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
body.mg-body .inv-scene__card::after {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 400' fill='none' stroke-linecap='round' stroke-dasharray='0 11'%3E%3Cpath d='M0 70C0 30 32 16 64 25 94 33 116 13 128 6 140-1 160-1 172 6 184 13 206 33 236 25 268 16 300 30 300 70V350C300 378 278 400 250 400H50C22 400 0 378 0 350Z' stroke='%23000' stroke-opacity='.4' stroke-width='8' transform='translate(0 1) translate(150 200) scale(.93) translate(-150 -200)'/%3E%3Cpath d='M0 70C0 30 32 16 64 25 94 33 116 13 128 6 140-1 160-1 172 6 184 13 206 33 236 25 268 16 300 30 300 70V350C300 378 278 400 250 400H50C22 400 0 378 0 350Z' stroke='%23b9a39d' stroke-width='7' transform='translate(150 200) scale(.93) translate(-150 -200)'/%3E%3Cpath d='M0 70C0 30 32 16 64 25 94 33 116 13 128 6 140-1 160-1 172 6 184 13 206 33 236 25 268 16 300 30 300 70V350C300 378 278 400 250 400H50C22 400 0 378 0 350Z' stroke='%23fbf4f0' stroke-width='5' transform='translate(-.6 -.8) translate(150 200) scale(.93) translate(-150 -200)'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
body.mg-body .inv-scene__card .inv-intro__label { font: 600 .64rem/1.5 var(--mg-sans); letter-spacing: .3em; color: var(--inv-accent); }
body.mg-body .inv-scene__card .inv-intro__names {
    padding: .05em .15em; font: 400 clamp(2.4rem, 11.5vw, 3.3rem)/1.12 var(--mg-script);
    background: var(--mg-metal); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
}
body.mg-body .inv-scene__card .inv-intro__rule { width: 4.4rem; height: 8px; background: var(--mg-scene-pearl) 0 50% / 9px 8px repeat-x; }
body.mg-body .inv-scene__card .inv-intro__date { font: 600 .66rem/1.5 var(--mg-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--mg-on-dark); }
body.mg-body .inv-intro--scene .inv-intro__skip { background: color-mix(in srgb, var(--inv-deep) 70%, transparent); border-color: var(--mg-line); color: var(--inv-foil); }
@media (prefers-reduced-motion: reduce) {
    .mg-scene-glints svg { animation: none !important; opacity: .8; }
}
