@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Cormorant+Garamond:ital,wght@0,400..700;1,400..700&family=Great+Vibes&display=swap');

:root {
    --font-body: "Cormorant Garamond", serif;
    --font-script: "Great Vibes", cursive;
    --font-arabic: "Amiri", serif;
    --olive: #6E764E;
    --olive-dark: #6E764E;
    --lace: #DFDED9;
    --paper: #F6F0E8;
    --paper-2: #FBF8F2;
    --deep: #202414;
    --muted: #786f60;
    --shadow: rgba(22, 23, 13, 0.23);
    --envelope-width: min(700px, 88vw);
    --content-width: min(1120px, calc(100vw - 48px));
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--deep);
    position: relative;
}

/* Fixed website background */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    background:
        linear-gradient(
            rgba(246, 240, 232, 0.38),
            rgba(246, 240, 232, 0.38)
        ),
        url("../images/bg-desktop.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Keep all website content above the fixed background */
.page {
    position: relative;
    z-index: 1;
}

@media (max-width: 760px) {
    body::before {
        background:
            linear-gradient(
                rgba(246, 240, 232, 0.38),
                rgba(246, 240, 232, 0.38)
            ),
            url("../images/bg-phone.png");

        background-size: cover;
        background-position: center;
    }
}

.page {
    width: 100%;
    position: relative;
    isolation: isolate;
}

.page-glow {
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(70px);
    z-index: -1;
}

.glow-a {
    width: 480px;
    height: 480px;
    left: 8%;
    top: 10%;
    background: rgba(95, 104, 47, 0.14);
}

.glow-b {
    width: 520px;
    height: 520px;
    right: 8%;
    bottom: 8%;
    background: rgba(223, 222, 217, 0.75);
}

.hero-stage {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    transition: min-height 700ms cubic-bezier(.2, .9, .2, 1), padding 700ms cubic-bezier(.2, .9, .2, 1);
}

.envelope-button {
    width: min(840px, 95vw);
    height: min(620px, 78vh);
    border: 0;
    background: transparent;
    position: relative;
    display: block;
    cursor: pointer;
    outline: none;
    transform: translateY(8px);
    transition: transform 700ms cubic-bezier(.2, .9, .2, 1);
}

.envelope-button:hover {
    transform: translateY(0);
}

.envelope-button:focus-visible {
    outline: 2px solid rgba(95, 104, 47, 0.55);
    outline-offset: 12px;
    border-radius: 24px;
}

.envelope-button img {
    display: block;
    pointer-events: none;
    user-select: none;
}

.closed-envelope,
.open-envelope {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.closed-envelope {
    z-index: 20;
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
    filter: drop-shadow(0 30px 24px var(--shadow));
    transition:
        opacity 420ms ease,
        visibility 0s linear 420ms,
        transform 800ms cubic-bezier(.2, .9, .2, 1),
        filter 420ms ease;
}

.closed-envelope img {
    width: min(780px, 92vw);
    height: auto;
}

.open-envelope {
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(38px) scale(0.96);
    transition:
        opacity 460ms ease 120ms,
        visibility 0s linear 580ms,
        transform 900ms cubic-bezier(.2, .9, .2, 1) 120ms;
}

.back-piece,
.front-piece,
.items-pocket {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    width: var(--envelope-width);
}

.back-piece {
    z-index: 1;
    bottom: 48px;
    filter: drop-shadow(0 28px 24px rgba(22, 23, 13, 0.17));
}

.back-piece img,
.front-piece img {
    width: 100%;
    height: auto;
}

.items-pocket {
    z-index: 3;
    width: var(--envelope-width);
    height: min(285px, 44vw);
    bottom: 78px;
    overflow: visible;
}

.front-piece {
    z-index: 6;
    width: calc(var(--envelope-width) * 0.94);
    bottom: 46px;
    filter: drop-shadow(0 18px 16px rgba(22, 23, 13, 0.13));
}

.inside-item {
    position: absolute;
    left: 50%;
    bottom: 16%;
    display: block;
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 0;
    transform: translate(-50%, 72px) rotate(0deg) scale(0.82);
    transform-origin: 50% 100%;
    transition:
        opacity 500ms ease,
        transform 980ms cubic-bezier(.19, .94, .23, 1);
    transition-delay: var(--delay);
}

.inside-item img {
    width: 100%;
    height: auto;
    max-width: none;
    max-height: none;
    object-fit: contain;
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.16));
}

.item-photo {
    z-index: 3;
    width: clamp(108px, 13vw, 155px);
}

.item-main-card {
    z-index: 5;
    width: clamp(150px, 18vw, 210px);
}

.item-flower {
    z-index: 4;
    width: clamp(88px, 11vw, 128px);
}

.item-small-card {
    z-index: 4;
    width: clamp(118px, 14vw, 168px);
}

.item-leaf {
    z-index: 2;
    width: clamp(96px, 11vw, 136px);
}

.item-side-card,
.item-side-card-2 {
    z-index: 2;
    width: clamp(118px, 14vw, 166px);
}

.click-text {
    position: absolute;
    left: 50%;
    bottom: 10px;
    z-index: 30;
    transform: translateX(-50%);
    color: var(--olive);
    font-size: 14px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0.78;
    transition: opacity 300ms ease, transform 300ms ease;
}

.after-open-content {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(36px);
    transition:
        max-height 1.15s ease,
        opacity 650ms ease 180ms,
        transform 700ms cubic-bezier(.2, .9, .2, 1) 140ms;
}

.content-section {
    width: var(--content-width);
    margin: 0 auto;
    padding: 64px 0;
}

.last-section {
    padding-bottom: 90px;
}

.section-intro {
    max-width: 760px;
    margin-bottom: 32px;
}

.section-intro.compact {
    max-width: 640px;
}

.eyebrow,
.mini-label,
.transition-kicker {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 12px;
}

.eyebrow {
    color: var(--olive);
    margin-bottom: 14px;
}

.section-intro h2 {
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    margin-bottom: 12px;
}

.section-intro p,
.info-card p,
.transition-inner p,
.simple-list li {
    color: var(--muted);
    line-height: 1.72;
    font-size: 16px;
}

.info-grid {
    display: grid;
    gap: 22px;
}

.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.info-card {
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(95, 104, 47, 0.10);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(27, 29, 18, 0.08);
    backdrop-filter: blur(4px);
}

.large-card {
    min-height: 220px;
}

.soft-card {
    background: rgba(247, 243, 234, 0.86);
}

.mini-label {
    color: var(--olive);
    margin-bottom: 16px;
}

.info-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.simple-list {
    list-style: none;
}

.simple-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.simple-list li::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--olive);
    position: absolute;
    left: 0;
    top: 11px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 170px;
    gap: 18px;
}

.gallery-card {
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(95, 104, 47, 0.13), rgba(255, 255, 255, 0.7)),
        var(--paper-2);
    box-shadow: 0 18px 40px rgba(27, 29, 18, 0.08);
    border: 1px solid rgba(95, 104, 47, 0.08);
}

.tall-card {
    grid-row: span 2;
}

.wide-card {
    grid-column: span 2;
}

.transition-band {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding: 90px 24px;
    overflow: hidden;
}

.transition-band::before,
.transition-band::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 54px;
    background: var(--paper);
    z-index: 2;
}

.transition-band::before {
    top: -1px;
    clip-path: polygon(0 0, 100% 0, 100% 32%, 94% 54%, 89% 42%, 82% 66%, 76% 48%, 70% 72%, 63% 50%, 57% 70%, 50% 46%, 43% 68%, 36% 48%, 30% 70%, 24% 48%, 17% 66%, 10% 42%, 5% 56%, 0 34%);
}

.transition-band::after {
    bottom: -1px;
    clip-path: polygon(0 66%, 6% 44%, 11% 58%, 18% 34%, 25% 54%, 31% 30%, 37% 52%, 44% 32%, 50% 56%, 57% 34%, 64% 54%, 71% 30%, 78% 50%, 85% 36%, 91% 58%, 96% 42%, 100% 66%, 100% 100%, 0 100%);
}

.olive-band {
    background: linear-gradient(135deg, rgba(95, 104, 47, 0.97), rgba(69, 78, 34, 0.95));
    color: #f7f3ea;
}

.light-band {
    background: linear-gradient(135deg, rgba(223, 222, 217, 0.92), rgba(247, 243, 234, 0.98));
    color: var(--deep);
}

.transition-inner {
    position: relative;
    z-index: 1;
    width: min(760px, calc(100vw - 48px));
    margin: 0 auto;
    text-align: center;
}

.transition-kicker {
    color: currentColor;
    opacity: 0.82;
    margin-bottom: 14px;
}

.transition-inner h3 {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 10px;
}

.olive-band .transition-inner p {
    color: rgba(247, 243, 234, 0.88);
}

.light-band .transition-inner p {
    color: rgba(32, 36, 20, 0.72);
}

.page.is-open .hero-stage {
    min-height: 760px;
    padding-top: 42px;
    padding-bottom: 12px;
}

.page.is-open .envelope-button {
    transform: translateY(70px);
}

.page.is-open .closed-envelope {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96) translateY(34px);
    filter: drop-shadow(0 14px 14px rgba(22, 23, 13, 0.08));
}

.page.is-open .open-envelope {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.page.is-open .inside-item {
    opacity: 1;
    transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r)) scale(1);
}

.page.is-open .envelope-button:hover .inside-item,
.page.is-open .envelope-button:focus-visible .inside-item {
    transform: translate(calc(-50% + var(--x)), calc(var(--y) - 18px)) rotate(var(--r)) scale(1.03);
}

.page.is-open .click-text {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

.page.is-open .after-open-content {
    max-height: 5200px;
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 960px) {
    .two-up,
    .three-up {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    :root {
        --envelope-width: min(610px, 90vw);
        --content-width: min(100vw - 24px, 720px);
    }

    .hero-stage {
        min-height: 100svh;
        padding: 18px 10px;
    }

    .envelope-button {
        width: 98vw;
        height: 560px;
    }

    .closed-envelope img {
        width: 96vw;
    }

    .items-pocket {
        height: 245px;
        bottom: 66px;
    }

    .inside-item {
        bottom: 15%;
    }

    .item-photo {
        width: clamp(76px, 18vw, 112px);
        --mx: -90px;
        --my: -104px;
    }

    .item-main-card {
        width: clamp(112px, 26vw, 154px);
        --mx: 0px;
        --my: -74px;
    }

    .item-flower {
        width: clamp(64px, 16vw, 92px);
        --mx: -128px;
        --my: -54px;
    }

    .item-small-card {
        --mx: 90px;
        --my: -86px;
    }

    .item-side-card {
        --mx: -54px;
        --my: -96px;
    }

    .item-side-card-2 {
        --mx: 58px;
        --my: -94px;
    }

    .item-small-card,
    .item-side-card,
    .item-side-card-2 {
        width: clamp(94px, 22vw, 132px);
    }

    .item-leaf {
        width: clamp(70px, 17vw, 98px);
        --mx: 126px;
        --my: -50px;
    }

    .page.is-open .inside-item {
        transform:
            translate(calc(-50% + var(--mx, var(--x))), var(--my, var(--y)))
            rotate(var(--r))
            scale(1);
    }

    .page.is-open .envelope-button:hover .inside-item,
    .page.is-open .envelope-button:focus-visible .inside-item {
        transform:
            translate(calc(-50% + var(--mx, var(--x))), calc(var(--my, var(--y)) - 14px))
            rotate(var(--r))
            scale(1.04);
    }

    .content-section {
        padding: 48px 0;
    }

    .section-intro h2 {
        font-size: 34px;
    }

    .transition-band {
        padding: 76px 18px;
    }

    .page.is-open .hero-stage {
        min-height: 640px;
        padding-top: 10px;
        padding-bottom: 0;
    }

    .page.is-open .envelope-button {
        transform: translateY(42px);
    }

    .click-text {
        bottom: 22px;
        font-size: 11px;
    }
}

@media (max-width: 520px) {
    :root {
        --envelope-width: min(440px, 92vw);
    }

    .envelope-button {
        height: 500px;
    }

    .items-pocket {
        height: 280px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 180px;
    }

    .wide-card,
    .tall-card {
        grid-column: auto;
        grid-row: auto;
    }

    .page.is-open .hero-stage {
        min-height: 560px;
    }
}

/* Updated wedding invitation sections */
.page-glow.glow-c {
    width: 420px;
    height: 420px;
    right: 8%;
    top: 36%;
    background: radial-gradient(circle, rgba(220, 205, 168, 0.25), rgba(220, 205, 168, 0));
}

.front-piece {
    width: calc(var(--envelope-width) * 0.96);
    bottom: 42px;
}

.items-pocket {
    height: min(305px, 46vw);
    bottom: 74px;
}

.inside-item {
    bottom: 15%;
}

.page.is-open .envelope-button:hover .inside-item,
.page.is-open .envelope-button:focus-visible .inside-item {
    transform: translate(calc(-50% + var(--x)), calc(var(--y) - 16px)) rotate(var(--r)) scale(1.03);
}

.item-names-card {
    width: clamp(164px, 20vw, 240px);
    z-index: 1;
}

.item-oval-emblem {
    width: clamp(162px, 20vw, 220px);
    z-index: 3;
}

.item-olive-branch {
    width: clamp(110px, 12vw, 158px);
    z-index: 3;
}

.item-flower-bouquet {
    width: clamp(118px, 13vw, 170px);
    z-index: 2;
}

.item-date-card {
    width: clamp(164px, 20vw, 240px);
    z-index: 4;
}

.after-open-content {
    position: relative;
    background: transparent;
}

.content-section {
    position: relative;
    padding: 26px 0;
}

.invitation-scene {
    padding-top: 10px;
}

.last-section {
    padding-bottom: 46px;
}

.scene-card {
    position: relative;
    width: min(980px, calc(100vw - 44px));
    margin: 0 auto;
    overflow: hidden;
}

.section-title {
    font-family: var(--font-body);
    color: var(--deep);
    line-height: 1.14;
    font-weight: 700;
}

.couple-title {
    font-family: var(--font-script);
    color: var(--deep);
    line-height: 1.05;
    font-weight: 400;
        text-align: center;
    display: flex;
    margin: 2rem 0 !important;
}

.section-body,
.intro-text,
.form-note,
.bible-verse,
.rsvp-success,
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    color: var(--muted);
}

.couple-title {
    font-size: clamp(32px, 4.7vw, 56px);
    margin: 0 0 16px;
}

.couple-title span {
    display: inline-block;
    margin: 0 8px;
}

.wedding-date {
    display: inline-block;
    margin-top: 4px;
    padding: 10px 20px;
    border-radius: 999px;
    color: var(--olive-dark);
    letter-spacing: 0.18em;
    font-size: 27px;
    text-transform: uppercase;
        width: 100%;
    text-align: center;
}

.bible-verse {
    margin: 18px auto 0;
    max-width: 570px;
    font-style: italic;
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.55;
            text-align: center;
}

.intro-card {
    padding: clamp(28px, 5vw, 54px);
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.88), rgba(246,239,226,0.92) 46%, rgba(232,231,214,0.86)),
        var(--paper-2);
    border: 1px solid rgba(95, 104, 47, 0.12);
    box-shadow: 0 22px 50px rgba(27, 29, 18, 0.09);
}

.intro-card::before {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(95, 104, 47, 0.14);
    border-radius: 26px;
    pointer-events: none;
}

.intro-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 26px;
    align-items: center;
}

.intro-copy {
    text-align: left;
}

.intro-text {
    font-size: 22px;
    line-height: 1.55;
    margin-bottom: 10px;
        text-align: center;
    margin-bottom: 1rem;
}

.intro-art-wrap {
    display: flex;
    justify-content: center;
}

.intro-art-card {
    width: min(100%, 420px);
    height: auto;
    filter: drop-shadow(0 18px 24px rgba(95, 104, 47, 0.12));
}

.floating-art {
    position: absolute;
    z-index: 0;
    opacity: 0.95;
    pointer-events: none;
}

.art-oval {
    width: 126px;
    right: 22px;
    top: 20px;
}

.art-olive {
    width: 155px;
    left: 26px;
    bottom: 16px;
    opacity: 0.72;
}

.transition-image-section {
    width: min(1280px, calc(100vw - 20px));
    margin: 0 auto;
    line-height: 0;
    text-align: center;
    display:none;
}

.transition-image-section img {
    display: inline-block;
    width: 100%;
    height: auto;
}

.transition-wide img { max-height: 128px; object-fit: contain; }
.transition-slim img { max-height: 82px; object-fit: contain; }
.transition-fan img { max-height: 210px; object-fit: contain; }

.split-card {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 0;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(27, 29, 18, 0.09);
    border: 1px solid rgba(95, 104, 47, 0.10);
}

.split-copy {
    padding: 34px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 260px;
}

.split-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.ceremony-card .split-copy {
    background: linear-gradient(145deg, rgba(110, 118, 78, 0.96), rgba(110, 118, 78, 0.97));
}

.ceremony-card .section-title,
.ceremony-card .section-body,
.ceremony-card .venue-title {
    color: #f8f3ea;
}

.ceremony-card .section-body {
    opacity: 0.88;
}

.cream-art {
    background: linear-gradient(180deg, rgba(251,247,241,0.98), rgba(238,230,214,0.95));
}

.cream-art img {
    width: min(100%, 410px);
    height: auto;
}

.celebration-card {
    background: linear-gradient(180deg, rgba(250,248,243,0.95), rgba(246,238,227,0.98));
}

.reverse-layout {
    grid-template-columns: 0.96fr 1.04fr;
}

.paper-art {
    background:
        radial-gradient(circle at 50% 20%, rgba(255,255,255,0.94), rgba(246,239,228,0.96)),
        linear-gradient(180deg, rgba(216,219,195,0.25), rgba(255,255,255,0.2));
}

.paper-art img {
    width: min(100%, 320px);
    height: auto;
    filter: drop-shadow(0 16px 18px rgba(95,104,47,0.08));
}

.section-title {
    font-size: clamp(28px, 3.4vw, 42px);
    margin-bottom: 10px;
}

.section-body {
    font-size: 20px;
    line-height: 1.65;
    margin-bottom: 18px;
}

.venue-title {
    font-size: clamp(26px, 3vw, 34px);
    line-height: 1.24;
    color: var(--olive);
    margin-bottom: 22px;
}

.map-button,
.rsvp-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    padding: 13px 24px;
    min-height: 46px;
    border-radius: 999px;
    border: 1px solid rgba(95, 104, 47, 0.25);
    background: linear-gradient(135deg, #6E764E, #6E764E);
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    box-shadow: 0 12px 24px rgba(95, 104, 47, 0.18);
    transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.map-button:hover,
.rsvp-form button:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 18px 32px rgba(95, 104, 47, 0.22);
}

.gift-card {
    border-radius: 30px;
    background: linear-gradient(130deg, rgba(110, 118, 78,0.96), rgba(155,145,104,0.92));
    color: #fff;
    padding: 28px 36px 28px 160px;
    box-shadow: 0 18px 42px rgba(27,29,18,0.12);
}

.gift-copy {
    position: relative;
    z-index: 1;
}

.gift-side-art {
    position: absolute;
    left: 20px;
    bottom: 0;
    width: 124px;
    opacity: 0.92;
}

.light-title,
.light-copy { color: #f8f3ea; }

.rsvp-layout {
    width: min(980px, calc(100vw - 44px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.58fr 1fr;
    gap: 20px;
    align-items: stretch;
}

.rsvp-side-card {
    position: relative;
    min-height: 100%;
    border-radius: 32px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 12%, rgba(255,255,255,0.92), rgba(240,236,224,0.88) 60%, rgba(224,225,201,0.62) 100%),
        linear-gradient(180deg, rgba(95,104,47,0.08), rgba(95,104,47,0.02));
    border: 1px solid rgba(95,104,47,0.12);
    box-shadow: 0 18px 42px rgba(27,29,18,0.08);
}

.rsvp-side-flower {
    position: absolute;
    width: 250px;
    left: 50%;
    top: 24px;
    transform: translateX(-50%);
}

.rsvp-side-emblem {
    position: absolute;
    width: 116px;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    opacity: 0.95;
}

.rsvp-card-vintage {
    padding: 28px 30px;
    border-radius: 32px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.88), rgba(248,243,234,0.96));
    border: 1px solid rgba(95, 104, 47, 0.12);
    box-shadow: 0 20px 50px rgba(27,29,18,0.08);
}

.rsvp-card-vintage::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px solid rgba(95,104,47,0.12);
    border-radius: 24px;
    pointer-events: none;
}

.rsvp-card-vintage > * { position: relative; z-index: 1; }

.rsvp-form {
    margin-top: 18px;
    display: grid;
    gap: 14px;
}

.rsvp-form label {
    display: grid;
    gap: 6px;
    color: var(--deep);
    font-family: var(--font-body);
    font-size: 17px;
    letter-spacing: 0.07em;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(95,104,47,0.14);
    background: rgba(255,255,255,0.84);
    font: inherit;
    font-size: 16px;
    outline: none;
}

.rsvp-form textarea { min-height: 94px; resize: vertical; }

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
    border-color: rgba(95,104,47,0.36);
    box-shadow: 0 0 0 4px rgba(95,104,47,0.08);
}

.rsvp-form button { width: min(210px, 100%); border: 0; }

.form-note {
    text-align: center;
    font-size: 14px;
    margin-top: 2px;
}

.rsvp-success {
    display: none;
    text-align: center;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(95,104,47,0.10);
}

.rsvp-success.is-visible { display: block; }

.closing-card {
    padding: 28px 28px 28px 28px;
    text-align:center;
    border-radius: 32px;
    background:
        linear-gradient(145deg, rgba(251,248,242,0.95), rgba(239,232,216,0.96));
    border: 1px solid rgba(95,104,47,0.12);
    box-shadow: 0 18px 42px rgba(27,29,18,0.08);
}

.closing-emblem {
    position: absolute;
    width: 126px;
    left: 34px;
    top: 50%;
    transform: translateY(-50%);
}

.closing-copy {
    text-align: left;
}

@media (max-width: 960px) {
    .intro-grid,
    .split-card,
    .rsvp-layout,
    .reverse-layout {
        grid-template-columns: 1fr;
    }

    .split-art {
        min-height: 220px;
    }

    .rsvp-side-card {
        min-height: 340px;
    }

    .gift-card,
    .closing-card {
        padding-left: 28px;
    }

    .gift-side-art,
    .closing-emblem {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        transform: none;
        display: block;
        margin: 0 auto 16px;
    }

    .closing-copy,
    .intro-copy {
        text-align: center;
    }

    .map-button { align-self: center; }
}

@media (max-width: 760px) {
    .content-section { padding: 18px 0; }

    .scene-card,
    .rsvp-layout {
        width: calc(100vw - 24px);
    }

    .front-piece {
        width: calc(var(--envelope-width) * 0.95);
    }

    .items-pocket {
        height: 244px;
        bottom: 64px;
    }

    .inside-item { bottom: 12%; }

    .page.is-open .inside-item {
        transform: translate(calc(-50% + var(--mx, var(--x))), var(--my, var(--y))) rotate(var(--r)) scale(1);
    }

    .page.is-open .envelope-button:hover .inside-item,
    .page.is-open .envelope-button:focus-visible .inside-item {
        transform: translate(calc(-50% + var(--mx, var(--x))), calc(var(--my, var(--y)) - 12px)) rotate(var(--r)) scale(1.03);
    }

    .item-names-card { width: clamp(132px, 34vw, 180px); --mx: -98px; --my: -82px; }
    .item-oval-emblem { width: clamp(98px, 27vw, 136px); --mx: -15px; --my: -75px; }
    .item-olive-branch { width: clamp(84px, 24vw, 116px); --mx: 112px; --my: -42px; }
    .item-flower-bouquet { width: clamp(96px, 26vw, 132px); --mx: -30px; --my: -104px; }
    .item-date-card { width: clamp(132px, 34vw, 178px); --mx: 106px; --my: -88px; }

    .transition-wide img { max-height: 84px; }
    .transition-slim img { max-height: 56px; }
    .transition-fan img { max-height: 128px; }

    .intro-card,
    .split-copy,
    .rsvp-card-vintage,
    .gift-card,
    .closing-card {
        padding: 22px 18px;
    }

    .intro-card::before,
    .rsvp-card-vintage::before { inset: 10px; }

    .art-oval {
        width: 86px;
        right: 12px;
        top: 12px;
    }

    .art-olive {
        width: 106px;
        left: 10px;
        bottom: 8px;
    }

    .intro-text,
    .section-body { font-size: 18px; }

    .venue-title { font-size: 24px; }

    .rsvp-side-card { min-height: 260px; }
    .rsvp-side-flower { width: 180px; top: 10px; }
    .rsvp-side-emblem { width: 92px; bottom: 12px; }
}

/* Mobile envelope zoom fix: makes the opened envelope easier to see on phones. */
@media (max-width: 760px) {
    .page.is-open .hero-stage {
        min-height: 690px;
        padding-top: 4px;
        padding-bottom: 0;
        overflow: visible;
    }

    .page.is-open .envelope-button {
        width: 108vw;
        height: 610px;
        transform: translateY(36px) scale(1.08);
        transform-origin: center center;
    }

    .page.is-open .open-envelope {
        transform: translateY(0) scale(1.12);
        transform-origin: center center;
    }

    .page.is-open .items-pocket {
        height: 270px;
        bottom: 70px;
    }

    .page.is-open .front-piece {
        width: calc(var(--envelope-width) * 0.98);
        bottom: 42px;
    }
}

@media (max-width: 520px) {
    .page.is-open .hero-stage {
        min-height: 640px;
    }

    .page.is-open .envelope-button {
        width: 112vw;
        height: 560px;
        transform: translateY(30px) scale(1.12);
    }

    .page.is-open .open-envelope {
        transform: translateY(0) scale(1.16);
    }
}

/* Font family update */
body,
button,
input,
select,
textarea {
    font-family: var(--font-body);
}

.couple-title {
    font-family: var(--font-script);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.couple-title span {
    font-family: var(--font-body);
    font-weight: 500;
}

.section-title,
.venue-title,
.family-line,
.wedding-date,
.map-button,
.rsvp-form button,
.rsvp-form label,
.click-text {
    font-family: var(--font-body);
}

.bible-verse,
.section-body,
.intro-text,
.form-note,
.rsvp-success {
    font-family: var(--font-arabic);
}

/* Layer containing items that must appear above the envelope front */
.front-overlay {
    position: absolute;
    left: 50%;
    bottom: 74px;
    z-index: 7;
    display: block;
    width: var(--envelope-width);
    height: min(305px, 46vw);
    overflow: visible;
    pointer-events: none;
    transform: translateX(-50%);
}

/* Reduce the width of the front envelope */
.front-piece,
.page.is-open .front-piece {
    width: calc(var(--envelope-width) * 0.93);
}

@media (max-width: 760px) {
    .front-overlay {
        bottom: 64px;
        height: 244px;
    }

    .page.is-open .front-overlay {
        bottom: 70px;
        height: 270px;
    }

    .front-piece,
    .page.is-open .front-piece {
        width: calc(var(--envelope-width) * 0.93);
    }
}

/* The Celebration countdown */
.countdown-art {
    min-height: 340px;
    padding: 32px;
}

.countdown-wrapper {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    text-align: center;
}

.countdown-heading {
    margin: 0 0 22px;
    color: var(--olive);
    font-family: var(--font-script);
    font-size: clamp(34px, 4vw, 50px);
    font-weight: 400;
    line-height: 1;
}

.celebration-countdown {
        display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.countdown-unit {
    position: relative;
    display: flex;
    min-height: 112px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border: 1px solid rgba(110, 118, 78, 0.2);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: 0 12px 28px rgba(95, 104, 47, 0.08);
    backdrop-filter: blur(3px);
}

.countdown-unit::before {
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(110, 118, 78, 0.1);
    border-radius: 13px;
    content: "";
    pointer-events: none;
}

.countdown-number {
    position: relative;
    z-index: 1;
    color: var(--olive);
    font-family: var(--font-body);
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 500;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    position: relative;
    z-index: 1;
    margin-top: 8px;
    color: rgba(55, 58, 40, 0.68);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.countdown-date {
    margin: 22px 0 0;
    color: var(--olive);
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.18em;
}

.countdown-finished {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--olive);
    font-family: var(--font-script);
    font-size: clamp(38px, 5vw, 56px);
    line-height: 1.2;
}

@media (max-width: 760px) {
    .countdown-art {
        min-height: 330px;
        padding: 26px 18px;
    }

    .celebration-countdown {
        gap: 10px;
    }

    .countdown-unit {
        min-height: 96px;
        padding: 13px 8px;
        border-radius: 15px;
    }

    .countdown-heading {
        margin-bottom: 18px;
    }

    .countdown-date {
        margin-top: 18px;
        font-size: 16px;
    }
}

/* Bride and groom house locations */
.homes-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(95, 104, 47, 0.1);
    border-radius: 34px;
    box-shadow: 0 20px 50px rgba(27, 29, 18, 0.09);
}

/* Light side on the left */
.home-location-groom {
    background:
        radial-gradient(
            circle at 50% 15%,
            rgba(255, 255, 255, 0.95),
            transparent 52%
        ),
        linear-gradient(
            180deg,
            rgba(251, 247, 241, 0.98),
            rgba(238, 230, 214, 0.96)
        );
    color: var(--olive);
}

/* Olive side on the right */
.home-location-bride {
        background: linear-gradient(145deg, rgba(110, 118, 78, 0.96), rgba(110, 118, 78, 0.97));
    color: #f8f3ea;
}

.home-location {
    position: relative;
    display: flex;
    min-height: 340px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 42px 36px;
    text-align: center;
}

.home-location + .home-location {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.home-location::before {
    position: absolute;
    inset: 13px;
    border: 1px solid currentColor;
    border-radius: 23px;
    content: "";
    opacity: 0.12;
    pointer-events: none;
}

.home-location > * {
    position: relative;
    z-index: 1;
}

.home-location-label {
    margin-bottom: 18px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    opacity: 0.68;
    text-transform: uppercase;
}

.home-location-icon {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 1px solid currentColor;
    border-radius: 50%;
    opacity: 0.82;
}

.home-location-icon svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.home-location-title {
    margin: 0 0 8px;
    font-family: var(--font-script);
    font-size: clamp(34px, 4vw, 48px);
    font-weight: 400;
    line-height: 1.05;
}

.home-location-name {
    margin: 0 0 9px;
    font-family: var(--font-body);
    font-size: 19px;
    font-weight: 600;
}

.home-location-address {
    max-width: 330px;
    margin: 0 0 20px;
    font-family: var(--font-body);
    font-size: 20px;
    line-height: 1.6;
    opacity: 0.76;
    letter-spacing: 0.07em;
}

/* Cream button on the olive bride side */
.home-location-bride .map-button {
    border-color: rgba(248, 243, 234, 0.5);
    background: #f8f3ea;
    color: var(--olive);
    box-shadow: 0 12px 24px rgba(31, 34, 20, 0.18);
}

.home-location-bride .map-button:hover {
    box-shadow: 0 18px 32px rgba(31, 34, 20, 0.24);
}

/* Mobile */
@media (max-width: 760px) {
    .homes-card {
        grid-template-columns: 1fr;
        border-radius: 26px;
    }

    .home-location {
        min-height: 310px;
        padding: 34px 20px;
    }

    .home-location + .home-location {
        border-top: 1px solid rgba(95, 104, 47, 0.12);
        border-left: 0;
    }

    .home-location-title {
        font-size: 38px;
    }

    .home-location-name {
        font-size: 18px;
    }

    .home-location-address {
        font-size: 15px;
    }
}

/* Whish gift section */
.whish-gift-card {
    display: grid;
    grid-template-columns: 0.42fr 1fr;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(95, 104, 47, 0.12);
    border-radius: 32px;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.92),
            rgba(246, 240, 232, 0.97)
        );
    box-shadow: 0 20px 50px rgba(27, 29, 18, 0.09);
}

.whish-gift-card::before {
    position: absolute;
    inset: 14px;
    z-index: 2;
    border: 1px solid rgba(95, 104, 47, 0.1);
    border-radius: 23px;
    content: "";
    pointer-events: none;
}

.whish-decoration {
    position: relative;
    display: flex;
    min-height: 340px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(255, 255, 255, 0.18),
            transparent 48%
        ),
        linear-gradient(
            145deg,
            rgba(110, 118, 78, 0.98),
            rgba(91, 99, 62, 0.98)
        );
}

.whish-decoration::before,
.whish-decoration::after {
    position: absolute;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(248, 243, 234, 0.12);
    border-radius: 50%;
    content: "";
}

.whish-decoration::before {
    top: -80px;
    left: -70px;
}

.whish-decoration::after {
    right: -90px;
    bottom: -100px;
}


.whish-gift-copy {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 50px;
}

.whish-eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--olive);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.whish-gift-text {
    max-width: 590px;
    margin-bottom: 24px;
    line-height: 1.65;
}

.whish-account-box {
    display: flex;
    width: 100%;
    max-width: 520px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 18px 17px 22px;
    border: 1px solid rgba(95, 104, 47, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 12px 28px rgba(95, 104, 47, 0.07);
}

.whish-account-details {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.whish-account-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.whish-account-number {
    color: var(--olive);
    font-family: var(--font-body);
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.whish-copy-button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--olive);
    border-radius: 999px;
    background: var(--olive);
    color: #f8f3ea;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease;
}

.whish-copy-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.whish-copy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(95, 104, 47, 0.2);
}

.whish-copy-button.is-copied {
    background: var(--deep);
    border-color: var(--deep);
}

.whish-copy-message {
    visibility: hidden;
    margin: 8px 0 0 4px;
    color: var(--olive);
    font-size: 14px;
    opacity: 0;
    transition: opacity 180ms ease;
}

.whish-copy-message.is-visible {
    visibility: visible;
    opacity: 1;
}

@media (max-width: 760px) {
    .whish-gift-card {
        grid-template-columns: 1fr;
        border-radius: 26px;
    }

    .whish-decoration {
        min-height: 155px;
    }

    .whish-decoration svg {
        width: 78px;
        height: 78px;
    }

    .whish-gift-copy {
        padding: 32px 22px;
        text-align: center;
    }

    .whish-gift-text {
        margin-right: auto;
        margin-left: auto;
    }

    .whish-account-box {
        max-width: 100%;
        flex-direction: column;
        padding: 18px;
    }

    .whish-account-details {
        align-items: center;
    }

    .whish-account-number {
        font-size: 27px;
    }

    .whish-copy-button {
        width: 100%;
    }

    .whish-copy-message {
        margin-left: 0;
    }
}


.whish-gift-card {
    color: #f8f3ea;
    border-color: rgba(248, 243, 234, 0.18);
    background: linear-gradient(
        135deg,
        rgba(110, 118, 78, 0.98),
        rgba(95, 104, 47, 0.98)
    );
    box-shadow: 0 20px 50px rgba(27, 29, 18, 0.18);
}

/* Inner decorative border */
.whish-gift-card::before {
    border-color: rgba(248, 243, 234, 0.14);
}

/* Slightly darker green logo side */
.whish-decoration {
    background:
        radial-gradient(
            circle at 50% 40%,
            rgba(255, 255, 255, 0.1),
            transparent 52%
        ),
        linear-gradient(
            145deg,
            rgba(83, 92, 54, 1),
            rgba(69, 77, 43, 1)
        );
}

/* Remove the old circles behind the gift icon */
.whish-decoration::before,
.whish-decoration::after {
    border-color: rgba(248, 243, 234, 0.1);
}

/* Whish Money logo */
.whish-money-logo {
    position: relative;
    z-index: 2;
    display: block;
    width: min(76%, 250px);
    height: auto;
    object-fit: contain;
    opacity: 0.96;
    filter: drop-shadow(0 10px 18px rgba(24, 28, 15, 0.18));
}

/* Right-side content colors */
.whish-gift-copy {
    color: #f8f3ea;
}

.whish-eyebrow,
.whish-gift-card .section-title,
.whish-gift-card .section-body,
.whish-gift-text {
    color: #f8f3ea;
}

.whish-gift-text {
    opacity: 0.84;
}

/* Account container */
.whish-account-box {
    border-color: rgba(248, 243, 234, 0.25);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 12px 28px rgba(27, 29, 18, 0.13);
    backdrop-filter: blur(5px);
}

.whish-account-label {
    color: rgba(248, 243, 234, 0.68);
}

.whish-account-number {
    color: #f8f3ea;
}

/* Cream copy button */
.whish-copy-button {
    border-color: #f8f3ea;
    background: #f8f3ea;
    color: var(--olive);
}

.whish-copy-button:hover {
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(27, 29, 18, 0.2);
}

.whish-copy-button.is-copied {
    border-color: rgba(248, 243, 234, 0.8);
    background: transparent;
    color: #f8f3ea;
}

.whish-copy-message {
    color: rgba(248, 243, 234, 0.85);
}

/* Mobile adjustments */
@media (max-width: 760px) {
    .whish-money-logo {
        width: min(68%, 230px);
    }

    .whish-decoration {
        min-height: 165px;
    }
}

/* Whish section styled like the presence/gift section */
.whish-scene {
    background: transparent;
}

/* One continuous muted olive card */
.whish-gift-card {
    position: relative;
    display: grid;
    grid-template-columns: 0.38fr 1fr;
    align-items: stretch;
    overflow: hidden;
    color: #f8f3ea;
    border: 0;
    border-radius: 30px;
    background: linear-gradient(
    100deg,
    #858762 0%,
    #96956f 42%,
    #aaa27c 100%
);
    box-shadow: 0 18px 42px rgba(43, 45, 28, 0.13);
}

/* Remove the old inner border */
.whish-gift-card::before {
    display: none;
}

/* Logo side uses the same background as the card */
.whish-decoration {
    position: relative;
    display: flex;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    overflow: visible;
    background: transparent;
}

/* Remove the decorative circles from the previous design */
.whish-decoration::before,
.whish-decoration::after {
    display: none;
}

/* Whish Money logo */
.whish-money-logo {
    position: relative;
    z-index: 2;
    display: block;
    width: min(76%, 250px);
    height: auto;
    object-fit: contain;
    opacity: 0.96;
    filter: drop-shadow(
        0 10px 16px rgba(38, 40, 23, 0.16)
    );
}

/* Right-side content */
.whish-gift-copy {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 52px 42px 18px;
    color: #f8f3ea;
    background: transparent;
}

.whish-eyebrow,
.whish-gift-card .section-title,
.whish-gift-card .section-body,
.whish-gift-text {
    color: #f8f3ea;
}

.whish-eyebrow {
    opacity: 0.8;
}

.whish-gift-text {
    max-width: 650px;
    opacity: 0.9;
}

/* Soft translucent account box */
.whish-account-box {
    border: 1px solid rgba(248, 243, 234, 0.25);
    background: rgba(248, 243, 234, 0.1);
    box-shadow: none;
    backdrop-filter: blur(4px);
}

.whish-account-label {
    color: rgba(248, 243, 234, 0.72);
}

.whish-account-number {
    color: #f8f3ea;
}

/* Cream copy button */
.whish-copy-button {
    border-color: #f8f3ea;
    background: #f8f3ea;
    color: #6e764e;
}

.whish-copy-button:hover {
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(43, 45, 28, 0.18);
}

.whish-copy-button.is-copied {
    border-color: rgba(248, 243, 234, 0.75);
    background: transparent;
    color: #f8f3ea;
}

.whish-copy-message {
    color: rgba(248, 243, 234, 0.88);
}

/* Mobile */
@media (max-width: 760px) {
    .whish-gift-card {
        grid-template-columns: 1fr;
        border-radius: 26px;
    }

    .whish-decoration {
        min-height: 150px;
        padding: 30px 20px 5px;
    }

    .whish-money-logo {
        width: min(65%, 230px);
    }

    .whish-gift-copy {
        padding: 22px 22px 34px;
        text-align: center;
    }

    .whish-account-box {
        flex-direction: column;
        max-width: 100%;
        padding: 18px;
    }

    .whish-account-details {
        align-items: center;
    }

    .whish-copy-button {
        width: 100%;
    }
}

.ceremony-button{
        border-color: rgba(248, 243, 234, 0.5);
    background: #f8f3ea;
    color: var(--olive);
    box-shadow: 0 12px 24px rgba(31, 34, 20, 0.18);
}

.end-title{
        font-family: var(--font-script);
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Prevent Safari from styling detected numbers as blue links */
a[x-apple-data-detectors],
a[x-apple-data-detectors]:hover,
a[x-apple-data-detectors]:focus,
a[x-apple-data-detectors]:active {
    color: inherit !important;
    text-decoration: none !important;
    font: inherit !important;
    background: transparent !important;
}



/* ============================================================
   PERSONALIZED INVITATION API
============================================================ */

.invitation-api-state {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 28px);
    padding: 10px 16px;
    border: 1px solid rgba(110, 118, 78, 0.18);
    border-radius: 999px;
    background: rgba(251, 248, 242, 0.94);
    color: var(--olive-dark);
    box-shadow: 0 10px 30px rgba(32, 36, 20, 0.12);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transform: translateX(-50%);
    backdrop-filter: blur(12px);
}

.invitation-api-state.is-ready {
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 500ms ease 1400ms,
        visibility 0s linear 1900ms;
}

.invitation-api-state.is-error {
    border-color: rgba(130, 42, 42, 0.2);
    background: rgba(255, 244, 242, 0.96);
    color: #7d2d2d;
}

.invitation-api-spinner {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 2px solid rgba(110, 118, 78, 0.22);
    border-top-color: var(--olive);
    border-radius: 50%;
    animation: invitation-api-spin 800ms linear infinite;
}

.invitation-api-state.is-ready .invitation-api-spinner,
.invitation-api-state.is-error .invitation-api-spinner {
    display: none;
}

@keyframes invitation-api-spin {
    to {
        transform: rotate(360deg);
    }
}

.envelope-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.personal-invitation {
    position: relative;
    margin: 24px auto 12px;
    max-width: 720px;
    padding: 20px 22px;
    border: 1px solid rgba(110, 118, 78, 0.18);
    border-radius: 24px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.75),
            rgba(240, 236, 222, 0.72)
        );
    text-align: center;
    display:none;
}

.personal-invitation::before,
.personal-invitation::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 34px;
    height: 1px;
    background: rgba(110, 118, 78, 0.35);
}

.personal-invitation::before {
    left: 18px;
}

.personal-invitation::after {
    right: 18px;
}

.personal-invitation-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.personal-invitation-name {
    margin: 0;
    color: var(--olive-dark);
    font-family: var(--font-script);
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 400;
    line-height: 1.15;
}

.personal-invitation-guests {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.personal-invitation-guest {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border: 1px solid rgba(110, 118, 78, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--deep);
    font-size: 14px;
}

.personal-invitation-guest small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 23px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(110, 118, 78, 0.11);
    color: var(--olive-dark);
    font-size: 9px;
    font-weight: 700;
}

.rsvp-layout {
    grid-template-columns: 1fr;
}

.rsvp-form-loading {
    padding: 18px;
    border: 1px dashed rgba(110, 118, 78, 0.22);
    border-radius: 16px;
    color: var(--muted);
    text-align: center;
}

.rsvp-form-content {
    display: grid;
    gap: 14px;
}

.rsvp-invitation-summary {
    display: grid;
    gap: 3px;
    padding: 14px 16px;
    border: 1px solid rgba(110, 118, 78, 0.13);
    border-radius: 16px;
    background: rgba(110, 118, 78, 0.055);
    text-align: center;
}

.rsvp-invitation-summary span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rsvp-invitation-summary strong {
    color: var(--olive-dark);
    font-family: var(--font-script);
    font-size: clamp(27px, 4vw, 38px);
    font-weight: 400;
    line-height: 1.15;
    display:none;
}

.rsvp-invitation-summary small {
    color: var(--muted);
    font-size: 14px;
}

.rsvp-guests-fieldset {
    display: grid;
    gap: 11px;
    min-width: 0;
    padding: 0;
    border: 0;
}

.rsvp-guests-fieldset legend {
    margin-bottom: 9px;
    color: var(--olive);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.07em;
    padding-top: 25px;

}

.rsvp-guests-list {
    display: grid;
    gap: 10px;
}

.rsvp-guest-row {
    display: grid;
    grid-template-columns:
        minmax(170px, 1fr)
        minmax(165px, 0.7fr);
    gap: 12px;
    align-items: end;
    padding: 14px;
    border: 1px solid rgba(110, 118, 78, 0.13);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.58);
}

.rsvp-guest-identity {
    display: grid;
    gap: 3px;
    align-self: center;
}

.rsvp-guest-identity strong {
    color: var(--deep);
    font-size: 18px;
    line-height: 1.2;
}

.rsvp-guest-identity small {
    color: var(--muted);
    font-size: 12px;
    display:none;
}

.rsvp-attendance-field,
.rsvp-plus-one-name-field {
    display: grid;
    gap: 6px;
}

.rsvp-plus-one-name-field {
    grid-column: 1 / -1;
}

.rsvp-attendance-field > span,
.rsvp-plus-one-name-field > span {
    color: var(--olive);
    font-size: 15px;
    letter-spacing: 0.06em;
}

.rsvp-form input.has-error,
.rsvp-form select.has-error {
    border-color: rgba(143, 46, 46, 0.55);
    box-shadow: 0 0 0 4px rgba(143, 46, 46, 0.08);
}

.rsvp-error {
    display: none;
    padding: 12px 16px;
    border: 1px solid rgba(143, 46, 46, 0.16);
    border-radius: 16px;
    background: rgba(143, 46, 46, 0.07);
    color: #7f3030;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
}

.rsvp-error.is-visible {
    display: block;
}

.rsvp-form button:disabled {
    cursor: wait;
    opacity: 0.64;
    transform: none;
}

#submittedByLabel{
    padding-top:15px;
}

@media (max-width: 680px) {
    .invitation-api-state {
        top: 10px;
        width: calc(100vw - 24px);
        justify-content: center;
        border-radius: 18px;
    }

    .personal-invitation {
        padding: 18px 14px;
    }

    .personal-invitation::before,
    .personal-invitation::after {
        display: none;
    }

    .rsvp-guest-row {
        grid-template-columns: 1fr;
    }

    .rsvp-plus-one-name-field {
        grid-column: auto;
    }
}
