/*
 * Template "Kebun Mungil" (Aqiqah & Kelahiran, baby girl) — a tiny garden that just bloomed.
 * Berry rose + leaf green + honey yellow on a warm paper cream. Real botanical watercolours (Redouté
 * roses, sweet peas, a pompon rose sprig, a swallowtail; public domain / CC0, see img/CREDITS.md) make a
 * wreath around the round photos and big accents per section. Round script (Pacifico) for names, a rounded
 * sans (Nunito) for everything else, Amiri for Arabic. Mobile-first, one column (~460px) on a berry
 * backdrop on wide screens.
 *
 * Colours come from the chosen colour variant (template.json → <x-inv.head>):
 *   --inv-primary (berry / peach / lavender / cherry: names, titles, berry sections, buttons)
 *   --inv-accent (honey: labels on dark, pills, badges; text on it = --inv-text)
 *   --inv-background (paper cream)   --inv-text   --inv-deep (dark berry, the lower part of berry sections)
 *   --inv-leaf (leaf green: leaf sections, the open button, icons)   --inv-soft (pink tint: pink sections, chips)
 *
 * Section tones (set on each section in its partial): .km-tone--cream, --pink, --berry, --leaf, --honey.
 * Each section draws its own top edge over the section above: .km-edge--fence (a white garden picket fence,
 * light sections) or .km-edge--scallop (a soft scalloped edge, coloured sections). The colour of the edge is
 * the top colour of the section (--km-edge, set by the tone).
 *
 * Motion only runs with html.inv-anim (set by <x-inv.head> unless the guest prefers reduced motion);
 * without it everything is shown finished.
 *
 * Contents: 1 base · 2 tones, edges & photo backgrounds · 3 shared pieces (heading, blossom, flowers,
 *           wreath) · 4 cover · 5 sections in page order · 6 forms (RSVP, wishes) · 7 shared components ·
 *           8 screen sizes · 9 motion
 */

/* ---------- 1. base ---------- */
:root {
    /* defaults = the "Berry Kebun" variant (the variant's colours override these) */
    --inv-primary: #b8325c;
    --inv-accent: #ffd27a;
    --inv-background: #fff6f1;
    --inv-text: #34121f;
    --inv-deep: #7c1a3d;
    --inv-leaf: #4f7d3a;
    --inv-soft: #ffdbe4;
    --inv-radius: 18px;

    --km-script: 'Pacifico', 'Brush Script MT', cursive;
    --km-sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --km-col: 460px;
    --km-paper: color-mix(in srgb, #fff 72%, var(--inv-background));
    --km-title: color-mix(in srgb, var(--inv-deep) 82%, var(--inv-text));
    --km-muted: color-mix(in srgb, var(--inv-text) 78%, var(--inv-background));
    --km-cream-muted: color-mix(in srgb, #fff 88%, transparent);
    --km-ring: color-mix(in srgb, var(--inv-primary) 20%, transparent);
    --km-leaf-dark: color-mix(in srgb, var(--inv-leaf) 62%, #0b1d08);
    --km-drop: 0 22px 40px -22px color-mix(in srgb, var(--inv-deep) 70%, transparent);

    /* a white garden picket fence (one picket + its rails per 22px tile; used as a mask) */
    --km-fence: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='26' viewBox='0 0 22 26'%3E%3Cpath d='M5 26V8.5Q5 6.6 6.3 5.2L11 0.4l4.7 4.8Q17 6.6 17 8.5V26Z'/%3E%3Crect y='12' width='22' height='3.4'/%3E%3Crect y='20' width='22' height='6'/%3E%3C/svg%3E");
    /* a five-petal blossom (mask) for the small label flowers */
    --km-blossom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(72 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(144 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(216 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(288 20 20)'/%3E%3C/g%3E%3C/svg%3E");
    /* a scalloped "bloom" badge (12 round lobes) */
    --km-bloom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='40'/%3E%3Cg%3E%3Ccircle cx='50' cy='11' r='11'/%3E%3Ccircle cx='69.5' cy='16.2' r='11'/%3E%3Ccircle cx='83.8' cy='30.5' r='11'/%3E%3Ccircle cx='89' cy='50' r='11'/%3E%3Ccircle cx='83.8' cy='69.5' r='11'/%3E%3Ccircle cx='69.5' cy='83.8' r='11'/%3E%3Ccircle cx='50' cy='89' r='11'/%3E%3Ccircle cx='30.5' cy='83.8' r='11'/%3E%3Ccircle cx='16.2' cy='69.5' r='11'/%3E%3Ccircle cx='11' cy='50' r='11'/%3E%3Ccircle cx='16.2' cy='30.5' r='11'/%3E%3Ccircle cx='30.5' cy='16.2' r='11'/%3E%3C/g%3E%3C/svg%3E");
    /* a sprinkle of tiny blossoms and dots (mask tile) */
    --km-sprinkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg transform='translate(4 6) scale(.36)'%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(0 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(72 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(144 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(216 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(288 20 20)'/%3E%3C/g%3E%3Cg transform='translate(38 36) scale(.26) rotate(20 20 20)'%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(0 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(72 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(144 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(216 20 20)'/%3E%3Cellipse cx='20' cy='10.5' rx='6.6' ry='8.6' transform='rotate(288 20 20)'/%3E%3C/g%3E%3Ccircle cx='46' cy='12' r='1.6'/%3E%3Ccircle cx='16' cy='48' r='1.4'/%3E%3C/svg%3E");
    /* a honey brush stroke under the script word of a heading */
    --km-brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M3 12C20 5 45 3 70 5s24 3 27 6c-3 4-18 6-40 6S10 18 3 12Z'/%3E%3C/svg%3E");

    /* colours of the shared components */
    --inv-ambient-1: var(--inv-primary);
    --inv-ambient-2: var(--inv-accent);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--inv-background);
    color: var(--inv-text);
    font-family: var(--km-sans);
    font-size: 15.5px;
    line-height: 1.65;
    font-variant-numeric: lining-nums;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--inv-primary); }

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

/* the one column of the page; every section paints its own full-width background */
.km-main { max-width: var(--km-col); margin: 0 auto; overflow-x: clip; }
.km-branding { max-width: var(--km-col); margin: 0 auto; }

/* sections clip sideways only, so their top edge (fence / scallop) can rise over the section above */
.km-section { position: relative; isolation: isolate; overflow-x: clip; padding: 4.4rem 1.4rem; text-align: center; }
.km-section > p { margin: 0 auto 1rem; max-width: 34ch; }

.km-arabic { font-family: 'Amiri', 'Traditional Arabic', serif; line-height: 1.9; color: var(--inv-primary); }
.km-amp { font-family: var(--km-script); font-weight: 400; }

/* ---------- 2. tones, edges & photo backgrounds ---------- */

/* cream: paper with a honey and a pink glow */
.km-tone--cream {
    --km-edge: var(--inv-background);
    background:
        radial-gradient(70% 28% at 100% 0%, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent 75%),
        radial-gradient(70% 30% at 0% 100%, color-mix(in srgb, var(--inv-soft) 75%, transparent), transparent 75%),
        var(--inv-background);
}
/* pink: a fresh wash of the soft tint */
.km-tone--pink {
    --km-edge: var(--inv-soft);
    background:
        radial-gradient(80% 40% at 50% 100%, color-mix(in srgb, #fff 40%, transparent), transparent 75%),
        linear-gradient(180deg, var(--inv-soft), color-mix(in srgb, var(--inv-soft) 55%, var(--inv-background)));
}
/* berry: the primary melting into the deep berry, a honey glow low on the right */
.km-tone--berry {
    --km-edge: var(--inv-primary);
    color: #fff;
    background:
        radial-gradient(60% 30% at 100% 100%, color-mix(in srgb, var(--inv-accent) 20%, transparent), transparent 75%),
        radial-gradient(80% 40% at 0% 30%, color-mix(in srgb, #fff 8%, transparent), transparent 75%),
        linear-gradient(180deg, var(--inv-primary), var(--inv-deep));
}
/* leaf: a fresh leaf green deepening downwards */
.km-tone--leaf {
    --km-edge: var(--inv-leaf);
    color: #fff;
    background:
        radial-gradient(70% 36% at 0% 0%, color-mix(in srgb, var(--inv-accent) 16%, transparent), transparent 75%),
        linear-gradient(180deg, var(--inv-leaf), var(--km-leaf-dark));
}
/* honey: a full honey band */
.km-tone--honey {
    --km-edge: var(--inv-accent);
    color: var(--inv-text);
    background:
        radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, #fff 35%, transparent), transparent 75%),
        var(--inv-accent);
}
/* berry and leaf sections: the same faint blossom sprinkle as the cover band */
:is(.km-tone--berry, .km-tone--leaf)::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: #fff; opacity: .07;
    -webkit-mask: var(--km-sprinkle) center top / 64px 64px repeat; mask: var(--km-sprinkle) center top / 64px 64px repeat;
}
:is(.km-tone--berry, .km-tone--leaf) a:not(.inv-button) { color: var(--inv-accent); }
:is(.km-tone--berry, .km-tone--leaf) .km-arabic { color: var(--inv-accent); }

/* the top edges: a layer in the section's colour rising over the section above */
.km-edge--fence::after, .km-edge--scallop::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 100%; z-index: 2; pointer-events: none; background: var(--km-edge);
}
/* the picket fence: white pickets with a fine shadow line so they also read over a light section */
.km-edge--fence::after {
    height: 26px; margin-bottom: -1px;
    -webkit-mask: var(--km-fence) left bottom / 22px 26px repeat-x; mask: var(--km-fence) left bottom / 22px 26px repeat-x;
}
.km-edge--fence::before {
    content: ''; position: absolute; left: 0; right: 0; bottom: 100%; z-index: 1; height: 28px; margin-bottom: -1px; pointer-events: none;
    background: color-mix(in srgb, var(--inv-text) 22%, transparent);
    -webkit-mask: var(--km-fence) left bottom / 22px 26px repeat-x; mask: var(--km-fence) left bottom / 22px 26px repeat-x;
    transform: translate(1.5px, -1px);
}
.km-edge--scallop::after {
    height: 14px; margin-bottom: -1px;
    -webkit-mask: radial-gradient(circle at 50% 100%, #000 13.5px, transparent 14px) left bottom / 30px 15px repeat-x;
    mask: radial-gradient(circle at 50% 100%, #000 13.5px, transparent 14px) left bottom / 30px 15px repeat-x;
}

/* a client photo behind a section, under a strong gradient of the section's own tone */
.km-bgphoto { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.km-bgphoto img { display: block; width: 100%; height: calc(100% + 80px); margin-top: -40px; object-fit: cover; object-position: center 45%; --inv-parallax: 40px; }
.km-bgphoto::after { content: ''; position: absolute; inset: 0; }
.km-tone--berry .km-bgphoto::after {
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--inv-primary) 94%, transparent),
            color-mix(in srgb, var(--inv-primary) 74%, transparent) 30%,
            color-mix(in srgb, var(--inv-deep) 80%, transparent) 70%,
            color-mix(in srgb, var(--inv-deep) 95%, transparent));
}
.km-tone--leaf .km-bgphoto::after {
    background:
        linear-gradient(180deg,
            color-mix(in srgb, var(--inv-leaf) 94%, transparent),
            color-mix(in srgb, var(--inv-leaf) 76%, transparent) 35%,
            color-mix(in srgb, var(--km-leaf-dark) 84%, transparent) 75%,
            color-mix(in srgb, var(--km-leaf-dark) 96%, transparent));
}

/* ---------- 3. shared pieces ---------- */

/* section heading: a letter-spaced label between two small blossoms, a bold rounded title, the last word in the script on a honey brush */
.km-heading { position: relative; margin: 0 0 2.1rem; }
.km-heading--left { text-align: left; }
.km-heading__eyebrow {
    display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .5rem;
    font-size: .7rem; font-weight: 900; line-height: 1.2; letter-spacing: .22em; text-transform: uppercase; color: var(--inv-leaf);
}
.km-heading__eyebrow::before, .km-heading__eyebrow::after {
    content: ''; width: .85rem; height: .85rem; flex: none; background: var(--inv-primary);
    -webkit-mask: var(--km-blossom) center / contain no-repeat; mask: var(--km-blossom) center / contain no-repeat;
}
.km-heading--left .km-heading__eyebrow::after { display: none; }
.km-heading__title {
    margin: 0; font-size: 2.15rem; font-weight: 900; line-height: 1.12; letter-spacing: -.02em; color: var(--km-title); text-wrap: balance;
}
.km-heading__title em {
    position: relative; z-index: 0; display: inline-block; padding: 0 .1em; font-family: var(--km-script); font-style: normal; font-weight: 400;
    font-size: 1.08em; letter-spacing: 0; color: var(--inv-primary);
}
.km-heading__title em::after {
    content: ''; position: absolute; left: -.08em; right: -.1em; bottom: .02em; height: .5em; z-index: -1;
    background: color-mix(in srgb, var(--inv-accent) 85%, transparent);
    -webkit-mask: var(--km-brush) center / 100% 100% no-repeat; mask: var(--km-brush) center / 100% 100% no-repeat;
}
:is(.km-tone--berry, .km-tone--leaf) .km-heading__eyebrow { color: var(--inv-accent); }
:is(.km-tone--berry, .km-tone--leaf) .km-heading__eyebrow::before,
:is(.km-tone--berry, .km-tone--leaf) .km-heading__eyebrow::after { background: var(--inv-soft); }
:is(.km-tone--berry, .km-tone--leaf) .km-heading__title { color: #fff; }
:is(.km-tone--berry, .km-tone--leaf) .km-heading__title em { color: var(--inv-accent); }
:is(.km-tone--berry, .km-tone--leaf) .km-heading__title em::after { background: color-mix(in srgb, #fff 18%, transparent); }
.km-tone--honey .km-heading__eyebrow { color: var(--inv-deep); }
.km-tone--honey .km-heading__title { color: var(--inv-text); }
.km-tone--honey .km-heading__title em { color: var(--inv-deep); }
.km-tone--honey .km-heading__title em::after { background: color-mix(in srgb, #fff 55%, transparent); }

/* icons */
.km-icon { width: 1.15rem; height: 1.15rem; flex: none; }

/* the blossom drawing (symbol #km-blossom in index) */
.km-blossom { display: block; width: 1.4rem; height: 1.4rem; overflow: visible; }
.km-blossom__petals { fill: var(--inv-accent); }
.km-blossom__heart { fill: var(--inv-primary); }

/* the botanical watercolours: always decoration, never in the way of a tap */
.km-flower { position: absolute; z-index: 0; display: block; height: auto; pointer-events: none; user-select: none; filter: drop-shadow(0 8px 10px color-mix(in srgb, var(--inv-deep) 22%, transparent)); }
.km-flower--butterfly { filter: drop-shadow(0 4px 4px rgb(0 0 0 / .18)); }

/* the round photo in a garden wreath (sections/_wreath): flowers behind, peeking out around the circle */
.km-wreath { --wr: 12rem; --wr-pos: center 40%; position: relative; isolation: isolate; width: var(--wr); aspect-ratio: 1; margin: 0; flex: none; }
.km-wreath .km-flower { z-index: -1; filter: drop-shadow(0 6px 8px color-mix(in srgb, var(--inv-deep) 25%, transparent)); }
.km-wreath__bouquet { width: 78%; left: -40%; bottom: -34%; rotate: -16deg; }
.km-wreath__red { width: 56%; right: -33%; bottom: -22%; rotate: 14deg; }
.km-wreath__sweetpea { width: 56%; right: -32%; top: -28%; rotate: 30deg; }
.km-wreath__pompon { width: 60%; left: -34%; top: -34%; rotate: -38deg; }
.km-wreath__circle {
    position: absolute; inset: 0; overflow: hidden; border-radius: 50%; background: var(--inv-soft);
    box-shadow:
        0 0 0 5px var(--inv-background),
        0 0 0 7px color-mix(in srgb, var(--inv-primary) 70%, transparent),
        0 24px 36px -18px color-mix(in srgb, var(--inv-deep) 75%, transparent);
}
.km-wreath__photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--wr-pos); }
.km-wreath__empty {
    position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: .2rem;
    background:
        radial-gradient(70% 50% at 50% 25%, color-mix(in srgb, var(--inv-accent) 40%, transparent), transparent 70%),
        linear-gradient(160deg, color-mix(in srgb, var(--inv-primary) 80%, #fff), var(--inv-deep));
}
.km-wreath__blossom { width: 26%; height: auto; aspect-ratio: 1; }
.km-wreath__blossom .km-blossom__heart { fill: var(--inv-deep); }
.km-wreath__blossom .km-blossom__petals { fill: var(--inv-accent); }
.km-wreath__initial { font-family: var(--km-script); line-height: 1.1; font-size: calc(var(--wr) * .34); color: #fff; text-shadow: 0 6px 18px rgb(0 0 0 / .25); }
.km-wreath__initial--many { font-size: calc(var(--wr) * .18); white-space: nowrap; }

/* ---------- 4. cover ---------- */
.km-cover {
    --wr-cover: min(58vw, 14.5rem, 33svh);
    position: fixed; inset: 0; z-index: 30; overflow-x: hidden; overflow-y: auto;
    display: flex; flex-direction: column; align-items: center; justify-content: safe center;
    min-height: 100svh; padding: 1.7rem 1.4rem 1.8rem;
    isolation: isolate; color: var(--inv-text);
    background:
        radial-gradient(70% 30% at 0% 100%, color-mix(in srgb, var(--inv-soft) 85%, transparent), transparent 75%),
        radial-gradient(60% 26% at 100% 100%, color-mix(in srgb, var(--inv-accent) 28%, transparent), transparent 75%),
        var(--inv-background);
    transition: opacity .9s ease;
}
.km-cover__inner { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 400px; text-align: center; transition: transform .9s cubic-bezier(.5, 0, .3, 1); }

.km-cover__title {
    position: relative; display: inline-flex; align-items: center; gap: .55rem; margin: 0 0 calc(var(--wr-cover) * .3);
    font-size: .74rem; font-weight: 900; line-height: 1.2; letter-spacing: .26em; text-transform: uppercase; color: var(--inv-accent);
}
.km-cover__title::before, .km-cover__title::after {
    content: ''; width: .8rem; height: .8rem; background: var(--inv-soft);
    -webkit-mask: var(--km-blossom) center / contain no-repeat; mask: var(--km-blossom) center / contain no-repeat;
}

.km-cover__art { position: relative; display: flex; justify-content: center; width: 100%; }
/* the band: from far above the screen down to the middle of the photo, then the wave */
.km-cover__band {
    position: absolute; z-index: -1; left: 50%; bottom: 50%; width: 100vw; height: 100vh; transform: translateX(-50%);
    background:
        radial-gradient(60% 50% at 80% 100%, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent 70%),
        linear-gradient(180deg, var(--inv-deep), var(--inv-primary) 85%);
}
/* a faint scatter of tiny blossoms on the band */
.km-cover__band::before {
    content: ''; position: absolute; inset: 0; background: var(--inv-soft); opacity: .14;
    -webkit-mask: var(--km-sprinkle) center bottom / 64px 64px repeat; mask: var(--km-sprinkle) center bottom / 64px 64px repeat;
}
.km-cover__wave { position: absolute; left: 0; top: calc(100% - 1px); display: block; width: 100%; height: 30px; fill: var(--inv-primary); }
.km-wreath--cover { --wr: var(--wr-cover); --wr-pos: 52% 60%; }
.km-wreath--cover .km-wreath__circle { box-shadow: 0 0 0 6px var(--inv-background), 0 0 0 8.5px var(--inv-accent), 0 26px 40px -16px color-mix(in srgb, var(--inv-deep) 80%, transparent); }
.km-cover__butterfly {
    position: absolute; z-index: 3; left: calc(50% + var(--wr-cover) * .3); top: calc(var(--wr-cover) * -.2); width: calc(var(--wr-cover) * .3);
    rotate: 16deg; filter: drop-shadow(0 6px 6px rgb(0 0 0 / .25)); pointer-events: none;
}

.km-cover__text { display: flex; flex-direction: column; align-items: center; margin-top: calc(var(--wr-cover) * .2); }
.km-cover__name {
    max-width: 100%; margin: 0; font-family: var(--km-script); font-weight: 400; font-size: 3.1rem; line-height: 1.25; color: var(--inv-primary);
    overflow-wrap: anywhere; text-shadow: 0 2px 0 color-mix(in srgb, var(--inv-accent) 70%, transparent);
}
.km-cover--many .km-cover__name { font-size: 2.3rem; }
.km-cover__label { display: inline-flex; align-items: center; gap: .45rem; margin: .15rem 0 0; font-size: .68rem; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-leaf); }
.km-cover__date { margin: .45rem 0 0; font-size: .98rem; font-weight: 800; color: var(--km-title); }
.km-cover__quote { max-width: 31ch; margin: .25rem 0 0; font-style: italic; font-weight: 500; font-size: .92rem; line-height: 1.45; color: var(--km-muted); }
.km-cover__guest {
    width: min(100%, 19rem); margin: .85rem 0 0; padding: .45rem 1rem .55rem; border-radius: 20px; background: #fff;
    box-shadow: inset 0 0 0 1.5px var(--km-ring), 0 10px 22px -16px color-mix(in srgb, var(--inv-deep) 60%, transparent);
}
.km-cover__guest p { margin: 0; font-size: .64rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; color: var(--inv-primary); }
.km-cover__guest-name { display: block; font-size: 1.12rem; font-weight: 800; line-height: 1.3; color: var(--inv-text); overflow-wrap: anywhere; }
.km-cover__open {
    margin-top: .9rem; min-height: 3rem; padding: .7rem 2rem; font-weight: 800; letter-spacing: .02em;
    background: var(--inv-leaf); color: #fff;
    box-shadow: 0 0 0 3px var(--inv-background), 0 0 0 4.5px color-mix(in srgb, var(--inv-leaf) 45%, transparent), 0 14px 24px -12px color-mix(in srgb, var(--inv-leaf) 90%, transparent);
}

/* opening: the cover fades and lifts away (never blocks: .9s) */
.km-cover--leave { transition: opacity .9s ease .1s; }
.km-cover--gone { opacity: 0; }
.km-cover--gone .km-cover__inner { transform: translateY(-2.5rem); }

/* ---------- 5. sections ---------- */

/* opening: flowers leaning in from the corners, the words on a soft glass panel */
.km-opening { padding: 5rem 1.5rem 5.2rem; }
.km-opening__sweetpea { width: 44%; max-width: 12rem; left: -9%; top: -1.2rem; rotate: -24deg; }
.km-opening__red { width: 40%; max-width: 10.5rem; right: -12%; bottom: -1.2rem; rotate: -18deg; }
.km-opening__body {
    position: relative; z-index: 1; max-width: 21rem; margin: 3.6rem auto 0; padding: 2.1rem 1.4rem 2.2rem; border-radius: 120px 120px 28px 28px;
    background: color-mix(in srgb, var(--inv-deep) 34%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--inv-accent) 55%, transparent);
    -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.km-opening__blossom { width: 2.4rem; height: 2.4rem; margin: 0 auto .6rem; }
.km-opening__basmalah { margin: 0 0 .5rem; font-size: 1.8rem; }
.km-opening__greeting { margin: 0 auto .9rem; max-width: 18ch; font-family: var(--km-script); font-size: 1.3rem; line-height: 1.6; color: #fff; }
.km-opening__message { margin: 0 auto; max-width: 28ch; font-size: .95rem; color: var(--km-cream-muted); }

/* baby: wreath + nickname, the full name, the birth tag, the name meaning; parents on a leaf block */
.km-babies { padding-bottom: 4.8rem; }
.km-baby { position: relative; text-align: left; }
.km-baby__divider { display: flex; justify-content: center; gap: .9rem; margin: 3rem 0 2.6rem; }
.km-baby__divider .km-blossom:nth-child(2) { transform: scale(1.35); }
.km-baby__intro { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1.4rem; padding: 1.8rem 0 1.4rem 2.6rem; }
.km-baby--flip .km-baby__intro { grid-template-columns: minmax(0, 1fr) auto; padding: 1.8rem 2.6rem 1.4rem 0; }
.km-baby--flip .km-wreath--baby { order: 2; }
.km-baby--flip .km-baby__who { text-align: right; }
.km-baby--flip .km-baby__chips { justify-content: flex-end; }
.km-wreath--baby { --wr: min(10.5rem, 40vw); --wr-pos: center 30%; }
.km-wreath--baby .km-wreath__bouquet { width: 66%; left: -32%; bottom: -24%; }
.km-wreath--baby .km-wreath__pompon { width: 54%; left: -28%; top: -30%; }
.km-wreath--baby .km-wreath__red { width: 48%; right: -22%; bottom: -17%; }
.km-baby--flip .km-wreath--baby .km-flower { scale: -1 1; }
.km-baby--many .km-wreath--baby { --wr: min(8.6rem, 34vw); }
.km-baby__who { min-width: 0; }
.km-baby__nickname {
    margin: 0 0 .5rem; font-family: var(--km-script); font-size: 2.9rem; line-height: 1.25; color: var(--inv-primary); overflow-wrap: anywhere;
    text-shadow: 0 2px 0 color-mix(in srgb, var(--inv-accent) 70%, transparent);
}
.km-baby--many .km-baby__nickname { font-size: 2.4rem; }
.km-baby__chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.km-baby__chip { padding: .22rem .75rem; border-radius: 999px; font-size: .76rem; font-weight: 800; line-height: 1.4; color: var(--inv-leaf); background: color-mix(in srgb, var(--inv-leaf) 14%, #fff); }
.km-baby__chip--berry { color: #fff; background: var(--inv-primary); }
.km-baby__name { margin: .6rem 0 1.4rem; font-size: 1.45rem; font-weight: 900; line-height: 1.2; letter-spacing: -.01em; color: var(--km-title); overflow-wrap: anywhere; text-wrap: balance; }
.km-baby--flip .km-baby__name { text-align: right; }

/* the birth tag: a garden plant label with a punched hole, a leaf header and big rounded numerals */
.km-tag {
    position: relative; margin: 0 10px 0 0; overflow: hidden; border-radius: 26px 26px 26px 26px; background: #fff;
    box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--inv-leaf) 22%, transparent), 10px 10px 0 0 color-mix(in srgb, var(--inv-accent) 75%, transparent);
}
.km-tag__head {
    display: flex; align-items: center; gap: .7rem; margin: 0; padding: .7rem 1rem .7rem .9rem;
    font-size: .74rem; font-weight: 900; letter-spacing: .24em; text-transform: uppercase; color: #fff;
    background: linear-gradient(120deg, var(--inv-leaf), var(--km-leaf-dark));
}
.km-tag__hole { width: .95rem; height: .95rem; flex: none; border-radius: 50%; background: var(--inv-background); box-shadow: inset 0 2px 3px rgb(0 0 0 / .35), 0 0 0 2.5px color-mix(in srgb, #fff 55%, transparent); }
.km-tag__blossom { width: 1.5rem; height: 1.5rem; margin-left: auto; }
.km-tag__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.km-tag__cell { min-width: 0; padding: 1rem 1.1rem 1rem; border-bottom: 1.5px dashed var(--km-ring); }
.km-tag__cell:nth-child(odd) { border-right: 1.5px dashed var(--km-ring); }
.km-tag__cell:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.km-tag__cell dt { font-size: .66rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-leaf); }
.km-tag__cell dd { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .3rem; margin: .1rem 0 0; }
.km-tag__num { font-size: 2.6rem; font-weight: 900; line-height: 1.05; letter-spacing: -.035em; font-variant-numeric: lining-nums tabular-nums; color: var(--inv-primary); }
.km-baby--many .km-tag__num { font-size: 2.2rem; }
.km-tag__unit { font-size: 1rem; font-weight: 800; color: var(--km-title); }
.km-tag__month { font-size: .82rem; font-weight: 800; line-height: 1.25; color: var(--km-title); }
.km-tag__place {
    display: flex; align-items: flex-start; gap: .6rem; margin: 0; padding: .85rem 1.1rem .95rem; font-size: .95rem; font-weight: 700;
    background: color-mix(in srgb, var(--inv-soft) 45%, #fff);
}
.km-tag__place .km-icon { margin-top: .15rem; color: var(--inv-primary); }
.km-tag__place small { display: block; font-size: .64rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-leaf); }

/* the name meaning: a berry panel with a honey quote mark and a pompon sprig over its corner */
.km-meaning {
    position: relative; isolation: isolate; margin: 2.2rem 0 0; padding: 1.4rem 1.3rem 1.45rem 1.4rem; border-radius: 28px 28px 28px 8px;
    color: #fff; background: radial-gradient(80% 90% at 100% 0%, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent 70%), linear-gradient(140deg, var(--inv-primary), var(--inv-deep));
    box-shadow: var(--km-drop);
}
.km-meaning::before { content: '\201C'; position: absolute; left: 1rem; top: .2rem; font-family: var(--km-script); font-size: 3.4rem; line-height: 1; color: var(--inv-accent); }
.km-meaning__sprig { width: 6rem; right: -1.5rem; top: -4.6rem; rotate: 32deg; z-index: 1; }
.km-meaning figcaption { padding-left: 2.4rem; font-size: .7rem; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; color: var(--inv-accent); }
.km-meaning blockquote { position: relative; z-index: 2; margin: .5rem 0 0; font-style: italic; font-weight: 600; font-size: 1.1rem; line-height: 1.55; color: #fff; }

/* parents: a leaf block */
.km-parents {
    position: relative; isolation: isolate; overflow: hidden; margin: 2.8rem 0 0; padding: 1.5rem 1.4rem 1.4rem; border-radius: 28px; text-align: left;
    color: #fff; background: radial-gradient(70% 80% at 100% 0%, color-mix(in srgb, var(--inv-accent) 18%, transparent), transparent 70%), linear-gradient(140deg, var(--inv-leaf), var(--km-leaf-dark));
    box-shadow: var(--km-drop);
}
.km-parents::after {
    content: ''; position: absolute; z-index: -1; right: -1.2rem; top: -1.2rem; width: 6.5rem; height: 6.5rem; background: var(--inv-accent); opacity: .22;
    -webkit-mask: var(--km-blossom) center / contain no-repeat; mask: var(--km-blossom) center / contain no-repeat;
}
.km-parents__label { margin: 0 0 .35rem; font-size: .7rem; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; color: var(--inv-accent); }
.km-parents__names { display: flex; flex-direction: column; margin: 0; font-size: 1.32rem; font-weight: 900; line-height: 1.3; }
.km-parents__names .km-amp { font-size: 1.2rem; line-height: 1.5; color: var(--inv-accent); }
.km-parents__address {
    display: flex; align-items: flex-start; gap: .5rem; margin: .95rem 0 0; padding-top: .85rem; font-size: .88rem; color: var(--km-cream-muted);
    border-top: 1px dashed color-mix(in srgb, #fff 40%, transparent);
}
.km-parents__address .km-icon { margin-top: .15rem; color: var(--inv-accent); }

/* message: large italic words, a honey pill signature, a big red rose leaning in at the lower right */
.km-message { text-align: left; padding: 4.6rem 1.6rem 5rem; }
.km-message__rose { width: 52%; max-width: 13rem; right: -16%; bottom: -1.8rem; rotate: -12deg; }
.km-message__quote { position: relative; z-index: 1; margin: 0; padding-right: 2.6rem; }
.km-message__mark { display: block; width: 2.6rem; height: 2rem; margin: 0 0 .7rem; fill: var(--inv-accent); }
.km-message__quote p { margin: 0; font-style: italic; font-size: 1.3rem; font-weight: 600; line-height: 1.55; color: #fff; }
.km-message__quote cite {
    display: inline-flex; align-items: center; gap: .45rem; margin-top: 1.3rem; padding: .35rem 1rem .35rem .45rem; border-radius: 999px;
    font-style: normal; font-size: .76rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--inv-text); background: var(--inv-accent);
}
.km-message__quote cite .km-blossom { width: 1.3rem; height: 1.3rem; }
.km-message__quote cite .km-blossom__petals { fill: #fff; }

/* events: a white card, the arched photo window, a honey bloom badge rising over the photo's edge */
.km-event { position: relative; }
.km-event + .km-event { margin-top: 3rem; }
.km-event__flower { z-index: 2; width: 7.2rem; right: -1.6rem; top: -2.6rem; rotate: 18deg; }
.km-event--flip .km-event__flower { right: auto; left: -1.8rem; rotate: -20deg; width: 6.2rem; }
.km-event__card {
    position: relative; margin: 0 12px 0 0; padding: 0 0 1.3rem; border-radius: 30px; background: #fff; text-align: left;
    box-shadow: 0 0 0 1.5px var(--km-ring), 12px 12px 0 0 var(--inv-soft);
}
.km-event--flip .km-event__card { margin: 0 0 0 12px; box-shadow: 0 0 0 1.5px var(--km-ring), -12px 12px 0 0 color-mix(in srgb, var(--inv-accent) 65%, transparent); }
.km-event__media { padding: .55rem .55rem 0; }
.km-event__photo { display: block; width: 100%; aspect-ratio: 16 / 11; object-fit: cover; object-position: center 55%; border-radius: 150px 150px 22px 22px; }
.km-event__top { display: flex; align-items: flex-end; gap: .9rem; padding: 1.2rem 1.15rem 0; }
.km-event__media + .km-event__top { margin-top: -3.4rem; }
.km-event__media + .km-event__top .km-event__head { padding-top: 3.6rem; }
.km-event--flip .km-event__top { flex-direction: row-reverse; text-align: right; }
.km-event__date {
    position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
    width: 5.6rem; aspect-ratio: 1; margin: 0; color: var(--inv-text); filter: drop-shadow(0 10px 12px color-mix(in srgb, var(--inv-deep) 40%, transparent));
}
.km-event__date::before {
    content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--inv-accent) 55%, #fff), var(--inv-accent) 60%);
    -webkit-mask: var(--km-bloom) center / contain no-repeat; mask: var(--km-bloom) center / contain no-repeat;
}
.km-event--flip .km-event__date { color: #fff; }
.km-event--flip .km-event__date::before { background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--inv-primary) 70%, #fff), var(--inv-primary) 60%); }
.km-event__weekday { font-size: .64rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.km-event__day { font-size: 2.2rem; font-weight: 900; line-height: .95; letter-spacing: -.04em; }
.km-event__month { font-size: .6rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.km-event__head { min-width: 0; padding-bottom: .35rem; }
.km-event__name { margin: 0; font-size: 1.4rem; font-weight: 900; line-height: 1.15; color: var(--inv-primary); }
.km-event__full { margin: .2rem 0 0; font-size: .82rem; font-weight: 700; color: var(--km-muted); }
.km-event__rows { display: grid; gap: .75rem; margin: 1.1rem 1.15rem 0; padding: 1rem 0 0; list-style: none; font-size: .92rem; border-top: 1.5px dashed var(--km-ring); }
.km-event__rows li { display: flex; align-items: flex-start; gap: .7rem; }
.km-event__rows .km-icon { width: 2.1rem; height: 2.1rem; padding: .45rem; border-radius: 50%; color: #fff; background: var(--inv-leaf); }
.km-event__rows li > span { padding-top: .3rem; }
.km-event__venue { display: block; font-weight: 800; }
.km-event__address { display: block; font-size: .86rem; color: var(--km-muted); }
.km-event .inv-maps { margin: 1.15rem 1.15rem 0; text-align: center; }
.km-event .inv-maps .inv-button { width: 100%; font-weight: 800; }
.km-event .inv-maps__frame { height: 190px; border-radius: 18px; }

/* countdown: cream blossoms with berry numerals, pompon sprigs at the sides, the calendar card below */
.km-countdown { padding-top: 6.6rem; padding-bottom: 4.8rem; }
.km-countdown__sprig { width: 31%; max-width: 8.2rem; top: -1.6rem; }
.km-countdown__sprig--left { left: -11%; rotate: -24deg; }
.km-countdown__sprig--right { right: -10%; width: 27%; top: -2.2rem; rotate: 26deg; }
.km-countdown .km-heading { position: relative; z-index: 1; }
.km-countdown .inv-countdown { gap: clamp(.35rem, 2vw, .7rem); }
.km-countdown .inv-countdown__item {
    position: relative; isolation: isolate; display: grid; place-content: center; width: clamp(4.1rem, 19vw, 4.9rem); min-width: 0; aspect-ratio: 1; padding: 0;
    border-radius: 0; color: var(--inv-text); background: none; filter: drop-shadow(0 12px 14px rgb(0 0 0 / .35));
}
.km-countdown .inv-countdown__item::before {
    content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(circle at 40% 35%, #fff, var(--km-paper) 70%);
    -webkit-mask: var(--km-bloom) center / contain no-repeat; mask: var(--km-bloom) center / contain no-repeat;
}
.km-countdown .inv-countdown__item:nth-child(even)::before { background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--inv-accent) 45%, #fff), var(--inv-accent) 75%); }
.km-countdown .inv-countdown__value { font-variant-numeric: lining-nums tabular-nums; font-size: 1.6rem; font-weight: 900; line-height: 1.05; color: var(--inv-primary); }
.km-countdown .inv-countdown__label { margin-top: .05rem; font-size: .54rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--km-title); }
.km-countdown .inv-countdown__done { font-family: var(--km-script); font-size: 1.4rem; color: var(--inv-accent); }
.km-countdown .inv-countdown__actions { flex-direction: column; align-items: center; gap: .6rem; margin-top: 2rem; }
.km-countdown .inv-countdown__actions .inv-button {
    width: min(100%, 17rem); min-height: 2.75rem; padding: .6rem 1rem; font-size: .86rem; font-weight: 800;
    color: #fff; background: color-mix(in srgb, #fff 10%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #fff 60%, transparent);
}
.km-countdown .inv-countdown__actions .inv-button:first-child { color: var(--inv-text); background: var(--inv-accent); box-shadow: none; }
.km-countdown .inv-cal {
    --inv-cal-bg: var(--km-paper); --inv-cal-mark: var(--inv-primary);
    max-width: 19rem; margin: 2.8rem auto 0; border-radius: 26px; box-shadow: 10px 10px 0 0 var(--inv-accent), 0 22px 40px -24px rgb(0 0 0 / .6);
}
.km-countdown .inv-cal__month { font-family: var(--km-script); font-size: 1.5rem; color: var(--inv-primary); }

/* prayer: a white arched panel with a fine berry line inside, flowers on its shoulder and foot */
.km-prayer { padding-top: 5.4rem; padding-bottom: 5.2rem; }
.km-prayer__panel {
    position: relative; max-width: 22rem; margin: 0 auto; padding: 3.2rem 1.5rem 2.6rem; border-radius: 170px 170px 30px 30px;
    color: var(--inv-text); background: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, #fff 55%, transparent), var(--km-drop);
}
.km-prayer__panel::before {
    content: ''; position: absolute; inset: 9px; border-radius: 160px 160px 22px 22px; pointer-events: none; border: 1.5px solid color-mix(in srgb, var(--inv-primary) 45%, transparent);
}
.km-prayer__bouquet { width: 8.4rem; left: -2.4rem; top: -3.4rem; rotate: -14deg; }
.km-prayer__rose { width: 6.4rem; right: -2rem; bottom: -2.4rem; rotate: 16deg; }
.km-prayer__eyebrow {
    position: relative; display: inline-block; margin: 0 0 .9rem; padding: .3rem .9rem; border-radius: 999px; font-size: .7rem; font-weight: 900;
    letter-spacing: .2em; text-transform: uppercase; color: #fff; background: var(--inv-leaf);
}
.km-prayer__arabic { position: relative; margin: 0 0 1rem; font-size: 1.6rem; }
.km-prayer__text { position: relative; margin: 0; }
.km-prayer__text p { margin: 0; font-size: 1.04rem; font-style: italic; font-weight: 600; line-height: 1.6; }
.km-prayer__text cite {
    display: inline-block; margin-top: 1rem; padding: .3rem .85rem; border-radius: 999px; font-style: normal; font-size: .72rem; font-weight: 900;
    letter-spacing: .14em; text-transform: uppercase; color: var(--inv-text); background: var(--inv-accent);
}

/* rundown: a climbing vine with leaves, the times on honey pills, the steps on glass cards */
.km-rundown { padding-bottom: 5.4rem; }
.km-rundown__sweetpea { width: 35%; max-width: 9rem; right: -7%; top: -1.4rem; rotate: 14deg; }
.km-rundown .km-heading { position: relative; z-index: 1; padding-right: 30%; }
.km-rundown__list { position: relative; z-index: 1; margin: 0; padding: 0; list-style: none; text-align: left; }
.km-rundown__list::before {
    content: ''; position: absolute; left: 2.3rem; top: .4rem; bottom: .4rem; width: 4px; margin-left: -2px; border-radius: 4px; transform-origin: top;
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-leaf) 60%, #fff), var(--inv-leaf));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--inv-deep) 40%, transparent);
}
.km-rundown__item { position: relative; display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); align-items: start; column-gap: .75rem; padding: 0 0 .85rem; }
.km-rundown__item:last-child { padding-bottom: 0; }
/* a small leaf on the vine beside every time pill */
.km-rundown__item::before {
    content: ''; position: absolute; left: 2.3rem; top: -.62rem; width: 1rem; height: .6rem; border-radius: 0 100% 0 100%;
    background: color-mix(in srgb, var(--inv-leaf) 70%, #fff); rotate: -30deg; transform-origin: left center;
}
.km-rundown__item:nth-child(even)::before { left: auto; right: calc(100% - 2.3rem); rotate: 210deg; transform-origin: right center; }
.km-rundown__item:first-child::before { display: none; }
.km-rundown__time {
    position: relative; justify-self: center; margin-top: .6rem; padding: .28rem .6rem; border-radius: 999px; font-size: .86rem; font-weight: 900;
    font-variant-numeric: tabular-nums; color: var(--inv-text); background: var(--inv-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-deep) 90%, transparent), 0 6px 10px -4px rgb(0 0 0 / .4);
}
.km-rundown__body { padding: .8rem 1rem .85rem; border-radius: 20px; background: color-mix(in srgb, #fff 11%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 20%, transparent); }
.km-rundown__body h3 { margin: 0; font-size: 1.02rem; font-weight: 800; line-height: 1.35; color: #fff; }
.km-rundown__body p { margin: .15rem 0 0; font-size: .88rem; color: var(--km-cream-muted); }

/* story: photos in tall arched windows beside the text, alternating; text-only chapters as pink cards */
.km-story { padding-bottom: 6rem; }
.km-story__list { position: relative; display: grid; gap: 2.6rem; margin: 0; padding: 0; list-style: none; text-align: left; }
.km-story__item { display: grid; grid-template-columns: 42% minmax(0, 1fr); align-items: center; gap: 1.3rem; }
.km-story__item--flip { grid-template-columns: minmax(0, 1fr) 42%; }
.km-story__item--flip .km-story__media { order: 2; }
.km-story__media { padding: 6px; }
.km-story__photo {
    display: block; width: 100%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 999px 999px 24px 24px; border: 5px solid var(--inv-primary);
    box-shadow: 0 0 0 3px var(--inv-background), 0 0 0 5px var(--inv-accent), 0 20px 30px -20px color-mix(in srgb, var(--inv-deep) 70%, transparent);
}
.km-story__item--flip .km-story__photo { border-color: var(--inv-leaf); }
.km-story__when {
    display: inline-block; padding: .22rem .75rem; border-radius: 999px; font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
    color: var(--inv-text); background: var(--inv-accent);
}
.km-story__body h3 { margin: .5rem 0 0; font-size: 1.28rem; font-weight: 900; line-height: 1.2; color: var(--inv-primary); }
.km-story__body p { margin: .4rem 0 0; font-size: .9rem; line-height: 1.6; color: var(--km-muted); }
.km-story__item--text { grid-template-columns: 3.2rem minmax(0, 1fr); align-items: start; gap: .9rem; padding: 1.15rem 1.2rem; border-radius: 24px; background: var(--inv-soft); }
.km-story__dot { position: relative; display: grid; place-items: center; width: 3.2rem; height: 3.2rem; }
.km-story__dot svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.km-story__dot .km-blossom__heart { fill: #fff; r: 7px; }
.km-story__dot b { position: relative; font-size: 1rem; font-weight: 900; color: var(--inv-primary); }
.km-story__sprig { width: 7rem; left: -1.4rem; bottom: -1.2rem; rotate: -22deg; }

/* gallery: the first photo a wide arch over both columns, the others rounded with a cream ring */
.km-gallery__rose { width: 38%; max-width: 9.5rem; right: -7%; top: 1.2rem; rotate: 10deg; }
.km-gallery .km-heading { position: relative; z-index: 1; }
.km-gallery .inv-gallery { position: relative; z-index: 1; gap: .65rem; }
.km-gallery .inv-gallery__item { border-radius: 22px; box-shadow: 0 0 0 2.5px color-mix(in srgb, #fff 80%, transparent), 0 16px 28px -18px rgb(0 0 0 / .7); }
.km-gallery .inv-gallery__item:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3.4; border-radius: 999px 999px 24px 24px; box-shadow: 0 0 0 3px var(--inv-accent), 0 16px 28px -18px rgb(0 0 0 / .7); }

/* live streaming: a horizontal berry card with fully rounded ends */
.km-stream__card {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .9rem 1rem; max-width: 24rem; margin: 0 auto; padding: 1.35rem 1.35rem 1.4rem;
    border-radius: 34px; color: #fff; text-align: left;
    background: radial-gradient(70% 90% at 0% 0%, color-mix(in srgb, #fff 16%, transparent), transparent 70%), linear-gradient(140deg, var(--inv-primary), var(--inv-deep));
    box-shadow: 10px 10px 0 0 var(--inv-accent), var(--km-drop);
}
.km-stream__icon { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; color: var(--inv-text); background: var(--inv-accent); }
.km-stream__icon .km-icon { width: 1.7rem; height: 1.7rem; }
.km-stream__title { margin: 0 0 .15rem; font-size: 1.5rem; font-weight: 900; line-height: 1.1; color: #fff; }
.km-stream__text p { margin: 0; font-size: .88rem; color: var(--km-cream-muted); }
.km-stream__text .km-stream__note { margin-top: .3rem; font-weight: 800; color: var(--inv-accent); }
.km-stream__button { grid-column: 1 / -1; min-height: 2.75rem; color: var(--inv-text) !important; background: var(--inv-accent) !important; font-weight: 800; }

/* RSVP card: cream with a scalloped top, a honey block offset behind, the sweet peas over its corner */
/* the sweet peas grow behind the card: only what peeks out above and beside it shows */
.km-rsvp__wrap { position: relative; isolation: isolate; }
.km-rsvp__sweetpea { z-index: -1; width: 7.6rem; right: -1.6rem; top: -5.2rem; rotate: 22deg; }
.km-rsvp__card {
    position: relative; margin-right: 10px; padding: 2.2rem 1.15rem 1.4rem; border-radius: 26px; color: var(--inv-text); background: var(--km-paper);
    box-shadow: 10px 10px 0 0 var(--inv-accent), 0 22px 40px -24px rgb(0 0 0 / .6);
}
.km-rsvp__card::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 12px; border-radius: 26px 26px 0 0;
    background: radial-gradient(circle at 50% 0, var(--inv-soft) 9px, transparent 9.5px) 0 0 / 22px 12px repeat-x;
}
.km-rsvp__intro { margin: 0 auto 1.1rem; max-width: 30ch; font-size: .92rem; color: var(--km-muted); }
.km-rsvp__sent { margin-bottom: 1rem; }
.km-rsvp__check { display: block; width: 4.25rem; height: 4.25rem; margin: 0 auto .5rem; }
.km-rsvp__check circle { fill: var(--inv-leaf); }
.km-rsvp__check path { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
html.inv-anim .km-rsvp__sent .km-rsvp__check { animation: km-bounce .8s cubic-bezier(.34, 1.56, .64, 1) both; }
html.inv-anim .km-rsvp__sent .km-rsvp__check path { animation: km-draw .45s ease-out .35s both; }
.km-rsvp__thanks { margin: 0; font-family: var(--km-script); font-size: 1.7rem; color: var(--inv-primary); }
.km-rsvp__line { margin: .1rem 0 0; font-size: .92rem; color: var(--km-muted); }
.km-rsvp .inv-rsvp__deadline { margin: 0 0 1rem; font-size: .86rem; font-weight: 700; color: var(--inv-primary); }

/* gift: cream cards like seed packets (a berry strip with a scalloped edge), two per row; the address below */
.km-gift__intro { color: var(--km-cream-muted); }
.km-gift .inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: 1.3rem; }
.km-gift .inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.km-gift .inv-gift__account,
.km-gift .inv-gift__address {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; min-width: 0; margin: 0; overflow: hidden;
    padding: 2.1rem .75rem 1rem; border-radius: 20px; color: var(--inv-text); background: var(--km-paper);
    box-shadow: 0 18px 30px -20px rgb(0 0 0 / .6);
}
.km-gift .inv-gift__account::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1.25rem;
    background: radial-gradient(circle at 50% 100%, var(--km-paper) 5.5px, transparent 6px) 0 100% / 15px 6px repeat-x, var(--inv-primary);
}
.km-gift .inv-gift__account p, .km-gift .inv-gift__address p { margin: 0; }
.km-gift .inv-gift__bank { font-weight: 800; font-size: .86rem; color: var(--inv-primary); }
.km-gift .inv-gift__logo { height: 1.6rem; padding: .2rem .5rem; border-radius: .4rem; background: #fff; }
.km-gift .inv-gift__logo img { max-width: 5rem; }
.km-gift .inv-gift__number {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .98rem; font-weight: 700;
    letter-spacing: .03em; line-height: 1.3; overflow-wrap: anywhere; color: var(--inv-text);
}
.km-gift .inv-gift__holder { font-size: .64rem; letter-spacing: .08em; text-transform: uppercase; color: var(--km-muted); overflow-wrap: anywhere; }
.km-gift .inv-button { margin-top: .35rem; min-height: 2.25rem; padding: .35rem .9rem; font-size: .76rem; font-weight: 800; }
.km-gift .inv-gift__address { margin-top: .75rem; padding-top: 1.1rem; font-size: .9rem; box-shadow: 8px 8px 0 0 var(--inv-accent); }
.km-gift .inv-gift__address .inv-gift__holder { font-size: .72rem; }

/* wishlist: white rows with a numbered honey bloom (or the item photo in a small arch) */
.km-wishlist__intro { color: var(--km-muted); font-size: .94rem; }
.km-wishlist__list { display: grid; gap: .75rem; margin: 1.3rem 0 0; padding: 0; list-style: none; text-align: left; }
.km-wishlist__item {
    display: grid; grid-template-columns: 2.9rem minmax(0, 1fr); align-items: start; gap: .9rem; padding: .9rem 1rem; border-radius: 22px;
    background: #fff; box-shadow: 0 0 0 1.5px var(--km-ring), 6px 6px 0 0 var(--inv-soft);
}
.km-wishlist__item:nth-child(even) { box-shadow: 0 0 0 1.5px var(--km-ring), 6px 6px 0 0 color-mix(in srgb, var(--inv-accent) 60%, transparent); }
.km-wishlist__number {
    position: relative; isolation: isolate; display: grid; place-items: center; width: 2.9rem; height: 2.9rem; font-size: 1.05rem; font-weight: 900; color: var(--inv-text);
}
.km-wishlist__number::before {
    content: ''; position: absolute; inset: 0; z-index: -1; background: var(--inv-accent);
    -webkit-mask: var(--km-bloom) center / contain no-repeat; mask: var(--km-bloom) center / contain no-repeat;
}
.km-wishlist__photo { display: block; width: 2.9rem; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 10px 10px; box-shadow: 0 0 0 2px var(--inv-accent); }
.km-wishlist__text p { margin: 0; }
.km-wishlist__name { padding-top: .1rem; font-size: 1.06rem; font-weight: 800; line-height: 1.3; color: var(--km-title); overflow-wrap: anywhere; }
.km-wishlist__note { margin-top: .1rem !important; font-size: .88rem; color: var(--km-muted); }
.km-wishlist__shop { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.2rem; margin-top: .25rem; font-size: .84rem; font-weight: 800; text-decoration: none; }
.km-wishlist__shop .km-icon { width: 1rem; height: 1rem; }

/* co-hosts: the names one per line on the honey band, split by small berry blossoms */
.km-cohosts__list { display: flex; flex-direction: column; align-items: center; gap: .55rem; margin: 0; padding: 0; list-style: none; }
.km-cohosts__list li { max-width: 26ch; font-size: 1.1rem; font-weight: 800; line-height: 1.3; color: var(--inv-text); }
.km-cohosts__list li + li::before {
    content: ''; display: block; width: .8rem; height: .8rem; margin: 0 auto .55rem; background: var(--inv-primary);
    -webkit-mask: var(--km-blossom) center / contain no-repeat; mask: var(--km-blossom) center / contain no-repeat;
}

/* contacts: pill rows with the initial on a berry disc and a WhatsApp button */
.km-contacts__list { display: grid; gap: .75rem; max-width: 24rem; margin: 0 auto; }
.km-contact {
    display: grid; grid-template-columns: 2.9rem minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .6rem .6rem .6rem .65rem; border-radius: 999px;
    background: #fff; text-align: left; box-shadow: 0 0 0 1.5px var(--km-ring), 6px 6px 0 0 var(--inv-soft);
}
.km-contact__avatar {
    display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border-radius: 50%;
    font-family: var(--km-script); font-size: 1.2rem; color: #fff; background: var(--inv-primary);
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--inv-accent);
}
.km-contact p { margin: 0; }
.km-contact__name { font-weight: 800; font-size: .96rem; line-height: 1.3; overflow-wrap: anywhere; }
.km-contact__role { font-size: .8rem; color: var(--km-muted); }
.km-contact__phone { font-size: .86rem; }
.km-contact__button { min-height: 2.5rem; padding: .45rem .95rem; font-size: .82rem; font-weight: 800; background: var(--inv-leaf) !important; color: #fff !important; }
.km-contact__button .km-icon { width: 1.05rem; height: 1.05rem; }

/* health protocol: white chips on pink */
.km-protocol__list { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.km-protocol__list li {
    display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .85rem; border-radius: 999px; font-size: .86rem; font-weight: 700;
    background: #fff; box-shadow: inset 0 0 0 1px var(--km-ring);
}
.km-protocol__list .km-icon { width: 1rem; height: 1rem; color: var(--inv-leaf); }
.km-protocol__note { font-size: .9rem; color: var(--km-muted); }

/* vendors: a white card of rows split by dashed lines */
.km-vendors__list { max-width: 24rem; margin: 0 auto; padding: .3rem 1.15rem; list-style: none; border-radius: 26px; background: #fff; box-shadow: 0 0 0 1.5px var(--km-ring), 10px 10px 0 0 var(--inv-soft); }
.km-vendor { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem 0; text-align: left; border-bottom: 1.5px dashed var(--km-ring); }
.km-vendor:last-child { border-bottom: 0; }
.km-vendor__text { display: flex; flex-direction: column; min-width: 0; }
.km-vendor__role { font-size: .64rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--inv-leaf); }
.km-vendor__name { font-size: 1.06rem; font-weight: 800; line-height: 1.3; color: var(--inv-text); overflow-wrap: anywhere; }
.km-vendor__link {
    display: inline-flex; align-items: center; gap: .3rem; flex: none; min-height: 2.2rem; padding: .3rem .7rem; border-radius: 999px;
    font-size: .76rem; font-weight: 800; text-decoration: none; background: var(--inv-soft); color: var(--inv-deep);
}
.km-vendor__link .km-icon { width: .95rem; height: .95rem; }

/* closing: the full photo fading into dark berry, flowers where the photo melts into the colour */
.km-closing { padding: 5rem 1.6rem 2.6rem; background: linear-gradient(180deg, var(--inv-primary), var(--inv-deep) 55%); }
.km-closing--photo { padding-top: 0; background: radial-gradient(60% 30% at 100% 100%, color-mix(in srgb, var(--inv-accent) 16%, transparent), transparent 75%), var(--inv-deep); }
.km-closing__photo { position: relative; z-index: -1; height: min(125vw, 36rem); margin: 0 -1.6rem; overflow: hidden; }
.km-closing__photo img { display: block; width: 100%; height: calc(100% + 60px); margin-top: -30px; object-fit: cover; object-position: center 25%; --inv-parallax: 30px; }
.km-closing__photo::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 38%, color-mix(in srgb, var(--inv-primary) 55%, transparent) 62%, color-mix(in srgb, var(--inv-deep) 88%, var(--inv-primary)) 86%, var(--inv-deep) 99%);
}
.km-closing__flowers { position: relative; height: 0; }
.km-closing__bouquet { width: 9rem; left: -2.6rem; top: -12rem; rotate: -10deg; }
.km-closing__sweetpea { width: 7rem; right: -2rem; top: -11.6rem; rotate: 18deg; }
.km-closing__butterfly { width: 3.2rem; left: 4.6rem; top: -13.4rem; rotate: -14deg; }
/* without a photo the flowers stand inside the section, over a berry gradient */
.km-closing:not(.km-closing--photo) { padding-top: 1rem; }
.km-closing:not(.km-closing--photo) .km-closing__flowers { margin-top: 9.5rem; }
.km-closing__body { position: relative; z-index: 1; }
.km-closing--photo .km-closing__body { margin-top: -3.2rem; }
.km-closing__blossom { width: 2.4rem; height: 2.4rem; margin: 0 auto .5rem; }
.km-closing__eyebrow { margin: 0 0 .3rem; font-size: .72rem; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; color: var(--inv-accent); }
.km-closing__title { margin: 0 0 1rem; font-size: 2.5rem; font-weight: 900; line-height: 1.15; letter-spacing: -.02em; color: #fff; }
.km-closing__title em { font-family: var(--km-script); font-style: normal; font-weight: 400; letter-spacing: 0; color: var(--inv-accent); }
.km-closing__message { margin: 0 auto; max-width: 30ch; color: var(--km-cream-muted); }
.km-closing__salam { margin: 1.1rem auto 0; max-width: 26ch; font-style: italic; font-size: 1.05rem; font-weight: 700; line-height: 1.4; color: var(--inv-accent); }
.km-closing__signature { margin: 1.1rem auto 0; max-width: 30ch; font-size: .88rem; color: var(--km-cream-muted); }
.km-closing__names {
    margin: 1.4rem auto 0; max-width: 100%; font-family: var(--km-script); font-size: 2.6rem; line-height: 1.3; color: #fff; overflow-wrap: anywhere;
    text-shadow: 0 3px 0 color-mix(in srgb, var(--inv-deep) 80%, transparent);
}

/* ---------- 6. forms (shared RSVP + wishes, restyled) ---------- */
.km-main .inv-form { gap: 1rem; text-align: left; }
.km-main .inv-form label, .km-main .inv-form__choices legend { font-size: .84rem; font-weight: 800; color: var(--inv-text); }
.km-main .inv-form input:not([type=radio]):not([type=checkbox]),
.km-main .inv-form select,
.km-main .inv-form textarea {
    width: 100%; min-height: 2.9rem; padding: .7rem .9rem; border: 0; border-radius: 14px;
    font: 400 .95rem/1.4 var(--km-sans); color: var(--inv-text); background: #fff;
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--inv-primary) 24%, transparent);
    transition: box-shadow .2s ease;
}
.km-main .inv-form select {
    appearance: none; padding-right: 2.4rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right .8rem center / 1.1rem no-repeat;
}
.km-main .inv-form input:not([type=radio]):focus-visible,
.km-main .inv-form select:focus-visible,
.km-main .inv-form textarea:focus-visible {
    outline: none; box-shadow: inset 0 0 0 2px var(--inv-primary), 0 0 0 4px color-mix(in srgb, var(--inv-accent) 50%, transparent);
}
.km-main .inv-form button[type=submit] { width: 100%; min-height: 3rem; font-weight: 800; box-shadow: 0 12px 22px -12px color-mix(in srgb, var(--inv-primary) 80%, transparent); }
.km-main .inv-form .inv-button--outline { width: 100%; min-height: 2.75rem; }
.km-main .inv-form__notice { text-align: center; }

/* the three answers as big cards with icons (the radio dot is hidden but still focusable) */
.km-rsvp .inv-form__choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.km-rsvp .inv-form__choices legend { margin-bottom: .5rem; padding: 0; }
.km-rsvp .inv-form__choices label {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: .45rem;
    min-height: 5.4rem; padding: .85rem .3rem .75rem; border-radius: 18px; cursor: pointer; text-align: center;
    font-size: .84rem; font-weight: 800; line-height: 1.2; color: var(--inv-text); background: #fff;
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--inv-primary) 22%, transparent);
    transition: background-color .25s ease, color .25s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.km-rsvp .inv-form__choices input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
/* icon: a tinted circle (::before) with a check, a cross or a question mark on it (::after, a mask in the text colour) */
.km-rsvp .inv-form__choices label::before {
    content: ''; width: 2.1rem; height: 2.1rem; border-radius: 50%; flex: none; background: var(--inv-soft);
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background-color .25s ease;
}
.km-rsvp .inv-form__choices label::after {
    content: ''; position: absolute; left: 50%; top: 1.3rem; width: 1.2rem; height: 1.2rem; margin-left: -.6rem;
    background: currentColor; color: var(--inv-primary); pointer-events: none;
    -webkit-mask: var(--km-choice-icon) center / contain no-repeat; mask: var(--km-choice-icon) center / contain no-repeat;
}
.km-rsvp .inv-form__choices label:nth-of-type(1) {
    --km-choice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.km-rsvp .inv-form__choices label:nth-of-type(2) {
    --km-choice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
}
.km-rsvp .inv-form__choices label:nth-of-type(3) {
    --km-choice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M8.5 8.8a3.5 3.5 0 1 1 4.9 3.2c-.9.4-1.4 1.1-1.4 2v.5M12 19h.01'/%3E%3C/svg%3E");
}
.km-rsvp .inv-form__choices label:has(input:checked) {
    color: #fff; background: var(--inv-primary); transform: translateY(-3px);
    box-shadow: 0 0 0 3px var(--inv-accent), 0 12px 24px -12px color-mix(in srgb, var(--inv-primary) 80%, transparent);
}
.km-rsvp .inv-form__choices label:has(input:checked)::before { background-color: rgb(255 255 255 / .2); transform: scale(1.1); }
.km-rsvp .inv-form__choices label:has(input:checked)::after { color: #fff; }
.km-rsvp .inv-form__choices label:has(input:focus-visible) { outline: 2px solid var(--inv-accent); outline-offset: 3px; }

/* wishes: the form on a white card, the wishes in a scroll box of about three */
.km-wishes .inv-wishes { --inv-wishes-height: 20rem; }
.km-wishes .inv-form {
    margin-right: 8px; padding: 1.3rem 1.1rem; border-radius: 26px; background: #fff;
    box-shadow: 8px 8px 0 0 var(--inv-primary);
}
.km-wishes .inv-wishes__list { margin-top: 1.4rem; }
.km-wishes .inv-wishes:not(.inv-wishes--paged) .inv-wishes__list {
    padding: .55rem; border-radius: 20px; background: color-mix(in srgb, #fff 45%, transparent); box-shadow: inset 0 0 0 1px var(--km-ring);
}
.km-wishes .inv-wish { padding: .75rem .9rem; border-radius: 16px; background: #fff; text-align: left; box-shadow: 0 2px 10px rgb(0 0 0 / .05); border-left: 4px solid var(--inv-primary); }
.km-wishes .inv-wish__name { font-weight: 800; color: var(--inv-primary); }
.km-wishes .inv-wish__message { font-size: .9rem; line-height: 1.5; }
.km-wishes .inv-wish__time { font-size: .72rem; color: var(--km-muted); }

/* ---------- 7. shared components ---------- */
.km-main .inv-button { font-weight: 700; }
body .inv-nav {
    --inv-nav-bg: color-mix(in srgb, #fff 94%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--inv-text) 74%, transparent);
    --inv-nav-active: var(--inv-primary);
    font-family: var(--km-sans);
}

/* ---------- 8. screen sizes ---------- */

/* short phones: the wreath and type step down so everything fits without scrolling */
@media (max-height: 760px) {
    .km-cover { --wr-cover: min(54vw, 13.2rem, 30svh); padding-top: 1.4rem; padding-bottom: 1.5rem; }
    .km-cover__name { font-size: 2.75rem; }
    .km-cover__quote { font-size: .88rem; }
    .km-cover__guest { margin-top: .7rem; }
    .km-cover__open { margin-top: .8rem; }
}
@media (max-height: 660px) {
    .km-cover { --wr-cover: min(50vw, 27svh); padding-top: 1.2rem; padding-bottom: 1.2rem; }
    .km-cover__title { font-size: .66rem; }
    .km-cover__name { font-size: 2.4rem; line-height: 1.2; }
    .km-cover--many .km-cover__name { font-size: 2rem; }
    .km-cover__label { font-size: .62rem; }
    .km-cover__date { margin-top: .3rem; font-size: .9rem; }
    .km-cover__quote { font-size: .84rem; line-height: 1.38; }
    .km-cover__guest { padding: .35rem .85rem .45rem; }
    .km-cover__guest-name { font-size: 1.04rem; }
    .km-cover__open { min-height: 2.75rem; padding: .6rem 1.7rem; }
}
/* very short screens (in-app browsers): a smaller wreath and quote, so everything fits */
@media (max-height: 600px) {
    .km-cover { --wr-cover: min(44vw, 24svh); padding-top: 1rem; }
    .km-cover__name { font-size: 2.1rem; }
    .km-cover__quote { font-size: .8rem; line-height: 1.32; }
}

/* wide screens: the phone-width column on a berry backdrop */
@media (min-width: 560px) {
    body.km-body {
        background:
            radial-gradient(70vw 60vh at 50% 0%, color-mix(in srgb, var(--inv-primary) 70%, transparent), transparent 70%),
            var(--inv-deep);
        background-attachment: fixed;
    }
    .km-main { box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); }
}

/* ---------- 9. motion ---------- */
@keyframes km-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes km-bounce { 0% { transform: scale(0); } 55% { transform: scale(1.15); } 75% { transform: scale(.94); } 100% { transform: scale(1); } }
@keyframes km-photo-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
@keyframes km-zoom-out { from { transform: scale(1.1); } to { transform: scale(1); } }
@keyframes km-band { from { transform: translate(-50%, -18px); } to { transform: translate(-50%, 0); } }
@keyframes km-bloom-in { from { opacity: 0; scale: .55; } to { opacity: 1; scale: 1; } }
@keyframes km-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes km-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
/* the butterfly flutters in from the upper right along a soft curve and lands (wings beat, then rest) */
@keyframes km-fly {
    0% { opacity: 0; translate: 9rem -7rem; }
    15% { opacity: 1; }
    55% { translate: 2.5rem -3.2rem; }
    85% { translate: .2rem -.4rem; }
    100% { opacity: 1; translate: 0 0; }
}
@keyframes km-flap { 0%, 100% { scale: 1 1; } 50% { scale: .35 1; } }
@keyframes km-sway { 0% { translate: 0 0; } 40% { translate: -6px 3px; } 100% { translate: 0 0; } }

/* cover (≤ 2.5 s, once): the band settles (0–.8 s), the photo fades in from a slight zoom (.1–1.1 s), the
   flowers open out one by one (.35–1.5 s), the butterfly flutters in and lands (.9–2.4 s); the text follows
   through its inv-enter delays */
html.inv-anim .km-cover__band { animation: km-band .8s cubic-bezier(.2, .7, .2, 1) both; }
html.inv-anim .km-wreath--cover .km-wreath__circle { animation: km-photo-in .9s cubic-bezier(.2, .7, .2, 1) .1s both; }
html.inv-anim .km-wreath--cover .km-wreath__photo { animation: km-zoom-out 1.1s cubic-bezier(.2, .7, .2, 1) .1s both; }
html.inv-anim .km-wreath--cover .km-flower { animation: km-bloom-in .8s cubic-bezier(.3, 1.4, .5, 1) both; }
html.inv-anim .km-wreath--cover .km-wreath__bouquet { animation-delay: .35s; }
html.inv-anim .km-wreath--cover .km-wreath__sweetpea { animation-delay: .5s; }
html.inv-anim .km-wreath--cover .km-wreath__red { animation-delay: .62s; }
html.inv-anim .km-wreath--cover .km-wreath__pompon { animation-delay: .72s; }
html.inv-anim .km-cover__butterfly { animation: km-fly 1.5s cubic-bezier(.3, .6, .3, 1) .9s both, km-flap .19s ease-in-out .9s 7; }

/* flowers in the sections: they rise in with their section (shared reveal); the big ones also sway gently once */
html.inv-anim .is-revealed > .km-flower[data-sway], html.inv-anim .km-flower[data-sway].is-revealed { animation: km-sway 1.6s cubic-bezier(.3, .8, .3, 1) .3s both; }

/* scroll-drawn details (the default, without support, is the finished drawing) */
@supports (animation-timeline: view()) {
    html.inv-anim .km-rundown__list::before { animation: km-grow linear both; animation-timeline: view(); animation-range: entry 20% cover 55%; }
}

@media (prefers-reduced-motion: reduce) {
    .km-cover, .km-cover--leave, .km-cover__inner { transition: none; }
}
