/*
 * Template "Monogram Modern" (Lamaran & Tunangan): calm, refined editorial minimalism, never plain.
 * Warm paper + ink + one vivid accent per variant. Signature pieces: the couple's initials as a giant
 * typographic monogram (sections/_monogram; first letter upright in ink, second italic in the accent),
 * a fine editorial grid (hairline rules, small-caps labels, numbers only where they encode order),
 * confident photo blocks with a colour block offset behind them, colour blocks behind text, ink sections
 * alternating with paper and accent-tint sections. Mobile-first, one column (~460px) on ink on wide screens.
 *
 * Colours come from the chosen colour variant (template.json → <x-inv.head>):
 *   --inv-primary    the accent colour (sage / kobalt / terakota / merlot): italic words, numerals, blocks
 *   --inv-accent     its light version, for text and blocks on ink
 *   --inv-background warm paper     --inv-text ink text     --inv-ink the dark sections
 *   --inv-tint       a pale wash of the accent (tint sections, colour blocks behind photos)
 * Everything else is mixed from those, so a new variant only needs these six colours.
 *
 * Section tones (set on each section in its partial): .mm-tone--paper, --tint (pale accent),
 * --ink (dark), --accent (the full accent colour). Light and dark alternate down the page.
 *
 * 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 section tones & photo backgrounds · 3 shared pieces (heading, monogram, pill) ·
 *           4 cover · 5 sections in page order · 6 forms (RSVP, wishes) · 7 shared components ·
 *           8 screen sizes · 9 motion
 */

/* ---------- 1. base ---------- */
:root {
    /* defaults = the "Sage" variant (the variant's colours override these) */
    --inv-primary: #3b6b5c;
    --inv-accent: #9fd0b9;
    --inv-background: #f3f1ec;
    --inv-text: #1d1d1f;
    --inv-ink: #1d1d1f;
    --inv-tint: #d7e4dc;
    --inv-radius: 2px;

    --mm-serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --mm-sans: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mm-col: 460px;
    --mm-gutter: 1.5rem;
    --mm-card: color-mix(in srgb, #fff 82%, var(--inv-background));
    --mm-muted: color-mix(in srgb, var(--inv-text) 74%, var(--inv-background));
    --mm-line: color-mix(in srgb, var(--inv-text) 20%, transparent);
    --mm-line-ink: rgb(255 255 255 / .2);
    --mm-ink-muted: rgb(255 255 255 / .76);
    /* the accent colour, a little deeper, for small text on paper (keeps ≥ 4.5:1 in every variant) */
    --mm-accent-ink: color-mix(in srgb, var(--inv-primary) 84%, var(--inv-ink));
    /* the ink of the dark sections: a glow of the accent in one corner */
    --mm-ink-bg:
        radial-gradient(90% 55% at 0% 0%, color-mix(in srgb, var(--inv-primary) 42%, transparent), transparent 72%),
        radial-gradient(70% 45% at 100% 100%, color-mix(in srgb, var(--inv-primary) 22%, transparent), transparent 75%),
        var(--inv-ink);

    /* 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;
    /* ink: only seen below the closing (the room for the fixed menu and music button) */
    background: var(--inv-ink);
    color: var(--inv-text);
    font-family: var(--mm-sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
a { color: var(--mm-accent-ink); }

.mm-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 */
.mm-main { max-width: var(--mm-col); margin: 0 auto; }
.mm-branding { max-width: var(--mm-col); margin: 0 auto; }

.mm-section { position: relative; isolation: isolate; overflow: hidden; padding: 4.6rem var(--mm-gutter); text-align: left; }
.mm-section > p { margin: 0 0 1rem; max-width: 36ch; }
/* two paper sections in a row: a hairline between them */
.mm-tone--paper + .mm-tone--paper { padding-top: 3.8rem; box-shadow: inset 0 1px 0 var(--mm-line); }

.mm-arabic { font-family: 'Amiri', 'Traditional Arabic', serif; line-height: 1.9; }
.mm-amp { font-family: var(--mm-serif); font-style: italic; color: var(--mm-accent-ink); }

/* ---------- 2. section tones & photo backgrounds ---------- */

/* paper: warm paper with two fine vertical rules of the editorial grid */
.mm-tone--paper {
    background:
        linear-gradient(var(--mm-line), var(--mm-line)) .65rem 0 / 1px 100% no-repeat,
        linear-gradient(var(--mm-line), var(--mm-line)) calc(100% - .65rem) 0 / 1px 100% no-repeat,
        var(--inv-background);
}
/* tint: a pale wash of the accent */
.mm-tone--tint {
    background:
        linear-gradient(color-mix(in srgb, var(--inv-primary) 22%, transparent), color-mix(in srgb, var(--inv-primary) 22%, transparent)) .65rem 0 / 1px 100% no-repeat,
        linear-gradient(color-mix(in srgb, var(--inv-primary) 22%, transparent), color-mix(in srgb, var(--inv-primary) 22%, transparent)) calc(100% - .65rem) 0 / 1px 100% no-repeat,
        linear-gradient(180deg, var(--inv-tint), color-mix(in srgb, var(--inv-tint) 70%, var(--inv-background)));
}
.mm-tone--tint { --mm-muted: color-mix(in srgb, var(--inv-text) 78%, var(--inv-tint)); }

/* ink: the dark sections */
.mm-tone--ink { color: #fff; background: var(--mm-ink-bg); }
.mm-tone--ink a:not(.inv-button) { color: var(--inv-accent); }
.mm-tone--ink .mm-arabic { color: var(--inv-accent); }

/* accent: the full accent colour */
.mm-tone--accent {
    color: #fff;
    background:
        radial-gradient(80% 50% at 100% 0%, color-mix(in srgb, #fff 16%, transparent), transparent 70%),
        radial-gradient(80% 50% at 0% 100%, color-mix(in srgb, var(--inv-ink) 28%, transparent), transparent 72%),
        var(--inv-primary);
}

/* a client photo behind a section, under a strong gradient of the section's own tone */
.mm-bgphoto { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.mm-bgphoto img { display: block; width: 100%; height: calc(100% + 80px); margin-top: -40px; object-fit: cover; object-position: center 40%; --inv-parallax: 40px; }
.mm-bgphoto::after { content: ''; position: absolute; inset: 0; }
.mm-tone--ink .mm-bgphoto::after {
    background:
        radial-gradient(90% 50% at 0% 0%, color-mix(in srgb, var(--inv-primary) 50%, transparent), transparent 75%),
        linear-gradient(180deg,
            color-mix(in srgb, var(--inv-ink) 88%, transparent),
            color-mix(in srgb, var(--inv-ink) 72%, transparent) 45%,
            color-mix(in srgb, var(--inv-ink) 94%, transparent));
}

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

/* section heading: an accent bar + small-caps label + a hairline to the edge, then the serif title */
.mm-heading { margin: 0 0 2.2rem; }
.mm-heading__label {
    display: flex; align-items: center; gap: .7rem; margin: 0 0 .8rem;
    font-size: .68rem; font-weight: 600; line-height: 1.25; letter-spacing: .24em; text-transform: uppercase; color: var(--mm-accent-ink);
}
.mm-heading__label::before { content: ''; flex: none; width: 1.6rem; height: 3px; background: var(--inv-primary); }
.mm-heading__label::after { content: ''; flex: 1; min-width: 1.5rem; height: 1px; background: var(--mm-line); }
.mm-heading__title {
    margin: 0; font-family: var(--mm-serif); font-size: 3.1rem; font-weight: 400; line-height: .98;
    letter-spacing: -.015em; color: var(--inv-text); text-wrap: balance;
}
.mm-heading__title em { font-style: italic; color: var(--inv-primary); }
.mm-heading--center { text-align: center; }
.mm-heading--center .mm-heading__label { justify-content: center; }
.mm-heading--center .mm-heading__label::before { width: auto; flex: 1; height: 1px; background: var(--mm-line); }

.mm-tone--ink .mm-heading__label { color: var(--inv-accent); }
.mm-tone--ink .mm-heading__label::before { background: var(--inv-accent); }
.mm-tone--ink .mm-heading__label::after { background: var(--mm-line-ink); }
.mm-tone--ink .mm-heading__title { color: #fff; }
.mm-tone--ink .mm-heading__title em { color: var(--inv-accent); }
.mm-tone--accent .mm-heading__label { color: #fff; }
.mm-tone--accent .mm-heading__label::before { background: #fff; }
.mm-tone--accent .mm-heading__label::after { background: rgb(255 255 255 / .35); }
.mm-tone--accent .mm-heading__title { color: #fff; }
.mm-tone--accent .mm-heading__title em { color: var(--inv-tint); }
.mm-tone--tint .mm-heading__label::after { background: color-mix(in srgb, var(--inv-primary) 30%, transparent); }

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

/* the monogram (sections/_monogram): the first letter upright in ink, the second italic in the accent,
   tucked under and to the right of it; the size comes from font-size on .mm-mono */
.mm-mono { position: relative; display: inline-flex; flex-direction: column; align-items: flex-start; font-family: var(--mm-serif); font-weight: 400; line-height: .78; letter-spacing: 0; }
.mm-mono__a { display: block; color: var(--inv-text); -webkit-text-stroke: 1px var(--inv-text); }
.mm-mono__b { display: block; margin: -.3em 0 0 .28em; font-style: italic; color: var(--inv-primary); -webkit-text-stroke: 1px var(--inv-primary); }

/* a small pill link (Instagram) */
.mm-pill {
    display: inline-flex; align-items: center; gap: .4rem; min-height: 2.2rem; padding: .3rem .85rem; border-radius: 999px;
    font-size: .8rem; font-weight: 500; text-decoration: none; color: var(--inv-text); background: transparent;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-text) 30%, transparent);
}
.mm-pill .mm-icon { width: 1rem; height: 1rem; color: var(--inv-primary); }

/* ---------- 4. cover ---------- */
.mm-cover {
    /* the stage height: the photo block (56% of the column) is a tall portrait, never taller than the screen allows */
    --cover-w: min(100vw - 3rem, 400px);
    --stage-h: min(calc(var(--cover-w) * .95), 46svh);
    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.5rem var(--mm-gutter);
    isolation: isolate; color: var(--inv-text);
    background:
        radial-gradient(70% 40% at 0% 100%, color-mix(in srgb, var(--inv-tint) 70%, transparent), transparent 75%),
        linear-gradient(var(--mm-line), var(--mm-line)) .65rem 0 / 1px 100% no-repeat,
        linear-gradient(var(--mm-line), var(--mm-line)) calc(100% - .65rem) 0 / 1px 100% no-repeat,
        var(--inv-background);
    transition: opacity .9s ease;
}
.mm-cover__inner { display: flex; flex-direction: column; width: 100%; max-width: 400px; text-align: left; transition: transform .9s cubic-bezier(.5, 0, .3, 1); }

/* the top rule: the title left, the date right */
.mm-cover__bar {
    display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0; padding-bottom: .55rem;
    border-bottom: 1px solid var(--inv-text);
    font-size: .68rem; font-weight: 600; line-height: 1.2; letter-spacing: .26em; text-transform: uppercase;
}
.mm-cover__date { font-variant-numeric: tabular-nums; letter-spacing: .14em; color: var(--mm-accent-ink); }

/* the stage: monogram left, photo block right, a tint block offset behind the photo */
.mm-cover__stage { position: relative; display: grid; grid-template-columns: 44% 56%; height: var(--stage-h); margin-top: 1.2rem; }
.mm-cover__mono { grid-column: 1; grid-row: 1; z-index: 1; align-self: start; font-size: min(calc(var(--stage-h) * .5), calc(var(--cover-w) * .44)); padding-top: .06em; }
.mm-cover__block {
    position: absolute; z-index: 0; left: 22%; right: 1.1rem; top: 26%; bottom: -1.1rem;
    background: var(--inv-tint);
}
.mm-cover__photo { position: relative; z-index: 2; grid-column: 2; grid-row: 1; margin: 0; overflow: hidden; background: var(--inv-primary); }
.mm-cover__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.mm-cover__stage--solo { grid-template-columns: 0 1fr; }
.mm-cover__stage--solo .mm-cover__block { left: 1.1rem; }
/* without a photo: the accent colour with a big outlined "&" and the title */
.mm-cover__empty {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
    background: radial-gradient(90% 60% at 20% 0%, color-mix(in srgb, #fff 16%, transparent), transparent 70%), var(--inv-primary);
}
.mm-cover__empty-amp { font-family: var(--mm-serif); font-style: italic; font-size: calc(var(--stage-h) * .55); line-height: .8; color: transparent; -webkit-text-stroke: 1.4px #fff; }
.mm-cover__empty-title { font-size: .64rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: #fff; }

.mm-cover__names {
    display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .22em; margin: 2rem 0 0;
    font-family: var(--mm-serif); font-weight: 400; font-size: 2.9rem; line-height: 1; letter-spacing: -.015em;
    color: var(--inv-text); overflow-wrap: anywhere;
}
.mm-cover__names em { font-size: .85em; color: var(--inv-primary); }
.mm-cover__quote {
    max-width: 34ch; margin: .75rem 0 0; padding-left: .8rem; border-left: 2px solid var(--inv-primary);
    font-family: var(--mm-serif); font-style: italic; font-size: 1.12rem; line-height: 1.3; color: var(--mm-muted);
}
.mm-cover__guest { margin: 1rem 0 0; padding-top: .6rem; border-top: 1px solid var(--mm-line); }
.mm-cover__guest p { margin: 0; font-size: .6rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--mm-accent-ink); }
.mm-cover__guest-name { display: block; margin-top: .1rem; font-family: var(--mm-serif); font-size: 1.45rem; line-height: 1.15; color: var(--inv-text); overflow-wrap: anywhere; }
.mm-cover__open {
    width: 100%; margin-top: 1rem; min-height: 3.1rem; padding: .7rem 1.5rem; border-radius: var(--inv-radius);
    font-size: .76rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
    color: var(--inv-background); background: var(--inv-ink);
    box-shadow: 6px 6px 0 var(--inv-primary);
}
.mm-cover__open::after { content: '→'; margin-left: .4rem; font-size: 1rem; letter-spacing: 0; }
/* calm: the button rises in once and keeps its offset block (no breathing pulse) */
html.inv-anim .mm-cover__open.inv-enter { animation: inv-enter 1.1s cubic-bezier(.2, .7, .2, 1) var(--enter-delay, 0s) both; }

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

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

/* opening: basmalah over a hairline, the greeting big, the verse as a pull-quote */
.mm-opening { padding: 4.8rem 1.6rem 5rem; }
.mm-opening__basmalah { max-width: none !important; margin: 0 0 1.6rem !important; padding-bottom: 1.2rem; text-align: center; font-size: 1.9rem; border-bottom: 1px solid var(--mm-line-ink); }
.mm-opening__greeting { max-width: 15ch !important; font-family: var(--mm-serif); font-size: 2.4rem; line-height: 1.04; letter-spacing: -.01em; color: #fff; }
.mm-opening__message { max-width: 32ch !important; color: var(--mm-ink-muted); }
.mm-opening__quote { position: relative; margin: 3.6rem 0 0; padding: .3rem 0 .2rem 1.2rem; border-left: 2px solid var(--inv-accent); }
.mm-opening__mark { position: absolute; left: .7rem; top: -2.9rem; font-family: var(--mm-serif); font-size: 6rem; line-height: 1; color: var(--inv-accent); }
.mm-opening__quote p { margin: 0; font-family: var(--mm-serif); font-style: italic; font-size: 1.32rem; line-height: 1.42; color: #fff; }
.mm-opening__quote cite {
    display: flex; align-items: center; gap: .6rem; margin-top: 1rem; font-style: normal; font-size: .66rem; font-weight: 600;
    letter-spacing: .22em; text-transform: uppercase; color: var(--inv-accent);
}
.mm-opening__quote cite::before { content: ''; width: 1.6rem; height: 1px; background: currentColor; }

/* couple: an editorial spread per person; photo block + offset tint block + a giant outlined initial */
.mm-person__media { position: relative; display: grid; grid-template-columns: 64% 36%; }
.mm-person__block { position: absolute; z-index: 0; left: 1.1rem; top: 1.1rem; width: 64%; aspect-ratio: 4 / 5; background: var(--inv-tint); }
.mm-person__photo, .mm-person__empty { position: relative; z-index: 1; grid-column: 1; grid-row: 1; display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; }
.mm-person__empty {
    display: grid; place-items: center; font-family: var(--mm-serif); font-size: 8rem; line-height: 1; color: #fff;
    background: radial-gradient(90% 60% at 20% 0%, color-mix(in srgb, #fff 16%, transparent), transparent 70%), var(--inv-primary);
}
.mm-person__initial {
    grid-column: 2; grid-row: 1; align-self: start; justify-self: center; margin-top: -.12em;
    font-family: var(--mm-serif); font-size: 8.4rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.2px var(--inv-primary);
}
.mm-person--bride .mm-person__media { grid-template-columns: 36% 64%; }
.mm-person--bride .mm-person__block { left: auto; right: 1.1rem; }
.mm-person--bride :is(.mm-person__photo, .mm-person__empty) { grid-column: 2; }
.mm-person--bride .mm-person__empty { font-style: italic; }
.mm-person--bride .mm-person__initial { grid-column: 1; font-style: italic; }
.mm-person__text { margin-top: 2.1rem; }
.mm-person--bride .mm-person__text { text-align: right; }
.mm-person__label { margin: 0; font-size: .64rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--mm-accent-ink); }
.mm-person__nickname { margin: .2rem 0 0; font-family: var(--mm-serif); font-size: 3.6rem; line-height: .95; letter-spacing: -.015em; color: var(--inv-text); overflow-wrap: anywhere; }
.mm-person--bride .mm-person__nickname { font-style: italic; color: var(--inv-primary); }
.mm-person__name { margin: .45rem 0 0; font-size: .95rem; font-weight: 600; line-height: 1.3; letter-spacing: .02em; color: var(--inv-text); overflow-wrap: anywhere; }
.mm-person__parents { margin: .8rem 0 .9rem; padding-top: .7rem; border-top: 1px solid var(--mm-line); font-size: .86rem; line-height: 1.5; color: var(--mm-muted); }
.mm-person__parents span:first-child { display: block; }
.mm-person__parents strong { font-weight: 600; color: var(--inv-text); }
.mm-person__parents .mm-amp { padding: 0 .25em; font-size: 1.1em; }
.mm-couple__and { display: flex; align-items: center; gap: 1rem; margin: 2.2rem 0 2.4rem; font-family: var(--mm-serif); font-size: 4.2rem; line-height: .8; color: var(--inv-primary); max-width: none !important; }
.mm-couple__and::before, .mm-couple__and::after { content: ''; flex: 1; height: 1px; background: var(--mm-line); }

/* families: the intent as a pull-quote, then the two-column spread with an "&" disc on its lower rule */
.mm-families { padding-bottom: 5rem; }
.mm-families__intent { position: relative; margin: 3.6rem 0 0; padding: .2rem 0 0 1.2rem; border-left: 2px solid var(--inv-accent); }
.mm-families__mark { position: absolute; left: .7rem; top: -2.8rem; font-family: var(--mm-serif); font-size: 6rem; line-height: 1; color: var(--inv-accent); }
.mm-families__intent p { margin: 0; font-family: var(--mm-serif); font-size: 1.55rem; line-height: 1.3; color: #fff; text-wrap: pretty; }
.mm-families__spread { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2.6rem; border-top: 1px solid var(--mm-line-ink); border-bottom: 1px solid var(--mm-line-ink); }
.mm-families__spread--one { grid-template-columns: minmax(0, 1fr); }
.mm-family { padding: 1.4rem .9rem 2.2rem 0; }
.mm-family + .mm-family { padding: 1.4rem 0 2.2rem .9rem; border-left: 1px solid var(--mm-line-ink); }
.mm-family__side {
    display: inline-block; margin: 0; padding: .3rem .6rem; font-size: .62rem; font-weight: 700; line-height: 1.2; letter-spacing: .2em;
    text-transform: uppercase; color: var(--inv-ink); background: var(--inv-accent);
}
.mm-family + .mm-family .mm-family__side { color: #fff; background: var(--inv-primary); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); }
.mm-family__role { margin: .8rem 0 0; font-size: .64rem; font-weight: 600; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; color: var(--mm-ink-muted); }
.mm-family__name { margin: .35rem 0 0; font-family: var(--mm-serif); font-size: 1.5rem; font-weight: 400; line-height: 1.1; color: #fff; overflow-wrap: anywhere; }
.mm-family__detail { display: flex; align-items: flex-start; gap: .4rem; margin: .8rem 0 0; font-size: .82rem; line-height: 1.5; color: var(--mm-ink-muted); }
.mm-family__detail .mm-icon { width: 1rem; height: 1rem; margin-top: .15rem; color: var(--inv-accent); }
.mm-families__and {
    position: absolute; left: 50%; bottom: 0; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; transform: translate(-50%, 50%);
    border-radius: 50%; font-family: var(--mm-serif); font-size: 1.6rem; line-height: 1; color: var(--inv-ink); background: var(--inv-accent);
    box-shadow: 0 0 0 5px var(--inv-ink);
}
.mm-families__and em { margin-top: -.1em; }
/* the couple's monogram as a big outlined ornament in the upper right corner */
.mm-families__mono { position: absolute; z-index: -1; right: -.4rem; top: 4.2rem; font-size: 10rem; opacity: .32; pointer-events: none; }
.mm-families__mono span { color: transparent !important; -webkit-text-stroke: 1.2px var(--inv-accent) !important; }

/* events: a full-bleed photo, then a white card rising over it with an accent bar and a spec table */
.mm-event + .mm-event { margin-top: 3.4rem; }
.mm-event__media { margin: 0 calc(var(--mm-gutter) * -1); }
.mm-event__media img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 45%; }
.mm-event__card {
    position: relative; padding: 1.35rem 1.2rem 1.35rem 1.35rem; background: var(--mm-card);
    box-shadow: inset 4px 0 0 var(--inv-primary), 0 24px 40px -28px color-mix(in srgb, var(--inv-ink) 70%, transparent);
}
.mm-event--photo .mm-event__card { margin: -3.4rem 0 0 1.1rem; }
.mm-event--flip .mm-event__card { padding: 1.35rem 1.35rem 1.35rem 1.2rem; box-shadow: inset -4px 0 0 var(--inv-primary), 0 24px 40px -28px color-mix(in srgb, var(--inv-ink) 70%, transparent); }
.mm-event--flip.mm-event--photo .mm-event__card { margin: -3.4rem 1.1rem 0 0; }
.mm-event__no { margin: 0 0 .6rem; font-size: .66rem; font-weight: 600; letter-spacing: .2em; color: var(--mm-muted); }
.mm-event__no span { color: var(--mm-accent-ink); }
.mm-event__date { display: flex; align-items: center; gap: .85rem; margin: 0 0 .5rem; }
.mm-event__day { font-family: var(--mm-serif); font-size: 4.4rem; line-height: .85; color: var(--inv-primary); font-variant-numeric: lining-nums; }
.mm-event__when { display: flex; flex-direction: column; padding-left: .85rem; border-left: 1px solid var(--mm-line); font-size: .66rem; font-weight: 600; line-height: 1.5; letter-spacing: .18em; text-transform: uppercase; }
.mm-event__when span + span { font-weight: 500; color: var(--mm-muted); }
.mm-event__name { margin: 0; font-family: var(--mm-serif); font-size: 2.1rem; font-weight: 400; line-height: 1.02; letter-spacing: -.01em; color: var(--inv-text); }
.mm-event__spec { margin: 1.1rem 0 0; }
.mm-event__spec div { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: .8rem; padding: .75rem 0; border-top: 1px solid var(--mm-line); }
.mm-event__spec dt { padding-top: .18rem; font-size: .6rem; font-weight: 600; line-height: 1.4; letter-spacing: .2em; text-transform: uppercase; color: var(--mm-accent-ink); }
.mm-event__spec dd { margin: 0; font-size: .92rem; line-height: 1.45; }
.mm-event__venue { display: block; font-weight: 600; }
.mm-event__address { display: block; font-size: .85rem; color: var(--mm-muted); }
.mm-event .inv-maps { margin: .4rem 0 0; }
.mm-event .inv-maps .inv-button { width: 100%; min-height: 2.9rem; border-radius: var(--inv-radius); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; background: var(--inv-ink); }
.mm-event .inv-maps__frame { height: 190px; border-radius: 0; }

/* countdown: big serif numerals split by vertical hairlines; the calendar card well below the buttons */
.mm-countdown .inv-countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--mm-line-ink); border-bottom: 1px solid var(--mm-line-ink); }
.mm-countdown .inv-countdown__item { min-width: 0; padding: 1.1rem .2rem 1rem; border-radius: 0; background: none; text-align: center; }
.mm-countdown .inv-countdown__item + .inv-countdown__item { border-left: 1px solid var(--mm-line-ink); }
.mm-countdown .inv-countdown__value { font-family: var(--mm-serif); font-size: 3.1rem; font-weight: 400; line-height: 1; font-variant-numeric: lining-nums tabular-nums; color: #fff; }
.mm-countdown .inv-countdown__label { margin-top: .35rem; font-size: .58rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--inv-accent); opacity: 1; }
.mm-countdown .inv-countdown__done { font-family: var(--mm-serif); font-size: 1.6rem; font-style: italic; color: var(--inv-accent); }
.mm-countdown .inv-countdown__actions { flex-direction: column; align-items: stretch; gap: .6rem; margin-top: 2rem; }
.mm-countdown .inv-countdown__actions .inv-button {
    width: 100%; min-height: 2.9rem; padding: .6rem 1rem; border-radius: var(--inv-radius); font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: #fff; background: transparent; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .5);
}
.mm-countdown .inv-countdown__actions .inv-button:first-child { color: var(--inv-ink); background: var(--inv-accent); box-shadow: none; }
.mm-countdown .inv-cal {
    --inv-cal-bg: var(--mm-card); --inv-cal-mark: var(--inv-primary); --inv-cal-text: var(--inv-text);
    max-width: 21rem; margin: 3rem auto 0; border-radius: 0;
    box-shadow: inset 0 4px 0 var(--inv-primary), 10px 10px 0 color-mix(in srgb, var(--inv-primary) 55%, transparent);
}
.mm-countdown .inv-cal__month { font-family: var(--mm-serif); font-size: 1.8rem; font-weight: 400; font-style: italic; color: var(--inv-primary); }

/* wedding plan: the big typographic date block on the accent colour */
.mm-plan { padding: 4.8rem 1.6rem 4.2rem; }
.mm-plan__ornament {
    position: absolute; z-index: -1; right: -1.4rem; top: -3.6rem; font-family: var(--mm-serif); font-style: italic; font-size: 17rem; line-height: 1;
    color: transparent; -webkit-text-stroke: 1.3px rgb(255 255 255 / .3); pointer-events: none;
}
.mm-plan__label {
    display: flex; align-items: center; gap: .7rem; margin: 0 0 1.2rem !important; max-width: none !important;
    font-size: .7rem; font-weight: 600; line-height: 1.3; letter-spacing: .24em; text-transform: uppercase; color: #fff;
}
.mm-plan__label::before { content: ''; flex: none; width: 1.6rem; height: 3px; background: #fff; }
.mm-plan__date {
    max-width: none !important; margin: 0 0 1rem !important; padding: 1rem 0 1.1rem; border-top: 1px solid rgb(255 255 255 / .4); border-bottom: 1px solid rgb(255 255 255 / .4);
    font-family: var(--mm-serif); line-height: .9; letter-spacing: -.02em; overflow-wrap: anywhere;
}
.mm-plan__date span { display: block; font-size: 5.2rem; color: #fff; }
.mm-plan__date em { display: block; margin-top: .05em; padding-left: .5em; font-size: 4.4rem; color: var(--inv-tint); }
.mm-plan__city { display: inline-flex !important; align-items: center; gap: .45rem; margin: 0 0 1rem !important; font-size: .72rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #fff; }
.mm-plan__city .mm-icon { width: 1rem; height: 1rem; }
.mm-plan__note { max-width: 28ch !important; font-family: var(--mm-serif); font-style: italic; font-size: 1.35rem; line-height: 1.3; color: rgb(255 255 255 / .92); }
.mm-plan__steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 2.2rem 0 0; padding: 0; list-style: none; border-top: 1px solid rgb(255 255 255 / .4); }
.mm-plan__step { position: relative; display: flex; flex-direction: column; padding: 1rem .8rem 0 0; }
.mm-plan__step + .mm-plan__step { padding: 1rem 0 0 1rem; border-left: 1px solid rgb(255 255 255 / .4); }
.mm-plan__step + .mm-plan__step::before {
    content: '→'; position: absolute; left: -.62rem; top: -.72rem; width: 1.24rem; height: 1.24rem; display: grid; place-items: center;
    border-radius: 50%; font-size: .8rem; line-height: 1; color: var(--inv-primary); background: #fff;
}
.mm-plan__no { font-family: var(--mm-serif); font-size: 2.4rem; line-height: 1; color: var(--inv-tint); }
.mm-plan__step-name { margin-top: .3rem; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #fff; }
.mm-plan__step-when { font-size: .82rem; color: rgb(255 255 255 / .85); }

/* rundown: an editorial timetable, rows split by hairlines */
.mm-rundown__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--inv-text); }
.mm-rundown__item { display: grid; grid-template-columns: 4.7rem minmax(0, 1fr); gap: .9rem; align-items: baseline; padding: .95rem 0; border-bottom: 1px solid var(--mm-line); }
.mm-rundown__item:first-child { padding-left: .6rem; padding-right: .6rem; margin: 0 -.6rem; background: var(--inv-tint); border-bottom-color: transparent; }
.mm-rundown__time { font-family: var(--mm-serif); font-size: 1.95rem; line-height: 1; font-variant-numeric: lining-nums tabular-nums; color: var(--inv-primary); }
.mm-rundown__body h3 { margin: 0; font-size: .96rem; font-weight: 600; line-height: 1.4; color: var(--inv-text); }
.mm-rundown__body p { margin: .15rem 0 0; font-size: .84rem; color: var(--mm-muted); }

/* love story: numbered chapters, photo blocks with an accent block offset behind, alternating */
.mm-story__list { display: grid; gap: 3.2rem; margin: 0; padding: 0; list-style: none; }
.mm-chapter__media { position: relative; display: grid; grid-template-columns: 60% 40%; }
.mm-chapter__block { position: absolute; z-index: 0; left: 1rem; top: 1rem; width: 60%; aspect-ratio: 4 / 5; background: var(--inv-primary); }
.mm-chapter__media img { position: relative; z-index: 1; grid-column: 1; grid-row: 1; display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 30%; }
.mm-chapter__media .mm-chapter__no { grid-column: 2; grid-row: 1; align-self: end; justify-self: center; }
.mm-chapter__no { font-family: var(--mm-serif); font-size: 5.6rem; line-height: .8; color: transparent; -webkit-text-stroke: 1.2px var(--inv-primary); font-variant-numeric: lining-nums; }
.mm-chapter--flip .mm-chapter__media { grid-template-columns: 40% 60%; }
.mm-chapter--flip .mm-chapter__block { left: auto; right: 1rem; }
.mm-chapter--flip .mm-chapter__media img { grid-column: 2; }
.mm-chapter--flip .mm-chapter__media .mm-chapter__no { grid-column: 1; }
.mm-chapter__body { margin-top: 1.9rem; }
.mm-chapter--flip .mm-chapter__body { text-align: right; }
.mm-chapter__when { display: inline-block; padding: .28rem .6rem; font-size: .62rem; font-weight: 600; line-height: 1.2; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-background); background: var(--inv-ink); }
.mm-chapter__body h3 { margin: .55rem 0 0; font-family: var(--mm-serif); font-size: 2.1rem; font-weight: 400; line-height: 1.02; color: var(--inv-text); }
.mm-chapter--flip .mm-chapter__body h3 { font-style: italic; }
.mm-chapter__body p { margin: .45rem 0 0; font-size: .9rem; line-height: 1.55; color: var(--mm-muted); }
.mm-chapter--flip .mm-chapter__body p { margin-left: auto; max-width: 34ch; }
/* a chapter without a photo: a white panel with an accent bar and the number set big */
.mm-chapter--text { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 1rem; padding: 1.3rem 1.2rem; background: var(--mm-card); box-shadow: inset 4px 0 0 var(--inv-primary); text-align: left; }
.mm-chapter--text .mm-chapter__no { font-size: 3.4rem; color: var(--inv-primary); -webkit-text-stroke: 0; }
.mm-chapter--text .mm-chapter__body { margin: 0; text-align: left; }
.mm-chapter--text .mm-chapter__body h3 { font-style: normal; }
.mm-chapter--text .mm-chapter__body p { margin-left: 0; }

/* gallery: an editorial photo spread, the first and every sixth photo wide, hairline gaps */
.mm-gallery .inv-gallery { gap: 4px; margin: 0 calc(var(--mm-gutter) * -1 + .65rem); }
.mm-gallery .inv-gallery__item { border-radius: 0; }
.mm-gallery .inv-gallery__item:first-child, .mm-gallery .inv-gallery__item:nth-child(6n) { grid-column: 1 / -1; aspect-ratio: 4 / 3; }

/* live streaming: an ink block on an accent block offset behind it */
.mm-stream { padding-top: 3.6rem; padding-bottom: 3.8rem; }
.mm-stream__card {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem; margin-right: 10px; padding: 1.5rem 1.35rem;
    color: #fff; text-align: left; background: var(--mm-ink-bg); box-shadow: 10px 10px 0 var(--inv-primary);
}
.mm-stream__icon { display: grid; place-items: center; width: 3.3rem; height: 3.3rem; border-radius: 50%; color: var(--inv-ink); background: var(--inv-accent); }
.mm-stream__icon .mm-icon { width: 1.7rem; height: 1.7rem; }
.mm-stream__title { margin: 0 0 .2rem; font-family: var(--mm-serif); font-size: 2rem; font-weight: 400; line-height: 1; color: #fff; }
.mm-stream__title em { color: var(--inv-accent); }
.mm-stream__text p { margin: 0; font-size: .86rem; color: var(--mm-ink-muted); }
.mm-stream__text .mm-stream__note { margin-top: .3rem; font-weight: 600; color: var(--inv-accent); }
.mm-stream__button {
    grid-column: 1 / -1; min-height: 2.9rem; border-radius: var(--inv-radius) !important; font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--inv-ink) !important; background: var(--inv-accent) !important;
}

/* RSVP card: paper with an accent bar on top */
.mm-rsvp__card {
    position: relative; padding: 1.8rem 1.15rem 1.4rem; color: var(--inv-text); background: var(--mm-card);
    box-shadow: inset 0 4px 0 var(--inv-primary), 0 26px 44px -26px rgb(0 0 0 / .7);
}
.mm-rsvp__intro { margin: 0 0 1.1rem; max-width: 32ch; font-size: .9rem; color: var(--mm-muted); }
.mm-rsvp__sent { margin-bottom: 1rem; text-align: center; }
.mm-rsvp__check { display: block; width: 4.4rem; height: 4.4rem; margin: 0 auto .5rem; overflow: visible; }
.mm-rsvp__check-ring { fill: none; stroke: var(--inv-primary); stroke-width: 2; }
.mm-rsvp__check-disc { fill: var(--inv-primary); }
.mm-rsvp__check path { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
html.inv-anim .mm-rsvp__sent .mm-rsvp__check { animation: mm-pop .8s cubic-bezier(.34, 1.56, .64, 1) both; }
html.inv-anim .mm-rsvp__sent .mm-rsvp__check path { animation: mm-draw .45s ease-out .35s both; }
.mm-rsvp__thanks { margin: 0; font-family: var(--mm-serif); font-style: italic; font-size: 2.1rem; color: var(--inv-primary); }
.mm-rsvp__line { margin: .1rem 0 0; font-size: .9rem; color: var(--mm-muted); }
.mm-rsvp .inv-rsvp__deadline { margin: 0 0 1rem; font-size: .84rem; font-weight: 600; color: var(--mm-accent-ink); }

/* gift: paper cards with an accent bar, two per row; the address framed by a hairline */
.mm-gift__intro { color: var(--mm-ink-muted); }
.mm-gift .inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: 1.4rem; }
.mm-gift .inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mm-gift .inv-gift__account {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 0; margin: 0;
    padding: 1.2rem .9rem 1rem; text-align: left; color: var(--inv-text); background: var(--mm-card);
    box-shadow: inset 0 4px 0 var(--inv-accent), 0 18px 30px -20px rgb(0 0 0 / .6);
}
.mm-gift .inv-gift__account p { margin: 0; }
.mm-gift .inv-gift__bank { font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--mm-accent-ink); }
.mm-gift .inv-gift__logo { height: 1.6rem; padding: .2rem .5rem; border-radius: .2rem; background: #fff; box-shadow: inset 0 0 0 1px var(--mm-line); }
.mm-gift .inv-gift__logo img { max-width: 5rem; }
.mm-gift .inv-gift__number {
    font-family: var(--mm-serif); font-size: 1.45rem; line-height: 1.1; letter-spacing: .02em; font-variant-numeric: lining-nums tabular-nums;
    overflow-wrap: anywhere; color: var(--inv-text);
}
.mm-gift .inv-gift__holder { font-size: .64rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--mm-muted); overflow-wrap: anywhere; }
.mm-gift .inv-button { margin-top: .4rem; min-height: 2.3rem; padding: .35rem .9rem; border-radius: var(--inv-radius); font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--inv-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-ink) 40%, transparent); }
.mm-gift .inv-gift__address { margin-top: .7rem; padding: 1.3rem 1.1rem 1.1rem; box-shadow: inset 0 0 0 5px var(--mm-card), inset 0 0 0 6px var(--mm-line), 0 18px 30px -20px rgb(0 0 0 / .6); font-size: .875rem; }
.mm-gift .inv-gift__address .inv-gift__holder { font-size: .72rem; }

/* co-hosts: the names in the serif in white on the accent band, one per row between hairlines */
.mm-cohosts__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgb(255 255 255 / .45); }
.mm-cohosts__list li { padding: .8rem 0; font-family: var(--mm-serif); font-size: 1.55rem; line-height: 1.15; color: #fff; border-bottom: 1px solid rgb(255 255 255 / .25); }

/* contacts: rows split by hairlines, the initial on an accent square, an ink WhatsApp button */
.mm-contacts__list { border-top: 1px solid var(--inv-text); }
.mm-contact { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) auto; align-items: center; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid var(--mm-line); }
.mm-contact__avatar { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; font-family: var(--mm-serif); font-style: italic; font-size: 1.7rem; line-height: 1; color: #fff; background: var(--inv-primary); }
.mm-contact p { margin: 0; }
.mm-contact__name { font-weight: 600; font-size: .95rem; line-height: 1.3; overflow-wrap: anywhere; }
.mm-contact__role { font-size: .78rem; color: var(--mm-muted); }
.mm-contact__phone { font-size: .85rem; }
.mm-contact__button { min-height: 2.5rem; padding: .45rem .9rem; border-radius: var(--inv-radius); font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; background: var(--inv-ink); }
.mm-contact__button .mm-icon { width: 1.05rem; height: 1.05rem; }

/* health protocol: white chips on the tint */
.mm-protocol__list { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.mm-protocol__list li { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .85rem; font-size: .84rem; font-weight: 500; background: var(--mm-card); box-shadow: inset 3px 0 0 var(--inv-primary); }
.mm-protocol__list .mm-icon { width: 1rem; height: 1rem; color: var(--inv-primary); }
.mm-protocol__note { font-size: .88rem; color: var(--mm-muted); }

/* vendors: an editorial credits list */
.mm-vendors__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--inv-text); }
.mm-vendor { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .85rem 0; border-bottom: 1px solid var(--mm-line); }
.mm-vendor__text { display: flex; flex-direction: column; min-width: 0; }
.mm-vendor__role { font-size: .6rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--mm-accent-ink); }
.mm-vendor__name { font-family: var(--mm-serif); font-size: 1.45rem; line-height: 1.15; color: var(--inv-text); overflow-wrap: anywhere; }
.mm-vendor__link {
    display: inline-flex; align-items: center; gap: .3rem; flex: none; min-height: 2.2rem; padding: .3rem .7rem; border-radius: 999px;
    font-size: .74rem; font-weight: 500; text-decoration: none; color: var(--inv-text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-text) 30%, transparent);
}
.mm-vendor__link .mm-icon { width: .95rem; height: .95rem; color: var(--inv-primary); }

/* closing: the full photo fading into ink, then the monogram, the thanks and the names */
.mm-closing { padding: 4.6rem 1.6rem 3.6rem; text-align: center; }
/* the closing ends in plain ink, so the credit and the room under it continue it without a seam */
.mm-tone--ink.mm-closing { background: radial-gradient(90% 40% at 0% 0%, color-mix(in srgb, var(--inv-primary) 42%, transparent), transparent 72%), var(--inv-ink); }
.mm-closing--photo { padding-top: 0; }
.mm-closing__photo { position: relative; z-index: -1; height: min(125vw, 36rem); margin: 0 -1.6rem; overflow: hidden; }
.mm-closing__photo img { display: block; width: 100%; height: calc(100% + 60px); margin-top: -30px; object-fit: cover; object-position: center 55%; --inv-parallax: 30px; }
.mm-closing__photo::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-ink) 18%, transparent), transparent 20%, transparent 42%, color-mix(in srgb, var(--inv-ink) 62%, transparent) 70%, var(--inv-ink) 98%);
}
.mm-closing__body { position: relative; }
.mm-closing--photo .mm-closing__body { margin-top: -7.5rem; }
.mm-closing__mono { font-size: 7.6rem; margin: 0 auto 1.4rem; }
.mm-closing__mono .mm-mono__a { color: #fff; -webkit-text-stroke-color: #fff; }
.mm-closing__mono .mm-mono__b { color: var(--inv-accent); -webkit-text-stroke-color: var(--inv-accent); }
.mm-closing__label {
    display: flex; align-items: center; justify-content: center; gap: .7rem; max-width: none !important; margin: 0 0 .5rem !important;
    font-size: .68rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--inv-accent);
}
.mm-closing__label::before, .mm-closing__label::after { content: ''; width: 1.6rem; height: 1px; background: currentColor; }
.mm-closing__title { margin: 0 0 1.1rem; font-family: var(--mm-serif); font-size: 3.6rem; font-weight: 400; line-height: 1; color: #fff; }
.mm-closing__title em { color: var(--inv-accent); }
.mm-closing__message { margin: 0 auto !important; max-width: 32ch; color: var(--mm-ink-muted); }
.mm-closing__salam { margin: 1.2rem auto 0 !important; max-width: 24ch; font-family: var(--mm-serif); font-style: italic; font-size: 1.4rem; line-height: 1.25; color: #fff; }
.mm-closing__signature { margin: 1.3rem auto 0 !important; padding-top: 1rem; max-width: 16rem !important; border-top: 1px solid var(--mm-line-ink); font-size: .66rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--mm-ink-muted); }
.mm-closing__names { margin: .5rem auto 0 !important; max-width: none !important; font-family: var(--mm-serif); font-size: 2.6rem; line-height: 1.05; color: #fff; }
.mm-closing__names em { font-size: .85em; color: var(--inv-accent); }

/* ---------- 6. forms (shared RSVP + wishes, restyled) ---------- */
.mm-main .inv-form { gap: 1rem; text-align: left; }
.mm-main .inv-form label, .mm-main .inv-form__choices legend { font-size: .8rem; font-weight: 600; color: var(--inv-text); }
.mm-main .inv-form input:not([type=radio]):not([type=checkbox]),
.mm-main .inv-form select,
.mm-main .inv-form textarea {
    width: 100%; min-height: 2.9rem; padding: .7rem .9rem; border: 0; border-radius: var(--inv-radius);
    font: 400 .95rem/1.4 var(--mm-sans); color: var(--inv-text); background: #fff;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-text) 26%, transparent);
    transition: box-shadow .2s ease;
}
.mm-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='%23555' 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;
}
.mm-main .inv-form input:not([type=radio]):focus-visible,
.mm-main .inv-form select:focus-visible,
.mm-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-primary) 22%, transparent);
}
.mm-main .inv-form button[type=submit] {
    width: 100%; min-height: 3rem; border-radius: var(--inv-radius); font-size: .76rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
    background: var(--inv-ink); box-shadow: 5px 5px 0 var(--inv-primary);
}
.mm-main .inv-form .inv-button--outline { width: 100%; min-height: 2.75rem; border-radius: var(--inv-radius); color: var(--inv-text); box-shadow: inset 0 0 0 1px var(--inv-text); }
.mm-main .inv-form__notice { text-align: center; }

/* the three answers as tiles with icons (the radio dot is hidden but still focusable) */
.mm-rsvp .inv-form__choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.mm-rsvp .inv-form__choices legend { margin-bottom: .5rem; padding: 0; }
.mm-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: var(--inv-radius); cursor: pointer; text-align: center;
    font-size: .82rem; font-weight: 600; line-height: 1.2; color: var(--inv-text); background: #fff;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-text) 20%, transparent);
    transition: background-color .25s ease, color .25s ease, transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease;
}
.mm-rsvp .inv-form__choices input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
/* icon: an accent ring (::before) with a check, a cross or a question mark in it (::after, a mask in the text colour) */
.mm-rsvp .inv-form__choices label::before {
    content: ''; width: 2.1rem; height: 2.1rem; border-radius: 50%; flex: none; background: var(--inv-tint);
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background-color .25s ease;
}
.mm-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(--mm-choice-icon) center / contain no-repeat; mask: var(--mm-choice-icon) center / contain no-repeat;
}
.mm-rsvp .inv-form__choices label:nth-of-type(1) {
    --mm-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");
}
.mm-rsvp .inv-form__choices label:nth-of-type(2) {
    --mm-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");
}
.mm-rsvp .inv-form__choices label:nth-of-type(3) {
    --mm-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");
}
.mm-rsvp .inv-form__choices label:has(input:checked) {
    color: #fff; background: var(--inv-primary); transform: translateY(-3px);
    box-shadow: 4px 4px 0 var(--inv-ink);
}
.mm-rsvp .inv-form__choices label:has(input:checked)::before { background-color: rgb(255 255 255 / .18); transform: scale(1.08); }
.mm-rsvp .inv-form__choices label:has(input:checked)::after { color: #fff; }
.mm-rsvp .inv-form__choices label:has(input:focus-visible) { outline: 2px solid var(--inv-primary); outline-offset: 3px; }

/* wishes: the form on a white card with an ink offset block, the wishes in a scroll box of about three */
.mm-wishes .inv-wishes { --inv-wishes-height: 20rem; }
.mm-wishes .inv-form { margin-right: 8px; padding: 1.3rem 1.1rem; background: #fff; box-shadow: 8px 8px 0 0 var(--inv-ink); }
.mm-wishes .inv-form button[type=submit] { box-shadow: none; background: var(--inv-primary); }
.mm-wishes .inv-wishes__list { margin-top: 1.6rem; }
.mm-wishes .inv-wishes:not(.inv-wishes--paged) .inv-wishes__list { padding: .5rem; background: color-mix(in srgb, #fff 40%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 25%, transparent); }
.mm-wishes .inv-wish { padding: .8rem .9rem; border-radius: 0; background: #fff; text-align: left; box-shadow: inset 3px 0 0 var(--inv-primary); }
.mm-wishes .inv-wish__name { font-weight: 700; color: var(--inv-text); }
.mm-wishes .inv-wish__message { font-size: .88rem; line-height: 1.5; }
.mm-wishes .inv-wish__time { font-size: .72rem; color: var(--mm-muted); }

/* ---------- 7. shared components ---------- */
.mm-main .inv-button { font-weight: 600; }
body .inv-nav {
    --inv-nav-bg: color-mix(in srgb, var(--inv-background) 95%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--inv-text) 74%, transparent);
    --inv-nav-active: var(--inv-primary);
    font-family: var(--mm-sans);
}

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

/* short phones: the stage and type step down so everything fits without scrolling */
@media (max-height: 760px) {
    .mm-cover { --stage-h: min(calc(var(--cover-w) * .95), 41svh); padding-top: 1.2rem; padding-bottom: 1.2rem; }
    .mm-cover__stage { margin-top: 1rem; }
    .mm-cover__names { margin-top: 1.7rem; font-size: 2.6rem; }
    .mm-cover__quote { font-size: 1.04rem; }
    .mm-cover__guest { margin-top: .8rem; }
    .mm-cover__open { margin-top: .85rem; }
}
@media (max-height: 660px) {
    .mm-cover { --stage-h: 35svh; padding-top: 1rem; padding-bottom: 1rem; }
    .mm-cover__stage { margin-top: .85rem; }
    .mm-cover__block { bottom: -.8rem; }
    .mm-cover__names { margin-top: 1.4rem; font-size: 2.3rem; }
    .mm-cover__quote { margin-top: .55rem; font-size: .96rem; line-height: 1.25; }
    .mm-cover__guest { margin-top: .65rem; padding-top: .45rem; }
    .mm-cover__guest-name { font-size: 1.28rem; }
    .mm-cover__open { min-height: 2.8rem; margin-top: .75rem; }
}
/* very short screens (in-app browsers): a smaller stage, so everything fits */
@media (max-height: 600px) {
    .mm-cover { --stage-h: 33svh; padding-top: .8rem; }
    .mm-cover__names { margin-top: 1.25rem; font-size: 2.1rem; }
    .mm-cover__quote { font-size: .9rem; }
    .mm-cover__guest-name { font-size: 1.18rem; }
}

/* wide screens: the phone-width column on ink */
@media (min-width: 560px) {
    body.mm-body { background: var(--mm-ink-bg); background-attachment: fixed; }
    .mm-main { box-shadow: 0 30px 60px -30px rgb(0 0 0 / .6); }
}

/* ---------- 9. motion ---------- */
@keyframes mm-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mm-pop { 0% { transform: scale(0); } 55% { transform: scale(1.12); } 75% { transform: scale(.95); } 100% { transform: scale(1); } }
/* a monogram letter: its outline wipes up, then the ink fills it */
@keyframes mm-letter {
    0% { clip-path: inset(100% -30% -30% -30%); color: transparent; }
    55% { clip-path: inset(-30% -30% -30% -30%); color: transparent; }
    100% { clip-path: inset(-30% -30% -30% -30%); }
}
@keyframes mm-letter-b {
    0% { clip-path: inset(100% -30% -30% -30%); color: transparent; transform: translateX(.08em); }
    55% { clip-path: inset(-30% -30% -30% -30%); color: transparent; }
    100% { clip-path: inset(-30% -30% -30% -30%); transform: none; }
}
@keyframes mm-uncover { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mm-settle { from { transform: scale(1.1); } to { transform: scale(1); } }
@keyframes mm-slide { from { opacity: 0; transform: translateX(-14%); } to { opacity: 1; transform: none; } }
@keyframes mm-rule { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* cover (≤ 2.5 s, once): the tint block slides in (0.1–0.9 s), the photo is uncovered upwards and
   settles (0.25–1.6 s), the two letters draw in (0.35–1.85 s and 0.6–2.1 s); the text follows through
   its inv-enter delays (up to 1.55 s + 0.6 s) */
html.inv-anim .mm-cover__block { animation: mm-slide .8s cubic-bezier(.2, .7, .2, 1) .1s both; }
html.inv-anim .mm-cover__photo { animation: mm-uncover 1.1s cubic-bezier(.65, 0, .25, 1) .25s both; }
html.inv-anim .mm-cover__photo img { animation: mm-settle 1.35s cubic-bezier(.2, .7, .2, 1) .25s both; }
html.inv-anim .mm-cover__mono .mm-mono__a { animation: mm-letter 1.5s cubic-bezier(.5, 0, .3, 1) .35s both; }
html.inv-anim .mm-cover__mono .mm-mono__b { animation: mm-letter-b 1.5s cubic-bezier(.5, 0, .3, 1) .6s both; }

/* the closing monogram draws in the same way once it is revealed */
html.inv-anim .is-revealed.mm-closing__mono .mm-mono__a, html.inv-anim .is-revealed .mm-closing__mono .mm-mono__a { animation: mm-letter 1.4s cubic-bezier(.5, 0, .3, 1) .1s both; }
html.inv-anim .is-revealed.mm-closing__mono .mm-mono__b, html.inv-anim .is-revealed .mm-closing__mono .mm-mono__b { animation: mm-letter-b 1.4s cubic-bezier(.5, 0, .3, 1) .35s both; }

/* the heading rules run out when their heading is revealed */
html.inv-anim .mm-heading__label::after { transform-origin: left; }
html.inv-anim :is(.is-revealed .mm-heading__label, .mm-heading.is-revealed .mm-heading__label)::after { animation: mm-rule .9s cubic-bezier(.2, .7, .2, 1) .2s both; }

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