/*
 * Template "Monokrom Elegan" — mobile-first. Colors come from the chosen variant (<x-inv.head>):
 *   --inv-primary = the dark tone, --inv-accent = the gold line, --inv-highlight = key info on cream
 *   (times, dates, active menu), --inv-background = cream, --inv-text.
 * Fonts: Pinyon Script, Playfair Display, Jost.
 * Rhythm: photo hero → dark band → tinted intro → cream / tinted / dark sections → photo closing.
 */

:root {
    --mono-cream: color-mix(in srgb, var(--inv-background) 85%, #fff);
    --mono-tint: color-mix(in srgb, var(--inv-accent) 22%, var(--inv-background));
    --mono-on-dark: color-mix(in srgb, var(--inv-background) 90%, #fff);
    --mono-hi: var(--inv-highlight, color-mix(in srgb, var(--inv-accent) 55%, var(--inv-text)));
    --mono-line: color-mix(in srgb, var(--inv-accent) 55%, transparent);
    --mono-muted: color-mix(in srgb, var(--inv-text) 70%, var(--inv-background));
    --mono-serif: 'Playfair Display', Georgia, serif;
    --mono-script: 'Pinyon Script', 'Brush Script MT', cursive;
    --mono-sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono-column: 480px;
    --inv-radius: 14px;
}

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

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

img { max-width: 100%; display: block; }
p { margin: 0 0 .75rem; }

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

/* ---------- shared pieces ---------- */

/* the couple's photo under a veil of the dark tone (cover + wide-screen aside); without a photo the veil alone */
.mono-photo {
    position: relative; isolation: isolate; color: var(--mono-on-dark);
    background-color: var(--inv-primary);
    background-image:
        linear-gradient(to bottom,
            color-mix(in srgb, var(--inv-primary) 25%, transparent),
            transparent 35%,
            color-mix(in srgb, var(--inv-primary) 70%, transparent) 62%,
            color-mix(in srgb, var(--inv-primary) 96%, transparent)),
        var(--mono-photo, linear-gradient(160deg, color-mix(in srgb, var(--inv-primary) 80%, #000), var(--inv-primary)));
    background-size: cover; background-position: 50% 30%;
}

.mono-script { font-family: var(--mono-script); font-weight: 400; line-height: 1.15; }
.mono-script span { font-size: .7em; color: var(--inv-accent); }

.mono-eyebrow {
    margin: 0 0 .5rem;
    font-family: var(--mono-sans); font-weight: 500; font-size: .7rem;
    letter-spacing: .32em; text-transform: uppercase;
}
.mono-section:not(.mono-band) .mono-eyebrow { color: var(--mono-hi); }

.mono-head { margin-bottom: 2rem; }
.mono-title {
    margin: 0 0 .65rem;
    font-family: var(--mono-serif); font-weight: 400; font-size: 2.1rem; line-height: 1.2;
    color: var(--inv-primary);
}
.mono-band .mono-title { color: var(--mono-on-dark); }
.mono-head .mono-divider { margin-bottom: 0; }
.mono-lead { font-size: 1rem; }
.mono-muted { color: var(--mono-muted); font-size: .9rem; }

.mono-divider { display: block; margin: 0 auto 1.25rem; color: var(--inv-accent); transform-origin: center; }

.mono-chip {
    display: inline-flex; align-items: center; gap: .4rem; margin-top: .25rem;
    padding: .4rem .95rem; border-radius: 999px;
    color: var(--inv-primary); font-size: .8rem; font-weight: 500; text-decoration: none;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 40%, transparent);
    transition: background-color .3s ease, color .3s ease;
}
.mono-chip:hover { background: var(--inv-primary); color: var(--mono-on-dark); }

/* buttons of the shared components, in this template's style */
.inv-button {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .8rem 1.5rem; border-radius: 999px;
    background: var(--inv-primary); color: var(--mono-on-dark);
    font-family: var(--mono-sans); font-weight: 500; font-size: .75rem;
    letter-spacing: .14em; text-transform: uppercase;
    box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--inv-primary) 90%, transparent);
}
.inv-button--outline { background: transparent; color: var(--inv-primary); box-shadow: inset 0 0 0 1px var(--inv-primary); }

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

.mono-cover {
    position: fixed; inset: 0; z-index: 30; overflow-y: auto;
    /* "safe": on short screens the content starts at the top and scrolls instead of being cut off */
    display: flex; align-items: safe center; justify-content: center;
    padding: 2.5rem 1.5rem; text-align: center;
}
.mono-cover--leave { transition: transform .9s cubic-bezier(.7, 0, .3, 1), opacity .9s ease; }
.mono-cover--gone { transform: translateY(-100%); opacity: 0; }
.mono-cover__inner { width: 100%; max-width: 420px; margin-top: auto; }
.mono-cover__names { margin: .25rem 0 .5rem; font-size: 3.4rem; }
.mono-cover__date { margin: 0 0 1.5rem; font-size: .85rem; letter-spacing: .12em; }
.mono-cover__guest {
    margin: 0 auto 1.25rem; padding: .7rem 1rem; max-width: 300px;
    border-block: 1px solid color-mix(in srgb, var(--inv-accent) 60%, transparent);
}
.mono-cover__guest p { margin: 0 0 .2rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.mono-cover__guest-name { display: block; font-family: var(--mono-serif); font-size: 1.35rem; }

.mono-open {
    background: var(--mono-cream); color: var(--inv-primary);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--mono-cream) 60%, transparent);
}
html.inv-anim .mono-open { animation: mono-pulse 2.6s ease-out 2.2s infinite; }
@keyframes mono-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--mono-cream) 55%, transparent); }
    100% { box-shadow: 0 0 0 16px transparent; }
}

/* ---------- hero: the full photo after opening (phones); the countdown band continues it ---------- */

.mono-hero {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: 82vh; min-height: 82svh;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    padding: 3rem 1.5rem 1rem; text-align: center; color: var(--mono-on-dark);
    background: var(--inv-primary);
}
.mono-hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.mono-hero__photo { position: absolute; left: 0; top: -40px; width: 100%; height: calc(100% + 80px); object-fit: cover; object-position: 50% 30%; }
.mono-hero::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--inv-primary) 20%, transparent), transparent 30%,
        color-mix(in srgb, var(--inv-primary) 60%, transparent) 62%, var(--inv-primary) 100%);
}
.mono-hero__names { margin: .1rem 0 .5rem; font-size: 3.6rem; text-shadow: 0 2px 18px rgb(0 0 0 / .35); }
.mono-hero__date { margin: 0; font-family: var(--mono-serif); font-size: 1.02rem; letter-spacing: .08em; }

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

.mono-section { padding: 4.5rem 1.6rem; text-align: center; }
.mono-band { background-color: var(--inv-primary); color: var(--mono-on-dark); }
.mono-band .mono-eyebrow { color: var(--inv-accent); }

/* countdown: right under the names, on the dark band that continues the photo */
.mono-countdown { padding-top: 1.25rem; padding-bottom: 3.5rem; }
.mono-countdown .inv-countdown { gap: .5rem; }
.mono-countdown .inv-countdown__item {
    flex: 1; max-width: 4.9rem; padding: .75rem .25rem .6rem;
    background: color-mix(in srgb, #fff 7%, transparent);
    border: 1px solid color-mix(in srgb, var(--inv-accent) 55%, transparent); border-radius: 12px;
}
.mono-countdown .inv-countdown__value { font-family: var(--mono-serif); font-weight: 500; font-size: 1.85rem; color: var(--inv-accent); }
.mono-countdown .inv-countdown__label { margin-top: .15rem; font-size: .62rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.mono-countdown .inv-countdown__actions { margin-top: 1.5rem; }
.mono-countdown .inv-button--outline { color: var(--mono-on-dark); box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 55%, transparent); }

/* opening: a tinted intro with running photos and big initials, then the text */
.mono-opening { padding-top: 0; }
.mono-intro { margin: 0 -1.6rem 2.75rem; padding: 2rem 0 2.5rem; background: var(--mono-tint); }
.mono-marquee { --inv-marquee-height: 10rem; margin-bottom: 2rem; }
.mono-marquee img { border-radius: 4px; }
.mono-bigmono {
    display: flex; align-items: center; justify-content: center; gap: 1.1rem; margin: 0 0 1rem;
    font-family: var(--mono-serif); font-size: 4.2rem; line-height: 1; color: var(--inv-primary);
}
.mono-bigmono i { width: 1px; height: 4.6rem; background: color-mix(in srgb, var(--inv-primary) 50%, transparent); }
.mono-bigmono__date { margin: 0; font-size: .95rem; font-weight: 500; letter-spacing: .5em; color: var(--mono-hi); }

.mono-opening__greeting { font-family: var(--mono-serif); font-style: italic; font-size: 1.2rem; color: var(--inv-primary); }
.mono-arabic { margin: 0 0 1rem; font-family: 'Amiri', 'Traditional Arabic', serif; font-size: 1.75rem; line-height: 1.6; color: var(--inv-primary); }
.mono-quote { margin: 2.25rem 0 0; }
.mono-quote blockquote { margin: 0; font-family: var(--mono-serif); font-style: italic; font-size: 1.02rem; line-height: 1.8; }
.mono-quote figcaption { margin-top: .75rem; font-size: .72rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--mono-hi); }

.mono-roundrow { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; }
.mono-roundrow__item {
    flex: 0 1 4.5rem; min-width: 0; aspect-ratio: 1; border-radius: 999px; overflow: hidden;
    border: 3px solid var(--mono-cream); box-shadow: 0 0 0 1px var(--mono-line), 0 8px 16px -8px rgb(0 0 0 / .45);
}
.mono-roundrow__item img { width: 100%; height: 100%; object-fit: cover; }

/* couple: portraits in a soft double frame (cream mat + thin gold line) */
.mono-couple { background: var(--mono-cream); }
.mono-person__frame {
    position: relative; width: min(13rem, 62%); aspect-ratio: 3 / 4; margin: 0 auto 1.4rem; padding: 7px;
    border-radius: 999px 999px 14px 14px; background: #fff;
    box-shadow: 0 0 0 1px var(--mono-line), 0 0 0 7px var(--mono-cream), 0 0 0 8px var(--mono-line),
        0 24px 40px -24px color-mix(in srgb, var(--inv-primary) 80%, transparent);
}
.mono-person__photo, .mono-person__initial {
    position: relative; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%;
    border-radius: 999px 999px 9px 9px;
}
.mono-person__initial {
    display: grid; place-items: center; background: var(--inv-primary); color: var(--inv-accent); font-size: 5rem;
}
.mono-person__nickname { margin: 0; font-size: 3rem; color: var(--inv-primary); }
.mono-person__name { margin: .1rem 0 .6rem; font-family: var(--mono-serif); font-weight: 500; font-size: 1.15rem; }
.mono-person__parents { font-size: .875rem; color: var(--mono-muted); }
.mono-person__parents strong { font-weight: 500; color: var(--inv-text); }
.mono-couple__amp { margin: 2rem 0; font-size: 3.5rem; color: var(--inv-accent); }

/* events: photo on top with an arched corner, details below, the event name down a narrow strip */
.mono-events { background: var(--mono-tint); }
.mono-event {
    display: grid; grid-template-columns: minmax(0, 1fr) 3.4rem; grid-template-areas: "media media" "panel name";
    background: var(--mono-cream); box-shadow: 0 22px 40px -28px color-mix(in srgb, var(--inv-primary) 85%, transparent);
    border-radius: 0 0 4px 4px;
}
.mono-event + .mono-event { margin-top: 2rem; }
.mono-event__media { grid-area: media; overflow: hidden; border-radius: 9rem 0 0 0; aspect-ratio: 5 / 4; }
.mono-event__photo { width: 100%; height: 100%; object-fit: cover; }
.mono-event__panel { grid-area: panel; padding: 1.6rem 1rem 1.75rem; }
.mono-event__name {
    grid-area: name; margin: 0; display: flex; align-items: center; justify-content: center; padding: 1rem 0;
    background: #fff; border-left: 1px solid var(--mono-line);
    font-family: var(--mono-serif); font-weight: 400; font-size: 1.3rem; letter-spacing: .32em; text-transform: uppercase;
    color: var(--inv-primary);
}
.mono-event__name span { writing-mode: vertical-rl; white-space: nowrap; max-height: 100%; }
.mono-event:not(.mono-event--photo) .mono-event__media { display: none; }
.mono-event__date { margin: 0 0 .15rem; font-family: var(--mono-serif); font-size: 1.25rem; line-height: 1.3; color: var(--inv-primary); }
.mono-event__time { margin: 0; font-weight: 500; letter-spacing: .04em; color: var(--mono-hi); }
.mono-event__pin { display: block; margin: 1.1rem auto .4rem; color: var(--inv-accent); }
.mono-event__venue { margin: 0 0 .2rem; font-weight: 600; font-size: 1.05rem; line-height: 1.35; color: var(--inv-text); }
.mono-event__address, .mono-event__dress { font-size: .86rem; color: var(--mono-muted); }
.mono-event__dress { margin: .6rem 0 0; font-style: italic; }
.mono-event .inv-maps { margin-top: 1.1rem; }
.mono-event .inv-maps .inv-button { border-radius: 6px; letter-spacing: .2em; }

/* love story: compact zig-zag */
.mono-story { background: var(--mono-cream); }
.mono-zz { list-style: none; margin: 0; padding: .25rem 0; position: relative; }
.mono-zz::before { content: ''; position: absolute; top: 1rem; bottom: 1rem; left: 50%; width: 1px; margin-left: -.5px; background: var(--mono-line); }
.mono-zz__item {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 2.1rem minmax(0, 1fr);
    grid-template-areas: "text num aside"; align-items: start; column-gap: .55rem; padding-bottom: 1.75rem;
}
.mono-zz__item:last-child { padding-bottom: 0; }
.mono-zz__item--flip { grid-template-areas: "aside num text"; }
.mono-zz__text { grid-area: text; text-align: right; }
.mono-zz__aside { grid-area: aside; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; text-align: left; }
.mono-zz__item--flip .mono-zz__text { text-align: left; }
.mono-zz__item--flip .mono-zz__aside { align-items: flex-end; text-align: right; }
.mono-zz__num {
    grid-area: num; justify-self: center; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 999px;
    background: var(--mono-cream); border: 1px solid var(--inv-accent); box-shadow: 0 0 0 4px var(--mono-cream);
    font-family: var(--mono-serif); font-size: .8rem; color: var(--mono-hi);
}
.mono-zz__title { margin: .2rem 0 0; font-family: var(--mono-serif); font-size: 1.12rem; font-weight: 500; line-height: 1.25; color: var(--inv-primary); overflow-wrap: anywhere; }
.mono-zz__rule { display: block; width: 75%; margin: .4rem 0 .45rem auto; border-top: 1px dotted var(--inv-accent); }
.mono-zz__item--flip .mono-zz__rule { margin-left: 0; margin-right: auto; }
.mono-zz__body { margin: 0; font-size: .82rem; line-height: 1.55; color: var(--mono-muted); overflow-wrap: anywhere; }
.mono-zz__date { display: block; padding-top: .15rem; font-family: var(--mono-serif); font-size: 1.1rem; font-style: italic; line-height: 1.2; color: var(--mono-hi); }
.mono-zz__photo {
    width: min(6rem, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 999px;
    border: 3px solid #fff; box-shadow: 0 0 0 1px var(--mono-line), 0 8px 16px -8px rgb(0 0 0 / .4);
}

/* gallery (dark band): with an odd number of items the first one is wide, so the grid ends full */
.mono-gallery .inv-gallery { gap: .4rem; }
.mono-gallery .inv-gallery__item { border-radius: 6px; background: color-mix(in srgb, #fff 6%, transparent); }
.mono-gallery .inv-gallery__item:first-child:nth-last-child(2n + 1) { grid-column: span 2; aspect-ratio: 4 / 3; }

.mono-stream { background: var(--mono-cream); }

/* gift: bank cards, two per row, a gold chip; the address card stays plain */
.mono-gift { background: var(--mono-tint); }
.mono-gift .inv-gift { margin-top: 1.5rem; }
.mono-gift .inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.mono-gift .inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.mono-gift .inv-gift__accounts .inv-gift__account {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; min-width: 0; margin: 0;
    padding: .85rem .8rem .8rem; border: 0; border-radius: 16px; text-align: left; color: var(--mono-on-dark);
    background:
        radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--inv-accent) 35%, transparent), transparent 60%),
        linear-gradient(135deg, color-mix(in srgb, var(--inv-primary) 85%, #fff), var(--inv-primary) 55%, color-mix(in srgb, var(--inv-primary) 75%, #000));
    box-shadow: 0 14px 26px -16px color-mix(in srgb, var(--inv-primary) 95%, transparent);
}
.mono-gift .inv-gift__accounts .inv-gift__account::before {
    content: ''; order: -1; width: 1.9rem; height: 1.4rem; margin-bottom: .25rem; border-radius: .3rem;
    background:
        linear-gradient(90deg, transparent 45%, rgb(0 0 0 / .18) 45% 55%, transparent 55%),
        linear-gradient(transparent 30%, rgb(0 0 0 / .15) 30% 38%, transparent 38% 62%, rgb(0 0 0 / .15) 62% 70%, transparent 70%),
        linear-gradient(135deg, color-mix(in srgb, var(--inv-accent) 55%, #fff), var(--inv-accent));
}
.mono-gift .inv-gift__account p { margin: 0; }
.mono-gift .inv-gift__accounts .inv-gift__bank { position: absolute; top: .8rem; right: .8rem; font-size: .7rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.mono-gift .inv-gift__logo { height: 1.45rem; padding: .2rem .45rem; border-radius: .35rem; background: #fff; }
.mono-gift .inv-gift__logo img { max-width: 4rem; }
.mono-gift .inv-gift__number {
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-weight: 500; font-size: clamp(.82rem, 3.6vw, .95rem);
    letter-spacing: .03em; line-height: 1.3; overflow-wrap: anywhere; color: #fff;
}
.mono-gift .inv-gift__holder { font-size: .6rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; opacity: .85; overflow-wrap: anywhere; }
.mono-gift .inv-gift__accounts .inv-button {
    margin-top: .3rem; padding: .35rem .75rem; font-size: .6rem; letter-spacing: .12em;
    background: transparent; color: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 50%, transparent);
}
.mono-gift .inv-gift__address { margin-top: .8rem; padding: 1.1rem 1rem; border: 1px solid var(--mono-line); border-radius: 16px; background: var(--mono-cream); }
.mono-gift .inv-gift__address .inv-gift__bank { font-size: .68rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--mono-hi); }
.mono-gift .inv-gift__address .inv-gift__holder { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }

/* rsvp + wishes */
.mono-rsvp { background: var(--mono-cream); }
.mono-wishes { background: var(--mono-tint); }
.mono-panel {
    padding: 1.5rem 1.25rem; border: 1px solid var(--mono-line); border-radius: var(--inv-radius);
    background: #fff; text-align: left; box-shadow: 0 18px 36px -28px color-mix(in srgb, var(--inv-primary) 80%, transparent);
}
.mono-panel .inv-form input:not([type=radio]):not([type=checkbox]),
.mono-panel .inv-form select,
.mono-panel .inv-form textarea {
    border-color: color-mix(in srgb, var(--inv-text) 18%, transparent); border-radius: 10px; background: #fff;
}
.mono-panel .inv-form .inv-button { justify-self: stretch; }
.mono-panel .inv-wish { background: color-mix(in srgb, var(--inv-primary) 5%, #fff); border-radius: 10px; }
.mono-panel .inv-wish__name { font-family: var(--mono-serif); font-weight: 500; color: var(--inv-primary); }
.mono-wishes .inv-wishes { --inv-wishes-height: 20rem; }
.mono-wishes .inv-wishes:not(.inv-wishes--paged) .inv-wishes__list {
    padding: .5rem; border-radius: 12px; background: color-mix(in srgb, var(--inv-primary) 3%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 25%, transparent);
}
.mono-panel .inv-wish { padding: .65rem .8rem; }
.mono-panel .inv-wish__message { font-size: .88rem; line-height: 1.45; }

/* closing: full-bleed photo, a dark gradient from the bottom */
.mono-closing {
    position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end;
    min-height: min(100svh, 46rem); padding: 6rem 1.6rem 3.5rem; text-align: center; color: #fff;
    background: var(--inv-primary);
}
.mono-closing__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.mono-closing__photo { position: absolute; left: 0; top: -40px; width: 100%; height: calc(100% + 80px); object-fit: cover; object-position: 50% 30%; }
.mono-closing::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(to bottom, transparent 20%, rgb(10 10 10 / .5) 52%, rgb(8 8 8 / .9) 100%);
}
.mono-closing__inner { width: 100%; }
.mono-closing__thanks { margin: 0 0 .75rem; font-family: var(--mono-serif); font-weight: 400; font-size: 2.2rem; letter-spacing: .14em; }
.mono-closing .mono-divider { margin-bottom: .75rem; }
.mono-closing__names { margin: 0 0 1rem; font-size: 3.3rem; }
.mono-closing__message { font-size: .93rem; line-height: 1.75; color: rgb(255 255 255 / .9); }
.mono-closing__signature { margin: 1.1rem 0 0; font-size: .74rem; letter-spacing: .3em; text-transform: uppercase; color: color-mix(in srgb, var(--inv-accent) 60%, #fff); }

/* shared components outside the sections */
.inv-music__button { background: var(--inv-primary); color: var(--mono-on-dark); box-shadow: 0 0 0 1px var(--mono-line), 0 6px 16px rgb(0 0 0 / .25); }
.inv-checkin { margin: 0 1.75rem 2rem; }
.inv-nav {
    --inv-nav-bg: color-mix(in srgb, var(--inv-primary) 90%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--mono-on-dark) 75%, transparent);
    --inv-nav-active: var(--mono-hi);
    border-color: color-mix(in srgb, var(--inv-accent) 40%, transparent);
}
.inv-to-top { background: var(--inv-primary); color: var(--mono-on-dark); box-shadow: 0 0 0 1px var(--mono-line), 0 6px 14px -6px rgb(0 0 0 / .4); }

/* sections slide in from the sides ("alternate"): never let that widen the page */
.mono-page { overflow-x: clip; }

/* ---------- wide screens: photo on the left, invitation on the right ---------- */

.mono-aside { display: none; }

@media (min-width: 1024px) {
    .mono-aside {
        position: fixed; inset: 0 var(--mono-column) 0 0; z-index: 0;
        display: flex; align-items: flex-end; justify-content: center;
        padding: 4rem; text-align: center;
    }
    .mono-aside__names { margin: .25rem 0 .75rem; font-size: 4.5rem; }
    .mono-aside__date { margin: 0; font-family: var(--mono-serif); font-size: 1.05rem; letter-spacing: .14em; }
    .mono-page {
        position: relative; z-index: 1; width: var(--mono-column); margin-left: auto;
        min-height: 100vh; background: var(--inv-background);
        box-shadow: -18px 0 40px rgb(0 0 0 / .18);
    }
    .mono-hero { display: none; }
    .mono-countdown { padding-top: 3.5rem; }
    .mono-cover__names { font-size: 4.25rem; }
    /* the floating buttons stay over the invitation column */
    .inv-nav { left: calc(100% - var(--mono-column) / 2); }
    .inv-to-top { left: calc(100% - var(--mono-column) + 1rem); }
}

@media (max-height: 620px) {
    .mono-cover__names { font-size: 2.75rem; }
    .mono-cover__date { margin-bottom: 1rem; }
}

/* ---------- motion (only with html.inv-anim) ---------- */

/* the big initials slide in from both sides, the line between them grows */
html.inv-anim .mono-bigmono span { transition: transform 1.1s cubic-bezier(.2, .7, .2, 1) .25s, opacity 1s ease .25s; }
html.inv-anim .mono-bigmono i { transition: transform 1s cubic-bezier(.2, .7, .2, 1) .5s; }
html.inv-anim .mono-bigmono:not(.is-revealed) span:first-child { transform: translateX(-40px); opacity: 0; }
html.inv-anim .mono-bigmono:not(.is-revealed) span:last-child { transform: translateX(40px); opacity: 0; }
html.inv-anim .mono-bigmono:not(.is-revealed) i { transform: scaleY(0); }

/* the vertical event name is written from the top down */
html.inv-anim .mono-event__name span { transition: clip-path 1.2s cubic-bezier(.65, 0, .35, 1) .45s; }
html.inv-anim .mono-event:not(.is-revealed) .mono-event__name span { clip-path: inset(0 0 100% 0); }

/* the arched photo settles from a slight zoom */
html.inv-anim .mono-event__photo { transition: transform 1.6s cubic-bezier(.2, .7, .2, 1) .1s; }
html.inv-anim .mono-event:not(.is-revealed) .mono-event__photo { transform: scale(1.12); }

@media (prefers-reduced-motion: reduce) {
    .mono-cover--leave { transition: none; }
    .mono-chip { transition: none; }
}

/* cover quote, monogram */
.mono-monogram { display: flex; align-items: center; justify-content: center; gap: .9rem; margin: 0 0 1.25rem; font-family: 'Playfair Display', Georgia, serif; font-size: 2rem; line-height: 1; }
.mono-monogram i { width: 1px; height: 2.25rem; background: currentColor; opacity: .55; }
.mono-cover__quote { max-width: 320px; margin: -.5rem auto 1.25rem; font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-size: .95rem; line-height: 1.6; opacity: .9; }

/* ---------- grayscale photo backgrounds (owner round 2: no plain sections) ---------- */
/* rhythm: photo hero → dark countdown → cream opening over a soft photo → cream couple → dark events over a photo →
   cream story → dark gallery → cream gift over a soft photo → dark rsvp over a photo → tinted wishes → photo closing */
.mono-section, .mono-opening__body { position: relative; isolation: isolate; }
.mono-bgphoto { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.mono-bgphoto img {
    position: absolute; left: 0; top: -48px; width: 100%; height: calc(100% + 96px); max-width: none;
    object-fit: cover; object-position: 50% 30%; filter: grayscale(1) contrast(1.05);
}
.mono-bgphoto::after { content: ''; position: absolute; inset: 0; }

/* light: the photo shows softly through the cream ground, which is strongest behind the text column */
.mono-bgphoto--light {
    background:
        radial-gradient(80% 40% at 50% 0%, color-mix(in srgb, var(--inv-accent) 18%, transparent), transparent 75%),
        linear-gradient(180deg, var(--mono-cream), color-mix(in srgb, var(--inv-background) 82%, #8c8c8c));
}
.mono-bgphoto--light img { opacity: .65; filter: grayscale(1) brightness(.78) contrast(1.15) blur(.5px); }
.mono-bgphoto--light::after {
    background:
        radial-gradient(58% 42% at 50% 45%, color-mix(in srgb, var(--mono-cream) 66%, transparent), transparent 100%),
        linear-gradient(180deg,
            color-mix(in srgb, var(--mono-cream) 85%, transparent) 0%,
            color-mix(in srgb, var(--mono-cream) 45%, transparent) 30%,
            color-mix(in srgb, var(--mono-cream) 45%, transparent) 70%,
            color-mix(in srgb, var(--mono-cream) 80%, transparent) 100%);
}

/* dark: the photo sinks into a deep near-black gradient of the primary tone; brighter in the middle */
.mono-bgphoto--dark {
    background:
        radial-gradient(90% 50% at 50% 0%, color-mix(in srgb, var(--inv-accent) 16%, transparent), transparent 70%),
        linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 80%, #000), color-mix(in srgb, var(--inv-primary) 45%, #000));
}
.mono-bgphoto--dark img { opacity: .75; }
.mono-bgphoto--dark::after {
    background: linear-gradient(180deg,
        color-mix(in srgb, color-mix(in srgb, var(--inv-primary) 60%, #000) 88%, transparent) 0%,
        color-mix(in srgb, color-mix(in srgb, var(--inv-primary) 60%, #000) 50%, transparent) 38%,
        color-mix(in srgb, color-mix(in srgb, var(--inv-primary) 60%, #000) 78%, transparent) 70%,
        color-mix(in srgb, color-mix(in srgb, var(--inv-primary) 50%, #000) 94%, transparent) 100%);
}

/* opening: the photo starts under the tinted intro band and runs to the end of the section */
.mono-opening .mono-intro { margin-bottom: 0; position: relative; z-index: 1; }
.mono-opening__body { margin: 0 -1.6rem -4.5rem; padding: 2.75rem 1.6rem 4.5rem; }
.mono-opening .mono-lead, .mono-quote blockquote { color: var(--inv-text); }
.mono-opening .mono-quote {
    padding: 1.5rem 1.25rem 1.4rem; border: 1px solid var(--mono-line); border-radius: 4px;
    background: color-mix(in srgb, var(--mono-cream) 82%, transparent);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* events and rsvp become dark bands; their cards and panel keep the dark text */
.mono-events.mono-band, .mono-rsvp.mono-band { background: color-mix(in srgb, var(--inv-primary) 60%, #000); }
.mono-events .mono-event, .mono-panel { color: var(--inv-text); }
.mono-events .mono-event { box-shadow: 0 26px 46px -24px rgb(0 0 0 / .7); }
.mono-rsvp .mono-panel { box-shadow: 0 26px 46px -24px rgb(0 0 0 / .7); }

/* gift: the intro sentence keeps full text color over the photo */
.mono-gift .mono-muted { color: var(--inv-text); }

/* closing: a grayscale photo fading into black; without a photo a deep charcoal gradient */
.mono-closing {
    background:
        radial-gradient(90% 45% at 50% 20%, color-mix(in srgb, var(--inv-accent) 14%, transparent), transparent 70%),
        linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 70%, #6b6b6b), #0a0a0a 85%);
}
.mono-closing__photo { filter: grayscale(1) contrast(1.08); }
.mono-closing::after {
    background: linear-gradient(to bottom, rgb(8 8 8 / .15) 0%, transparent 18%, rgb(8 8 8 / .55) 50%, rgb(6 6 6 / .93) 82%, #060606 100%);
}

/* cover: a deeper veil through the middle so the names stay clear on short screens, where they sit higher on the photo */
.mono-cover.mono-photo {
    background-image:
        linear-gradient(to bottom,
            color-mix(in srgb, var(--inv-primary) 35%, transparent),
            color-mix(in srgb, var(--inv-primary) 30%, transparent) 30%,
            color-mix(in srgb, var(--inv-primary) 72%, transparent) 58%,
            color-mix(in srgb, var(--inv-primary) 96%, transparent)),
        var(--mono-photo, linear-gradient(160deg, color-mix(in srgb, var(--inv-primary) 80%, #000), var(--inv-primary)));
}
.mono-cover__names, .mono-cover__quote, .mono-cover__date, .mono-cover .mono-eyebrow, .mono-monogram { text-shadow: 0 2px 14px rgb(0 0 0 / .45); }
