/*
 * Arch Modern — 2026 "sculptural silhouettes". Every block is an arch, half-arch, pebble or dome, and the
 * sections are stacked like colored paper stock (cream, sand, the mid tone, clay, deep). The event date
 * is the hero in a huge light sans; names in Instrument Serif italic; almost no ornaments.
 * Phone-first; on wide screens a centered 460px column on a backdrop of large soft silhouettes.
 * Colors come from the variant: --inv-primary, --inv-accent, --inv-background, --inv-text,
 * --inv-stock, --inv-sand, --inv-clay, --inv-muted, --inv-line. All classes start with "am-".
 */

:root {
    --inv-primary: #3e4c3c;
    --inv-accent: #a65f42;
    --inv-background: #f7f2e8;
    --inv-text: #283026;
    --inv-stock: #bfc9ae;
    --inv-sand: #eadcc4;
    --inv-clay: #ddb39a;
    --inv-muted: #5e665a;
    --inv-line: #d6c9b2;
    --inv-radius: 18px;

    --am-serif: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
    --am-sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --am-col: 460px;
    /* left/right edge of the column on wide screens (0 on phones) */
    --am-edge: max(0px, calc((100vw - var(--am-col)) / 2));
    /* how far each shaped section slides over the one before it */
    --am-overlap: 3.6rem;
    --am-arch: 999px 999px 1.1rem 1.1rem;
    --am-pebble: 58% 42% 52% 48% / 46% 54% 46% 54%;
    --am-shadow: 0 18px 36px -20px color-mix(in srgb, var(--inv-primary) 70%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.am-body {
    margin: 0; min-height: 100vh; background: var(--inv-sand); color: var(--inv-text);
    font: 400 15px/1.7 var(--am-sans); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
p, h1, h2, h3, figure, blockquote { margin: 0; }
a { color: inherit; }

.am-serif { font-family: var(--am-serif); font-style: italic; font-weight: 400; line-height: 1.05; letter-spacing: -.005em; }
.am-label { font-size: .68rem; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: var(--am-muted, var(--inv-muted)); }
.am-muted { color: var(--am-muted, var(--inv-muted)); font-size: .9rem; }
.am-lead { font-size: .93rem; font-weight: 300; }
.am-icon { flex: none; display: inline-block; vertical-align: -.2em; }

/* ---------- backdrop on wide screens: big soft silhouettes ---------- */
.am-backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--inv-sand); }
.am-backdrop__shape { position: absolute; display: block; }
.am-backdrop__shape--a { left: -6vw; bottom: -10vh; width: 34vw; height: 70vh; border-radius: 999px 999px 0 0; background: var(--inv-stock); opacity: .7; }
.am-backdrop__shape--b { left: 14vw; top: -14vh; width: 22vw; height: 22vw; border-radius: var(--am-pebble); background: var(--inv-clay); opacity: .6; }
.am-backdrop__shape--c { right: -8vw; top: 12vh; width: 30vw; height: 80vh; border-radius: 999px 999px 0 0; background: var(--inv-primary); opacity: .14; }
.am-backdrop__shape--d { right: 12vw; bottom: -12vh; width: 26vw; height: 26vw; border-radius: 100% 0 0 0; background: var(--inv-background); opacity: .8; }

.am-preview {
    position: fixed; z-index: 60; top: 0; left: var(--am-edge); right: var(--am-edge); padding: .35rem .75rem;
    background: var(--inv-primary); color: var(--inv-background); font-size: .7rem; text-align: center; letter-spacing: .03em;
}

/* the page column */
.am-page {
    position: relative; z-index: 1; width: 100%; max-width: var(--am-col); min-height: 100vh; margin: 0 auto;
    background: var(--inv-primary); overflow-x: clip;
}
@media (min-width: 520px) { .am-page { box-shadow: 0 0 70px -24px rgb(0 0 0 / .4); } }

/* ---------- buttons: pebbles and domes ---------- */
.am-btn, .am-page .inv-button, .am-cover .inv-button {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 2.65rem; padding: .6rem 1.2rem; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--am-btn-bg, var(--inv-primary)); color: var(--am-btn-fg, var(--inv-background)); text-decoration: none;
    font: 500 .8rem/1.2 var(--am-sans); letter-spacing: .03em;
    box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--inv-primary) 85%, transparent);
    transition: transform .2s ease, filter .2s ease;
}
.am-btn:hover, .am-page .inv-button:hover { filter: brightness(1.12); }
.am-btn:active { transform: scale(.97); }
.am-btn:focus-visible, .am-page .inv-button:focus-visible, .am-cover .inv-button:focus-visible { outline: 2px solid var(--inv-accent); outline-offset: 3px; }
.am-btn--dome { border-radius: 1.6rem 1.6rem .55rem .55rem; padding-inline: 1.5rem; }
.am-btn--small { min-height: 2.15rem; padding: .4rem .9rem; font-size: .74rem; }
.am-btn--soft { background: var(--am-soft-bg, var(--inv-stock)); color: var(--inv-text); box-shadow: none; }
.am-page .inv-button--outline {
    background: transparent; color: var(--am-btn-bg, var(--inv-primary));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--am-btn-bg, var(--inv-primary)) 55%, transparent);
}

/* ---------- cover ---------- */
.am-cover {
    position: fixed; z-index: 50; top: 0; bottom: 0; left: var(--am-edge); right: var(--am-edge);
    display: flex; overflow-x: hidden; overflow-y: auto; background: var(--inv-background);
}
.am-cover__inner {
    position: relative; z-index: 1; margin: auto; width: 100%; padding: 2.2rem 1.5rem 2.4rem;
    display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center;
}

/* drifting silhouettes in the corners */
.am-float { position: absolute; z-index: 0; display: block; pointer-events: none; will-change: transform; }
.am-float--arch { top: -1px; right: 1.4rem; width: 4.6rem; height: 9.5rem; border-radius: 0 0 999px 999px; background: var(--inv-stock); transform-origin: 50% 0; }
.am-float--pebble { bottom: 3.5rem; left: -2.4rem; width: 7.5rem; height: 6.5rem; border-radius: var(--am-pebble); background: var(--inv-clay); }
.am-float--half { bottom: -1px; right: -1px; width: 9rem; height: 9rem; border-radius: 100% 0 0 0; background: var(--inv-sand); transform-origin: 100% 100%; }
@keyframes am-sway { 0%, 100% { transform: rotate(0deg) translateY(0); } 50% { transform: rotate(-3deg) translateY(4px); } }
@keyframes am-drift { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(6px, -8px) rotate(8deg); } }
html.inv-anim .am-float--arch { animation: am-sway 8s ease-in-out infinite; }
html.inv-anim .am-float--pebble { animation: am-drift 9s ease-in-out infinite; }
html.inv-anim .am-float--half { animation: am-sway 10s ease-in-out infinite -4s; }

.am-cover__arch { position: relative; width: min(54vw, 13.5rem); margin: .4rem 0 1.4rem; }
.am-cover__shadow {
    position: absolute; inset: 0; transform: translate(14px, 12px); border-radius: var(--am-arch); background: var(--inv-primary);
}
.am-cover__photo {
    position: relative; aspect-ratio: 3 / 4.1; border-radius: var(--am-arch);
    background: var(--am-photo, none) center 30% / cover no-repeat, linear-gradient(160deg, var(--inv-sand), var(--inv-stock));
}
.am-monogram {
    position: absolute; left: -1.1rem; bottom: -1.3rem;
    display: flex; align-items: center; justify-content: center; gap: .3rem;
    min-width: 4.2rem; height: 3.7rem; padding: 0 .85rem; border-radius: var(--am-pebble);
    background: var(--inv-clay); color: var(--inv-text);
    font: 400 1.25rem/1 var(--am-serif); font-style: italic;
    box-shadow: 0 10px 20px -12px rgb(0 0 0 / .45);
}
.am-monogram i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .7; }
.am-cover__names { font-size: clamp(2.7rem, 12vw, 3.4rem); color: var(--inv-primary); }
.am-cover__names span { color: var(--inv-accent); }
.am-cover__date {
    display: flex; align-items: center; gap: .7rem; font-weight: 200; font-size: 2rem; line-height: 1;
    letter-spacing: .04em; color: var(--inv-text);
}
.am-cover__date i { width: .45rem; height: .45rem; border-radius: 999px 999px 0 0; background: var(--inv-accent); }
.am-cover__quote {
    max-width: 19rem; font: italic 400 1rem/1.4 var(--am-serif); color: var(--inv-muted);
    display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.am-cover__guest {
    width: min(100%, 17.5rem); margin-top: .3rem; padding: .85rem 1.1rem; border-radius: 2.2rem 2.2rem 1rem 1rem;
    background: var(--inv-sand);
}
.am-cover__guest p { font-size: .7rem; color: var(--inv-muted); letter-spacing: .1em; }
.am-cover__guest-name { display: block; margin-top: .15rem; font-weight: 500; font-size: 1.02rem; color: var(--inv-text); overflow-wrap: anywhere; }
.am-open { margin-top: .4rem; padding: .8rem 1.6rem; font-size: .86rem; }
.am-cover--leave { transition: opacity .8s ease, transform .9s cubic-bezier(.65, 0, .35, 1); }
.am-cover--gone { opacity: 0; transform: translateY(-5%); }

/* ---------- hero: the date set huge ---------- */
.am-hero { position: relative; overflow: hidden; padding: 2.6rem 1.5rem calc(var(--am-overlap) + 2.4rem); background: var(--inv-sand); text-align: center; }
body:has(.am-preview) .am-hero { padding-top: 3.6rem; }
.am-hero__dome {
    position: absolute; left: -3rem; top: 6.5rem; width: 15rem; height: 15rem; border-radius: 50%;
    background: var(--inv-stock); opacity: .75;
}
.am-hero__label { position: relative; margin-bottom: 1.2rem; color: var(--inv-text); }

/* running photos (x-inv.photo-marquee): arch-topped, full bleed */
.am-marquee.inv-marquee { --inv-marquee-height: clamp(8.5rem, 40vw, 11rem); position: relative; width: auto; margin: 0 -1.5rem 1.6rem; }
.am-marquee .inv-marquee__track img { border-radius: 999px 999px .8rem .8rem; box-shadow: 0 12px 20px -14px rgb(0 0 0 / .45); }

/* the big monogram inside the hero arch (when the running photos show the couple) */
.am-hero__mono {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    aspect-ratio: 3 / 4.6; border-radius: var(--am-arch); box-shadow: var(--am-shadow);
    background: var(--inv-primary); color: var(--inv-background);
    font: italic 400 clamp(4.4rem, 22vw, 6rem)/.82 var(--am-serif);
}
.am-hero__mono i { font-size: .5em; line-height: 1.1; color: var(--inv-clay); }

/* after opening the big date and the monogram come up one by one */
html.inv-anim.inv-opened .am-bigdate__part, html.inv-anim.inv-opened .am-hero__mono > * { animation: am-up 1s cubic-bezier(.16, 1, .3, 1) both; }
html.inv-anim.inv-opened .am-bigdate__part--1 { animation-delay: .25s; }
html.inv-anim.inv-opened .am-bigdate__part--2 { animation-delay: .4s; }
html.inv-anim.inv-opened .am-bigdate__part--3 { animation-delay: .55s; }
html.inv-anim.inv-opened .am-hero__mono > :nth-child(1) { animation-delay: .5s; }
html.inv-anim.inv-opened .am-hero__mono > :nth-child(2) { animation-delay: .65s; }
html.inv-anim.inv-opened .am-hero__mono > :nth-child(3) { animation-delay: .8s; }
@keyframes am-up { from { opacity: 0; transform: translateY(.4em); } to { opacity: 1; transform: none; } }

/* the divider's three silhouettes pop in when their heading arrives */
html.inv-anim .am-heading .am-divider > :not(:first-child) { transform-box: fill-box; transform-origin: 50% 100%; transform: scale(0); transition: transform .6s cubic-bezier(.34, 1.56, .64, 1) .35s; }
html.inv-anim .am-heading .am-divider > :nth-child(3) { transition-delay: .5s; }
html.inv-anim .am-heading .am-divider > :nth-child(4) { transition-delay: .65s; }
html.inv-anim .am-heading.is-revealed .am-divider > :not(:first-child) { transform: none; }
.am-hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: end; gap: .8rem; text-align: left; }
.am-hero__grid:has(.am-bigdate) { min-height: 0; }
.am-bigdate { display: grid; font-weight: 200; font-size: clamp(5.4rem, 29vw, 8.4rem); line-height: .8; letter-spacing: -.04em; color: var(--inv-primary); }
.am-bigdate__part--2 { color: var(--inv-accent); padding-left: .18em; }
.am-bigdate__part--3 { font-weight: 300; }
.am-hero__arch { position: relative; }
.am-hero__arch::before {
    content: ''; position: absolute; inset: auto -10px -10px auto; width: 70%; height: 55%; border-radius: var(--am-pebble);
    background: var(--inv-clay);
}
.am-hero__photo {
    position: relative; aspect-ratio: 3 / 4.6; border-radius: var(--am-arch); box-shadow: var(--am-shadow);
    background: var(--am-photo, none) center 30% / cover no-repeat, linear-gradient(160deg, var(--inv-background), var(--inv-stock));
}
.am-hero__grid:not(:has(.am-bigdate)) { grid-template-columns: minmax(0, 15rem); justify-content: center; }
.am-hero__names { position: relative; margin-top: 1.6rem; font-size: clamp(2.7rem, 12vw, 3.4rem); color: var(--inv-primary); }
.am-hero__names span { color: var(--inv-accent); }
.am-hero__date { position: relative; margin-top: .4rem; font-size: .78rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; }

/* ---------- sections stacked like paper stock ---------- */
.am-main { position: relative; }
.am-section {
    --am-bg: var(--inv-background); --am-fg: var(--inv-text); --am-muted: var(--inv-muted);
    position: relative; margin-top: calc(-1 * var(--am-overlap));
    padding: calc(var(--am-overlap) * .9 + 1.6rem) 1.5rem calc(var(--am-overlap) + 2.4rem);
    background: var(--am-bg); color: var(--am-fg); text-align: center;
}
.am-main > .am-section:last-child { padding-bottom: 3rem; }
.am-tone-cream { --am-bg: var(--inv-background); }
.am-tone-sand { --am-bg: var(--inv-sand); --am-muted: color-mix(in srgb, var(--inv-muted) 85%, var(--inv-text)); --am-soft-bg: var(--inv-background); }
.am-tone-stock { --am-bg: var(--inv-stock); --am-muted: color-mix(in srgb, var(--inv-text) 82%, var(--inv-stock)); --am-soft-bg: var(--inv-background); }
.am-tone-clay { --am-bg: var(--inv-clay); --am-muted: color-mix(in srgb, var(--inv-text) 85%, var(--inv-clay)); }
.am-tone-deep {
    --am-bg: var(--inv-primary); --am-fg: var(--inv-background); --am-muted: color-mix(in srgb, var(--inv-background) 80%, var(--inv-primary));
    --am-btn-bg: var(--inv-background); --am-btn-fg: var(--inv-primary);
}
/* the silhouettes of the section tops */
.am-shape-dome { border-radius: 50% 50% 0 0 / var(--am-overlap) var(--am-overlap) 0 0; }
/* half-arch: a long curve from one side, never taller than the overlap (the section below shows through) */
.am-shape-half { border-top-left-radius: 78% var(--am-overlap); }
.am-shape-half--right { border-top-left-radius: 0; border-top-right-radius: 78% var(--am-overlap); }
/* a section without a shape continues the one before it */
.am-section:not([class*="am-shape-"]) { margin-top: calc(-1 * var(--am-overlap) - 1px); padding-top: calc(var(--am-overlap) + .5rem); }

.am-heading { display: grid; justify-items: center; gap: .35rem; margin-bottom: 1.6rem; }
.am-heading__title { font-size: 2.9rem; color: var(--am-title, var(--inv-primary)); }
.am-tone-deep .am-heading__title { --am-title: var(--inv-background); }
.am-divider { display: block; margin: .25rem auto 0; color: var(--am-fg); }
.am-divider__a { fill: var(--inv-accent); }
.am-divider__b { fill: var(--inv-clay); }
.am-divider__c { fill: var(--inv-primary); }
.am-tone-clay .am-divider__b { fill: var(--inv-background); }
.am-tone-deep .am-divider__c { fill: var(--inv-stock); }
.am-tone-deep .am-divider__a { fill: var(--inv-clay); }
.am-section > .am-muted { max-width: 22rem; margin: -.6rem auto 1.4rem; }

/* opening */
.am-opening { display: grid; gap: 1.1rem; }
.am-arabic { font-family: 'Amiri', serif; font-size: 1.6rem; line-height: 1.8; color: var(--inv-primary); }
.am-opening__greeting { font-weight: 500; font-size: .95rem; }
.am-quote {
    position: relative; margin-top: 1rem; padding: 2.2rem 1.4rem 1.5rem; border-radius: 9rem 9rem 1.4rem 1.4rem / 5rem 5rem 1.4rem 1.4rem;
    background: var(--inv-sand);
}
.am-quote__mark {
    position: absolute; top: -1.3rem; left: 50%; transform: translateX(-50%); width: 2.6rem; height: 2.6rem; border-radius: 999px 999px .5rem .5rem;
    display: grid; place-items: center; background: var(--inv-primary); color: var(--inv-background); font-size: 2.1rem; line-height: 1; padding-top: .7rem;
}
.am-quote blockquote { font-size: 1.15rem; line-height: 1.45; color: var(--inv-text); }
.am-quote figcaption { margin-top: .7rem; font-size: .7rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-accent); }

/* couple: zig-zag */
.am-couple__intro { max-width: 22rem; margin: -.4rem auto 2rem; font-size: .88rem; color: var(--am-muted); }
.am-person { display: flex; align-items: center; gap: 1.15rem; text-align: left; }
.am-person--right { flex-direction: row-reverse; text-align: right; }
.am-person__frame { flex: none; position: relative; width: 8.2rem; }
.am-person__pebble {
    position: absolute; left: -.9rem; bottom: -.8rem; width: 72%; height: 48%; border-radius: var(--am-pebble); background: var(--inv-clay);
}
.am-person--right .am-person__pebble { left: auto; right: -.9rem; background: var(--inv-stock); }
.am-person__photo {
    position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 3 / 4.2; object-fit: cover;
    border-radius: var(--am-arch); box-shadow: var(--am-shadow); background: var(--inv-background);
    font-size: 3.4rem; color: var(--inv-primary);
}
.am-person__text { min-width: 0; display: grid; gap: .3rem; justify-items: start; }
.am-person--right .am-person__text { justify-items: end; }
.am-person__nickname { font-size: 2.5rem; color: var(--inv-primary); }
.am-person__name { font-size: .95rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.am-person__parents { font-size: .78rem; line-height: 1.55; color: var(--am-muted); }
.am-person__parents strong { color: var(--am-fg); font-weight: 500; }
.am-person .am-btn { margin-top: .4rem; }
.am-couple__amp { display: flex; justify-content: center; margin: 1.8rem 0 1.6rem; }
.am-couple__amp span {
    display: grid; place-items: center; width: 3.6rem; height: 4.2rem; padding-top: .4rem; border-radius: 999px 999px .6rem .6rem;
    background: var(--inv-primary); color: var(--inv-background); font-size: 2.4rem;
}
@media (max-width: 370px) {
    .am-person__frame { width: 6.8rem; }
    .am-person__nickname { font-size: 2.1rem; }
}

/* countdown on the deep tone: four different silhouettes */
.am-countdown__date { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1.4rem; font-weight: 400; font-size: .9rem; }
.am-countdown .inv-countdown { gap: .55rem; }
.am-countdown .inv-countdown__item {
    flex: 1; min-width: 0; max-width: 5rem; padding: 1.05rem .3rem .75rem;
    background: var(--inv-stock); color: var(--inv-text); border-radius: var(--am-arch);
}
.am-countdown .inv-countdown__item:nth-child(2) { background: var(--inv-clay); border-radius: var(--am-pebble); }
.am-countdown .inv-countdown__item:nth-child(3) { background: var(--inv-sand); border-radius: 2.6rem .6rem 1.1rem 1.1rem; }
.am-countdown .inv-countdown__item:nth-child(4) { background: var(--inv-background); border-radius: 1.1rem 1.1rem 999px 999px; }
.am-countdown .inv-countdown__value { font-size: 1.8rem; font-weight: 300; line-height: 1.1; }
.am-countdown .inv-countdown__label { margin-top: .2rem; font-size: .6rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.am-countdown .inv-countdown__actions { margin-top: 1.5rem; }
.am-countdown .inv-countdown__actions .inv-button { font-size: .74rem; }
.am-countdown .inv-countdown__done { font-size: .9rem; }

/* events: dome-topped cards */
.am-events__intro { max-width: 22rem; margin: -.5rem auto 1.8rem; font-size: .88rem; color: var(--am-muted); }
.am-event {
    display: grid; justify-items: center; gap: .35rem; padding: .8rem .8rem 1.5rem;
    border-radius: 999px 999px 1.5rem 1.5rem / 11rem 11rem 1.5rem 1.5rem; background: var(--inv-sand);
}
.am-event--alt { background: color-mix(in srgb, var(--inv-stock) 60%, var(--inv-background)); }
.am-event + .am-event { margin-top: 1.6rem; }
.am-event__top { position: relative; width: 100%; margin-bottom: 1rem; }
.am-event__photo { display: block; width: 100%; height: 12rem; object-fit: cover; border-radius: 999px 999px 1rem 1rem / 10rem 10rem 1rem 1rem; }
.am-event__day {
    position: absolute; right: .4rem; bottom: -1.2rem; display: grid; place-items: center; width: 4.2rem; height: 3.8rem;
    border-radius: var(--am-pebble); background: var(--inv-primary); color: var(--inv-background);
    font-weight: 200; font-size: 2rem; line-height: 1; letter-spacing: -.03em;
}
.am-event__name { margin-bottom: .3rem; font-size: 2.1rem; color: var(--inv-primary); }
.am-event__line, .am-event__venue, .am-event__dress { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font-size: .88rem; }
.am-event__time { font-weight: 600; color: var(--inv-accent); }
.am-event__venue { margin-top: .45rem; font-weight: 600; font-size: .95rem; }
.am-event__address { max-width: 20rem; font-size: .82rem; line-height: 1.6; color: var(--am-muted); }
.am-event__dress { margin-top: .25rem; padding: .3rem .85rem; border-radius: 999px; background: var(--inv-background); font-size: .76rem; }
.am-event__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; width: 100%; max-width: 22rem; margin-top: 1rem; }
.am-event__actions .am-btn { padding-inline: .6rem; font-size: .76rem; }
.am-event__actions .am-btn--soft { background: var(--inv-background); }
.am-event__actions .am-btn:only-child { grid-column: 1 / -1; }

/* love story: zig-zag timeline on the mid tone */
.am-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
.am-timeline::before {
    content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1.5px; transform: translateX(-50%);
    background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--inv-primary) 45%, transparent) 6%, color-mix(in srgb, var(--inv-primary) 45%, transparent) 94%, transparent);
}
.am-moment {
    position: relative; display: grid; align-items: start;
    grid-template-columns: minmax(0, 1fr) 1.8rem minmax(0, 1fr); grid-template-areas: "text dot meta"; column-gap: .65rem;
}
.am-moment--flip { grid-template-areas: "meta dot text"; }
.am-moment + .am-moment { margin-top: 1.9rem; }
.am-moment__dot {
    grid-area: dot; position: relative; z-index: 1; display: grid; place-items: center; width: 1.8rem; height: 2.1rem; padding-top: .15rem;
    border-radius: 999px 999px .4rem .4rem; background: var(--inv-primary); color: var(--inv-background); box-shadow: 0 0 0 4px var(--inv-stock);
    font-size: .78rem; font-weight: 500;
}
.am-moment__text { grid-area: text; min-width: 0; text-align: right; }
.am-moment--flip .am-moment__text { text-align: left; }
.am-moment__title { margin-top: .1rem; font-size: 1.45rem; line-height: 1.1; color: var(--inv-primary); overflow-wrap: anywhere; }
.am-moment__rule { display: block; width: 72%; margin: .5rem 0 .55rem auto; border-top: 2px dotted var(--inv-primary); opacity: .55; }
.am-moment--flip .am-moment__rule { margin-inline: 0 auto; }
.am-moment__story { font-size: .8rem; line-height: 1.6; color: var(--am-muted); overflow-wrap: anywhere; }
.am-moment__meta { grid-area: meta; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; text-align: left; }
.am-moment--flip .am-moment__meta { align-items: flex-end; text-align: right; }
.am-moment__date { font-size: 1.4rem; line-height: 1.1; color: var(--inv-accent); overflow-wrap: anywhere; }
.am-moment__photo {
    width: min(5.4rem, 100%); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
    border: 3px solid var(--inv-background); box-shadow: 0 12px 22px -12px rgb(0 0 0 / .5);
}
.am-moment__badge {
    display: grid; place-items: center; width: 3.2rem; height: 3.2rem; border-radius: var(--am-pebble);
    background: var(--inv-background); color: var(--inv-accent);
}

/* gallery (slider): arch-topped thumbnails, round arrows in the primary tone, one big arched stage */
.am-gallery .inv-gallery-slider { gap: .9rem; grid-template-columns: minmax(0, 1fr); }
.am-gallery .inv-gallery-slider__thumb { width: 3.5rem; aspect-ratio: 3 / 4; border-radius: 999px 999px .5rem .5rem; opacity: .6; }
.am-gallery .inv-gallery-slider__thumb.is-active { opacity: 1; border-color: var(--inv-accent); }
.am-gallery .inv-gallery-slider__arrow {
    width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 0;
    background: var(--inv-primary); color: var(--inv-background); font-size: 1.3rem; line-height: 1;
}
.am-gallery .inv-gallery-slider__stage { border-radius: 999px 999px 1.3rem 1.3rem / 46% 46% 1.3rem 1.3rem; box-shadow: var(--am-shadow); }
.am-gallery .inv-gallery-slider__count { background: color-mix(in srgb, var(--inv-primary) 85%, transparent); color: var(--inv-background); }

/* live streaming */
.am-stream__note { margin: -.6rem 0 1.2rem; font-size: .82rem; font-weight: 600; color: var(--inv-text); }

/* gift: bank cards in the deep tone with a half-arch corner, two per row */
.am-gift .inv-gift { display: grid; gap: .8rem; }
.am-gift .inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.am-gift .inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.am-gift .inv-gift__account p { margin: 0; }
.am-gift .inv-gift__accounts .inv-gift__account {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem;
    min-width: 0; margin: 0; padding: .9rem .85rem .85rem; overflow: hidden; text-align: left;
    border-radius: 2.4rem 16px 16px 16px; color: var(--inv-background);
    background:
        radial-gradient(55% 60% at 105% 110%, color-mix(in srgb, var(--inv-clay) 75%, transparent), transparent 70%),
        radial-gradient(40% 50% at 100% -10%, rgb(255 255 255 / .14), transparent 70%),
        linear-gradient(145deg, color-mix(in srgb, var(--inv-primary) 85%, #fff), var(--inv-primary) 55%, color-mix(in srgb, var(--inv-primary) 82%, #000));
    box-shadow: 0 14px 26px -14px rgb(0 0 0 / .6);
}
/* the chip */
.am-gift .inv-gift__accounts .inv-gift__account::before {
    content: ''; width: 1.75rem; height: 1.3rem; margin-left: .25rem; border-radius: 4px;
    background:
        linear-gradient(90deg, transparent 45%, rgb(0 0 0 / .18) 45% 55%, transparent 55%),
        linear-gradient(0deg, transparent 45%, rgb(0 0 0 / .18) 45% 55%, transparent 55%),
        linear-gradient(135deg, #f3e3c4, #c9a86c 55%, #efdcb5);
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2);
}
.am-gift .inv-gift__accounts .inv-gift__bank {
    position: absolute; top: .8rem; right: .8rem; max-width: calc(100% - 3.6rem);
    font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-align: right; overflow-wrap: anywhere;
}
.am-gift .inv-gift__accounts .inv-gift__logo { height: 1.5rem; padding: .2rem .4rem; border-radius: .4rem; }
.am-gift .inv-gift__accounts .inv-gift__logo img { max-width: 4rem; }
.am-gift .inv-gift__accounts .inv-gift__number {
    margin-top: .85rem; font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-weight: 500; font-size: .98rem; line-height: 1.3; letter-spacing: .05em; overflow-wrap: anywhere;
}
.am-gift .inv-gift__accounts .inv-gift__holder { font-size: .6rem; line-height: 1.4; letter-spacing: .12em; text-transform: uppercase; opacity: .88; overflow-wrap: anywhere; }
.am-gift .inv-gift__accounts .inv-button--outline {
    min-height: 0; margin-top: .6rem; padding: .35rem .8rem; border-radius: 999px; font-size: .64rem; letter-spacing: .06em;
    background: rgb(255 255 255 / .12); color: var(--inv-background); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .45);
}
.am-gift .inv-gift__address {
    margin: 0; padding: 1.5rem 1.2rem; border-radius: 6rem 6rem 1.2rem 1.2rem / 3.5rem 3.5rem 1.2rem 1.2rem; background: var(--inv-background);
    display: grid; justify-items: center; gap: .3rem; font-size: .85rem;
}
.am-gift .inv-gift__address .inv-gift__bank { font-size: .68rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--inv-accent); }
.am-gift .inv-gift__address .inv-gift__holder { font-weight: 600; }
.am-gift .inv-gift__address .inv-button { margin-top: .5rem; }

/* rsvp & wishes: dome-topped cards */
.am-card {
    padding: 1.6rem 1.15rem 1.3rem; border-radius: 3rem 3rem 1.3rem 1.3rem; text-align: left;
    background: color-mix(in srgb, var(--inv-background) 55%, #fff);
    box-shadow: 0 18px 36px -24px rgb(0 0 0 / .45), 0 0 0 1px color-mix(in srgb, var(--inv-line) 70%, transparent);
}
.am-card .inv-form { gap: .85rem; }
.am-card .inv-form label, .am-card .inv-form__choices legend { font-size: .8rem; font-weight: 500; }
.am-card .inv-form input:not([type=radio]):not([type=checkbox]), .am-card .inv-form select, .am-card .inv-form textarea {
    padding: .7rem .95rem; border: 1px solid var(--inv-line); border-radius: 14px; background: var(--inv-background);
    color: var(--inv-text); font: 400 .9rem/1.5 var(--am-sans);
}
.am-card .inv-form input:focus, .am-card .inv-form select:focus, .am-card .inv-form textarea:focus {
    outline: none; border-color: var(--inv-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-primary) 14%, transparent);
}
.am-card .inv-form__choices label { padding: .4rem .75rem; border: 1px solid var(--inv-line); border-radius: 999px; font-size: .78rem; }
.am-card .inv-form__choices label:has(input:checked) { border-color: var(--inv-primary); background: var(--inv-sand); }
.am-card .inv-form button[type=submit] { width: 100%; border-radius: 1.4rem 1.4rem .6rem .6rem; }
.am-card .inv-rsvp__deadline { margin-bottom: .8rem; font-size: .78rem; color: var(--inv-muted); }
.am-card .inv-form__notice { background: var(--inv-sand); }
.am-rsvp:has(+ .am-wishes) { padding-bottom: calc(var(--am-overlap) + .6rem); }
.am-wishes .am-card { --inv-wishes-height: 20rem; border-radius: 1.3rem 1.3rem 3rem 3rem; }
.am-wishes .inv-wishes__list { gap: .55rem; }
.am-wishes .inv-wish { padding: .7rem .9rem; border-radius: 1.4rem .5rem 1.1rem 1.1rem; background: var(--inv-sand); font-size: .82rem; }
.am-wishes .inv-wish:nth-child(even) { border-radius: .5rem 1.4rem 1.1rem 1.1rem; background: color-mix(in srgb, var(--inv-stock) 45%, var(--inv-background)); }
.am-wishes .inv-wish__name { font-size: .86rem; color: var(--inv-primary); }
.am-wishes .inv-wish__reply { background: var(--inv-background); }

/* closing on the deep tone */
.am-closing { overflow: hidden; }
.am-closing__arch { position: relative; width: min(58%, 13.5rem); margin: 0 auto 2rem; }
.am-closing__pebble {
    position: absolute; right: -1.4rem; bottom: -1rem; width: 70%; height: 46%; border-radius: var(--am-pebble); background: var(--inv-clay);
}
.am-closing__photo { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4.1; object-fit: cover; border-radius: var(--am-arch); box-shadow: 0 20px 40px -20px rgb(0 0 0 / .6); }
.am-closing .am-divider { margin-bottom: 1.3rem; }
.am-closing .am-lead { color: color-mix(in srgb, var(--inv-background) 92%, var(--inv-primary)); }
.am-closing__signature { margin-top: 1.5rem; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--am-muted); }
.am-closing__names { margin-top: .3rem; font-size: 3rem; color: var(--inv-background); }
.am-closing__names span { color: var(--inv-clay); }
.am-closing__date { margin-top: .9rem; font-weight: 200; font-size: 3.2rem; line-height: 1; letter-spacing: .02em; color: var(--inv-stock); opacity: .85; }

/* branding (must stay visible) on the deep page color */
.am-branding { color: color-mix(in srgb, var(--inv-background) 80%, var(--inv-primary)); opacity: 1; font-size: .72rem; }

/* ---------- floating UI kept inside the column ---------- */
.am-nav.inv-nav {
    --inv-nav-bg: color-mix(in srgb, var(--inv-background) 94%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--inv-text) 72%, transparent);
    --inv-nav-active: var(--inv-primary);
    border-color: var(--inv-line); border-radius: 1.6rem 1.6rem 1.1rem 1.1rem;
}
.am-nav.inv-nav--icons .inv-nav__item.is-active { border-radius: 999px 999px .7rem .7rem; color: var(--inv-background); }
.inv-music { right: calc(var(--am-edge) + 1rem); }
.inv-music__button { background: var(--inv-primary); color: var(--inv-background); box-shadow: 0 0 0 2px var(--inv-background), 0 6px 14px rgb(0 0 0 / .25); }
.inv-autoscroll { color: var(--inv-primary); font-family: var(--am-sans); }
.inv-autoscroll--running { background: var(--inv-primary); color: var(--inv-background); }
.inv-to-top { left: calc(var(--am-edge) + 1rem); border-radius: 999px 999px .6rem .6rem; background: var(--inv-sand); color: var(--inv-primary); box-shadow: 0 0 0 1px var(--inv-line), 0 6px 14px rgb(0 0 0 / .18); }
.inv-qr-tab { right: var(--am-edge); font-family: var(--am-sans); color: var(--inv-primary); border-color: var(--inv-line); background: color-mix(in srgb, var(--inv-background) 96%, transparent); border-radius: 1.2rem 0 0 .6rem; }
.inv-qr-sheet .inv-checkin { font-family: var(--am-sans); color: var(--inv-text); }
.inv-checkin__title { color: var(--inv-primary); }

/* reduced motion: nothing drifts */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .am-float, .am-bigdate__part, .am-hero__mono > * { animation: none !important; }
    .am-cover--leave { transition: opacity .3s ease; }
    .am-cover--gone { transform: none; }
}

/* ---------- cover fit: everything up to "Buka Undangan" on one phone screen ---------- */
/* the blocks share the screen height; the arch is sized by the screen height as well as its width */
.am-cover__inner { min-height: 100%; margin: 0; justify-content: space-evenly; gap: .6rem; padding: clamp(1.2rem, 4svh, 2.2rem) 1.5rem clamp(1.6rem, 4.5svh, 2.4rem); }
.am-cover__arch { width: min(54vw, 13.5rem, 31svh); margin: .2rem 0 1.3rem; }
@media (max-height: 760px) {
    .am-cover__inner { gap: .45rem; }
    .am-cover__arch { width: min(54vw, 28svh); margin-bottom: 1.2rem; }
    .am-monogram { height: 3.2rem; min-width: 3.8rem; bottom: -1.1rem; font-size: 1.1rem; }
    .am-cover__names { font-size: clamp(2.4rem, 11vw, 3rem); }
    .am-cover__date { font-size: 1.7rem; }
    .am-cover__quote { font-size: .93rem; -webkit-line-clamp: 6; }
    .am-cover__guest { padding: .7rem 1rem; }
    .am-open { margin-top: .2rem; }
}
@media (max-height: 660px) {
    .am-cover__arch { width: min(50vw, 25svh); }
    .am-cover__names { font-size: clamp(2.2rem, 10vw, 2.6rem); }
    .am-cover__date { font-size: 1.5rem; }
    .am-float--arch { height: 7.5rem; }
}
