:root {
    --invite-ivory: #fffaf2;
    --invite-paper: #fffdf8;
    --invite-aubergine: #2d1324;
    --invite-mulberry: #7a2f53;
    --invite-blush: #e9b7bd;
    --invite-sage: #9aaa88;
    --invite-champagne: #ead8aa;
    --invite-gold: #c69b4a;
    --invite-gold-deep: #9d7430;
    --invite-whatsapp: #1f7a5a;
    --invite-shadow: 0 28px 90px rgba(45, 19, 36, .20);
    --invite-serif: "Cormorant Garamond", Georgia, serif;
    --invite-script: "Great Vibes", cursive;
    --invite-sans: "Montserrat", Arial, sans-serif;
}

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

html {
    min-height: 100%;
    background: var(--invite-ivory);
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--invite-ivory);
    color: var(--invite-aubergine);
    font-family: var(--invite-sans);
    letter-spacing: 0;
    overflow-x: hidden;
}

body.duzii-convite-open {
    background: var(--invite-ivory);
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
.invitation-card:focus-visible {
    outline: 3px solid var(--invite-gold);
    outline-offset: 4px;
}

.invite-page {
    min-height: 100svh;
    background:
        linear-gradient(135deg, rgba(154, 170, 136, .16), transparent 28%),
        linear-gradient(315deg, rgba(233, 183, 189, .28), transparent 33%),
        var(--invite-ivory);
}

.invite-stage {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 48px 24px;
    overflow-x: hidden;
}

body.admin-bar .invite-stage {
    min-height: calc(100svh - 32px);
}

.invite-stage__veil {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        repeating-linear-gradient(115deg, rgba(198, 155, 74, .08) 0 1px, transparent 1px 26px),
        linear-gradient(180deg, rgba(255, 255, 255, .56), rgba(255, 250, 242, .92));
}

.invite-stage__veil::before,
.invite-stage__veil::after {
    content: "";
    position: absolute;
    left: 50%;
    width: min(980px, 88vw);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(198, 155, 74, .72), transparent);
}

.invite-stage__veil::before {
    top: 32px;
}

.invite-stage__veil::after {
    bottom: 32px;
}

.invite-ornaments {
    position: absolute;
    inset: 0;
    z-index: -1;
    color: var(--invite-gold);
    pointer-events: none;
}

.ornament {
    position: absolute;
    display: block;
    opacity: .48;
    filter: drop-shadow(0 14px 20px rgba(45, 19, 36, .08));
}

.ornament--glasses {
    left: 7%;
    top: 12%;
    width: 126px;
    color: var(--invite-gold-deep);
    transform: rotate(-10deg);
}

.ornament--music {
    right: 8%;
    top: 10%;
    width: 132px;
    color: var(--invite-mulberry);
    opacity: .25;
    transform: rotate(9deg);
}

.ornament--candles {
    left: 9%;
    bottom: 8%;
    width: 132px;
    color: var(--invite-sage);
    opacity: .42;
}

.ornament--flourish {
    width: 230px;
    color: var(--invite-gold);
    opacity: .44;
}

.ornament--flourish-left {
    left: 2%;
    top: 47%;
}

.ornament--flourish-right {
    right: 2%;
    top: 49%;
}

.invite-shell {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    min-height: 720px;
    display: grid;
    place-items: center;
    perspective: 1800px;
}

.envelope {
    position: absolute;
    inset: auto 0 96px;
    width: min(650px, 100%);
    height: 470px;
    margin: 0 auto;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--invite-aubergine);
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform .32s ease, opacity .28s ease;
}

.envelope:hover .envelope__seal,
.envelope:focus-visible .envelope__seal {
    transform: translate(-50%, -50%) scale(1.06);
}

.envelope:hover .envelope__paper-preview {
    transform: translateX(-50%) translateY(-8px);
}

.envelope__shadow {
    position: absolute;
    left: 7%;
    right: 7%;
    bottom: 44px;
    height: 42px;
    border-radius: 50%;
    background: rgba(45, 19, 36, .18);
    filter: blur(18px);
}

.envelope__back,
.envelope__front,
.envelope__flap,
.envelope__paper-preview {
    position: absolute;
    left: 50%;
    width: 88%;
    transform: translateX(-50%);
}

.envelope__back {
    top: 92px;
    height: 290px;
    border: 1px solid rgba(198, 155, 74, .55);
    border-radius: 8px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .55), rgba(234, 216, 170, .34)),
        var(--invite-champagne);
    box-shadow: var(--invite-shadow);
}

.envelope__paper-preview {
    top: 38px;
    z-index: 2;
    width: 64%;
    height: 236px;
    border: 1px solid rgba(198, 155, 74, .45);
    border-radius: 8px;
    display: grid;
    place-items: start center;
    padding-top: 42px;
    background:
        linear-gradient(90deg, transparent 0 31px, rgba(198, 155, 74, .12) 31px 32px, transparent 32px),
        linear-gradient(180deg, var(--invite-paper), #fbf2e1);
    color: var(--invite-mulberry);
    font-family: var(--invite-script);
    font-size: 3.2rem;
    line-height: 1;
    box-shadow: 0 18px 35px rgba(45, 19, 36, .12);
    transition: transform .32s ease;
}

.envelope__paper-preview span {
    opacity: 0;
}

.envelope__front {
    top: 92px;
    z-index: 3;
    height: 290px;
    border: 1px solid rgba(198, 155, 74, .62);
    border-radius: 8px;
    background:
        linear-gradient(32deg, rgba(122, 47, 83, .12) 0 49.7%, transparent 50%),
        linear-gradient(-32deg, rgba(154, 170, 136, .18) 0 49.7%, transparent 50%),
        linear-gradient(180deg, rgba(255, 250, 242, .78), rgba(234, 216, 170, .86));
    clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}

.envelope__front::after {
    content: "";
    position: absolute;
    inset: 16px;
    border: 1px solid rgba(157, 116, 48, .36);
    border-radius: 8px;
    clip-path: polygon(0 4%, 50% 54%, 100% 4%, 100% 100%, 0 100%);
}

.envelope__flap {
    top: 92px;
    z-index: 5;
    height: 178px;
    border-radius: 8px 8px 0 0;
    background:
        linear-gradient(180deg, rgba(255, 253, 248, .72), rgba(234, 216, 170, .94)),
        var(--invite-champagne);
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: 50% 0;
    transition: transform .72s cubic-bezier(.2, .76, .18, 1), z-index .01s linear .38s;
}

.envelope__seal {
    position: absolute;
    left: 50%;
    top: 234px;
    z-index: 6;
    width: 84px;
    height: 84px;
    display: grid;
    place-items: center;
    color: var(--invite-mulberry);
    transform: translate(-50%, -50%);
    transition: transform .24s ease, opacity .24s ease;
}

.envelope__seal svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 18px rgba(45, 19, 36, .2));
}

.envelope__copy {
    position: absolute;
    left: 50%;
    bottom: -54px;
    width: min(520px, 92%);
    min-height: 76px;
    transform: translateX(-50%);
    display: grid;
    gap: 8px;
    place-items: center;
    text-align: center;
}

.envelope__title {
    display: block;
    color: var(--invite-aubergine);
    font-family: var(--invite-script);
    font-size: 3.45rem;
    line-height: .95;
}

.envelope__hint {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid rgba(198, 155, 74, .48);
    border-radius: 999px;
    background: rgba(255, 253, 248, .78);
    color: var(--invite-mulberry);
    font-family: var(--invite-sans);
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.35;
    box-shadow: 0 10px 26px rgba(45, 19, 36, .08);
}

.invitation-card {
    position: relative;
    z-index: 8;
    width: min(700px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 58px 62px 52px;
    border: 1px solid rgba(198, 155, 74, .55);
    border-radius: 8px;
    background:
        linear-gradient(90deg, transparent 0 38px, rgba(198, 155, 74, .11) 38px 39px, transparent 39px),
        linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 250, 242, .95)),
        var(--invite-paper);
    box-shadow: var(--invite-shadow);
    color: var(--invite-aubergine);
    text-align: center;
}

.invite-shell.is-ready .invitation-card {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transform: translateY(120px) rotateX(-18deg) scale(.78);
    transition:
        opacity .34s ease .42s,
        transform .78s cubic-bezier(.19, .9, .2, 1) .34s;
}

.invite-shell.is-ready.is-open .invitation-card {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) rotateX(0) scale(1);
}

.invitation-card::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(198, 155, 74, .38);
    border-radius: 8px;
    pointer-events: none;
}

.invitation-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(198, 155, 74, .025) 0 1px, transparent 1px 7px),
        repeating-linear-gradient(90deg, rgba(122, 47, 83, .018) 0 1px, transparent 1px 9px);
    mix-blend-mode: multiply;
}

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

.invitation-card__border {
    position: absolute;
    inset: 22px;
    border: 1px solid rgba(198, 155, 74, .32);
    border-radius: 8px;
    pointer-events: none;
}

.invitation-card__corner {
    position: absolute;
    z-index: 1;
    width: 74px;
    height: 74px;
    color: var(--invite-gold);
    opacity: .72;
}

.invitation-card__corner::before,
.invitation-card__corner::after {
    content: "";
    position: absolute;
    background: currentColor;
}

.invitation-card__corner::before {
    width: 58px;
    height: 1px;
}

.invitation-card__corner::after {
    width: 1px;
    height: 58px;
}

.invitation-card__corner--top-left {
    left: 30px;
    top: 30px;
}

.invitation-card__corner--top-left::before,
.invitation-card__corner--top-left::after {
    left: 0;
    top: 0;
}

.invitation-card__corner--top-right {
    right: 30px;
    top: 30px;
}

.invitation-card__corner--top-right::before,
.invitation-card__corner--top-right::after {
    right: 0;
    top: 0;
}

.invitation-card__corner--bottom-left {
    left: 30px;
    bottom: 30px;
}

.invitation-card__corner--bottom-left::before,
.invitation-card__corner--bottom-left::after {
    left: 0;
    bottom: 0;
}

.invitation-card__corner--bottom-right {
    right: 30px;
    bottom: 30px;
}

.invitation-card__corner--bottom-right::before,
.invitation-card__corner--bottom-right::after {
    right: 0;
    bottom: 0;
}

.invitation-card__kicker {
    margin: 0 0 24px;
    color: var(--invite-gold-deep);
    font-family: var(--invite-sans);
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.45;
    text-transform: uppercase;
}

.invitation-card h1 {
    margin: 0 0 18px;
    padding-top: 18px;
    color: var(--invite-mulberry);
    font-family: var(--invite-script);
    font-size: 4.8rem;
    font-weight: 400;
    line-height: .95;
    overflow-wrap: normal;
}

.invitation-card p,
.invitation-card blockquote {
    margin: 0;
}

.invitation-card__lead,
.invitation-card__event,
.invitation-card__presence,
.invitation-card__gift,
.invitation-card__rsvp {
    font-family: var(--invite-serif);
    font-size: 1.55rem;
    line-height: 1.46;
}

.invitation-card__lead {
    max-width: 530px;
    margin: 0 auto;
}

.invitation-card__event {
    display: grid;
    gap: 4px;
    margin: 18px auto 24px;
    color: var(--invite-aubergine);
    font-size: 1.78rem;
    font-weight: 600;
}

.invitation-card blockquote {
    max-width: 520px;
    margin: 0 auto;
    color: var(--invite-mulberry);
    font-family: var(--invite-serif);
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.45;
}

.invitation-card__presence {
    margin-top: 4px;
    font-weight: 600;
}

.invitation-card__gift {
    max-width: 540px;
    margin: 12px auto 0;
}

.invitation-card__gift a {
    display: inline-block;
    color: var(--invite-mulberry);
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--invite-champagne);
    text-underline-offset: 5px;
}

.invitation-card__rsvp {
    display: grid;
    gap: 16px;
    place-items: center;
}

.heart-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    width: min(330px, 100%);
    margin: 22px auto;
    color: var(--invite-mulberry);
}

.heart-divider--small {
    width: min(260px, 100%);
    margin: 18px auto;
}

.heart-divider span {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(198, 155, 74, .8), transparent);
}

.heart-divider__icon {
    width: 35px;
    height: 32px;
    color: var(--invite-mulberry);
    filter: drop-shadow(0 5px 10px rgba(122, 47, 83, .14));
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    max-width: 100%;
    padding: 12px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--invite-whatsapp), #245b49);
    color: #fffdf8;
    font-family: var(--invite-sans);
    font-size: .94rem;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(31, 122, 90, .25);
    transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}

.whatsapp-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(31, 122, 90, .32);
}

.whatsapp-button svg {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

.whatsapp-button strong {
    min-width: 0;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.whatsapp-button span {
    min-width: 0;
}

.invite-shell.is-open .envelope {
    pointer-events: none;
    opacity: 0;
    transform: translateY(150px) rotateX(10deg) scale(.82);
    transition: transform .5s ease .56s, opacity .32s ease .72s;
}

.invite-shell.is-open .envelope__flap {
    z-index: 1;
    transform: translateX(-50%) rotateX(168deg);
}

.invite-shell.is-open .envelope__paper-preview {
    transform: translateX(-50%) translateY(-190px) scale(.96);
    transition: transform .7s cubic-bezier(.2, .76, .18, 1) .16s, opacity .22s ease .52s;
    opacity: 0;
}

.invite-shell.is-open .envelope__seal {
    opacity: 0;
    transform: translate(-50%, -60%) scale(.72);
}

.invite-shell.is-open .envelope__copy {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    transition: transform .28s ease, opacity .2s ease;
}

@media (max-width: 1080px) {
    .ornament--glasses,
    .ornament--music,
    .ornament--candles {
        opacity: .22;
    }

    .ornament--flourish {
        display: none;
    }
}

@media (max-width: 760px) {
    .invite-stage {
        padding: 28px 16px;
        place-items: start center;
    }

    body.admin-bar .invite-stage {
        min-height: calc(100svh - 46px);
    }

    .invite-shell {
        min-height: 640px;
        align-items: start;
        padding-top: 10px;
        width: 100%;
    }

    .envelope {
        top: 54px;
        bottom: auto;
        width: min(390px, 100%);
        height: 420px;
    }

    .envelope__back,
    .envelope__front {
        top: 96px;
        height: 214px;
    }

    .envelope__flap {
        top: 96px;
        height: 132px;
    }

    .envelope__paper-preview {
        top: 58px;
        height: 168px;
        padding-top: 32px;
        font-size: 2.25rem;
    }

    .envelope__seal {
        top: 198px;
        width: 66px;
        height: 66px;
    }

    .envelope__copy {
        bottom: 0;
        width: min(440px, 92%);
    }

    .envelope__title {
        font-size: 2.55rem;
    }

    .envelope__hint {
        font-size: .84rem;
        padding-inline: 16px;
    }

    .invitation-card {
        width: 100%;
        max-width: 560px;
        padding: 42px 24px 38px;
        overflow: hidden;
    }

    .invitation-card__border {
        inset: 14px;
    }

    .invitation-card__corner {
        display: none;
    }

    .invitation-card h1 {
        font-size: 2.75rem;
        padding-top: 6px;
    }

    .invitation-card__lead,
    .invitation-card__event,
    .invitation-card__presence,
    .invitation-card__gift,
    .invitation-card__rsvp {
        font-size: 1.26rem;
    }

    .invitation-card__event {
        font-size: 1.38rem;
    }

    .invitation-card blockquote {
        font-size: 1.22rem;
    }

    .heart-divider {
        gap: 12px;
        margin-block: 18px;
    }

    .ornament--glasses {
        left: -28px;
        top: 72px;
        width: 96px;
    }

    .ornament--music {
        right: -32px;
        top: 88px;
        width: 92px;
    }

    .ornament--candles {
        left: auto;
        right: -26px;
        bottom: 48px;
        width: 88px;
    }

    .whatsapp-button {
        width: 100%;
        flex-wrap: wrap;
        border-radius: 8px;
        padding: 13px 16px;
        white-space: normal;
    }
}

@media (max-width: 420px) {
    .invite-stage {
        padding-inline: 12px;
    }

    .invite-shell {
        min-height: 600px;
    }

    .envelope {
        width: min(340px, 100%);
    }

    .envelope__title {
        font-size: 2.24rem;
    }

    .envelope__paper-preview {
        font-size: 2rem;
    }

    .invitation-card {
        width: 100%;
        padding: 38px 18px 34px;
    }

    .invitation-card h1 {
        font-size: 2.45rem;
        padding-top: 4px;
    }

    .invitation-card__lead,
    .invitation-card__event,
    .invitation-card__presence,
    .invitation-card__gift,
    .invitation-card__rsvp {
        font-size: 1.16rem;
    }

    .invitation-card__event {
        font-size: 1.25rem;
    }

    .invitation-card blockquote {
        font-size: 1.12rem;
    }
}

@media (max-width: 520px) {
    .invite-stage {
        justify-items: start;
    }

    .invite-shell {
        width: min(360px, 100%);
        max-width: 360px;
        justify-self: start;
    }

    .invitation-card h1 {
        font-size: 2.38rem;
        padding-top: 4px;
    }

    .invitation-card__lead,
    .invitation-card__event,
    .invitation-card__presence,
    .invitation-card__gift,
    .invitation-card__rsvp {
        font-size: 1.12rem;
    }

    .invitation-card__event {
        font-size: 1.2rem;
    }

    .invitation-card blockquote {
        font-size: 1.08rem;
    }

    .whatsapp-button {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        justify-items: center;
        font-size: .86rem;
    }

    .whatsapp-button strong {
        grid-column: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .001ms !important;
        transition-delay: 0s !important;
    }

    .invite-shell.is-ready .invitation-card,
    .invite-shell.is-ready.is-open .invitation-card,
    .invite-shell.is-open .envelope {
        transform: none;
    }
}
