/* =========================================================
   SURPRISE 1 — PREMIUM LETTER REVEAL
   SLOWER / CINEMATIC CARD OPENING
========================================================= */


/* =========================================================
   MAIN SCREEN
========================================================= */

#surprise1 {
    position: fixed;
    inset: 0;

    overflow: hidden;

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

    color: #fff;

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(245, 210, 139, .12),
            transparent 32%
        ),
        radial-gradient(
            circle at 50% 72%,
            rgba(87, 116, 154, .08),
            transparent 38%
        ),
        linear-gradient(
            180deg,
            #04060d 0%,
            #091224 55%,
            #0b1829 100%
        );

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


/* =========================================================
   BACKGROUND ELEMENTS
========================================================= */

.s1-bg,
.s1-moon,
.s1-stars {
    position: absolute;
    inset: 0;

    pointer-events: none;
}


/* =========================================================
   MOON
========================================================= */

.s1-moon {
    inset: auto;

    left: 50%;
    top: 37%;

    width: 360px;
    height: 360px;

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

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255, 220, 150, .12),
            transparent 68%
        );

    filter: blur(10px);

    animation: s1glow 7s infinite;
}


/* =========================================================
   STARS
========================================================= */

.s1-stars {
    padding: 12vh 8vw;

    font-size: 12px;
    letter-spacing: 12px;
    line-height: 8;

    color: rgba(255, 255, 255, .3);
}


/* =========================================================
   MAIN SHELL
========================================================= */

.s1-shell {
    position: relative;
    z-index: 2;

    width: min(90vw, 430px);
    height: min(88vh, 680px);

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

    text-align: center;
}


/* =========================================================
   TOP LABEL
========================================================= */

.s1-top {
    position: absolute;

    top: 10px;
    left: 0;
    right: 0;

    display: flex;
    justify-content: space-between;

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

    font-size: 9px;
    letter-spacing: 3px;
}

.s1-top span {
    color: #e4c27c;
}


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

.s1-seal {
    position: absolute;

    top: 55px;

    width: 70px;
    height: 70px;

    border: 1px solid rgba(228, 194, 124, .3);
    border-radius: 50%;

    display: grid;
    place-items: center;

    color: #e8c77d;

    box-shadow:
        0 0 30px rgba(228, 194, 124, .08);
}

.s1-seal:before {
    content: "";

    position: absolute;
    inset: 9px;

    border: 1px dashed rgba(228, 194, 124, .2);
    border-radius: 50%;
}


/* =========================================================
   INTRO
========================================================= */

.s1-intro {
    padding-top: 60px;

    transition: .7s ease;
}

.s1-intro.hidden {
    opacity: 0;

    transform: translateY(-20px);

    filter: blur(6px);

    pointer-events: none;
}

.s1-intro > p {
    margin: 0 0 18px;

    color: #e3c27c;

    font-size: 10px;
    letter-spacing: 5px;
}

.s1-intro h1 {
    margin: 0;

    font-size: clamp(38px, 10vw, 51px);
    line-height: 1.12;

    font-weight: 500;
}


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

.s1-divider {
    margin: 28px 0 22px;

    color: #e8c77d;

    opacity: .8;
}


/* =========================================================
   DESCRIPTION TEXT
========================================================= */

.s1-text {
    color: rgba(255, 255, 255, .62);

    font-size: 15px;
    line-height: 1.7;
}


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

.s1-btn {
    width: 185px;
    height: 52px;

    margin: 30px auto 0;

    border: 1px solid rgba(232, 199, 125, .4);
    border-radius: 999px;

    background: rgba(255, 255, 255, .045);

    color: #f1d89d;

    font: 600 14px Georgia;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    cursor: pointer;

    transition: .25s;
}

.s1-btn:hover {
    background: rgba(232, 199, 125, .09);

    transform: translateY(-2px);
}

.s1-btn b {
    margin-left: 10px;

    font-size: 18px;
    font-weight: 400;
}


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

.s1-envelope {
    position: absolute;

    left: 50%;
    top: 51%;

    width: min(84vw, 350px);
    height: 330px;

    transform:
        translate(-50%, -42%)
        scale(.88);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 1.2s ease,
        transform 1.2s cubic-bezier(.22, .61, .36, 1);
}

.s1-envelope.open {
    opacity: 1;
    visibility: visible;

    transform:
        translate(-50%, -46%)
        scale(1);
}


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

.s1-back {
    position: absolute;

    left: 0;
    right: 0;
    top: 45px;
    bottom: 0;

    border: 1px solid rgba(232, 199, 125, .22);
    border-radius: 10px;

    background:
        linear-gradient(
            145deg,
            rgba(38, 49, 69, .72),
            rgba(13, 22, 37, .62)
        );

    box-shadow:
        0 30px 70px rgba(0, 0, 0, .28);

    transition:
        opacity 1.2s ease 1.25s,
        transform 1.35s cubic-bezier(.22, .61, .36, 1) 1.25s,
        box-shadow 1.2s ease 1.25s;
}

.s1-envelope.open .s1-back {
    opacity: 0;

    transform:
        scale(.96)
        translateY(8px);

    box-shadow: none;

    pointer-events: none;
}


/* =========================================================
   LETTER
========================================================= */

.s1-letter {
    position: absolute;
    z-index: 3;

    left: 50%;
    top: 50%;

    width: 82%;
    min-height: 285px;

    transform:
        translate(-50%, -42%)
        scale(.92);

    padding: 34px 24px 30px;

    box-sizing: border-box;

    border: 1px solid rgba(159, 126, 83, .18);
    border-radius: 3px;

    background:
        radial-gradient(
            circle at 18% 12%,
            rgba(196, 157, 102, .08),
            transparent 25%
        ),
        radial-gradient(
            circle at 85% 88%,
            rgba(196, 157, 102, .07),
            transparent 28%
        ),
        repeating-linear-gradient(
            0deg,
            rgba(120, 95, 65, .018) 0 1px,
            transparent 1px 4px
        ),
        linear-gradient(
            145deg,
            #fffaf0,
            #f3e7d3
        );

    color: #453a31;

    box-shadow:
        0 26px 65px rgba(0, 0, 0, .24),
        0 2px 0 rgba(255, 255, 255, .65) inset;

    transition:
        transform 4.5s cubic-bezier(.22, .61, .36, 1),
        box-shadow 4.5s ease;
}


/* =========================================================
   LETTER DECORATIONS
========================================================= */

.s1-letter:before,
.s1-letter:after {
    position: absolute;

    color: rgba(174, 133, 83, .45);

    font-size: 14px;
    line-height: 1;
}

.s1-letter:before {
    content: "✦";

    top: 13px;
    left: 15px;
}

.s1-letter:after {
    content: "✦";

    right: 15px;
    bottom: 13px;
}


/* =========================================================
   LETTER OPEN STATE
========================================================= */

.s1-envelope.open .s1-letter {
    transform:
        translate(-50%, -50%)
        scale(1);

    box-shadow:
        0 30px 80px rgba(0, 0, 0, .30),
        0 2px 0 rgba(255, 255, 255, .7) inset;
}


/* =========================================================
   LETTER CONTENT
========================================================= */

.s1-letter small {
    display: block;

    font-size: 8px;
    letter-spacing: 4px;

    color: #806b55;
}

.s1-letter h2 {
    margin: 15px 0 12px;

    font-size: 29px;
    line-height: 1.18;

    font-weight: 500;
}

.s1-letter i {
    display: block;

    margin: 2px 0 14px;

    font-style: normal;

    color: #b28a58;

    font-size: 17px;
}

.s1-letter p {
    margin: 0;

    font-size: 15px;
    line-height: 1.7;

    color: #66564a;
}

.s1-letter em {
    display: block;

    margin-top: 22px;

    font-style: normal;

    color: #a26969;

    font-size: 20px;
}


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

.s1-flap {
    position: absolute;
    z-index: 5;

    left: 0;
    right: 0;
    top: 45px;

    height: 135px;

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

    background:
        linear-gradient(
            145deg,
            #293449,
            #141d2e
        );

    transform-origin: top;

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    transition:
        transform 4.2s cubic-bezier(.22, .61, .36, 1),
        opacity 1.4s ease 2.0s;
}

.s1-envelope.open .s1-flap {
    transform: rotateX(180deg);

    opacity: 0;

    pointer-events: none;
}


/* =========================================================
   LETTER GLOW
========================================================= */

.s1-envelope.open:after {
    content: "";

    position: absolute;
    z-index: 1;

    left: 50%;
    top: 50%;

    width: 82%;
    height: 70%;

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

    border-radius: 50%;

    background:
        rgba(232, 199, 125, .07);

    filter: blur(28px);

    pointer-events: none;
}


/* =========================================================
   NEXT BUTTON
========================================================= */

.s1-next {
    position: absolute;

    bottom: 50px;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transform: translateY(12px);
}

.s1-next.visible {
    opacity: 1;
    visibility: visible;

    pointer-events: auto;

    transform: none;
}


/* =========================================================
   BOTTOM LABEL
========================================================= */

.s1-bottom {
    position: absolute;

    bottom: 8px;
    left: 0;
    right: 0;

    color: #ffffff40;

    font-size: 9px;
    letter-spacing: 1.5px;
}


/* =========================================================
   MOON GLOW ANIMATION
========================================================= */

@keyframes s1glow {

    50% {
        transform:
            translate(-50%, -50%)
            scale(1.12);

        opacity: .8;
    }

}


/* =========================================================
   MOBILE — 420px AND BELOW
========================================================= */

@media (max-width: 420px) {

    .s1-shell {
        height: 88vh;
    }

    .s1-seal {
        top: 45px;

        transform: scale(.8);
    }

    .s1-intro {
        padding-top: 45px;
    }

    .s1-intro h1 {
        font-size: 38px;
    }

    .s1-text {
        font-size: 14px;
    }

    .s1-envelope {
        width: 86vw;
        height: 310px;
    }

    .s1-letter {
        width: 84%;
        min-height: 270px;

        padding: 31px 20px 28px;
    }

    .s1-letter h2 {
        font-size: 27px;
    }

    .s1-letter p {
        font-size: 14px;
    }

    .s1-flap {
        top: 42px;
        height: 125px;
    }

    .s1-back {
        top: 42px;
    }

    .s1-next {
        bottom: 48px;
    }

}