/* =========================================================
   RESET
   ========================================================= */

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


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --forest-950: #06120c;
    --forest-900: #0b1b12;
    --forest-850: #112319;
    --forest-800: #192d21;
    --forest-700: #2b4333;

    --ivory-50: #fdfbf7;
    --ivory-100: #f8f4ec;
    --ivory-200: #efe8dc;
    --ivory-300: #e3dacc;

    --gold-300: #e3cca4;
    --gold-400: #ceb184;
    --gold-500: #ad8e63;
    --gold-600: #8d704d;

    --text: #252a24;
    --muted: #73776f;

    --white: #ffffff;

    --dark-line: rgba(255, 255, 255, .13);
    --light-line: rgba(42, 49, 43, .13);

    --shadow-soft:
        0 14px 45px rgba(8, 18, 12, .09);

    --shadow-card:
        0 28px 75px rgba(11, 20, 14, .13);

    --shadow-large:
        0 38px 110px rgba(0, 0, 0, .30);

    --ease-envelope:
        cubic-bezier(.22, .78, .22, 1);
}


/* =========================================================
   GLOBAL
   ========================================================= */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: hidden;

    background: var(--ivory-100);
    color: var(--text);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

::selection {
    background: var(--gold-400);
    color: var(--forest-950);
}

.mem-container {
    width: min(
        1180px,
        calc(100% - 56px)
    );

    margin: 0 auto;
}


/* =========================================================
   HERO
   ========================================================= */

.mem-envelope-hero {
    position: relative;

    min-height: 100svh;
    overflow: hidden;

    background: var(--forest-950);
    color: var(--white);
}


/* =========================================================
   HERO BACKGROUND
   ========================================================= */

.mem-envelope-background {
    position: absolute;
    inset: 0;

    background:
        url("../images/hero.jpg")
        center center / cover
        no-repeat;

    transform: scale(1.02);
}

.mem-envelope-background::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(3, 15, 9, .79) 0%,
            rgba(6, 25, 16, .60) 42%,
            rgba(5, 24, 16, .46) 72%,
            rgba(3, 14, 9, .72) 100%
        );
}

.mem-envelope-overlay {
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at 50% 48%,
            rgba(104, 140, 112, .07),
            transparent 45%
        ),
        linear-gradient(
            180deg,
            rgba(0, 0, 0, .06),
            rgba(0, 0, 0, .26)
        );
}

.mem-envelope-inner {
    position: relative;
    z-index: 2;

    min-height: 100svh;
}


/* =========================================================
   LANGUAGE
   ========================================================= */

.mem-envelope-languages {
    position: absolute;

    z-index: 120;

    top: 32px;
    right: 0;

    display: flex;
    align-items: center;

    gap: 9px;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: .13em;
}

.mem-envelope-languages a {
    padding: 5px 1px;

    color: rgba(255, 255, 255, .43);

    text-decoration: none;

    transition:
        color .2s ease,
        transform .2s ease;
}

.mem-envelope-languages a:hover {
    color: var(--white);

    transform:
        translateY(-1px);
}

.mem-envelope-languages a.active {
    color: var(--gold-300);
}

.mem-envelope-languages span {
    color: rgba(255, 255, 255, .17);
}


/* =========================================================
   HERO BRAND
   ========================================================= */

.mem-envelope-brand {
    position: absolute;

    z-index: 100;

    /*
       Было 34px.
       Теперь логотип расположен ниже.
    */
    top: 64px;
    left: 50%;

    transform:
        translateX(-50%);

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 9px;

    text-align: center;
}

.mem-envelope-brand img {
    width: 145px;
    height: auto;
}

.mem-envelope-brand span {
    color: var(--gold-300);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 9px;

    letter-spacing: .24em;

    text-transform: uppercase;
}


/* =========================================================
   ENVELOPE STAGE
   ========================================================= */

.mem-envelope-stage {
    min-height: 100svh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding:
        125px
        0
        40px;
}


/* =========================================================
   ENVELOPE WRAPPER
   ========================================================= */

.mem-envelope {
    /* высота сцены */
    --stage-h: 560px;

    /* ширина конверта */
    --env-w: 520px;

    /* низ конверта */
    --env-bottom: 40px;

    /* задняя стенка */
    --back-h: 320px;

    /* передняя стенка */
    --front-h: 200px;

    /* верхний клапан */
    --flap-h: 190px;

    /* карточка */
    --card-w: 340px;
    --card-h: 430px;

    /* карточка после открытия */
    --card-open-gap: 10px;


    position: relative;

    width:
        min(
            var(--env-w),
            90vw
        );

    height: var(--stage-h);

    margin: 0 auto;

    perspective: 1700px;

    /*
       Поднимаем весь конверт вверх.
    */
    transform:
        translateY(-35px);
}


/* =========================================================
   ENVELOPE BACK
   ========================================================= */

.mem-envelope-back {
    position: absolute;

    z-index: 2;

    left: 0;
    bottom: var(--env-bottom);

    width: 100%;
    height: var(--back-h);

    border:
        1px solid
        rgba(163, 137, 96, .13);

    background:
        linear-gradient(
            145deg,
            #f4eee3 0%,
            #fffdf8 50%,
            #e6ded1 100%
        );

    box-shadow:
        0
        30px
        78px
        rgba(0, 0, 0, .22);
}


/* =========================================================
   INVITATION CARD
   ========================================================= */

.mem-invitation-card {
    position: absolute;

    z-index: 10;

    left: 50%;
    bottom: var(--env-bottom);

    width:
        min(
            var(--card-w),
            86%
        );

    min-height: var(--card-h);

    transform:
        translateX(-50%);

    padding:
        28px
        27px;

    overflow: hidden;

    border:
        1px solid
        rgba(173, 145, 105, .18);

    background:
        linear-gradient(
            180deg,
            #fdf9f0 0%,
            #f0e7d9 100%
        );

    color: var(--text);

    text-align: center;

    clip-path:
        inset(
            calc(100% - var(--back-h))
            0
            0
            0
        );

    transition:
        transform .95s var(--ease-envelope) .3s,
        clip-path .5s ease .3s,
        filter .5s ease .5s;
}

.mem-invitation-card::before {
    content: "";

    position: absolute;

    inset: 10px;

    border:
        1px solid
        rgba(173, 145, 105, .10);

    pointer-events: none;
}

.mem-invitation-card::after {
    content: "";

    position: absolute;

    inset: 0;

    opacity: .08;

    pointer-events: none;

    background:
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 3px,
            rgba(97, 80, 56, .08) 4px
        );
}

.mem-invitation-card > * {
    position: relative;

    z-index: 2;
}


/* =========================================================
   CARD OPEN
   ========================================================= */

.mem-envelope.is-open
.mem-invitation-card {
    z-index: 60;

    transform:
        translateX(-50%)
        translateY(
            calc(
                -1 * (
                    var(--stage-h)
                    - var(--env-bottom)
                    - var(--card-h)
                    - var(--card-open-gap)
                )
            )
        );

    clip-path:
        inset(0 0 0 0);

    filter:
        drop-shadow(
            0
            28px
            48px
            rgba(0, 0, 0, .34)
        );
}


/* =========================================================
   CARD LOGO
   ========================================================= */

.mem-card-logo {
    width: 142px;

    max-width: 70%;

    height: auto;

    margin:
        0
        auto
        16px;
}


/* =========================================================
   CARD LABEL
   ========================================================= */

.mem-card-label {
    margin-bottom: 10px;

    color: var(--gold-600);

    font-size: 7px;
    font-weight: 700;

    letter-spacing: .24em;

    text-transform: uppercase;
}


/* =========================================================
   CARD TITLE
   ========================================================= */

.mem-invitation-card h1 {
    margin: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 26px;
    font-weight: 400;

    line-height: 1.05;

    letter-spacing: -.035em;
}

.mem-invitation-card h1 em {
    display: block;

    margin-top: 4px;

    color: var(--gold-500);

    font-weight: 400;
}


/* =========================================================
   DIVIDER
   ========================================================= */

.mem-card-divider {
    width: 38px;
    height: 1px;

    margin:
        15px
        auto;

    background: var(--gold-500);
}


/* =========================================================
   DATE
   ========================================================= */

.mem-card-date {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 10px;
}

.mem-card-date span {
    color: #62665f;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 13px;
}

.mem-card-date strong {
    padding-left: 10px;

    border-left:
        1px solid
        #bbb2a5;

    color: #222821;

    font-size: 12px;
}


/* =========================================================
   LOCATION
   ========================================================= */

.mem-card-location {
    margin-top: 13px;
}

.mem-card-location strong {
    display: block;

    margin-bottom: 5px;

    color: #273027;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: .13em;

    text-transform: uppercase;
}

.mem-card-location span {
    display: block;

    max-width: 275px;

    margin: 0 auto;

    color: #74786f;

    font-size: 8px;

    line-height: 1.5;
}


/* =========================================================
   REGISTER BUTTON
   ========================================================= */

.mem-card-button {
    display: inline-flex;

    align-items: center;
    justify-content: space-between;

    gap: 25px;

    min-width: 180px;

    margin-top: 17px;

    padding:
        12px
        15px;

    border:
        1px solid
        var(--gold-500);

    background: var(--forest-850);

    color: var(--white);

    text-decoration: none;

    font-size: 9px;
    font-weight: 700;

    opacity: 0;

    transform:
        translateY(8px);

    pointer-events: none;

    transition:
        opacity .4s ease .95s,
        transform .4s ease .95s,
        background .2s ease,
        color .2s ease;
}

.mem-envelope.is-open
.mem-card-button {
    opacity: 1;

    transform:
        translateY(0);

    pointer-events: auto;
}

.mem-card-button:hover {
    background: var(--gold-500);

    color: var(--forest-950);
}

.mem-card-button-arrow {
    color: var(--gold-300);
}


/* =========================================================
   ENVELOPE FRONT
   ========================================================= */

.mem-envelope-front {
    position: absolute;

    z-index: 30;

    left: 0;
    bottom: var(--env-bottom);

    width: 100%;
    height: var(--front-h);

    overflow: hidden;

    border:
        1px solid
        rgba(160, 134, 95, .11);

    background:
        linear-gradient(
            180deg,
            #f7f1e6,
            #eae2d5
        );

    box-shadow:
        0 -6px 18px rgba(0, 0, 0, .05),
        0 14px 28px rgba(0, 0, 0, .07);
}


/* LEFT FOLD */

.mem-envelope-front::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            120deg,
            #fdfaf3,
            #f1eade
        );

    clip-path:
        polygon(
            0 0,
            50% 50%,
            0 100%
        );
}


/* RIGHT FOLD */

.mem-envelope-front::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            240deg,
            #f6efe3,
            #e7dfd1
        );

    clip-path:
        polygon(
            100% 0,
            50% 50%,
            100% 100%
        );
}


/* =========================================================
   ENVELOPE FLAP
   ========================================================= */

.mem-envelope-flap {
    position: absolute;

    z-index: 40;

    left: 0;

    bottom:
        calc(
            var(--env-bottom)
            + var(--back-h)
            - var(--flap-h)
        );

    width: 100%;
    height: var(--flap-h);

    transform:
        rotateX(0deg);

    transform-origin:
        center top;

    clip-path:
        polygon(
            0 0,
            100% 0,
            50% 100%
        );

    background:
        linear-gradient(
            180deg,
            #fffdf8 0%,
            #d7e1ec00 100%
        );

    backface-visibility: hidden;

    transition:
        transform .82s cubic-bezier(.25, .72, .2, 1),
        z-index 0s linear .42s;
}

.mem-envelope-flap::after {
    content: "";

    position: absolute;

    top: 0;
    left: 4%;

    width: 92%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(173, 145, 105, .52),
            transparent
        );
}

.mem-envelope.is-open
.mem-envelope-flap {
    z-index: 1;

    transform:
        rotateX(180deg);
}


/* =========================================================
   OPEN INVITATION BUTTON
   ========================================================= */

.mem-envelope-open {
    position: absolute;

    z-index: 80;

    left: 50%;

    /*
       Сам BR остаётся на хорошем месте.
       Благодаря стрелке текст оказывается выше.
    */
    bottom:
        calc(
            var(--env-bottom)
            + 28px
        );

    width: 175px;

    transform:
        translateX(-50%);

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 4px;

    padding: 0;

    border: 0;

    background: transparent;

    transition:
        opacity .3s ease,
        transform .3s ease;
}

.mem-envelope-open:focus-visible {
    outline:
        1px solid
        rgba(206, 177, 132, .8);

    outline-offset: 8px;
}


/* =========================================================
   OPEN LABEL
   ========================================================= */

.mem-open-label {
    position: relative;

    display: block;

    margin-bottom: 2px;

    color: #51544e;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 15px;

    line-height: 1.2;

    text-align: center;

    white-space: nowrap;

    transition:
        color .2s ease;
}


/* =========================================================
   ARROW TO BR
   ========================================================= */

.mem-open-arrow {
    position: relative;

    display: block;

    flex: 0 0 auto;

    width: 1px;
    height: 32px;

    margin:
        0
        auto
        3px;

    background:
        linear-gradient(
            180deg,
            rgba(145, 98, 42, .10) 0%,
            rgba(145, 98, 42, .50) 35%,
            rgba(145, 98, 42, .98) 100%
        );

    pointer-events: none;

    animation:
        memOpenArrow
        1.45s
        ease-in-out
        infinite;
}


/* arrow point */

.mem-open-arrow::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -1px;

    width: 8px;
    height: 8px;

    border-right:
        1.5px solid
        #98652b;

    border-bottom:
        1.5px solid
        #98652b;

    transform:
        translateX(-50%)
        rotate(45deg);
}


/* top dot */

.mem-open-arrow::before {
    content: "";

    position: absolute;

    top: -2px;
    left: 50%;

    width: 3px;
    height: 3px;

    transform:
        translateX(-50%);

    border-radius: 50%;

    background:
        rgba(152, 101, 43, .48);
}


/* =========================================================
   ARROW ANIMATION
   ========================================================= */

@keyframes memOpenArrow {

    0%,
    100% {
        opacity: .55;

        transform:
            translateY(0);
    }

    50% {
        opacity: 1;

        transform:
            translateY(4px);
    }
}


/* =========================================================
   WAX SEAL
   ========================================================= */

.mem-wax-seal {
    position: relative;

    width: 62px;
    height: 62px;

    flex: 0 0 auto;

    display: grid;

    place-items: center;

    margin-top: 1px;

    border-radius: 50%;

    border:
        2px solid
        rgba(101, 62, 21, .65);

    background:
        radial-gradient(
            circle at 34% 27%,
            #f1cf89 0%,
            #c49142 35%,
            #996428 64%,
            #684015 100%
        );

    box-shadow:
        inset 3px 4px 6px rgba(255, 232, 177, .35),
        inset -4px -5px 7px rgba(67, 37, 10, .32),
        0 8px 18px rgba(0, 0, 0, .24);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.mem-wax-seal::before {
    content: "";

    position: absolute;

    inset: -3px;

    z-index: -1;

    border-radius:
        48% 52% 45% 55% /
        53% 45% 55% 47%;

    background: #986529;
}

.mem-wax-ring {
    position: absolute;

    inset: 8px;

    border:
        1px solid
        rgba(255, 226, 166, .38);

    border-radius: 50%;
}

.mem-wax-monogram {
    position: relative;

    z-index: 2;

    color:
        rgba(76, 45, 15, .88);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 17px;

    letter-spacing: -.04em;

    text-shadow:
        0
        1px
        rgba(255, 233, 189, .25);
}


/* =========================================================
   OPEN HOVER
   ========================================================= */

.mem-envelope-open:hover
.mem-wax-seal {
    transform:
        scale(1.08)
        rotate(-3deg);

    box-shadow:
        inset 3px 4px 6px rgba(255, 232, 177, .35),
        inset -4px -5px 7px rgba(67, 37, 10, .32),
        0 14px 28px rgba(0, 0, 0, .31);
}

.mem-envelope-open:hover
.mem-open-label {
    color: var(--gold-600);
}

.mem-envelope-open:hover
.mem-open-arrow {
    background:
        linear-gradient(
            180deg,
            rgba(145, 98, 42, .25),
            rgba(145, 98, 42, 1)
        );
}


/* =========================================================
   AFTER OPEN
   ========================================================= */

.mem-envelope.is-open
.mem-envelope-open {
    opacity: 0;

    transform:
        translateX(-50%)
        scale(.82);

    pointer-events: none;
}


/* =========================================================
   SCROLL INDICATOR
   ========================================================= */

.mem-envelope-scroll {
    position: absolute;

    z-index: 5;

    left: 50%;
    bottom: 17px;

    width: 23px;
    height: 38px;

    transform:
        translateX(-50%);

    border:
        1px solid
        rgba(255, 255, 255, .23);

    border-radius: 20px;
}

.mem-envelope-scroll span {
    position: absolute;

    top: 7px;
    left: 50%;

    width: 3px;
    height: 6px;

    transform:
        translateX(-50%);

    border-radius: 5px;

    background: var(--gold-300);

    animation:
        memScroll
        1.7s
        infinite;
}

@keyframes memScroll {

    0% {
        opacity: 0;

        transform:
            translate(-50%, 0);
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;

        transform:
            translate(-50%, 11px);
    }
}


/* =========================================================
   COMMON SECTION DESIGN
   ========================================================= */

.mem-section-label {
    display: inline-flex;

    align-items: center;

    gap: 14px;

    color: #7e7a71;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: .23em;

    text-transform: uppercase;
}

.mem-section-label::before {
    content: "";

    width: 30px;
    height: 1px;

    background: var(--gold-500);
}

.mem-section-label.light {
    color:
        rgba(255, 255, 255, .50);
}

.mem-section-label.light::before {
    background: var(--gold-300);
}

.mem-section-number {
    color: var(--gold-500);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 12px;
}

.mem-section-number.light {
    color: var(--gold-300);
}


/* =========================================================
   ABOUT
   ========================================================= */

.mem-about {
    position: relative;

    overflow: hidden;

    padding:
        120px
        0
        128px;

    background:
        linear-gradient(
            180deg,
            #fcfaf5,
            #f1ebe1
        );
}

.mem-about::before {
    content: "";

    position: absolute;

    top: 0;
    left: 50%;

    width: 1px;
    height: 58px;

    background:
        linear-gradient(
            var(--gold-500),
            transparent
        );
}

.mem-about::after {
    content: "BR";

    position: absolute;

    right: -30px;
    bottom: -90px;

    color:
        rgba(29, 42, 32, .024);

    font-family:
        Georgia,
        serif;

    font-size: 300px;

    line-height: 1;
}

.mem-about > .mem-container {
    position: relative;

    z-index: 2;
}

.mem-about .mem-section-number {
    display: block;

    margin-bottom: 45px;

    text-align: right;
}

.mem-about-grid {
    display: grid;

    grid-template-columns:
        1.05fr
        .78fr;

    gap: 115px;

    align-items: start;
}

.mem-about h2,
.mem-rsvp h2 {
    margin:
        22px
        0
        0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            43px,
            4.6vw,
            69px
        );

    font-weight: 400;

    line-height: 1.03;

    letter-spacing: -.038em;
}

.mem-about-text {
    padding:
        8px
        0
        8px
        31px;

    border-left:
        1px solid
        rgba(173, 145, 105, .30);
}

.mem-about-text p {
    margin:
        0
        0
        22px;

    color: var(--muted);

    font-size: 15px;

    line-height: 1.82;
}

.mem-about-text .lead {
    color: var(--text);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 20px;

    line-height: 1.63;
}


/* =========================================================
   AGENDA
   ========================================================= */

.mem-agenda {
    position: relative;

    overflow: hidden;

    padding:
        114px
        0
        128px;

    background:
        radial-gradient(
            circle at 90% 14%,
            rgba(85, 112, 90, .15),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            #18231b 0%,
            #283329 54%,
            #131d16 100%
        );

    color: var(--white);
}

.mem-agenda::after {
    content: "BR";

    position: absolute;

    right: 2%;
    bottom: -75px;

    color:
        rgba(255, 255, 255, .017);

    font-family:
        Georgia,
        serif;

    font-size: 350px;
}

.mem-section-top {
    position: relative;

    z-index: 2;

    display: flex;

    justify-content: space-between;
    align-items: flex-start;
}

.mem-agenda h2 {
    margin:
        22px
        0
        0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size:
        clamp(
            44px,
            4.8vw,
            70px
        );

    font-weight: 400;

    line-height: 1.02;

    letter-spacing: -.035em;
}

.mem-agenda-list {
    position: relative;

    z-index: 2;

    margin-top: 64px;

    border-top:
        1px solid
        var(--dark-line);
}

.mem-agenda-item {
    position: relative;

    display: grid;

    grid-template-columns:
        65px
        150px
        1fr;

    gap: 28px;

    align-items: center;

    min-height: 112px;

    padding:
        0
        22px;

    border-bottom:
        1px solid
        var(--dark-line);

    transition:
        background .25s ease,
        padding .25s ease;
}

.mem-agenda-item:hover {
    padding-left: 34px;

    background:
        rgba(255, 255, 255, .033);
}

.mem-agenda-item .number {
    color:
        rgba(255, 255, 255, .26);

    font-size: 9px;
    font-weight: 700;
}

.mem-agenda-item time {
    color: var(--gold-300);

    font-family:
        Georgia,
        serif;

    font-size: 29px;
}

.mem-agenda-item strong {
    color:
        rgba(255, 255, 255, .94);

    font-family:
        Georgia,
        serif;

    font-size:
        clamp(
            20px,
            2vw,
            26px
        );

    font-weight: 400;

    line-height: 1.3;
}


/* =========================================================
   RSVP
   ========================================================= */

.mem-rsvp {
    position: relative;

    padding:
        120px
        0
        132px;

    background:
        linear-gradient(
            180deg,
            #f6f2e9,
            #eae4d8
        );
}

.mem-rsvp .mem-section-number {
    display: block;

    margin-bottom: 45px;

    text-align: right;
}

.mem-rsvp-grid {
    display: grid;

    grid-template-columns:
        .78fr
        1.22fr;

    gap: 90px;

    align-items: start;
}

.mem-rsvp-info {
    position: sticky;

    top: 42px;
}

.mem-rsvp h2 {
    max-width: 520px;
}

.mem-rsvp h2 em {
    display: block;

    color: var(--gold-500);

    font-weight: 400;
}

.mem-rsvp-info > p {
    margin-top: 28px;

    color: var(--muted);

    font-size: 15px;

    line-height: 1.78;
}


/* =========================================================
   DETAILS
   ========================================================= */

.mem-details {
    margin-top: 42px;

    border-top:
        1px solid
        var(--light-line);
}

.mem-details > div {
    display: grid;

    grid-template-columns:
        92px
        1fr;

    gap: 18px;

    padding:
        17px
        0;

    border-bottom:
        1px solid
        var(--light-line);
}

.mem-details small {
    color: #88877f;

    font-size: 8px;
    font-weight: 700;

    letter-spacing: .11em;

    text-transform: uppercase;
}

.mem-details strong {
    color: #30332e;

    font-size: 13px;

    line-height: 1.5;
}


/* =========================================================
   FORM CARD
   ========================================================= */

.mem-form-card {
    position: relative;

    padding:
        52px
        48px;

    overflow: hidden;

    border-top:
        3px solid
        var(--gold-500);

    background:
        rgba(253, 250, 244, .96);

    box-shadow: var(--shadow-card);
}

.mem-form-card::before {
    content: "";

    position: absolute;

    inset: 13px;

    border:
        1px solid
        rgba(173, 145, 105, .17);

    pointer-events: none;
}

.mem-form-card::after {
    content: "BR";

    position: absolute;

    right: -28px;
    bottom: -35px;

    color:
        rgba(30, 43, 33, .028);

    font-family:
        Georgia,
        serif;

    font-size: 145px;
}

.mem-form-card form,
.mem-important,
.mem-errors {
    position: relative;

    z-index: 2;
}


/* =========================================================
   FORM
   ========================================================= */

.mem-form-grid {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap:
        30px
        27px;
}

.mem-form-grid label.full {
    grid-column:
        1 / -1;
}

.mem-form-grid label span {
    display: block;

    margin-bottom: 9px;

    color: #555a52;

    font-size: 9px;
    font-weight: 700;
}

.mem-form-grid input,
.mem-form-grid textarea {
    width: 100%;

    padding:
        13px
        0;

    border: 0;

    border-bottom:
        1px solid
        #aaa59b;

    background: transparent;

    color: var(--text);

    outline: none;

    font-size: 14px;

    transition:
        border-color .2s ease;
}

.mem-form-grid input:focus,
.mem-form-grid textarea:focus {
    border-bottom-color:
        var(--gold-500);
}

.mem-form-grid textarea {
    min-height: 105px;

    resize: vertical;
}


/* =========================================================
   CONSENT
   ========================================================= */

.mem-consent {
    display: flex;

    align-items: flex-start;

    gap: 11px;

    margin-top: 30px;

    color: #696b64;

    font-size: 11px;

    line-height: 1.6;
}

.mem-consent input {
    width: 15px;
    height: 15px;

    accent-color: var(--forest-800);
}


/* =========================================================
   SUBMIT
   ========================================================= */

.mem-submit {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-top: 30px;

    padding:
        19px
        21px;

    border: 0;

    background: var(--forest-850);

    color: var(--white);

    font-size: 11px;
    font-weight: 700;

    transition:
        background .2s ease,
        transform .2s ease;
}

.mem-submit:hover {
    background: var(--forest-700);

    transform:
        translateY(-2px);
}

.mem-submit span:last-child {
    color: var(--gold-300);

    font-size: 17px;
}


/* =========================================================
   IMPORTANT
   ========================================================= */

.mem-important {
    margin-top: 26px;

    padding-top: 22px;

    border-top:
        1px solid
        var(--light-line);
}

.mem-important strong {
    font-size: 9px;

    letter-spacing: .13em;

    text-transform: uppercase;
}

.mem-important p {
    margin:
        8px
        0
        0;

    color: #74766e;

    font-size: 11px;

    line-height: 1.65;
}


/* =========================================================
   ERRORS
   ========================================================= */

.mem-errors {
    margin-bottom: 28px;

    padding:
        15px
        18px;

    border-left:
        3px solid
        #913d36;

    background: #f5e5e1;

    color: #79332e;

    font-size: 12px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.mem-footer {
    position: relative;

    overflow: hidden;

    padding:
        52px
        0;

    background:
        linear-gradient(
            145deg,
            #101a13,
            #07110b
        );

    color: var(--white);
}

.mem-footer-inner {
    display: grid;

    grid-template-columns:
        1fr
        1.2fr
        1fr;

    gap: 35px;

    align-items: center;
}

.mem-footer img {
    width: 185px;
}

.mem-footer-inner > div {
    color: var(--gold-300);

    text-align: center;

    font-family:
        Georgia,
        serif;

    font-size: 14px;
}

.mem-footer small {
    color:
        rgba(255, 255, 255, .38);

    text-align: right;
}


/* =========================================================
   RESULT PAGES
   ========================================================= */

.mem-result {
    position: relative;

    min-height: 100svh;

    display: grid;

    place-items: center;

    padding: 25px;

    overflow: hidden;

    background: var(--forest-950);
}

.mem-result-bg {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            rgba(5, 18, 12, .76),
            rgba(5, 18, 12, .91)
        ),
        url("../images/hero.jpg")
        center / cover
        no-repeat;
}

.mem-result-card {
    position: relative;

    z-index: 2;

    width:
        min(
            650px,
            100%
        );

    padding:
        54px
        55px;

    background:
        rgba(251, 248, 241, .97);

    text-align: center;

    border-top:
        3px solid
        var(--gold-500);

    box-shadow: var(--shadow-large);
}

.mem-result-logo {
    width: 205px;

    margin:
        0
        auto
        27px;
}

.mem-result-icon {
    width: 54px;
    height: 54px;

    display: grid;

    place-items: center;

    margin:
        0
        auto
        24px;

    border:
        1px solid
        var(--gold-500);

    border-radius: 50%;
}

.mem-result-card h1 {
    font-family:
        Georgia,
        serif;

    font-size:
        clamp(
            40px,
            5vw,
            62px
        );

    font-weight: 400;
}

.mem-result-card p {
    line-height: 1.7;
}

.mem-result-card .muted {
    color: var(--muted);
}

.mem-back {
    display: inline-block;

    margin-top: 20px;

    padding-bottom: 5px;

    border-bottom:
        1px solid
        var(--gold-500);

    text-decoration: none;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   LAPTOP / TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .mem-about-grid {
        gap: 65px;
    }

    .mem-rsvp-grid {
        gap: 55px;
    }

}


/* =========================================================
   SMALL TABLET
   ========================================================= */

@media (max-width: 860px) {

    .mem-envelope {
        --stage-h: 510px;

        --env-w: 460px;

        --env-bottom: 34px;

        --back-h: 292px;

        --front-h: 184px;

        --flap-h: 172px;

        --card-w: 318px;

        --card-h: 400px;

        transform:
            translateY(-28px);
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 720px) {

    .mem-container {
        width:
            calc(
                100% - 30px
            );
    }


    /* LANGUAGE */

    .mem-envelope-languages {
        top: 18px;
        right: 0;

        gap: 7px;

        font-size: 8px;
    }


    /* TOP LOGO */

    .mem-envelope-brand {
        top: 42px;
    }

    .mem-envelope-brand img {
        width: 105px;
    }

    .mem-envelope-brand span {
        display: none;
    }


    /* HERO STAGE */

    .mem-envelope-stage {
        padding:
            100px
            0
            28px;
    }


    /* ENVELOPE */

    .mem-envelope {
        --stage-h: 468px;

        --env-w: 400px;

        --env-bottom: 26px;

        --back-h: 266px;

        --front-h: 168px;

        --flap-h: 156px;

        --card-w: 296px;

        --card-h: 366px;

        --card-open-gap: 8px;


        width: 92vw;

        transform:
            translateY(-20px);
    }


    .mem-invitation-card {
        padding:
            0px
            18px;
    }


    .mem-card-logo {
        width: 118px;
    }


    .mem-invitation-card h1 {
        font-size: 22px;
    }


    .mem-card-date {
        flex-direction: column;

        gap: 4px;
    }


    .mem-card-date strong {
        padding-left: 0;

        border-left: 0;
    }


    .mem-card-button {
        min-width: 160px;

        margin-top: 14px;
    }


    /* OPEN */

    .mem-envelope-open {
        bottom:
            calc(
                var(--env-bottom)
                + 22px
            );

        width: 150px;

        gap: 3px;
    }


    .mem-open-label {
        font-size: 13px;
    }


    .mem-open-arrow {
        height: 25px;

        margin-bottom: 2px;
    }


    .mem-wax-seal {
        width: 50px;
        height: 50px;
    }


    .mem-wax-ring {
        inset: 7px;
    }


    .mem-wax-monogram {
        font-size: 14px;
    }


    .mem-envelope-scroll {
        display: none;
    }


    /* ABOUT */

    .mem-about {
        padding:
            75px
            0
            82px;
    }


    .mem-about-grid {
        grid-template-columns: 1fr;

        gap: 34px;
    }


    .mem-about h2,
    .mem-rsvp h2 {
        font-size:
            clamp(
                37px,
                10.5vw,
                51px
            );
    }


    .mem-about-text {
        padding-left: 17px;
    }


    /* AGENDA */

    .mem-agenda {
        padding:
            76px
            0
            82px;
    }


    .mem-agenda-list {
        margin-top: 40px;
    }


    .mem-agenda-item {
        grid-template-columns:
            28px
            62px
            1fr;

        gap: 9px;

        min-height: 90px;

        padding:
            0
            4px;
    }


    .mem-agenda-item time {
        font-size: 18px;
    }


    .mem-agenda-item strong {
        font-size: 15px;
    }


    /* RSVP */

    .mem-rsvp {
        padding:
            78px
            0
            85px;
    }


    .mem-rsvp-grid {
        grid-template-columns: 1fr;

        gap: 40px;
    }


    .mem-rsvp-info {
        position: static;
    }


    .mem-form-card {
        padding:
            33px
            21px;
    }


    .mem-form-grid {
        grid-template-columns: 1fr;

        gap: 24px;
    }


    .mem-form-grid label.full {
        grid-column: auto;
    }


    /* FOOTER */

    .mem-footer-inner {
        grid-template-columns: 1fr;

        gap: 20px;

        text-align: center;
    }


    .mem-footer img {
        width: 160px;

        margin: 0 auto;
    }


    .mem-footer small {
        text-align: center;
    }


    /* RESULT */

    .mem-result-card {
        padding:
            40px
            22px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .mem-envelope-flap,
    .mem-invitation-card,
    .mem-card-button,
    .mem-envelope-open {
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }

    .mem-envelope-scroll span,
    .mem-open-arrow {
        animation: none;
    }

}