/* A soft tinted wash at the very top of the page, easing into the flat
 * ivory base after the hero — the whole page reads as one atmosphere
 * instead of a photo hero sitting on top of a flat, unrelated background. */
.invite {
    font-family: var(--font-body); color: var(--color-charcoal);
    background: linear-gradient(180deg, var(--color-tint), var(--color-ivory) 640px);
}
.invite .container { max-width: 760px; margin: 0 auto; padding: 0 20px; }

.invite-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 60px 20px 76px;
    overflow: hidden;
}
/*
 * The photo(s) live on their own wrapper layer, sized taller than the hero
 * and shifted upward by default, so JS can translate the whole wrapper
 * downward on scroll (parallax) without ever revealing empty space at the
 * edges. Separate from .invite-hero itself because the hero also holds the
 * text content, which must never move with the background.
 */
.invite-hero-bg-wrap {
    position: absolute;
    top: -15%; left: 0; right: 0;
    height: 130%;
    z-index: 0;
    will-change: transform;
}
/*
 * Each event photo gets its own stacked layer inside the wrapper; only one
 * is .is-active at a time and JS crosses over on an interval, so the hero
 * itself is never a single static frame when there's more than one photo.
 */
.invite-hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(160deg, var(--color-primary-light), var(--color-primary-dark));
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.8s ease;
}
.invite-hero-bg.is-active { opacity: 1; }
/* "Ken Burns" drift: the photo breathes with a slow, continuous zoom
 * instead of sitting as a single dead frame — this is most of what makes a
 * hero photo feel alive versus feeling like a static screenshot. */
@media (prefers-reduced-motion: no-preference) {
    .invite-hero-bg.is-active { animation: inviteHeroKenBurns 9s ease-in-out infinite alternate; }
}
@media (prefers-reduced-motion: reduce) {
    .invite-hero-bg { transition: none; }
}
@keyframes inviteHeroKenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.07); }
}
.invite-hero::before {
    content: '';
    position: absolute; inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.1) 45%, rgba(0,0,0,.62) 100%);
}
.invite-hero-inner { position: relative; z-index: 2; max-width: 720px; }
/* Frosted-glass eyebrow badge instead of a flat tint — reads as a modern
   material rather than a plain colored pill. */
.invite-hero .eyebrow {
    display: inline-block; padding: 6px 16px; border-radius: 999px;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.invite-hero h1 {
    font-family: var(--font-display); font-size: 88px; line-height: 1.05; margin: 0 0 16px; letter-spacing: -.01em;
    text-shadow: 0 6px 30px rgba(0,0,0,.3);
}
.invite-hero .date-line { font-size: 17px; opacity: .9; letter-spacing: .06em; }

/*
 * Hero entrance: eyebrow/title/date/countdown fade up in sequence on load
 * instead of appearing all at once — the page's first impression shouldn't
 * feel like a static screenshot. Respects prefers-reduced-motion: users who
 * disable motion get the final state immediately, no animation at all.
 */
@media (prefers-reduced-motion: no-preference) {
    .invite-hero .eyebrow, .invite-hero h1, .invite-hero .date-line, .invite-hero .invite-countdown {
        opacity: 0;
        animation: inviteHeroIn .8s cubic-bezier(.2,.7,.3,1) forwards;
    }
    .invite-hero .eyebrow { animation-delay: .1s; }
    .invite-hero h1 { animation-delay: .25s; }
    .invite-hero .date-line { animation-delay: .45s; }
    .invite-hero .invite-countdown { animation-delay: .6s; }
}
@keyframes inviteHeroIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/*
 * Scroll reveal: content sections fade/slide into view as the visitor
 * scrolls, toggled by IntersectionObserver in invitation.js (adds
 * .is-visible). Each motif gets its own character — classic is a slow,
 * refined fade; modern is a sharp directional slide; elegant is a soft
 * float-up — rather than one generic effect reused everywhere.
 */
@media (prefers-reduced-motion: no-preference) {
    .reveal { opacity: 0; transition: opacity .7s ease, transform .7s ease; }
    .reveal:not(.is-visible) { transform: translateY(28px); }
    .reveal.is-visible { opacity: 1; transform: translateY(0); }

    .motif-modern .reveal { transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
    .motif-modern .reveal:not(.is-visible) { transform: translateX(-32px); }
    .motif-modern .reveal.is-visible { transform: translateX(0); }

    .motif-classic .reveal { transition: opacity 1s ease, transform 1s cubic-bezier(.16,.8,.2,1); }
    .motif-classic .reveal:not(.is-visible) { transform: translateY(18px) scale(.98); }
    .motif-classic .reveal.is-visible { transform: translateY(0) scale(1); }

    .motif-elegant .reveal { transition: opacity .8s ease, transform .8s cubic-bezier(.34,1.4,.4,1); }
    .motif-elegant .reveal:not(.is-visible) { transform: translateY(34px); }
    .motif-elegant .reveal.is-visible { transform: translateY(0); }

    .motif-envelope .reveal { transition: opacity .9s ease, transform .9s cubic-bezier(.22,.9,.25,1); }
    .motif-envelope .reveal:not(.is-visible) { transform: translateY(24px) scale(.985); }
    .motif-envelope .reveal.is-visible { transform: translateY(0) scale(1); }

    /* Royal: slow and formal, settling into place like a seal being
       pressed down rather than floating or sliding in. */
    .motif-royal .reveal { transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.16,.7,.2,1); }
    .motif-royal .reveal:not(.is-visible) { transform: translateY(14px) scale(1.03); }
    .motif-royal .reveal.is-visible { transform: translateY(0) scale(1); }
}
.invite-hero::after {
    content: '';
    position: absolute; bottom: 22px; left: 50%; z-index: 1;
    width: 10px; height: 10px; margin-left: -5px;
    border-right: 2px solid rgba(255,255,255,.75); border-bottom: 2px solid rgba(255,255,255,.75);
    transform: rotate(45deg);
    animation: inviteScrollCue 1.8s ease-in-out infinite;
}
@keyframes inviteScrollCue {
    0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: .5; }
    50% { transform: rotate(45deg) translate(6px, 6px); opacity: 1; }
}

.invite-countdown { display: flex; justify-content: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
/* Frosted glass rather than a flat white-tint box — matches the eyebrow
   badge and reads as a deliberate material, not just a translucent square. */
.invite-countdown .cd-box {
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-radius: 12px; padding: 12px 18px; min-width: 74px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.invite-countdown .cd-num { font-family: var(--font-display); font-size: 26px; font-weight: 700; display: block; }
.invite-countdown .cd-label { font-size: 11px; opacity: .85; text-transform: uppercase; letter-spacing: .05em; }

@media (prefers-reduced-motion: no-preference) {
    .invite-countdown .cd-num.tick { animation: inviteCdTick .4s ease; }
}
@keyframes inviteCdTick {
    0% { transform: scale(1); }
    30% { transform: scale(1.18); }
    100% { transform: scale(1); }
}

.invite section { padding: 72px 0; }
.invite .section-title { font-family: var(--font-display); font-size: 26px; color: var(--color-primary-dark); margin: 0 0 28px; text-align: center; }
@media (max-width: 600px) {
    .invite section { padding: 52px 0; }
}

.invite-timeline { list-style: none; margin: 0; padding: 0; }
.invite-timeline li {
    display: flex; gap: 16px; align-items: flex-start;
    background: #fff; border-radius: 14px; padding: 16px 18px; margin-bottom: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    transition: transform .25s ease, box-shadow .25s ease;
}
.invite-timeline li:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(0,0,0,.1); }
.invite-timeline .venue-time { font-family: var(--font-display); font-weight: 700; color: var(--color-primary); min-width: 60px; }
.invite-timeline .venue-info strong { display: block; color: var(--color-primary-dark); }
.invite-timeline .venue-info span { font-size: 13px; color: var(--color-muted); }
.invite-timeline .venue-info a { font-size: 13px; color: var(--color-primary); font-weight: 600; }

#invite-map { height: 320px; border-radius: 14px; margin-top: 16px; border: 1px solid #E2E2E4; }

/*
 * Column-count masonry, not a fixed-height grid: each photo keeps its own
 * aspect ratio and the browser flows them into balanced columns, which
 * reads as a real photo gallery instead of a strip of identical crops.
 */
.invite-gallery { column-count: 3; column-gap: 14px; }
.invite-gallery .gallery-item { display: block; width: 100%; margin: 0 0 14px; border-radius: 16px; overflow: hidden; cursor: zoom-in; break-inside: avoid; position: relative; }
.invite-gallery img { width: 100%; display: block; border-radius: 16px; transition: transform .3s ease; }
.invite-gallery .gallery-item:hover img { transform: scale(1.03); }

/*
 * The event photo gallery (#gallery section) — photos overlap like a
 * scattered stack of prints, each at its own slight rotation/offset. The
 * front photo enlarges on click (lightbox); the button sends it to the
 * back of the stack, revealing the next one, and it also auto-advances on
 * its own so the section is never a single static frame.
 */
.invite-photo-stack { position: relative; width: min(480px, 92vw); aspect-ratio: 4 / 3; margin: 0 auto 20px; }
.invite-photo-stack-item {
    position: absolute; inset: 0;
    border-radius: 16px;
    box-shadow: 0 20px 44px rgba(0,0,0,.24);
    overflow: hidden;
    opacity: 1;
}
.invite-photo-stack-item img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.invite-photo-stack-item.is-front:hover { box-shadow: 0 26px 52px rgba(0,0,0,.3); }
@media (prefers-reduced-motion: no-preference) {
    .invite-photo-stack-item { transition: transform .45s cubic-bezier(.4,0,.2,1), opacity .4s ease; }
}
/* Disables the transition for one frame while JS resets a just-shuffled
   photo to its new resting position at the back of the stack — otherwise
   it would visibly animate from "flown away" to "back of stack", instead
   of appearing there instantly the way a real re-stacked photo would. */
.invite-photo-stack-item.is-resetting { transition: none !important; }

.invite-photo-stack-controls { display: flex; justify-content: center; margin-bottom: 20px; }
.invite-photo-stack-btn {
    border: 1px solid var(--color-gold); background: #fff; color: var(--color-primary-dark);
    padding: 8px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background-color .2s ease, transform .15s ease;
}
.invite-photo-stack-btn:hover { background: var(--color-tint); transform: translateY(-2px); }

.shared-media-tile { position: relative; border-radius: 10px; overflow: hidden; background: #F0F0F1; cursor: pointer; }
.shared-media-tile img, .shared-media-tile video { width: 100%; height: 120px; object-fit: cover; display: block; }
.shared-media-tile .shared-media-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.shared-media-tile .shared-media-who {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 8px; font-size: 11px; color: #fff;
    background: linear-gradient(0deg, rgba(0,0,0,.65), transparent);
}

.shared-media-lightbox {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.85); z-index: 1000;
    align-items: center; justify-content: center; padding: 24px;
}
.shared-media-lightbox-inner {
    background: #fff; border-radius: 14px; padding: 20px; max-width: 90vw; max-height: 90vh;
    display: flex; flex-direction: column; gap: 12px; align-items: center; position: relative;
}
.shared-media-lightbox-close {
    position: absolute; top: -14px; right: -14px; width: 32px; height: 32px; border-radius: 50%;
    background: var(--color-primary); color: #fff; border: none; cursor: pointer; font-size: 14px;
}
.shared-media-lightbox-caption { font-size: 13px; color: var(--color-muted); text-align: center; }

.invite-video { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 14px; overflow: hidden; }
.invite-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.invite-faq-item {
    background: #fff; border-radius: 12px; margin-bottom: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.05);
    transition: box-shadow .2s ease;
}
.invite-faq-item:hover { box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.invite-faq-q { padding: 14px 18px; font-weight: 600; color: var(--color-primary-dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.invite-faq-q span { transition: transform .25s ease; color: var(--color-gold); font-weight: 700; }
.invite-faq-item.open .invite-faq-q span { transform: rotate(135deg); }
.invite-faq-a { padding: 0 18px; max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease; font-size: 14px; color: var(--color-muted); }
.invite-faq-item.open .invite-faq-a { padding: 0 18px 16px; max-height: 300px; }

.invite-rsvp {
    position: relative; background: #fff; border-radius: 18px; padding: 28px 28px 26px;
    box-shadow: 0 12px 30px rgba(0,0,0,.08); overflow: hidden;
}
/* A thin gradient accent along the top edge — a small but consistent
   "premium stationery" cue reused across every card of this kind. */
.invite-rsvp::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--color-gold), var(--color-primary), var(--color-gold));
}
.invite-rsvp h3 { font-family: var(--font-display); color: var(--color-primary-dark); margin: 0 0 6px; }
.invite-rsvp .greeting { color: var(--color-muted); margin-bottom: 18px; }
.invite-rsvp .rsvp-status-choices { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.invite-rsvp .rsvp-status-choices > div { display: contents; }
.invite-rsvp .rsvp-status-choices .form-check {
    display: inline-flex; align-items: center; gap: 8px; margin: 0;
    border: 1px solid #E2E2E4; border-radius: 999px; padding: 10px 18px 10px 14px; cursor: pointer;
    background: linear-gradient(180deg, #fff, #FAFAFA);
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}
.invite-rsvp .rsvp-status-choices .form-check:hover { border-color: #C7C8CC; transform: translateY(-1px); }
.invite-rsvp .rsvp-status-choices .form-check-input {
    width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: var(--color-primary); flex-shrink: 0;
}
.invite-rsvp .rsvp-status-choices .form-check-label {
    font-size: 14px; font-weight: 600; color: var(--color-charcoal); cursor: pointer; margin: 0;
}
.invite-rsvp .rsvp-status-choices .form-check:has(.form-check-input:checked) {
    background: var(--color-primary); border-color: var(--color-primary);
}
.invite-rsvp .rsvp-status-choices .form-check:has(.form-check-input:checked) .form-check-label { color: #fff; }
.invite-rsvp .rsvp-status-choices .form-check:has(.form-check-input:checked) .form-check-input { accent-color: #fff; }
.invite-rsvp .planner-field { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.invite-rsvp .planner-field label { font-size: 13px; font-weight: 600; color: var(--color-muted); }
.invite-rsvp button[type=submit] {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff; border: none; padding: 12px 28px; border-radius: 999px; font-weight: 700; cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.18);
    transition: transform .15s ease, box-shadow .15s ease;
}
.invite-rsvp button[type=submit]:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.24); }
.invite-rsvp button[type=submit]:active { transform: translateY(0); }
.invite-rsvp .rsvp-saved { color: var(--color-primary-dark); background: var(--color-blush); padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.invite-rsvp .gift-failed { color: #8a2b2b; background: #fbe4e4; padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }

.gift-amount-presets { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.gift-amount-presets button {
    border: 1px solid #E2E2E4; background: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 13px; cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}
.gift-amount-presets button:hover { border-color: var(--color-gold); transform: translateY(-1px); }
.gift-amount-presets button.active { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-primary-dark); }
.invite-gift .gift-note { font-size: 12px; color: var(--color-muted); margin-top: 10px; }

.invite-music-toggle {
    position: fixed; bottom: 20px; right: 20px; width: 52px; height: 52px; border-radius: 50%;
    background: var(--color-primary); color: #fff; border: none; font-size: 20px; cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,.35); z-index: 20;
}

/*
 * Solid background (not translucent/backdrop-blur like the eyebrow badge)
 * because this is `position: fixed` and stays in the same viewport spot
 * while the guest scrolls past both the dark photo hero and the plain
 * ivory body sections — it needs to stay legible against either.
 */
.invite-lang-switch {
    position: fixed; top: 16px; right: 16px; z-index: 30;
    display: flex; gap: 2px; background: var(--color-primary); border-radius: 999px; padding: 4px;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.invite-lang-btn {
    padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
    color: rgba(255,255,255,.75); text-decoration: none; letter-spacing: .02em;
    transition: background-color .15s ease, color .15s ease;
}
.invite-lang-btn:hover:not(.is-active) { color: #fff; }
.invite-lang-btn.is-active { background: rgba(255,255,255,.95); color: var(--color-primary-dark); }
@media (max-width: 600px) {
    .invite-lang-switch { top: 10px; right: 10px; }
}

.invite-dress-code {
    position: relative; background: #fff; border-radius: 14px; padding: 26px 24px 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06); text-align: center; overflow: hidden;
    transition: box-shadow .2s ease;
}
.invite-dress-code:hover { box-shadow: 0 12px 28px rgba(0,0,0,.1); }
.invite-dress-code::before {
    content: ''; position: absolute; top: 0; left: 50%; width: 44px; height: 3px;
    transform: translateX(-50%); background: var(--color-gold); border-radius: 0 0 4px 4px;
}

/*
 * Motifs (classic/modern/elegant/envelope) are the structural half of a
 * template — the color half comes from --color-primary/--color-gold/
 * --color-ivory/--color-tint, set per-event in an inline <style> block.
 * Each motif changes actual layout (hero alignment, card-vs-banner hero,
 * countdown shape, section rhythm), not just borders and radii, so each
 * reads as a different design rather than one skin with several palettes.
 * Reused across every event type — a new type only needs a new palette in
 * InvitationTemplateCatalog, never new CSS here.
 */

/* ---------- Classic: symmetric, framed, serif-forward invitation card ---------- */
/* A faint dot-grid texture on the page body — reads as fine cotton stationery
   rather than a flat digital background. Extremely low opacity by design. */
.invite.motif-classic {
    background-image: radial-gradient(circle, rgba(0,0,0,.035) .6px, transparent .6px);
    background-size: 22px 22px;
    background-color: var(--color-ivory);
}
.invite.motif-classic .invite-hero { padding: 76px 24px; }
.invite.motif-classic .invite-hero-inner { position: relative; padding: 8px 36px; border-top: 1px solid rgba(255,255,255,.55); border-bottom: 1px solid rgba(255,255,255,.55); }
/* Two overlapping ring outlines above the title — this motif's one
   signature ornamental unit, distinct from every other motif's medallion/
   leaf-cluster/corner-bracket approach, and built with borders only so
   there's no glyph to fall back on a mismatched font. */
.invite-rings { position: relative; width: 44px; height: 24px; margin: 0 auto 16px; }
.invite-rings::before, .invite-rings::after {
    content: ''; position: absolute; top: 0; width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid var(--color-gold);
}
.invite-rings::before { left: 0; }
.invite-rings::after { left: 20px; }
/*
 * Small CSS-drawn diamonds, not Unicode dingbats (❦/❧). Playfair Display and
 * Noto Serif Armenian don't include those glyphs, so the browser was silently
 * falling back to the OS's generic serif font for just those characters —
 * a different typeface/weight sitting inside otherwise-consistent headings.
 * A drawn shape renders identically everywhere, no font coverage to guess at.
 */
.invite.motif-classic .invite-hero-inner::before,
.invite.motif-classic .invite-hero-inner::after {
    content: ''; position: absolute; left: 50%; width: 7px; height: 7px;
    background: rgba(255,255,255,.85); transform: translateX(-50%) rotate(45deg);
}
.invite.motif-classic .invite-hero-inner::before { top: -4.5px; }
.invite.motif-classic .invite-hero-inner::after { bottom: -4.5px; }
/*
 * No font-style: italic on the title/eyebrow — Noto Serif Armenian (the
 * fallback that actually renders Armenian text here) has no italic face, so
 * the browser was faking it with a shear transform, which distorts serif
 * strokes rather than reading as elegant. Letter-spacing carries the
 * refinement instead.
 */
.invite.motif-classic .invite-hero h1 { letter-spacing: .01em; }
.invite.motif-classic .invite-hero .eyebrow { background: transparent; display: inline-flex; align-items: center; gap: 10px; }
.invite.motif-classic .invite-hero .eyebrow::before,
.invite.motif-classic .invite-hero .eyebrow::after { content: ''; width: 5px; height: 5px; background: currentColor; transform: rotate(45deg); flex-shrink: 0; }
.invite.motif-classic .invite-countdown .cd-box { background: transparent; border: 1px solid rgba(255,255,255,.5); border-radius: 2px; }
.invite.motif-classic .section-title { display: flex; align-items: center; gap: 14px; justify-content: center; }
.invite.motif-classic .section-title::before,
.invite.motif-classic .section-title::after { content: ''; flex: 1; max-width: 90px; height: 1px; background: var(--color-gold); }
/* The divider lines draw outward from the title as the section scrolls
   into view, instead of just appearing fully formed. */
@media (prefers-reduced-motion: no-preference) {
    .invite.motif-classic .section-title::before,
    .invite.motif-classic .section-title::after { transition: transform .6s ease .15s; transform: scaleX(0); }
    .invite.motif-classic .section-title::before { transform-origin: right; }
    .invite.motif-classic .section-title::after { transform-origin: left; }
    .invite.motif-classic .section-title.is-visible::before,
    .invite.motif-classic .section-title.is-visible::after { transform: scaleX(1); }
}
.invite.motif-classic .invite-timeline .venue-time { border: 1px solid var(--color-gold); border-radius: 4px; padding: 4px 10px; text-align: center; }
.invite.motif-classic .invite-rsvp,
.invite.motif-classic .invite-timeline li,
.invite.motif-classic .invite-faq-item,
.invite.motif-classic .invite-dress-code { border-radius: 6px; border: 1px solid var(--color-gold); box-shadow: none; }

/* ---------- Modern: left-aligned, bold sans, numbered sections, blocky cards ---------- */
.invite.motif-modern .invite-hero { justify-content: flex-start; text-align: left; padding: 80px 44px; position: relative; }
.invite.motif-modern .invite-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--color-gold); }
/* A small "issue number" tag, like a magazine cover line — this motif's
   one signature ornamental unit, in the same numbered-editorial language
   as the section counters below, instead of a medallion/leaf/ring motif. */
.invite-issue-tag {
    display: block; font-family: var(--font-body); font-weight: 800; font-size: 12px;
    letter-spacing: .18em; color: var(--color-gold); margin-bottom: 14px;
}
/* A touch more contrast/saturation on the photo — reads as a deliberate
   bold editorial choice rather than a straight camera-roll photo. */
.invite.motif-modern .invite-hero-bg { filter: contrast(1.08) saturate(1.12); }
.invite.motif-modern .invite-hero-inner { max-width: 540px; border-left: 5px solid var(--color-gold); padding-left: 26px; }
.invite.motif-modern .invite-hero .eyebrow { background: transparent; border-radius: 0; padding: 0; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.invite.motif-modern .invite-hero h1 { font-family: var(--font-body); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; font-size: 54px; text-shadow: none; }
.invite.motif-modern .invite-countdown { justify-content: flex-start; gap: 0; }
.invite.motif-modern .invite-countdown .cd-box { background: transparent; border-radius: 0; padding: 0 20px; min-width: auto; border-right: 1px solid rgba(255,255,255,.35); }
.invite.motif-modern .invite-countdown .cd-box:last-child { border-right: none; }
.invite.motif-modern .container { counter-reset: sectionNum; }
.invite.motif-modern section { counter-increment: sectionNum; }
.invite.motif-modern .section-title { position: relative; text-align: left; text-transform: uppercase; letter-spacing: .06em; font-size: 20px; padding-bottom: 10px; display: inline-block; font-family: var(--font-body); font-weight: 800; }
.invite.motif-modern .section-title::before { content: counter(sectionNum, decimal-leading-zero) ' — '; color: var(--color-gold); }
/* The underline grows in from the left as the section scrolls into view,
   instead of sitting there as a static bar from the first frame. */
.invite.motif-modern .section-title::after {
    content: ''; position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--color-primary);
}
@media (prefers-reduced-motion: no-preference) {
    .invite.motif-modern .section-title::after { transform: scaleX(0); transform-origin: left; transition: transform .6s ease .15s; }
    .invite.motif-modern .section-title.is-visible::after { transform: scaleX(1); }
}
.invite.motif-modern .invite-timeline li { border-radius: 0; border-left: 4px solid var(--color-primary); box-shadow: none; }
.invite.motif-modern .invite-rsvp,
.invite.motif-modern .invite-faq-item,
.invite.motif-modern .invite-dress-code { border-radius: 0; box-shadow: none; border: 1px solid #E2E2E4; }
.invite.motif-modern .invite-rsvp button[type=submit] { border-radius: 0; }

/* ---------- Elegant: floating rounded card over the hero image, circular accents ---------- */
.invite.motif-elegant .invite-hero { align-items: flex-start; min-height: 640px; padding: 46px 20px 120px; }
.invite.motif-elegant .invite-hero::after { display: none; }
.invite.motif-elegant .invite-hero-inner {
    position: relative; background: #fff; color: var(--color-charcoal); border-radius: 28px; padding: 38px 32px;
    box-shadow: 0 26px 54px rgba(0,0,0,.24); margin: 90px auto 0; max-width: 420px;
}
/* Soft blurred glow peeking from behind the floating card, for a dreamy
   sense of depth instead of the card sitting flat against the photo. */
.invite.motif-elegant .invite-hero-inner::before,
.invite.motif-elegant .invite-hero-inner::after {
    content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(22px);
}
.invite.motif-elegant .invite-hero-inner::before {
    top: -36px; right: -30px; width: 130px; height: 130px;
    background: radial-gradient(circle, var(--color-gold), transparent 70%); opacity: .55;
}
.invite.motif-elegant .invite-hero-inner::after {
    bottom: -40px; left: -34px; width: 150px; height: 150px;
    background: radial-gradient(circle, var(--color-primary-light), transparent 70%); opacity: .45;
}
.invite.motif-elegant .invite-hero-inner .eyebrow { background: var(--color-tint); color: var(--color-primary-dark); }
/* Sized down from the shared 88px hero scale — this motif's title lives
   inside a compact 420px floating card, not full-bleed over the photo. */
.invite.motif-elegant .invite-hero-inner h1 { color: var(--color-primary-dark); text-shadow: none; font-size: 42px; line-height: 1.12; }
.invite.motif-elegant .invite-hero-inner .date-line { color: var(--color-muted); }
/* CSS-drawn dot, not '♡' — Playfair/Noto Serif Armenian don't carry that
   glyph so it was rendering in a mismatched fallback serif. */
.invite.motif-elegant .invite-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.invite.motif-elegant .invite-hero .eyebrow::before,
.invite.motif-elegant .invite-hero .eyebrow::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.invite.motif-elegant .invite-countdown .cd-box {
    background: var(--color-tint); border-radius: 50%; width: 68px; height: 68px; min-width: 68px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0;
}
.invite.motif-elegant .invite-countdown .cd-num { color: var(--color-primary-dark); }
.invite.motif-elegant .invite-countdown .cd-label { color: var(--color-muted); }
.invite.motif-elegant .section-title::before,
.invite.motif-elegant .section-title::after { content: '· · ·'; color: var(--color-gold); font-size: 14px; margin: 0 12px; letter-spacing: .2em; }
.invite.motif-elegant .invite-timeline li { align-items: center; }
.invite.motif-elegant .invite-timeline .venue-time {
    background: var(--color-tint); color: var(--color-primary-dark); border-radius: 50%;
    width: 56px; height: 56px; min-width: 56px; display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.invite.motif-elegant .invite-rsvp,
.invite.motif-elegant .invite-timeline li,
.invite.motif-elegant .invite-faq-item,
.invite.motif-elegant .invite-dress-code { border-radius: 26px; border: 1px solid rgba(0,0,0,.04); box-shadow: 0 18px 36px rgba(0,0,0,.07); }

/* ---------- Royal: palatial double-line framing, monogram crest, deep jewel tones ---------- */
.invite.motif-royal .invite-hero { padding: 60px 24px 88px; }
.invite.motif-royal .invite-hero-bg { filter: saturate(1.05) brightness(.9); }
.invite.motif-royal .invite-hero-inner { position: relative; padding: 40px 44px; }
/* A hairline outer frame with a second, inset hairline — the classic
   certificate/crest border, distinct from every other motif's single rule
   or corner brackets. */
.invite.motif-royal .invite-hero-inner::before,
.invite.motif-royal .invite-hero-inner::after {
    content: ''; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.5); pointer-events: none;
}
.invite.motif-royal .invite-hero-inner::after { inset: 9px; border-color: rgba(255,255,255,.28); }

/* Monogram crest medallion above the title — a small "coat of arms" moment
   unique to this motif, flanked by thin hairlines instead of text. */
.invite-crest {
    position: relative; width: 78px; height: 78px; margin: 0 auto 20px; border-radius: 50%;
    background: radial-gradient(circle at 32% 26%, rgba(255,255,255,.4), transparent 45%), var(--color-gold);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 24px rgba(0,0,0,.35), inset 0 1px 2px rgba(255,255,255,.5), inset 0 -3px 6px rgba(0,0,0,.25);
}
.invite-crest::before, .invite-crest::after { content: ''; position: absolute; top: 50%; width: 22px; height: 1px; background: rgba(255,255,255,.65); }
.invite-crest::before { right: 100%; margin-right: 10px; }
.invite-crest::after { left: 100%; margin-left: 10px; }
.invite-crest-mono { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--color-primary-dark); letter-spacing: .02em; }

.invite.motif-royal .invite-hero .eyebrow {
    background: transparent; border: 1px solid rgba(255,255,255,.4); backdrop-filter: none; -webkit-backdrop-filter: none;
    letter-spacing: .22em; text-transform: uppercase; font-size: 11px;
}
.invite.motif-royal .invite-hero h1 { font-weight: 700; letter-spacing: .015em; }
.invite.motif-royal .invite-hero .date-line { letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }

/* Cut-corner "seal" badges instead of pills/circles/squares — a shape no
   other motif uses for its countdown. */
.invite.motif-royal .invite-countdown .cd-box {
    background: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.35); border-radius: 0;
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.invite.motif-royal .section-title { display: flex; align-items: center; justify-content: center; gap: 12px; text-transform: uppercase; letter-spacing: .12em; font-size: 20px; }
.invite.motif-royal .section-title::before,
.invite.motif-royal .section-title::after { content: ''; flex: 1; max-width: 64px; height: 1px; background: var(--color-gold); }
@media (prefers-reduced-motion: no-preference) {
    .invite.motif-royal .section-title::before,
    .invite.motif-royal .section-title::after { transition: transform .7s ease .15s; transform: scaleX(0); }
    .invite.motif-royal .section-title::before { transform-origin: right; }
    .invite.motif-royal .section-title::after { transform-origin: left; }
    .invite.motif-royal .section-title.is-visible::before,
    .invite.motif-royal .section-title.is-visible::after { transform: scaleX(1); }
}

.invite.motif-royal .invite-timeline li,
.invite.motif-royal .invite-rsvp,
.invite.motif-royal .invite-faq-item,
.invite.motif-royal .invite-dress-code { position: relative; border-radius: 2px; border: 1px solid var(--color-gold); box-shadow: 0 10px 26px rgba(0,0,0,.08); }
/* Same inner-hairline idea as the hero frame, reused on the card faces. */
.invite.motif-royal .invite-rsvp::after,
.invite.motif-royal .invite-dress-code::after { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(0,0,0,.06); pointer-events: none; }
.invite.motif-royal .invite-timeline .venue-time {
    font-family: var(--font-display); font-weight: 700; color: var(--color-primary);
    border: 1px solid var(--color-gold); border-radius: 2px; padding: 4px 10px; text-align: center;
}
.invite.motif-royal .invite-rsvp button[type=submit] { letter-spacing: .12em; text-transform: uppercase; border-radius: 2px; }

/* ---------- Garden: organic botanical shapes, soft sage & rose, asymmetric warmth ---------- */
/* Two soft blurred organic "watercolor wash" blobs fixed behind the whole
   page — painted first (default DOM order), so every card/section that
   comes after naturally covers them except in the gaps, which is exactly
   the soft-atmosphere effect this motif wants. No z-index juggling needed. */
.invite.motif-garden::before,
.invite.motif-garden::after {
    content: ''; position: fixed; filter: blur(70px); opacity: .3; pointer-events: none;
    border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
}
.invite.motif-garden::before { top: -12%; left: -14%; width: 46vw; height: 46vw; background: var(--color-primary-light); }
.invite.motif-garden::after { bottom: -12%; right: -16%; width: 42vw; height: 42vw; background: var(--color-gold); }

/* A small fan of leaves in place of a text eyebrow ornament or a crest —
   this motif's signature decorative unit, reused above the hero title and
   flanking every section title. */
.invite-leaf-cluster { display: flex; justify-content: center; gap: 3px; margin-bottom: 16px; }
.invite-leaf-cluster span { display: block; width: 11px; height: 17px; background: var(--color-gold); border-radius: 0 100% 0 100%; opacity: .9; }
.invite-leaf-cluster span:nth-child(1) { transform: rotate(-30deg) translateY(5px); }
.invite-leaf-cluster span:nth-child(2) { transform: translateY(-5px); }
.invite-leaf-cluster span:nth-child(3) { transform: rotate(30deg) translateY(5px); }

.invite.motif-garden .invite-hero { padding: 70px 24px 90px; }
.invite.motif-garden .invite-hero-inner { max-width: 640px; }
.invite.motif-garden .invite-hero .eyebrow { background: rgba(255,255,255,.22); border: none; font-weight: 500; letter-spacing: .08em; }
.invite.motif-garden .invite-hero h1 { font-weight: 500; letter-spacing: .01em; }
.invite.motif-garden .invite-hero .date-line { letter-spacing: .05em; }

/* Organic blob countdown badges instead of circles/pills/squares — the
   same hand-drawn silhouette as the leaf cluster's rounding logic. */
.invite.motif-garden .invite-countdown .cd-box {
    background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3);
    border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
}

.invite.motif-garden .section-title { display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: 500; letter-spacing: .01em; }
.invite.motif-garden .section-title::before,
.invite.motif-garden .section-title::after { content: ''; width: 13px; height: 19px; background: var(--color-primary-light); border-radius: 0 100% 0 100%; opacity: .85; }
.invite.motif-garden .section-title::before { transform: rotate(50deg); }
.invite.motif-garden .section-title::after { transform: rotate(-130deg); }
@media (prefers-reduced-motion: no-preference) {
    .invite.motif-garden .section-title::before,
    .invite.motif-garden .section-title::after { transition: transform .6s ease .1s, opacity .6s ease .1s; opacity: 0; }
    .invite.motif-garden .section-title::before { transform: rotate(50deg) scale(.4); }
    .invite.motif-garden .section-title::after { transform: rotate(-130deg) scale(.4); }
    .invite.motif-garden .section-title.is-visible::before { transform: rotate(50deg) scale(1); opacity: .85; }
    .invite.motif-garden .section-title.is-visible::after { transform: rotate(-130deg) scale(1); opacity: .85; }

    /* Garden: soft, gentle — grows into place rather than sliding or
       floating, like a bloom opening. */
    .motif-garden .reveal { transition: opacity .9s ease, transform .9s cubic-bezier(.22,.85,.3,1); }
    .motif-garden .reveal:not(.is-visible) { transform: scale(.94); }
    .motif-garden .reveal.is-visible { transform: scale(1); }
}

.invite.motif-garden .invite-timeline li,
.invite.motif-garden .invite-rsvp,
.invite.motif-garden .invite-faq-item,
.invite.motif-garden .invite-dress-code { border-radius: 32px; border: none; box-shadow: 0 16px 34px rgba(0,0,0,.07); }
.invite.motif-garden .invite-timeline .venue-time {
    background: var(--color-tint); color: var(--color-primary-dark);
    border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
    width: 56px; height: 56px; min-width: 56px; display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.invite.motif-garden .invite-rsvp button[type=submit] { border-radius: 999px; font-weight: 600; letter-spacing: .02em; }

/* ---------- Envelope: wax-sealed envelope intro, refined serif invitation ---------- */
html.envelope-locked, html.envelope-locked body { overflow: hidden; height: 100%; }

.invite-envelope-gate {
    position: fixed; inset: 0; z-index: 500;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 50% 28%, rgba(255,255,255,.08), transparent 55%),
        radial-gradient(circle at 50% 20%, var(--color-primary-light), var(--color-primary-dark) 72%);
    transition: opacity .7s ease, visibility .7s ease;
    overflow: hidden;
}
.invite-envelope-gate.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.invite-envelope-gate.no-anim { transition: none; }

/* Ambient drifting sparks — always moving, so the intro never reads as a
   static screenshot even before the visitor does anything. */
.invite-envelope-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.invite-envelope-particles span {
    position: absolute; bottom: -6%; width: 5px; height: 5px; border-radius: 50%;
    background: var(--color-gold); opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
    .invite-envelope-particles span { animation: inviteParticleFloat linear infinite; }
    .invite-envelope-particles span:nth-child(1) { left: 10%; width: 4px; height: 4px; animation-duration: 9s; animation-delay: 0s; }
    .invite-envelope-particles span:nth-child(2) { left: 24%; animation-duration: 12s; animation-delay: 2.5s; }
    .invite-envelope-particles span:nth-child(3) { left: 42%; width: 3px; height: 3px; animation-duration: 8s; animation-delay: 1.2s; }
    .invite-envelope-particles span:nth-child(4) { left: 61%; animation-duration: 13s; animation-delay: 4s; }
    .invite-envelope-particles span:nth-child(5) { left: 78%; width: 4px; height: 4px; animation-duration: 10s; animation-delay: .5s; }
    .invite-envelope-particles span:nth-child(6) { left: 91%; animation-duration: 11s; animation-delay: 3.2s; }
}
@keyframes inviteParticleFloat {
    0% { transform: translateY(0) scale(.6); opacity: 0; }
    12% { opacity: .6; }
    88% { opacity: .25; }
    100% { transform: translateY(-112vh) scale(1); opacity: 0; }
}

.invite-envelope-intro {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 26px;
    padding: 20px;
}
@media (prefers-reduced-motion: no-preference) {
    .invite-envelope-intro { animation: inviteEnvelopeIntroIn 1s cubic-bezier(.2,.8,.25,1) both; }
}
@keyframes inviteEnvelopeIntroIn {
    from { opacity: 0; transform: translateY(18px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.invite-envelope-caption {
    font-family: var(--font-display); font-weight: 600; font-size: 18px;
    color: #fff; letter-spacing: .08em; text-align: center; opacity: .95;
    display: inline-flex; align-items: center; gap: 14px;
}
/* CSS-drawn diamonds, not '✦' — the dingbat isn't in Playfair Display so it
   was falling back to a mismatched system serif right in the middle of an
   otherwise-consistent headline. */
.invite-envelope-caption::before,
.invite-envelope-caption::after { content: ''; width: 4px; height: 4px; background: var(--color-gold); opacity: .85; transform: rotate(45deg); flex-shrink: 0; }

/* perspective belongs on the direct parent of the 3D-transformed flap, not
   further up the tree — otherwise the "hinge fold" flattens into a plain
   mirror-flip instead of a real 3D fold. */
.invite-envelope { position: relative; width: min(280px, 72vw); aspect-ratio: 4 / 3; perspective: 900px; transform-style: preserve-3d; }
@media (prefers-reduced-motion: no-preference) {
    .invite-envelope { animation: inviteEnvelopeFloat 5s ease-in-out infinite; }
    .invite-envelope-gate.is-opening .invite-envelope { animation: none; }
}
@keyframes inviteEnvelopeFloat {
    0%, 100% { transform: translateY(0) rotateX(0deg); }
    50% { transform: translateY(-9px) rotateX(3deg); }
}

/* Soft blurred glow breathing behind the envelope, drawing the eye to it */
.invite-envelope-glow {
    position: absolute; z-index: 0; left: 50%; top: 50%;
    width: 130%; height: 130%; transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--color-gold), transparent 68%);
    filter: blur(26px); opacity: .35;
}
@media (prefers-reduced-motion: no-preference) {
    .invite-envelope-glow { animation: inviteEnvelopeGlow 3.2s ease-in-out infinite; }
}
@keyframes inviteEnvelopeGlow {
    0%, 100% { opacity: .28; }
    50% { opacity: .48; }
}

.invite-envelope-body {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(165deg, var(--color-ivory), #fff 60%);
    border-radius: 4px;
    box-shadow: 0 30px 70px rgba(0,0,0,.4);
    overflow: hidden;
}
.invite-envelope-body::before { content: ''; position: absolute; inset: 9px; border: 1px solid var(--color-gold); opacity: .8; z-index: 2; }
/* The back-fold pattern (bottom + side creases) reads as a proper closed
   envelope, not just a flat card with one triangle on top. Purely
   decorative — subtle tonal shading, no separate moving parts. */
.invite-envelope-body::after {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(to bottom right, transparent 49.4%, rgba(0,0,0,.05) 50%, transparent 50.6%),
        linear-gradient(to bottom left, transparent 49.4%, rgba(0,0,0,.05) 50%, transparent 50.6%);
}

/* The invitation card itself, tucked inside the envelope — it rises into
   view once the flap opens, so opening the envelope reveals something
   instead of just dissolving straight to the real page. */
.invite-envelope-letter {
    position: absolute; left: 10%; right: 10%; bottom: -60%; z-index: 5;
    background: linear-gradient(165deg, #fff, var(--color-ivory));
    border: 1px solid var(--color-gold); border-radius: 3px;
    padding: 16px 10px 34px;
    display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
    box-shadow: 0 -14px 26px rgba(0,0,0,.14);
    opacity: 0;
}
.invite-envelope-letter-mono { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--color-primary-dark); letter-spacing: .05em; }
.invite-envelope-letter-names { font-family: var(--font-body); font-size: 10.5px; color: var(--color-muted); letter-spacing: .05em; text-transform: uppercase; }
@media (prefers-reduced-motion: no-preference) {
    .invite-envelope-letter { transition: bottom .85s cubic-bezier(.2,.8,.2,1) .5s, opacity .5s ease .5s; }
    .invite-envelope-gate.is-opening .invite-envelope-letter { bottom: 6%; opacity: 1; }
}

.invite-envelope-flap {
    position: absolute; top: 0; left: 0; right: 0; height: 54%; z-index: 3;
    background: linear-gradient(150deg, var(--color-primary-light), var(--color-primary) 55%, var(--color-primary-dark));
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top center;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.invite-envelope-flap::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(150deg, rgba(255,255,255,.16), transparent 60%);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.invite-envelope-seal {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 74px; height: 74px; border-radius: 50%;
    background:
        radial-gradient(circle at 32% 26%, rgba(255,255,255,.55), transparent 40%),
        radial-gradient(circle at 50% 50%, var(--color-gold), var(--color-primary-dark) 88%);
    color: #fff; border: none; cursor: pointer; z-index: 4; padding: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 22px rgba(0,0,0,.4), inset 0 1px 2px rgba(255,255,255,.4), inset 0 -3px 6px rgba(0,0,0,.25);
}
.invite-envelope-seal-mono {
    /* Upright, not italic — Noto Serif Armenian has no italic face, so
       forcing font-style: italic here fakes it with a shear transform that
       distorts the serif strokes. Letter-spacing signals "engraved" instead. */
    font-family: var(--font-display); font-weight: 700; font-size: 18px;
    letter-spacing: .04em; text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.invite-envelope-seal-ring {
    position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(255,255,255,.55);
}
@media (prefers-reduced-motion: no-preference) {
    .invite-envelope-seal::before {
        content: ''; position: absolute; inset: -10px; border-radius: 50%;
        box-shadow: 0 0 0 0 rgba(255,255,255,.4);
        animation: inviteEnvelopeSealPulse 2.4s ease-out infinite;
    }
    /* A slow rotating shine sweep gives the wax a "metallic" liveliness
       instead of sitting as a flat painted circle. */
    .invite-envelope-seal::after {
        content: ''; position: absolute; inset: 0; border-radius: 50%;
        background: conic-gradient(from 0deg, transparent 0deg, rgba(255,255,255,.45) 20deg, transparent 50deg, transparent 360deg);
        mix-blend-mode: overlay;
        animation: inviteSealShine 4.5s linear infinite;
    }
}
@keyframes inviteEnvelopeSealPulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,.35); }
    70% { box-shadow: 0 0 0 16px rgba(255,255,255,0); }
    100% { box-shadow: 0 0 0 16px rgba(255,255,255,0); }
}
@keyframes inviteSealShine { to { transform: rotate(360deg); } }

.invite-envelope-hint { font-size: 13px; letter-spacing: .06em; color: #fff; opacity: .8; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
    .invite-envelope-flap { transition: transform .9s cubic-bezier(.6,-.15,.3,1.2); }
    .invite-envelope-seal {
        transition: transform .7s cubic-bezier(.6,-.15,.3,1.2) .15s, opacity .5s ease .15s;
    }
    .invite-envelope-seal:hover { transform: translate(-50%, -50%) scale(1.06); }
    .invite-envelope-seal:active { transform: translate(-50%, -50%) scale(.96); }
    .invite-envelope-gate.is-opening .invite-envelope-flap { transform: rotateX(180deg); }
    .invite-envelope-gate.is-opening .invite-envelope-seal { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    /* Sequenced reveal: seal shrinks (.15s-.85s) → flap opens (0-.9s) →
       letter rises into view (.5s-1.35s) → held briefly so it's actually
       readable → then the whole intro dissolves, handing off to the real
       hero underneath. */
    .invite-envelope-gate.is-opening .invite-envelope-intro {
        transition: opacity .55s ease 1.7s, transform .6s ease 1.7s;
        opacity: 0; transform: scale(1.04);
    }
}
@media (prefers-reduced-motion: reduce) {
    /* No flap/seal/float animation — but the gate must still visibly dismiss on click. */
    .invite-envelope-gate.is-opening { opacity: 0; visibility: hidden; pointer-events: none; }
}

.invite.motif-envelope .invite-hero { padding: 90px 24px; }
.invite.motif-envelope .invite-hero-inner { padding: 10px 30px; position: relative; }
/* Thin corner brackets frame the title like engraved stationery — a
   font-independent motif, unlike the dingbat approach used before. */
.invite.motif-envelope .invite-hero-inner::before,
.invite.motif-envelope .invite-hero-inner::after {
    content: ''; position: absolute; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.5);
}
.invite.motif-envelope .invite-hero-inner::before { top: -16px; left: -10px; border-right: none; border-bottom: none; }
.invite.motif-envelope .invite-hero-inner::after { bottom: -16px; right: -10px; border-left: none; border-top: none; }
.invite.motif-envelope .invite-hero .eyebrow { background: transparent; letter-spacing: .18em; text-transform: uppercase; font-size: 12px; }
.invite.motif-envelope .invite-hero h1 { font-weight: 600; letter-spacing: .015em; }
/* Words fade up one after another instead of the whole title arriving as
   one static block — replaces the generic block-level hero animation. */
@media (prefers-reduced-motion: no-preference) {
    .invite.motif-envelope .invite-hero h1 { opacity: 1; animation: none; }
    .invite.motif-envelope .invite-hero h1 .hero-word {
        display: inline-block; opacity: 0;
        animation: inviteHeroIn .7s cubic-bezier(.2,.7,.3,1) forwards;
    }
    .invite.motif-envelope .invite-hero h1 .hero-word:nth-child(1) { animation-delay: .3s; }
    .invite.motif-envelope .invite-hero h1 .hero-word:nth-child(2) { animation-delay: .42s; }
    .invite.motif-envelope .invite-hero h1 .hero-word:nth-child(3) { animation-delay: .54s; }
    .invite.motif-envelope .invite-hero h1 .hero-word:nth-child(4) { animation-delay: .66s; }
    .invite.motif-envelope .invite-hero h1 .hero-word:nth-child(5) { animation-delay: .78s; }
}
.invite.motif-envelope .invite-hero .date-line::before,
.invite.motif-envelope .invite-hero .date-line::after { content: '—'; margin: 0 10px; opacity: .6; }
.invite.motif-envelope .invite-countdown .cd-box {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.45); border-radius: 50%;
    width: 70px; height: 70px; min-width: 70px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.invite.motif-envelope .section-title { letter-spacing: .03em; }
/* Tapered gradient lines instead of a hard-edged rule either side of the
   title — softer, reads as engraved rather than a plain divider. */
.invite.motif-envelope .section-title::before,
.invite.motif-envelope .section-title::after { content: ''; flex: 1; max-width: 80px; height: 1px; }
.invite.motif-envelope .section-title::before { background: linear-gradient(to left, var(--color-gold), transparent); }
.invite.motif-envelope .section-title::after { background: linear-gradient(to right, var(--color-gold), transparent); }
@media (prefers-reduced-motion: no-preference) {
    .invite.motif-envelope .section-title::before,
    .invite.motif-envelope .section-title::after { transition: transform .6s ease .15s; transform: scaleX(0); }
    .invite.motif-envelope .section-title::before { transform-origin: right; }
    .invite.motif-envelope .section-title::after { transform-origin: left; }
    .invite.motif-envelope .section-title.is-visible::before,
    .invite.motif-envelope .section-title.is-visible::after { transform: scaleX(1); }
}
.invite.motif-envelope .invite-timeline li { border-radius: 14px; border: 1px solid var(--color-tint); align-items: center; transition: transform .25s ease, box-shadow .25s ease; }
.invite.motif-envelope .invite-timeline li:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,.1); }
.invite.motif-envelope .invite-timeline .venue-time {
    background: var(--color-tint); color: var(--color-primary-dark); border-radius: 50%;
    width: 58px; height: 58px; min-width: 58px; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.invite.motif-envelope .invite-rsvp,
.invite.motif-envelope .invite-faq-item,
.invite.motif-envelope .invite-dress-code { border-radius: 18px; border: 1px solid var(--color-tint); box-shadow: 0 14px 32px rgba(0,0,0,.06); }
.invite.motif-envelope .invite-rsvp h3 { letter-spacing: .01em; }
.invite.motif-envelope .invite-rsvp button[type=submit] { letter-spacing: .04em; }

@media (max-width: 860px) {
    .invite-gallery { column-count: 2; }
    .invite-hero h1 { font-size: 56px; }
    .invite.motif-modern .invite-hero h1 { font-size: 42px; }
}

@media (max-width: 600px) {
    .invite-gallery { column-count: 1; }
    .invite-hero { min-height: 78vh; }
    .invite-hero h1 { font-size: 40px; }
    .invite.motif-modern .invite-hero h1 { font-size: 32px; }
}
