/*
 * Sunda Wayang Golek: a Sundanese wedding staged as a wayang golek show. Deep red lacquer, gold and golek
 * green on warm ivory; teak only in the puppets' rods. Ornaments are inline SVG (sections/_defs): the carved
 * proscenium with a lotus crest, red velvet curtains (CSS), the banana trunk, two golek rod puppets that sway,
 * nod and move their arm sticks, the carved lung band, a kacapi divider, ukiran corners.
 * Sections rotate between ivory (default tokens, optionally over a faint photo), red lacquer
 * (.swg-section--dark) and a photo under a deep gradient (.swg-section--photo, green with --green).
 * Colors from the variant: --inv-primary (lacquer), --inv-accent (gold), --inv-background, --inv-text,
 * --inv-red (curtains, kain), --inv-green, --inv-wood, --inv-surface, --inv-ink. Fonts: --inv-font-display
 * (names) and --inv-font-heading (titles, labels) from the client's choice; Crimson Pro for reading text.
 * All classes start with "swg-".
 */

:root {
    --inv-primary: #7b1420;
    --inv-accent: #d6a74a;
    --inv-background: #fbf2e4;
    --inv-text: #34150f;
    --inv-red: #b3242b;
    --inv-green: #1d6a4a;
    --inv-wood: #5c2f15;
    --inv-surface: #fffaf2;
    --inv-ink: #240a07;
    --inv-radius: 14px;

    --swg-w: 460px;
    /* distance from the viewport edge to the column (0 on phones) */
    --swg-edge: max(0px, calc((100vw - var(--swg-w)) / 2));
    --swg-title: var(--inv-font-heading, 'Cinzel', 'Trajan Pro', Georgia, serif);
    --swg-script: var(--inv-font-display, 'Allura', 'Great Vibes', cursive);
    --swg-serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;

    --swg-gold-bg: linear-gradient(120deg, color-mix(in srgb, var(--inv-accent) 48%, #fff) 0%, var(--inv-accent) 32%, color-mix(in srgb, var(--inv-accent) 72%, #3d2200) 58%, color-mix(in srgb, var(--inv-accent) 62%, #fff) 82%, var(--inv-accent) 100%);
    /* gold dark enough to read on ivory, light enough to read on lacquer */
    --swg-gold-text: color-mix(in srgb, var(--inv-accent) 50%, var(--inv-ink));
    --swg-gold-light: color-mix(in srgb, var(--inv-accent) 74%, #fff);
    --swg-deep: color-mix(in srgb, var(--inv-primary) 68%, #000);
    --swg-red-deep: color-mix(in srgb, var(--inv-red) 66%, var(--inv-ink));
    --swg-green-deep: color-mix(in srgb, var(--inv-green) 60%, #000);

    /* faint carved flowers (ukiran) on the grounds: gold on lacquer, red on ivory */
    --swg-carve-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23e2b45a' stroke-opacity='.13' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M36 22c5 6 5 22 0 28-5-6-5-22 0-28zM22 36c6-5 22-5 28 0-6 5-22 5-28 0z'/%3E%3Ccircle cx='36' cy='36' r='3.2'/%3E%3Cpath d='M0 8c6 0 10 4 10 10 0 4-4 5-5 2M72 8c-6 0-10 4-10 10 0 4 4 5 5 2M0 64c6 0 10-4 10-10 0-4-4-5-5-2M72 64c-6 0-10-4-10-10 0-4 4-5 5-2'/%3E%3C/g%3E%3C/svg%3E");
    --swg-carve-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23a0242b' stroke-opacity='.075' stroke-width='1.1' stroke-linecap='round'%3E%3Cpath d='M36 22c5 6 5 22 0 28-5-6-5-22 0-28zM22 36c6-5 22-5 28 0-6 5-22 5-28 0z'/%3E%3Ccircle cx='36' cy='36' r='3.2'/%3E%3Cpath d='M0 8c6 0 10 4 10 10 0 4-4 5-5 2M72 8c-6 0-10 4-10 10 0 4 4 5 5 2M0 64c6 0 10-4 10-10 0-4-4-5-5-2M72 64c-6 0-10-4-10-10 0-4 4-5 5-2'/%3E%3C/g%3E%3C/svg%3E");
    /* red lacquer: a warm sheen from above over the deep primary */
    --swg-lacquer:
        var(--swg-carve-gold),
        radial-gradient(85% 42% at 50% 0%, color-mix(in srgb, var(--inv-primary) 72%, #ffcf8a 16%) 0%, transparent 75%),
        linear-gradient(180deg, var(--inv-primary), color-mix(in srgb, var(--inv-primary) 82%, #000) 70%, var(--swg-deep));
    /* red velvet (curtains, valance): soft vertical folds */
    --swg-velvet:
        repeating-linear-gradient(90deg, rgb(0 0 0 / .32) 0, rgb(0 0 0 / .05) 6%, rgb(255 255 255 / .1) 10%, rgb(0 0 0 / .05) 14%, rgb(0 0 0 / .32) 20%),
        linear-gradient(180deg, color-mix(in srgb, var(--inv-red) 90%, #fff 10%), var(--swg-red-deep));

    /* context tokens: ivory by default, redefined on lacquer and over photos */
    --swg-fg: var(--inv-text);
    --swg-muted: color-mix(in srgb, var(--inv-text) 84%, transparent);
    --swg-title-c: var(--inv-primary);
    --swg-label: var(--inv-red);
    --swg-line: color-mix(in srgb, var(--inv-accent) 75%, transparent);
    --swg-line-soft: color-mix(in srgb, var(--inv-accent) 34%, transparent);
    --swg-key: var(--inv-red);
    --swg-btn-bg: linear-gradient(135deg, color-mix(in srgb, var(--inv-primary) 88%, #fff 12%), var(--swg-deep));
    --swg-btn-fg: #fff;
}

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

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

body.swg-body {
    margin: 0;
    background: var(--swg-deep);
    color: var(--inv-text);
    font: 400 1.08rem/1.65 var(--swg-serif);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

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

.swg-backdrop { position: fixed; inset: 0; z-index: 0; background: var(--swg-lacquer); }

.swg-page {
    position: relative; z-index: 1;
    width: min(100%, var(--swg-w)); min-height: 100vh; margin: 0 auto;
    background: var(--inv-background);
    overflow-x: clip;
}
@media (min-width: 520px) {
    .swg-page { box-shadow: 0 0 0 2px var(--inv-accent), 0 0 0 8px var(--swg-deep), 0 0 0 9px var(--swg-line), 0 30px 90px rgb(0 0 0 / .55); }
}
@media (max-width: 519px) {
    .swg-backdrop { display: none; }
}

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

/* ---------- ornaments: carved band, corners, kacapi ---------- */

.swg-band { height: 26px; line-height: 0; box-shadow: 0 6px 12px -8px rgb(0 0 0 / .5); }
.swg-band svg { display: block; }

.swg-corners { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.swg-corner { position: absolute; width: clamp(84px, 24vw, 112px); aspect-ratio: 1; opacity: .85; }
.swg-corner svg {
    display: block; width: 100%; height: 100%; overflow: visible;
    transform-origin: 6% 6%;
    animation: swg-vine 7s ease-in-out infinite alternate;
}
.swg-corner--tl { top: 6px; left: 6px; }
.swg-corner--tr { top: 6px; right: 6px; transform: scaleX(-1); }
.swg-corner--bl { bottom: 6px; left: 6px; transform: scaleY(-1); }
.swg-corner--br { bottom: 6px; right: 6px; transform: scale(-1, -1); }
.swg-corner--tr svg { animation-delay: -2.6s; animation-duration: 8s; }
.swg-corner--bl svg { animation-delay: -4s; }
.swg-corner--br svg { animation-delay: -1.4s; animation-duration: 8.4s; }
@keyframes swg-vine {
    from { transform: rotate(-1.8deg) scale(1); }
    to { transform: rotate(1.6deg) scale(1.03); }
}

/* kacapi divider: the zither between two fading gold lines; its strings shiver once on reveal */
.swg-kacapi { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: .8rem auto 0; }
.swg-kacapi__line { width: 3.6rem; height: 1px; background: linear-gradient(90deg, transparent, var(--swg-line)); }
.swg-kacapi__line--end { transform: scaleX(-1); }
.swg-kacapi__svg { display: block; width: 5.4rem; height: auto; aspect-ratio: 160 / 44; overflow: visible; filter: drop-shadow(0 4px 4px rgb(0 0 0 / .2)); }
.swg-kacapi__strings { transform-box: fill-box; transform-origin: 50% 50%; }
html.inv-anim .is-revealed .swg-kacapi__strings,
html.inv-anim .swg-kacapi.is-revealed .swg-kacapi__strings { animation: swg-pluck .9s ease-out .5s 1; }
@keyframes swg-pluck {
    0%, 100% { transform: none; }
    12% { transform: translateY(.7px); }
    24% { transform: translateY(-.6px); }
    38% { transform: translateY(.45px); }
    52% { transform: translateY(-.3px); }
    70% { transform: translateY(.15px); }
}

.swg-kicker {
    position: relative; z-index: 2;
    font: 500 .76rem/1.4 var(--swg-title); letter-spacing: .36em; text-transform: uppercase;
    color: var(--swg-gold-light);
}

/* ---------- photo backgrounds under a gradient ---------- */

.swg-photobg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.swg-photobg__img { position: absolute; inset: -40px 0; background: var(--swg-photo, none) center 30% / cover no-repeat; }
.swg-photobg::after { content: ''; position: absolute; inset: 0; background: var(--swg-veil, transparent); }

/* ---------- the wayang golek puppets ---------- */

.swg-golek { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 10px 8px rgb(0 0 0 / .4)); }
/* played: the figure sways on its rod, the head nods, the arm stick lifts the hand */
.swg-golek__all { transform-origin: 70px 420px; animation: swg-sway 5s ease-in-out infinite alternate; }
.swg-golek__head { transform-origin: 70px 90px; animation: swg-nod 3.6s ease-in-out infinite; }
.swg-golek__arm { transform-origin: 93px 106px; animation: swg-arm 3.8s ease-in-out infinite alternate; }
.swg-golek--bride .swg-golek__all { animation-delay: -2.1s; animation-duration: 5.4s; }
.swg-golek--bride .swg-golek__head { animation-delay: -1.3s; animation-duration: 4s; }
.swg-golek--bride .swg-golek__arm { animation-delay: -1.7s; animation-duration: 4.2s; }
@keyframes swg-sway {
    from { transform: rotate(-2deg); }
    to { transform: rotate(2deg); }
}
@keyframes swg-nod {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-6deg); }
    48% { transform: rotate(3deg); }
    70% { transform: rotate(-2deg); }
}
@keyframes swg-arm {
    from { transform: rotate(4deg); }
    to { transform: rotate(-13deg); }
}

/* ---------- the stage: proscenium, photo, curtains, puppets, banana trunk ---------- */

.swg-stage { position: relative; width: min(84%, 340px); aspect-ratio: 300 / 380; margin: 0 auto; }
.swg-stage__opening {
    position: absolute; left: 14.667%; right: 14.667%; top: 16.842%; height: 72.632%;
    border-radius: 50% 50% 0 0 / 25.36% 25.36% 0 0; overflow: hidden; isolation: isolate;
    background: var(--swg-deep);
}
.swg-stage__photo {
    position: absolute; inset: 0;
    background:
        var(--swg-photo, none) center 30% / cover no-repeat,
        radial-gradient(70% 55% at 50% 30%, color-mix(in srgb, var(--inv-red) 70%, #ffcf8a 20%), var(--swg-red-deep));
}
.swg-stage__photo--empty { display: grid; place-items: center; }
.swg-stage__photo--empty span { display: flex; align-items: baseline; gap: .35rem; font: 400 clamp(2.6rem, 13vw, 3.4rem)/1 var(--swg-script); color: var(--swg-gold-light); text-shadow: 0 3px 10px rgb(0 0 0 / .45); }
.swg-stage__photo--empty i { font: 500 .45em/1 var(--swg-title); font-style: normal; }
/* a warm spotlight from above, the floor in shade */
.swg-stage__light {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        radial-gradient(55% 40% at 50% 8%, rgb(255 226 170 / .3), transparent 70%),
        linear-gradient(180deg, transparent 55%, rgb(0 0 0 / .42));
}
/* the valance: a pleated red velvet pelmet with scalloped edge and a gold fringe line */
.swg-stage__valance {
    position: absolute; z-index: 3; top: 0; left: 0; right: 0; height: 15%;
    background:
        linear-gradient(180deg, transparent calc(100% - 13px), var(--inv-accent) calc(100% - 13px) calc(100% - 11px), transparent calc(100% - 11px)),
        var(--swg-velvet);
    background-size: 100% 100%, 26px 100%, 100% 100%;
    -webkit-mask: radial-gradient(9px 9px at 50% 0, #000 98%, transparent) 0 100% / 18px 9px repeat-x, linear-gradient(#000, #000) 0 0 / 100% calc(100% - 9px) no-repeat;
    mask: radial-gradient(9px 9px at 50% 0, #000 98%, transparent) 0 100% / 18px 9px repeat-x, linear-gradient(#000, #000) 0 0 / 100% calc(100% - 9px) no-repeat;
    filter: drop-shadow(0 4px 4px rgb(0 0 0 / .4));
}
/* the curtains, tied back at the sides (their resting state); the cover draws them aside once */
.swg-curtain {
    position: absolute; z-index: 2; top: 0; bottom: 0; width: 51%;
    background: var(--swg-velvet); background-size: 22px 100%, 100% 100%;
    box-shadow: inset 0 0 18px rgb(0 0 0 / .35);
    transform: scaleX(.26);
}
.swg-curtain--l { left: 0; transform-origin: 0 50%; clip-path: polygon(0 0, 100% 0, 100% 34%, 52% 64%, 78% 100%, 0 100%); }
.swg-curtain--r { right: 0; transform-origin: 100% 50%; clip-path: polygon(100% 0, 0 0, 0 34%, 48% 64%, 22% 100%, 100% 100%); }
.swg-stage__frame { position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 14px 18px rgb(0 0 0 / .45)); pointer-events: none; }
/* the puppets: cut off at the middle of the trunk (their rods go into it) */
.swg-stage__cast { position: absolute; inset: 0; z-index: 3; clip-path: inset(-30% -30% 7.9% -30%); pointer-events: none; }
.swg-stage__puppet { position: absolute; top: 30.2%; height: 66%; width: 27.35%; }
.swg-stage__puppet--l { left: .5%; }
.swg-stage__puppet--r { right: .5%; }
.swg-stage__trunk { position: absolute; z-index: 4; left: 0; width: 100%; top: 87.4%; height: auto; aspect-ratio: 300 / 34; overflow: visible; filter: drop-shadow(0 8px 8px rgb(0 0 0 / .45)); }

/* the monogram plaque on the trunk: lacquer with a gold rim, the letters parted by a thin gold rule */
.swg-stage__sign {
    position: absolute; z-index: 5; left: 50%; top: 86.2%; transform: translateX(-50%);
    display: flex; align-items: center; gap: .55em; padding: .22em .9em .26em;
    border-radius: 999px; background: var(--swg-lacquer);
    box-shadow: inset 0 0 0 1px var(--inv-accent), inset 0 0 0 3px var(--swg-deep), inset 0 0 0 4px color-mix(in srgb, var(--inv-accent) 55%, transparent), 0 6px 12px -4px rgb(0 0 0 / .6);
    font: 500 clamp(.72rem, 3.4vw, .9rem)/1.2 var(--swg-title); letter-spacing: .08em; color: var(--swg-gold-light);
}
.swg-stage__sign span + span::before { content: ''; display: inline-block; width: 1px; height: .9em; margin-right: .55em; vertical-align: -.1em; background: var(--swg-gold-light); opacity: .7; }

/* ---------- cover: the stage before the show ---------- */

.swg-cover {
    position: fixed; inset: 0; z-index: 30;
    width: min(100%, var(--swg-w)); margin: 0 auto;
    display: flex; overflow-x: hidden; overflow-y: auto;
    color: var(--inv-surface);
    background: var(--swg-lacquer);
    --swg-veil: linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 82%, transparent), color-mix(in srgb, var(--inv-primary) 88%, transparent) 45%, color-mix(in srgb, var(--swg-deep) 96%, transparent));
}
html.inv-anim .swg-cover [data-reveal] { opacity: 1; }
.swg-cover > .swg-photobg .swg-photobg__img { inset: -10px; filter: blur(3px) saturate(.9); }
.swg-cover__inner {
    position: relative; z-index: 2;
    width: 100%; min-height: 100svh; margin: auto; padding: 1.5rem 1.25rem 2.2rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem;
    text-align: center;
}
.swg-stage--cover { width: min(82vw, 300px, calc(46svh * 300 / 380)); margin-bottom: .2rem; }
.swg-cover__text { display: flex; flex-direction: column; align-items: center; gap: .5rem; width: 100%; }
.swg-cover__names {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .5rem;
    font: 400 clamp(2.7rem, 12.5vw, 3.4rem)/1.12 var(--swg-script); color: var(--inv-surface);
    text-shadow: 0 3px 14px rgb(0 0 0 / .45);
}
.swg-cover__amp, .swg-hero__amp { font: 500 .42em/1 var(--swg-title); color: var(--swg-gold-light); }
.swg-cover__date {
    display: flex; align-items: center; gap: .65rem;
    font: 500 .76rem/1.4 var(--swg-title); letter-spacing: .18em; text-transform: uppercase; color: var(--swg-gold-light);
}
.swg-cover__date::before, .swg-cover__date::after { content: ''; width: 7px; height: 7px; transform: rotate(45deg); background: var(--inv-accent); box-shadow: 0 0 0 1.5px var(--swg-deep), 0 0 0 2.5px var(--swg-gold-light); }
.swg-cover__quote { max-width: 19rem; font: italic 400 .98rem/1.45 var(--swg-serif); color: color-mix(in srgb, var(--inv-surface) 90%, transparent); }

/* the guest, between two gold rules (no box) */
.swg-guest { position: relative; width: min(100%, 17rem); margin-top: .2rem; padding: .45rem .5rem; }
.swg-guest::before, .swg-guest::after {
    content: ''; position: absolute; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--swg-gold-light) 25%, var(--swg-gold-light) 75%, transparent);
}
.swg-guest::before { top: 0; }
.swg-guest::after { bottom: 0; }
.swg-guest__label { font: 500 .66rem/1.4 var(--swg-title); letter-spacing: .3em; text-transform: uppercase; color: var(--swg-gold-light); }
.swg-guest__name { margin-top: .1rem; font: 600 1.22rem/1.3 var(--swg-serif); color: var(--inv-surface); overflow-wrap: anywhere; }

.swg-open { margin-top: .4rem; position: relative; z-index: 2; }
.swg-cover .swg-open { background: var(--swg-gold-bg); color: var(--inv-ink); box-shadow: 0 14px 26px -12px rgb(0 0 0 / .7), inset 0 1px 0 rgb(255 255 255 / .45); }

/* the opening moment (≤ 2.5 s): the curtains draw aside, the photo warms up, the puppets rise from the trunk */
html.inv-anim .swg-stage--cover { animation: swg-fade .6s ease-out both; }
html.inv-anim .swg-stage--cover .swg-curtain { animation: swg-curtain 1.5s cubic-bezier(.62, .02, .28, 1) .35s both; }
html.inv-anim .swg-stage--cover .swg-curtain--r { animation-name: swg-curtain-r; }
html.inv-anim .swg-stage--cover .swg-stage__photo { animation: swg-photo 2s ease-out .4s both; }
html.inv-anim .swg-stage--cover .swg-stage__puppet { animation: swg-rise 1.2s cubic-bezier(.3, 1.25, .5, 1) 1s both; }
html.inv-anim .swg-stage--cover .swg-stage__puppet--r { animation-delay: 1.15s; }
@keyframes swg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes swg-curtain {
    from { transform: scaleX(1); clip-path: polygon(0 0, 100% 0, 100% 34%, 100% 64%, 100% 100%, 0 100%); }
    to { transform: scaleX(.26); clip-path: polygon(0 0, 100% 0, 100% 34%, 52% 64%, 78% 100%, 0 100%); }
}
@keyframes swg-curtain-r {
    from { transform: scaleX(1); clip-path: polygon(100% 0, 0 0, 0 34%, 0 64%, 0 100%, 100% 100%); }
    to { transform: scaleX(.26); clip-path: polygon(100% 0, 0 0, 0 34%, 48% 64%, 22% 100%, 100% 100%); }
}
@keyframes swg-photo { from { transform: scale(1.1); filter: brightness(.55); } to { transform: none; filter: none; } }
@keyframes swg-rise { from { transform: translateY(38%); } to { transform: none; } }

/* opening the invitation: the text fades, the stage comes a little closer, then the cover fades */
.swg-cover--leave { transition: opacity .6s ease .45s; }
.swg-cover--gone { opacity: 0; }
.swg-cover--leave .swg-cover__text, .swg-cover--leave .swg-kicker { opacity: 0; transition: opacity .35s ease; }
html.inv-anim .swg-cover--leave .swg-stage--cover { transform: scale(1.06); transition: transform 1s cubic-bezier(.4, 0, .2, 1); }

/* ---------- hero: the show begins ---------- */

.swg-hero {
    position: relative; overflow: hidden;
    min-height: min(100vh, 860px); min-height: min(100svh, 860px); padding: 2.6rem 1rem 4.2rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
    text-align: center; color: var(--inv-surface);
    background: var(--swg-lacquer);
    --swg-veil: linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 84%, transparent), color-mix(in srgb, var(--swg-deep) 94%, transparent));
}
.swg-hero > * { position: relative; z-index: 1; }
.swg-hero > .swg-photobg { position: absolute; z-index: 0; }
.swg-hero > .swg-photobg .swg-photobg__img { filter: blur(3px); }
.swg-stage--hero { width: min(88%, 350px); margin-top: .4rem; }
.swg-hero__names {
    margin-top: .6rem;
    display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .5rem;
    font: 400 clamp(2.8rem, 13vw, 3.5rem)/1.15 var(--swg-script); color: var(--inv-surface);
    text-shadow: 0 3px 14px rgb(0 0 0 / .45);
}
.swg-hero__date { font: 500 .78rem/1.4 var(--swg-title); letter-spacing: .22em; text-transform: uppercase; color: var(--swg-gold-light); }
.swg-hero > .swg-band { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }
/* the photo comes alive a moment after opening */
html.inv-anim.inv-opened .swg-stage--hero .swg-stage__photo { animation: swg-photo 2.2s ease-out .2s both; }

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

.swg-main { position: relative; }

/* ivory with faint red carving */
.swg-section {
    position: relative; overflow: hidden;
    padding: 4.4rem 1.4rem;
    text-align: center; color: var(--swg-fg);
    background:
        var(--swg-carve-red),
        radial-gradient(70% 40% at 50% 0%, color-mix(in srgb, var(--inv-accent) 14%, transparent), transparent 70%),
        linear-gradient(180deg, var(--inv-background), color-mix(in srgb, var(--inv-background) 92%, var(--inv-accent)));
}
/* ivory over a faint photo */
.swg-section--photo-light {
    --swg-veil: linear-gradient(180deg, color-mix(in srgb, var(--inv-background) 84%, transparent), color-mix(in srgb, var(--inv-background) 90%, transparent) 40%, color-mix(in srgb, var(--inv-background) 96%, transparent));
    background: linear-gradient(180deg, var(--inv-background), color-mix(in srgb, var(--inv-background) 88%, var(--inv-accent)));
}
/* red lacquer: ivory text, gold labels, gold buttons */
.swg-section--dark, .swg-section--photo {
    --swg-fg: var(--inv-surface);
    --swg-muted: color-mix(in srgb, var(--inv-surface) 88%, transparent);
    --swg-title-c: var(--inv-surface);
    --swg-label: var(--swg-gold-light);
    --swg-line: color-mix(in srgb, var(--inv-accent) 85%, #fff 10%);
    --swg-line-soft: color-mix(in srgb, var(--inv-accent) 45%, transparent);
    --swg-key: var(--swg-gold-light);
    --swg-btn-bg: var(--swg-gold-bg);
    --swg-btn-fg: var(--inv-ink);
    background: var(--swg-lacquer);
}
/* a photo under a deep gradient (lacquer red, or golek green) */
.swg-section--photo {
    --swg-veil: linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 90%, transparent), color-mix(in srgb, var(--inv-primary) 74%, transparent) 45%, color-mix(in srgb, var(--swg-deep) 94%, transparent));
}
.swg-section--green {
    --swg-veil: linear-gradient(180deg, color-mix(in srgb, var(--swg-green-deep) 92%, transparent), color-mix(in srgb, var(--inv-green) 76%, transparent) 45%, color-mix(in srgb, var(--swg-green-deep) 95%, transparent));
    background: var(--swg-carve-gold), linear-gradient(180deg, var(--inv-green), var(--swg-green-deep));
}
.swg-section--dark .inv-button--outline, .swg-section--photo .inv-button--outline { color: var(--inv-surface); background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--inv-accent) 75%, transparent); }

.swg-section > * { position: relative; z-index: 1; }
.swg-section > .swg-corners, .swg-section > .swg-photobg { position: absolute; z-index: 0; }
.swg-section > .swg-band--top { position: absolute; z-index: 2; top: 0; left: 0; right: 0; }
.swg-section:has(> .swg-band--top) { padding-top: 5.4rem; }

.swg-heading { margin-bottom: 2rem; }
.swg-heading__label { font: 600 .72rem/1.4 var(--swg-title); letter-spacing: .34em; text-transform: uppercase; color: var(--swg-label); }
.swg-heading__title {
    position: relative; display: inline-block; margin-top: .35rem; padding: 0 .4rem;
    font: 500 clamp(1.75rem, 8vw, 2.1rem)/1.22 var(--swg-title); letter-spacing: .03em; color: var(--swg-title-c); overflow-wrap: anywhere;
}
/* a soft wash of colour behind the title */
.swg-heading__title::before {
    content: ''; position: absolute; z-index: -1; left: -1.2rem; right: -1.2rem; top: 18%; bottom: 4%;
    border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--inv-red) 13%, transparent), transparent);
}
.swg-section--dark .swg-heading__title::before, .swg-section--photo .swg-heading__title::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent); }

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

.swg-card {
    position: relative;
    background: var(--inv-surface); color: var(--inv-text);
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px var(--swg-line-soft), inset 0 0 0 5px var(--inv-surface), inset 0 0 0 6px color-mix(in srgb, var(--inv-accent) 30%, transparent), 0 26px 46px -28px rgb(0 0 0 / .55);
}

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

.inv-button {
    gap: .5rem; padding: .85rem 1.45rem; border-radius: 999px;
    background: var(--swg-btn-bg); color: var(--swg-btn-fg);
    font: 600 .74rem/1.2 var(--swg-title); letter-spacing: .14em; text-transform: uppercase;
    box-shadow: 0 12px 22px -14px rgb(0 0 0 / .55), inset 0 1px 0 rgb(255 255 255 / .25), 0 0 0 1px color-mix(in srgb, var(--inv-accent) 55%, transparent);
}
.inv-button--outline {
    background: color-mix(in srgb, var(--inv-surface) 80%, transparent); color: var(--inv-primary);
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--inv-primary) 55%, transparent);
}
.inv-button--outline:hover { background: color-mix(in srgb, var(--inv-primary) 8%, var(--inv-surface)); }
.inv-button .swg-icon { width: 1.15rem; height: 1.15rem; }

.swg-pill {
    display: inline-flex; align-items: center; gap: .4rem; margin-top: .7rem; padding: .45rem .95rem;
    border-radius: 999px; color: var(--swg-gold-light); text-decoration: none;
    background: rgb(255 255 255 / .06);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 60%, transparent);
    font: 500 .86rem/1 var(--swg-serif); letter-spacing: .02em;
}

/* ---------- opening ---------- */
.swg-opening { padding-top: 4.6rem; }
.swg-arabic { margin: .6rem 0 .2rem; font: 400 1.85rem/1.8 'Amiri', serif; color: var(--inv-primary); }
.swg-opening__greeting { margin-top: .5rem; font: 500 1.22rem/1.45 var(--swg-title); letter-spacing: .03em; color: var(--swg-title-c); }
.swg-opening .swg-kacapi { margin-bottom: 1.2rem; }
.swg-opening__message { max-width: 24rem; margin: 0 auto; color: var(--swg-fg); }
/* the verse on a red lacquer panel with carved gold corners */
.swg-plaque {
    position: relative; max-width: 23rem; margin: 2.4rem auto 0; padding: 2.3rem 1.8rem 1.8rem;
    border-radius: 6px; color: var(--inv-surface);
    background: var(--swg-lacquer);
    box-shadow: inset 0 0 0 1.5px var(--inv-accent), inset 0 0 0 6px var(--swg-deep), inset 0 0 0 7px color-mix(in srgb, var(--inv-accent) 55%, transparent), 0 26px 40px -24px rgb(0 0 0 / .6);
}
.swg-plaque .swg-corner { width: 3.6rem; opacity: 1; }
.swg-plaque .swg-corner svg { animation: none; }
.swg-plaque__mark { position: absolute; top: .3rem; left: 50%; transform: translateX(-50%); font: 400 3.4rem/1 var(--swg-serif); color: var(--swg-gold-light); }
.swg-plaque blockquote { position: relative; margin: 0; font: italic 400 1.08rem/1.65 var(--swg-serif); }
.swg-plaque figcaption { position: relative; margin-top: .8rem; font: 600 .7rem/1.4 var(--swg-title); letter-spacing: .24em; text-transform: uppercase; color: var(--swg-gold-light); }

/* ---------- couple: zig-zag, photos in small carved arches ---------- */
.swg-person {
    display: grid; grid-template-columns: 8.6rem minmax(0, 1fr); align-items: center; gap: 1.1rem;
    max-width: 26rem; margin: 0 auto; text-align: left;
}
.swg-person--right { grid-template-columns: minmax(0, 1fr) 8.6rem; text-align: right; }
.swg-person--right .swg-person__frame { order: 2; }
.swg-person__frame {
    position: relative; margin-top: 1.4rem; padding: 5px;
    border-radius: 50% 50% 6px 6px / 36% 36% 6px 6px;
    background: var(--swg-gold-bg);
    box-shadow: 0 0 0 3px var(--swg-deep), 0 0 0 4px var(--swg-line), 0 24px 30px -16px rgb(0 0 0 / .65);
}
.swg-person__frame::after {
    content: ''; position: absolute; left: -10px; right: -10px; bottom: -12px; height: 9px; border-radius: 3px;
    background: var(--swg-gold-bg); box-shadow: 0 6px 10px -4px rgb(0 0 0 / .5);
}
.swg-person__crest { position: absolute; z-index: 2; left: 50%; top: -1.7rem; width: 4.4rem; transform: translateX(-50%); overflow: visible; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .4)); }
.swg-person__photo {
    display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
    border-radius: 50% 50% 3px 3px / 35% 35% 3px 3px;
}
.swg-person__photo--empty { display: grid; place-items: center; background: radial-gradient(70% 55% at 50% 30%, color-mix(in srgb, var(--inv-red) 70%, #ffcf8a 20%), var(--swg-red-deep)); font: 400 3.4rem/1 var(--swg-script); color: var(--inv-surface); }
.swg-person__text { min-width: 0; }
.swg-person__role { font: 600 .64rem/1.4 var(--swg-title); letter-spacing: .24em; text-transform: uppercase; color: var(--swg-label); }
.swg-person__nick { font: 400 2.7rem/1.15 var(--swg-script); color: var(--swg-gold-light); overflow-wrap: anywhere; }
.swg-person__name { margin-top: .1rem; font: 600 1.12rem/1.35 var(--swg-serif); color: var(--swg-fg); overflow-wrap: anywhere; }
.swg-person__parents { margin-top: .4rem; font-size: .95rem; line-height: 1.5; color: var(--swg-muted); }
.swg-person__parents strong { color: var(--swg-fg); font-weight: 600; }
.swg-couple .swg-lead { margin-bottom: 1.4rem; }

.swg-amp { display: flex; align-items: center; justify-content: center; gap: .7rem; margin: 2rem 0 .6rem; }
.swg-amp svg { width: 1.4rem; height: 1.4rem; overflow: visible; }
.swg-amp::before, .swg-amp::after { content: ''; order: -1; width: 3.4rem; height: 1px; background: linear-gradient(90deg, transparent, var(--swg-line)); }
.swg-amp::after { order: 5; transform: scaleX(-1); }
.swg-amp span { font: 400 3rem/1 var(--swg-script); color: var(--swg-gold-light); }

/* ---------- countdown: the date set large, arched tiles ---------- */
.swg-date {
    display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .9rem;
    max-width: 22rem; margin: -.4rem auto 1.8rem;
}
.swg-date__side {
    padding: .5rem 0; border-block: 1px solid var(--swg-line);
    font: 600 .74rem/1.35 var(--swg-title); letter-spacing: .18em; text-transform: uppercase; color: var(--inv-surface);
}
.swg-date__day {
    display: grid; place-items: center; width: 5.2rem; aspect-ratio: 1; border-radius: 50%;
    font: 500 2.7rem/1 var(--swg-title); color: var(--swg-gold-light);
    background: rgb(0 0 0 / .18);
    box-shadow: inset 0 0 0 1.5px var(--inv-accent), inset 0 0 0 5px rgb(0 0 0 / .12), inset 0 0 0 6px color-mix(in srgb, var(--inv-accent) 50%, transparent);
}

.inv-countdown { gap: .55rem; }
.inv-countdown__item {
    flex: 1; min-width: 0; max-width: 4.8rem; padding: 1.05rem .2rem .65rem;
    border-radius: 50% 50% 8px 8px / 2.2rem 2.2rem 8px 8px;
    background: linear-gradient(180deg, rgb(255 255 255 / .1), rgb(0 0 0 / .22));
    box-shadow: inset 0 0 0 1px var(--inv-accent), inset 0 0 0 4px rgb(0 0 0 / .12), inset 0 0 0 5px color-mix(in srgb, var(--inv-accent) 40%, transparent), 0 14px 22px -12px rgb(0 0 0 / .6);
}
.inv-countdown__value { font: 500 1.7rem/1.1 var(--swg-title); color: var(--swg-gold-light); }
.inv-countdown__label { margin-top: .25rem; font: 600 .58rem/1.2 var(--swg-title); letter-spacing: .14em; text-transform: uppercase; color: var(--inv-surface); opacity: 1; }
.inv-countdown__done { font-style: italic; color: var(--swg-muted); }
.inv-countdown__actions { margin-top: 1.6rem; }
.inv-countdown__actions .inv-button { padding: .75rem 1rem; font-size: .62rem; letter-spacing: .1em; }

/* ---------- events: photo-headed cards with a carved band and a date medallion ---------- */
.swg-event {
    position: relative; max-width: 23rem; margin: 0 auto; overflow: hidden;
    border-radius: 22px; background: var(--inv-surface);
    box-shadow: inset 0 0 0 1px var(--swg-line-soft), 0 28px 46px -28px rgb(0 0 0 / .55);
}
.swg-event + .swg-event { margin-top: 2rem; }
.swg-event__head {
    --swg-tone: var(--inv-red);
    display: flex; flex-direction: column; justify-content: flex-end; min-height: 11.5rem; padding: 1.2rem 1rem 1.1rem;
    color: var(--inv-surface);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--swg-tone) 18%, transparent) 0%, color-mix(in srgb, var(--swg-tone) 40%, transparent) 40%, color-mix(in srgb, var(--swg-tone) 70%, #000 22%) 100%),
        var(--swg-photo, none) center 40% / cover no-repeat,
        radial-gradient(70% 70% at 50% 20%, color-mix(in srgb, var(--swg-tone) 70%, #ffcf8a 20%), color-mix(in srgb, var(--swg-tone) 60%, #000));
}
.swg-event--green .swg-event__head { --swg-tone: var(--inv-green); }
.swg-event__kicker { font: 600 .66rem/1.4 var(--swg-title); letter-spacing: .3em; text-transform: uppercase; color: var(--swg-gold-light); text-shadow: 0 1px 6px rgb(0 0 0 / .5); }
.swg-event__name { font: 500 1.65rem/1.2 var(--swg-title); letter-spacing: .04em; text-shadow: 0 2px 10px rgb(0 0 0 / .5); overflow-wrap: anywhere; }
.swg-band--event { box-shadow: none; }
.swg-event__medal {
    position: relative; z-index: 1; display: grid; place-items: center; align-content: center;
    width: 6.4rem; aspect-ratio: 1; margin: -2.3rem auto 0; border-radius: 50%;
    background: var(--inv-surface);
    box-shadow: 0 0 0 3px var(--inv-accent), 0 0 0 6px var(--inv-surface), 0 0 0 7px var(--swg-line-soft), 0 14px 22px -10px rgb(0 0 0 / .5);
}
.swg-event__weekday, .swg-event__month { font: 600 .56rem/1.2 var(--swg-title); letter-spacing: .14em; text-transform: uppercase; color: var(--swg-gold-text); }
.swg-event__day { font: 500 2.3rem/1.05 var(--swg-title); color: var(--inv-primary); }
.swg-event__body { padding: .9rem 1.2rem 1.5rem; display: flex; flex-direction: column; align-items: center; gap: .25rem; color: var(--inv-text); }
.swg-event__body p { display: flex; align-items: flex-start; justify-content: center; gap: .4rem; overflow-wrap: anywhere; }
.swg-event__body p .swg-icon { margin-top: .25rem; color: var(--inv-red); }
.swg-event__time { font: 600 1.05rem/1.5 var(--swg-serif); color: var(--inv-red); }
.swg-event__place { width: 100%; margin-top: .6rem; padding: .8rem .9rem; border-radius: 14px; background: color-mix(in srgb, var(--inv-accent) 10%, var(--inv-surface)); }
.swg-event__venue { font: 700 1.14rem/1.35 var(--swg-serif); color: var(--inv-ink); }
.swg-event__address { display: block !important; margin-top: .2rem; font-size: .95rem; line-height: 1.55; color: color-mix(in srgb, var(--inv-text) 88%, transparent); }
.swg-event__dress {
    margin-top: .6rem; padding: .3rem .85rem; border-radius: 999px; font: 500 .9rem/1.5 var(--swg-serif);
    background: color-mix(in srgb, var(--inv-green) 10%, var(--inv-surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-green) 30%, transparent);
}
.swg-event__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: .5rem; width: 100%; margin-top: 1rem; }
.swg-event__actions .inv-button { width: 100%; padding: .75rem .5rem; font-size: .6rem; letter-spacing: .08em; text-decoration: none; }
.swg-event__maps { margin: 0; }

/* ---------- love story: compact zig-zag on lacquer ----------
   Default: text left (aligned right, toward the line), meta right. .is-flip swaps the sides. */
.swg-story { padding-left: 1rem; padding-right: 1rem; }
.swg-zig { position: relative; max-width: 25rem; margin: 0 auto; padding: 0; list-style: none; }
.swg-zig::before {
    content: ''; position: absolute; left: 50%; top: .2rem; bottom: 0; width: 1px; transform: translateX(-50%);
    background: linear-gradient(180deg, var(--inv-accent), var(--inv-accent) 85%, transparent);
}
.swg-zig__item {
    position: relative;
    display: grid; grid-template-columns: minmax(0, 1fr) 2.3rem minmax(0, 1fr); column-gap: .65rem; align-items: start;
    grid-template-areas: "text num meta";
}
.swg-zig__item + .swg-zig__item { margin-top: 2.2rem; }
.swg-zig__item.is-flip { grid-template-areas: "meta num text"; }
.swg-zig__num {
    grid-area: num; justify-self: center; display: grid; place-items: center;
    width: 2.3rem; height: 2.3rem; border-radius: 50%;
    background: var(--swg-gold-bg); color: var(--inv-ink);
    font: 600 .74rem/1 var(--swg-title);
    box-shadow: 0 0 0 3px var(--inv-primary), 0 0 0 4px var(--swg-line), 0 6px 12px -6px rgb(0 0 0 / .5);
}
.swg-zig__text { grid-area: text; min-width: 0; text-align: right; }
.is-flip .swg-zig__text { text-align: left; }
.swg-zig__title { font: 600 1.12rem/1.3 var(--swg-serif); color: var(--inv-surface); overflow-wrap: anywhere; }
.swg-zig__rule { display: block; width: 72%; height: 1px; margin: .45rem 0 .5rem auto; background: linear-gradient(270deg, var(--swg-line), transparent); }
.is-flip .swg-zig__rule { margin-left: 0; margin-right: auto; background: linear-gradient(90deg, var(--swg-line), transparent); }
.swg-zig__story { font-size: .95rem; line-height: 1.55; color: var(--swg-muted); overflow-wrap: anywhere; }
.swg-zig__meta { grid-area: meta; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; text-align: left; }
.is-flip .swg-zig__meta { align-items: flex-end; text-align: right; }
.swg-zig__date { font: italic 500 1.25rem/1.2 var(--swg-serif); color: var(--swg-gold-light); overflow-wrap: anywhere; }
.swg-zig__photo {
    display: block; width: min(6.4rem, 100%); aspect-ratio: 3 / 4; object-fit: cover;
    border-radius: 50% 50% 4px 4px / 34% 34% 4px 4px;
    border: 3px solid var(--inv-accent);
    box-shadow: 0 0 0 3px var(--swg-deep), 0 14px 22px -14px rgb(0 0 0 / .7);
}

/* ---------- gallery slider on ivory, the stage photo in a lacquer frame ---------- */
.swg-gallery .inv-gallery-wrap { max-width: 24rem; margin: 0 auto; }
.swg-gallery .inv-gallery-slider { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.swg-gallery .inv-gallery-slider__stage { margin: 0 10px; }
.inv-gallery-slider__thumb { border-radius: 6px; }
.inv-gallery-slider__thumb.is-active { border-color: var(--inv-accent); }
.inv-gallery-slider__arrow { background: var(--swg-gold-bg); color: var(--inv-ink); font-weight: 600; box-shadow: 0 4px 10px -4px rgb(0 0 0 / .6); }
.inv-gallery-slider__stage {
    border-radius: 50% 50% 10px 10px / 26% 26% 10px 10px;
    box-shadow: 0 0 0 3px var(--inv-accent), 0 0 0 10px var(--inv-primary), 0 0 0 11px var(--inv-accent), 0 30px 50px -24px rgb(0 0 0 / .7);
}
.inv-gallery-slider__count { font-family: var(--swg-serif); background: rgb(0 0 0 / .5); }
.inv-gallery__play { background: color-mix(in srgb, var(--inv-ink) 65%, transparent); color: #fff; }

/* ---------- live streaming over a photo ---------- */
.swg-live__card {
    max-width: 23rem; margin: 0 auto; padding: 1.6rem 1.4rem 1.8rem; color: var(--inv-surface);
    background: color-mix(in srgb, var(--swg-deep) 55%, transparent); backdrop-filter: blur(4px);
    box-shadow: inset 0 0 0 1px var(--inv-accent), inset 0 0 0 5px rgb(0 0 0 / .1), inset 0 0 0 6px color-mix(in srgb, var(--inv-accent) 40%, transparent), 0 26px 44px -26px rgb(0 0 0 / .7);
}
.swg-live__badge {
    display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem;
    border-radius: 999px; background: var(--inv-red); color: #fff;
    font: 600 .66rem/1 var(--swg-title); letter-spacing: .2em;
    box-shadow: 0 0 0 1px var(--swg-gold-light);
}
.swg-live__badge span { width: .45rem; height: .45rem; border-radius: 50%; background: #ffd0c8; animation: swg-blink 1.4s ease-in-out infinite; }
@keyframes swg-blink { 50% { opacity: .25; } }
.swg-live__text { margin: 1rem 0 .5rem; color: var(--inv-surface); }
.swg-live__note { margin-bottom: 1rem; font: 600 1rem/1.5 var(--swg-serif); color: var(--swg-gold-light); }
.swg-live__card .inv-button { margin-top: .5rem; }

/* ---------- gift: red lacquer bank cards, two per row (a lonely last card spans both) ---------- */
.inv-gift { display: grid; gap: .9rem; max-width: 22rem; margin: 0 auto; }
.inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.inv-gift__account {
    position: relative; overflow: hidden; isolation: isolate; min-width: 0;
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: .45rem;
    grid-template-areas: "chip bank" "number number" "holder holder" "button button";
    margin: 0; padding: .85rem .85rem 1.6rem;
    border-radius: 16px; text-align: left; color: #fff;
    background:
        linear-gradient(118deg, transparent 22%, rgb(255 255 255 / .12) 36%, transparent 50%),
        var(--swg-carve-gold),
        linear-gradient(150deg, color-mix(in srgb, var(--inv-primary) 80%, #fff 12%), var(--swg-deep) 80%);
    box-shadow: 0 18px 30px -18px rgb(0 0 0 / .65), inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 75%, transparent);
}
.inv-gift__account + .inv-gift__account { margin-top: 0; }
.inv-gift__account::before {
    content: ''; grid-area: chip; width: 1.7rem; height: 1.3rem; border-radius: .3rem;
    background:
        linear-gradient(90deg, transparent 31%, rgb(0 0 0 / .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%),
        linear-gradient(135deg, #f6e6c4, #c9a160 55%, #ead3a2);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2);
}
/* a strip of the carved band along the card's foot */
.inv-gift__account::after {
    content: ''; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: .75rem;
    background:
        linear-gradient(180deg, var(--inv-accent) 0 1.5px, transparent 1.5px),
        radial-gradient(circle at 50% 50%, var(--inv-accent) 0 1.6px, transparent 2px) 0 0 / 12px 100%,
        repeating-linear-gradient(90deg, var(--inv-green) 0 6px, var(--inv-red) 6px 12px);
}
.inv-gift__bank {
    grid-area: bank; justify-self: end; min-width: 0; max-width: 100%; margin: 0;
    font: 600 .66rem/1.2 var(--swg-title); letter-spacing: .06em; text-transform: uppercase; text-align: right; overflow-wrap: anywhere;
}
.inv-gift__logo { height: 1.5rem; max-width: 100%; padding: .2rem .45rem; border-radius: .35rem; }
.inv-gift__logo img { max-width: 4.6rem; }
.inv-gift__number { grid-area: number; margin: .75rem 0 .15rem; font: 600 1.02rem/1.25 var(--swg-serif); letter-spacing: .06em; font-variant-numeric: tabular-nums; color: #fff; overflow-wrap: anywhere; }
.inv-gift__holder { grid-area: holder; margin: 0; font: 600 .6rem/1.35 var(--swg-title); letter-spacing: .08em; text-transform: uppercase; color: rgb(255 255 255 / .9); overflow-wrap: anywhere; }
.inv-gift__account .inv-button {
    grid-area: button; justify-self: start; margin-top: .6rem; padding: .35rem .7rem; border-radius: 999px;
    font-size: .6rem; letter-spacing: .06em; color: #fff; background: rgb(255 255 255 / .1);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 70%, #fff);
}
/* the gift address stays an ivory card */
.inv-gift__account.inv-gift__address {
    display: block; padding: 1.5rem 1.3rem; text-align: center; color: var(--inv-text);
    background: var(--inv-surface);
    box-shadow: inset 0 0 0 1px var(--swg-line-soft), inset 0 0 0 5px var(--inv-surface), inset 0 0 0 6px color-mix(in srgb, var(--inv-accent) 30%, transparent), 0 20px 40px -28px rgb(0 0 0 / .5);
}
.inv-gift__address::before, .inv-gift__address::after { content: none; }
.inv-gift__address .inv-gift__bank { text-align: center; font: 600 .68rem/1.4 var(--swg-title); letter-spacing: .26em; color: var(--inv-red); }
.inv-gift__address .inv-gift__holder { margin: .6rem 0 .2rem; font: 600 1.08rem/1.3 var(--swg-serif); letter-spacing: .02em; text-transform: none; color: var(--inv-ink); }
.inv-gift__address p:not([class]) { color: color-mix(in srgb, var(--inv-text) 88%, transparent); }
.inv-gift__address .inv-button { margin-top: 1rem; color: var(--inv-primary); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 50%, transparent); }

/* ---------- rsvp & wishes forms ---------- */
.swg-form { max-width: 24rem; margin: 0 auto; padding: 1.5rem 1.3rem 1.6rem; text-align: left; }
.inv-form { gap: .9rem; }
.inv-form label, .inv-form__choices legend { font: 600 .9rem/1.4 var(--swg-serif); letter-spacing: .01em; color: var(--inv-text); }
.inv-form input:not([type=radio]):not([type=checkbox]), .inv-form select, .inv-form textarea {
    padding: .7rem .85rem; border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--inv-accent) 55%, transparent);
    background: #fff; color: var(--inv-text);
    font: 400 1.02rem/1.4 var(--swg-serif);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.inv-form input::placeholder, .inv-form textarea::placeholder { color: color-mix(in srgb, var(--inv-text) 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-primary) 18%, transparent);
}
.inv-form option { background: #fff; color: var(--inv-ink); }
.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: .98rem; }
.inv-form__notice { color: var(--inv-text); background: color-mix(in srgb, var(--inv-accent) 16%, transparent); border: 1px solid var(--swg-line-soft); }
.swg-card .inv-button { --swg-btn-bg: linear-gradient(135deg, color-mix(in srgb, var(--inv-primary) 88%, #fff 12%), var(--swg-deep)); --swg-btn-fg: #fff; }
.inv-form .inv-button { justify-self: stretch; margin-top: .3rem; }
.inv-rsvp__deadline { font-style: italic; color: var(--inv-primary); }

/* 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-accent) 9%, var(--inv-background));
    box-shadow: inset 0 0 0 1px var(--swg-line-soft), inset 0 -14px 16px -14px rgb(0 0 0 / .2);
    scrollbar-color: color-mix(in srgb, var(--inv-primary) 45%, transparent) transparent;
}
.inv-wishes__empty { text-align: center; font-style: italic; }
.inv-wish {
    padding: .65rem .8rem; border-radius: 10px;
    background: #fff; color: var(--inv-text);
    border: 1px solid var(--swg-line-soft); border-left: 3px solid var(--inv-red);
}
.inv-wish__name { font: 600 1rem/1.3 var(--swg-serif); color: var(--inv-primary); }
.inv-wish__message { font-size: 1rem; line-height: 1.5; }
.inv-wish__time { margin-top: .25rem; font: 400 .74rem/1.3 var(--swg-serif); letter-spacing: .02em; }
.inv-wish__reply { margin-top: .5rem; padding: .45rem .65rem; background: color-mix(in srgb, var(--inv-green) 9%, transparent); }
.inv-wishes__page-button { color: var(--inv-primary); }

/* ---------- closing: the curtain call ---------- */
.swg-section.swg-closing {
    min-height: min(100vh, 760px); min-height: min(100svh, 760px); padding: 0;
    display: flex; flex-direction: column; justify-content: flex-end;
    color: var(--inv-surface);
    background: var(--swg-lacquer);
}
/* the photo reads clearly in the upper part, then melts into the lacquer (masked, so there is no edge) */
.swg-closing > .swg-closing__photo {
    position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: 68%; overflow: hidden;
    -webkit-mask: linear-gradient(180deg, #000 0%, #000 50%, rgb(0 0 0 / .6) 72%, transparent 100%);
    mask: linear-gradient(180deg, #000 0%, #000 50%, rgb(0 0 0 / .6) 72%, transparent 100%);
}
.swg-closing__photo > div { position: absolute; inset: -40px 0; background: var(--swg-photo) center 30% / cover no-repeat; }
/* a light warm glaze: colour photos keep their colours, a black-and-white photo turns softly warm instead of grey */
.swg-closing__photo::before { content: ''; position: absolute; z-index: 1; inset: 0; background: #f0b27a; mix-blend-mode: soft-light; opacity: .45; }
/* only a soft shade under the valance and a deepening towards the text */
.swg-closing__photo::after {
    content: ''; position: absolute; z-index: 2; inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 28%, transparent) 0%, transparent 16%, transparent 32%, color-mix(in srgb, var(--inv-primary) 62%, transparent) 56%, color-mix(in srgb, var(--inv-primary) 85%, transparent) 100%);
}
/* the valance across the top and the curtains tied back at both sides */
.swg-closing::before {
    content: ''; position: absolute; z-index: 1; top: 0; left: 0; right: 0; height: 3.2rem;
    background:
        linear-gradient(180deg, transparent calc(100% - 13px), var(--inv-accent) calc(100% - 13px) calc(100% - 11px), transparent calc(100% - 11px)),
        var(--swg-velvet);
    background-size: 100% 100%, 26px 100%, 100% 100%;
    -webkit-mask: radial-gradient(9px 9px at 50% 0, #000 98%, transparent) 0 100% / 18px 9px repeat-x, linear-gradient(#000, #000) 0 0 / 100% calc(100% - 9px) no-repeat;
    mask: radial-gradient(9px 9px at 50% 0, #000 98%, transparent) 0 100% / 18px 9px repeat-x, linear-gradient(#000, #000) 0 0 / 100% calc(100% - 9px) no-repeat;
    filter: drop-shadow(0 5px 5px rgb(0 0 0 / .4));
}
.swg-section > .swg-closing__curtain { position: absolute; z-index: 1; top: 0; height: 58%; width: 20%; background: var(--swg-velvet); background-size: 22px 100%, 100% 100%; box-shadow: inset 0 0 16px rgb(0 0 0 / .35); }
.swg-section > .swg-closing__curtain { -webkit-mask: linear-gradient(180deg, #000 55%, transparent); mask: linear-gradient(180deg, #000 55%, transparent); }
.swg-closing__curtain--l { left: 0; clip-path: polygon(0 0, 100% 0, 92% 36%, 38% 66%, 62% 100%, 0 100%); }
.swg-closing__curtain--r { right: 0; clip-path: polygon(100% 0, 0 0, 8% 36%, 62% 66%, 38% 100%, 100% 100%); }
.swg-closing > .swg-closing__content { z-index: 2; padding: 11rem 1.4rem 2.6rem; }
.swg-closing__message, .swg-closing__label { text-shadow: 0 1px 8px rgb(0 0 0 / .5); }
.swg-closing__crest { display: block; width: 4rem; margin: 0 auto .3rem; overflow: visible; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .45)); }
.swg-closing__label { font: 600 .72rem/1.4 var(--swg-title); letter-spacing: .38em; text-transform: uppercase; color: var(--swg-gold-light); }
.swg-closing__thanks { margin-top: .2rem; font: 500 clamp(1.9rem, 8.5vw, 2.1rem)/1.2 var(--swg-title); letter-spacing: .06em; color: var(--inv-surface); text-shadow: 0 2px 12px rgb(0 0 0 / .5); }
.swg-kacapi--light { --swg-line: color-mix(in srgb, var(--inv-accent) 85%, #fff); }
.swg-closing__message { max-width: 23rem; margin: .6rem auto 0; font-size: .92rem; line-height: 1.6; color: color-mix(in srgb, var(--inv-surface) 92%, transparent); }
/* the names between the two golek, all standing on the banana trunk */
.swg-closing__cast {
    position: relative; display: grid; grid-template-columns: 3.9rem minmax(0, 1fr) 3.9rem; align-items: center;
    max-width: 24rem; margin: .8rem auto 0; padding-bottom: .7rem;
}
.swg-closing__puppet { position: relative; z-index: 1; display: block; aspect-ratio: 140 / 428; clip-path: inset(-30% -60% 10.5% -60%); margin-bottom: -1.1rem; }
.swg-closing__names { position: relative; z-index: 1; padding-bottom: 1.1rem; font: 400 clamp(2.1rem, 9.5vw, 2.6rem)/1.15 var(--swg-script); color: var(--inv-surface); text-shadow: 0 3px 14px rgb(0 0 0 / .5); overflow-wrap: anywhere; }
.swg-closing__names span { display: block; margin: .1rem 0 .2rem; font: 500 .42em/1 var(--swg-title); color: var(--swg-gold-light); }
.swg-closing__trunk { position: absolute; z-index: 2; left: -4%; bottom: 0; width: 108%; height: auto; aspect-ratio: 300 / 34; overflow: visible; filter: drop-shadow(0 8px 8px rgb(0 0 0 / .45)); }
.swg-closing__sign { margin-top: .9rem; font: 600 .74rem/1.5 var(--swg-title); letter-spacing: .24em; text-transform: uppercase; color: var(--swg-gold-light); }
/* the puppets come up and bow once as the closing appears */
html.inv-anim .swg-closing__puppet[data-reveal="bow"] { opacity: 1; transform: translateY(40%); transition: transform 1.1s cubic-bezier(.3, 1.2, .5, 1); }
html.inv-anim .swg-closing__puppet[data-reveal="bow"].is-revealed { transform: none; }
html.inv-anim .swg-closing__puppet.is-revealed .swg-golek { animation: swg-bow 1.6s ease-in-out 1.1s 1; transform-origin: 50% 98%; }
@keyframes swg-bow { 40%, 55% { transform: rotate(var(--swg-bow, 7deg)); } }
.swg-closing__puppet--r { --swg-bow: -7deg; }

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

.swg-nav.inv-nav {
    --inv-nav-bg: color-mix(in srgb, var(--swg-deep) 94%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--inv-surface) 80%, transparent);
    --inv-nav-active: linear-gradient(135deg, var(--inv-red), var(--swg-red-deep));
    border-color: color-mix(in srgb, var(--inv-accent) 65%, transparent);
    box-shadow: 0 14px 34px -12px rgb(0 0 0 / .55), inset 0 -2px 0 color-mix(in srgb, var(--inv-accent) 70%, transparent);
    font-family: var(--swg-serif);
}
.swg-nav.inv-nav--icons .inv-nav__item.is-active { color: #fff; box-shadow: 0 0 0 2px var(--swg-deep), 0 0 0 3px var(--inv-accent), 0 8px 18px -6px rgb(0 0 0 / .5); }

.inv-music { right: calc(var(--swg-edge) + 1rem); }
.inv-music__button { background: var(--swg-gold-bg); color: var(--inv-ink); box-shadow: 0 8px 22px -8px rgb(0 0 0 / .5), 0 0 0 2px var(--swg-deep), 0 0 0 3px var(--inv-accent); }
.inv-autoscroll { color: var(--inv-primary); background: color-mix(in srgb, var(--inv-surface) 94%, transparent); border-color: color-mix(in srgb, var(--inv-accent) 55%, transparent); font-family: var(--swg-serif); }
.inv-autoscroll--running { background: var(--inv-primary); color: #fff; }

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

.swg-branding { position: relative; z-index: 1; color: var(--inv-surface); font-family: var(--swg-serif); background: var(--swg-deep); opacity: 1; }
.swg-branding a { color: var(--swg-gold-light); }

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .swg-corner svg, .swg-golek__all, .swg-golek__head, .swg-golek__arm, .swg-live__badge span, .swg-golek { animation: none !important; }
    .swg-cover--leave { transition: opacity .3s ease; }
}

/* ---------- fit: the whole cover (names, guest, button) on one phone screen ---------- */

@media (max-height: 760px) {
    .swg-cover__inner { gap: .4rem; padding-top: 1.1rem; padding-bottom: 1.8rem; }
    .swg-cover__text { gap: .4rem; }
    .swg-stage--cover { width: min(80vw, 280px, calc(42svh * 300 / 380)); }
    .swg-cover__names { font-size: clamp(2.4rem, 11vw, 2.9rem); }
    .swg-cover__quote { font-size: .92rem; line-height: 1.4; }
}
@media (max-height: 660px) {
    .swg-cover__inner { gap: .3rem; padding-top: .8rem; padding-bottom: 1.5rem; }
    .swg-cover__text { gap: .3rem; }
    .swg-stage--cover { width: min(76vw, calc(40svh * 300 / 380)); }
    .swg-cover__names { font-size: clamp(2.2rem, 10vw, 2.5rem); }
    .swg-cover__quote { max-width: 20rem; font-size: .84rem; line-height: 1.38; }
    .swg-guest { padding: .3rem .5rem; }
    .swg-guest__name { font-size: 1.1rem; }
    .swg-open { margin-top: .15rem; }
}
@media (max-height: 590px) {
    .swg-stage--cover { width: min(70vw, calc(37svh * 300 / 380)); }
    .swg-cover__names { font-size: 2.1rem; }
    .swg-cover__quote { font-size: .8rem; }
    .swg-kicker { font-size: .68rem; }
}

/* ---------- intro scene "Lalakon Dimimitian" (scene.json, sections/_scene) ---------- */

.swg-scene-hall { position: absolute; inset: 0; overflow: hidden; background: var(--swg-lacquer); }
.swg-scene-hall i { position: absolute; inset: -12px; background: var(--swg-photo) center 30% / cover no-repeat; filter: blur(6px) saturate(.85); opacity: .18; }
.swg-scene-hall::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(42% 60% at 50% 34%, rgb(255 222 160 / .3), transparent 72%),
        linear-gradient(180deg, rgb(0 0 0 / .1), transparent 30%, rgb(0 0 0 / .38));
}
.swg-scene-curtain { position: absolute; inset: 0; background: var(--swg-velvet); background-size: 13% 100%, 100% 100%; box-shadow: inset 0 0 40px rgb(0 0 0 / .45); }
.swg-scene-curtain::after { content: ''; position: absolute; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, var(--swg-gold-light), var(--inv-accent)); }
.swg-scene-curtain--l::after { right: 0; }
.swg-scene-curtain--r::after { left: 0; }
.swg-scene-valance { position: absolute; inset: 0; display: flex; flex-direction: column; filter: drop-shadow(0 6px 8px rgb(0 0 0 / .5)); }
.swg-scene-valance > span {
    flex: 1; background: linear-gradient(180deg, transparent calc(100% - 13px), var(--inv-accent) calc(100% - 13px) calc(100% - 11px), transparent calc(100% - 11px)), var(--swg-velvet);
    background-size: 100% 100%, 30px 100%, 100% 100%;
    -webkit-mask: radial-gradient(11px 11px at 50% 0, #000 98%, transparent) 0 100% / 22px 11px repeat-x, linear-gradient(#000, #000) 0 0 / 100% calc(100% - 11px) no-repeat;
    mask: radial-gradient(11px 11px at 50% 0, #000 98%, transparent) 0 100% / 22px 11px repeat-x, linear-gradient(#000, #000) 0 0 / 100% calc(100% - 11px) no-repeat;
}
.swg-scene-valance > .swg-band { order: -1; flex: none; }
.swg-scene-floor { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.swg-scene-floor__trunk { display: block; width: 100%; flex: 1; min-height: 0; overflow: visible; filter: drop-shadow(0 -2px 6px rgb(0 0 0 / .35)); }
.swg-scene-floor > .swg-band { flex: none; margin-top: -6px; }
.swg-scene-crest { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 8px rgb(0 0 0 / .45)); }

/* the card: a lacquer panel shaped like the proscenium opening, with a carved gold rim */
.inv-intro--scene:has(.swg-scene-hall) .inv-scene__card {
    top: 41%; width: min(58vw, 17rem); aspect-ratio: 4 / 5; padding: 2.6rem 1.1rem 1.6rem;
    color: var(--inv-surface);
    background:
        radial-gradient(70% 45% at 50% 18%, color-mix(in srgb, var(--inv-primary) 70%, #ffcf8a 18%), transparent 75%),
        linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 92%, #000), var(--swg-deep));
    -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-mask: none; mask: none;
    border-radius: 50% 50% 6px 6px / 28% 28% 6px 6px;
    box-shadow: inset 0 0 0 2px var(--inv-accent), inset 0 0 0 6px var(--swg-deep), inset 0 0 0 7px color-mix(in srgb, var(--inv-accent) 60%, transparent), 0 26px 44px -14px rgb(0 0 0 / .7);
}
.inv-intro--scene:has(.swg-scene-hall) .inv-scene__card::before {
    content: ''; position: absolute; left: 50%; top: 14px; width: 7px; height: 7px; transform: translateX(-50%) rotate(45deg);
    background: var(--inv-accent); box-shadow: 0 0 0 1.5px var(--swg-deep), 0 0 0 2.5px var(--swg-gold-light);
}
.inv-intro--scene:has(.swg-scene-hall) .inv-intro__label { font: 500 .64rem/1.4 var(--swg-title); letter-spacing: .28em; color: var(--swg-gold-light); }
.inv-intro--scene:has(.swg-scene-hall) .inv-intro__names { font-family: var(--swg-script); font-weight: 400; line-height: 1.1; color: var(--inv-surface); text-shadow: 0 3px 12px rgb(0 0 0 / .45); }
.inv-intro--scene:has(.swg-scene-hall) .inv-intro__rule { background: linear-gradient(90deg, transparent, var(--inv-accent) 30%, var(--inv-accent) 70%, transparent); }
.inv-intro--scene:has(.swg-scene-hall) .inv-intro__date { font: 500 .7rem/1.4 var(--swg-title); letter-spacing: .14em; text-transform: uppercase; color: var(--swg-gold-light); }
.inv-intro--scene:has(.swg-scene-hall) .inv-intro__skip { background: color-mix(in srgb, var(--swg-deep) 70%, transparent); border-color: color-mix(in srgb, var(--inv-accent) 60%, transparent); color: var(--swg-gold-light); }
@media (max-height: 700px) {
    .inv-intro--scene:has(.swg-scene-hall) .inv-scene__card { top: 40%; width: min(54vw, 16rem); padding-block: 2.3rem 1.3rem; }
    .inv-intro--scene:has(.swg-scene-hall) .inv-intro__date { font-size: .64rem; letter-spacing: .08em; }
}
