
/* ==============================
   GENERAL STYLING
============================== */

* {
    box-sizing: border-box;
}

:root {
    --rose: #d94f70;
    --deep: #71384e;
}

body {
    margin: 0;
    min-height: 100vh;

    background: linear-gradient(
        135deg,
        #fff1f3,
        #fff8f0,
        #fce8ed
    );

    color: #573b45;
    font-family: "DM Sans", sans-serif;
}

.apology-card {
    max-width: 760px;
    width: 100%;
    padding: 45px 30px;
    border-radius: 32px;

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

    box-shadow: 0 25px 80px rgba(130,65,85,.13);
}

.eyebrow {
    color: #c46b81;
    letter-spacing: 3px;
    font-size: 11px;
    font-weight: bold;
}

/* ==============================
   MAIN HEADING
============================== */

h1 {
    margin: 20px 0;

    font: 700 clamp(45px, 7vw, 75px)/1
    "Playfair Display", serif;

    color: #603b49;
}

h1 em {
    color: var(--rose);
}

.intro {
    max-width: 500px;
    margin: auto auto 25px;
    color: #896b75;
    line-height: 1.7;
}

/* ==============================
   ROSE ANIMATION SCENE
============================== */

.garden-scene {
    position: relative;

    height: 290px;
    max-width: 600px;

    margin: auto auto 25px;

    overflow: hidden;
    border-radius: 24px;

    background: linear-gradient(
        #f8dce5,
        #fce9e3 72%,
        #f7d9d8
    );
}

.moon {
    position: absolute;

    width: 65px;
    height: 65px;

    border-radius: 50%;

    background: #fff8e9;

    top: 25px;
    right: 70px;

    box-shadow: 0 0 35px #fff5d9;
}

.ground {
    position: absolute;

    bottom: 0;
    width: 100%;
    height: 58px;

    background: #d6a6a0;

    border-radius: 50% 50% 0 0;
}

.sparkle {
    position: absolute;
    color: white;

    animation: twinkle 2s infinite alternate;
}

.s1 {
    top: 48px;
    left: 20%;
}

.s2 {
    top: 92px;
    right: 25%;
}

.s3 {
    top: 28px;
    left: 56%;
}

/* ==============================
   BOY AND GIRL CHARACTERS
============================== */

.character {
    position: absolute;

    bottom: 43px;

    width: 90px;
    height: 190px;
}

.boy {
    left: 22%;

    animation: approach 2.2s ease .3s forwards;
}

.girl {
    right: 21%;
}

.head {
    position: absolute;

    top: 6px;
    left: 22px;

    width: 49px;
    height: 54px;

    border-radius: 48%;

    background: #f1bd9d;

    z-index: 3;
}

.hair {
    position: absolute;

    z-index: 4;

    top: 0;
    left: 18px;

    width: 57px;
    height: 29px;

    border-radius: 50% 50% 25% 25%;

    background: #49333b;
}

.eye {
    position: absolute;

    top: 25px;
    left: 13px;

    width: 4px;
    height: 5px;

    border-radius: 50%;

    background: #49333b;
}

.eye-right {
    left: 32px;
}

.smile {
    position: absolute;

    width: 12px;
    height: 6px;

    left: 19px;
    top: 37px;

    border-bottom: 2px solid #a85b62;
    border-radius: 50%;
}

.body {
    position: absolute;

    top: 58px;
    left: 14px;

    width: 66px;
    height: 78px;

    border-radius: 22px 22px 10px 10px;

    background: #7892a4;

    z-index: 2;
}

/* ARMS */

.arm {
    position: absolute;

    z-index: 1;

    top: 67px;

    width: 17px;
    height: 67px;

    border-radius: 20px;

    background: #f1bd9d;

    transform-origin: top center;
}

.arm-back {
    left: 10px;
    transform: rotate(16deg);
}

.arm-front {
    left: 69px;

    transform: rotate(-20deg);

    animation: offer 1.2s ease-in-out 2.1s forwards;
}

/* LEGS */

.leg {
    position: absolute;

    top: 127px;

    width: 20px;
    height: 52px;

    background: #4e5368;

    border-radius: 10px;

    z-index: 1;
}

.leg-left {
    left: 24px;
}

.leg-right {
    left: 51px;
}

/* ==============================
   ROSE
============================== */

.rose {
    position: absolute;

    z-index: 5;

    top: 80px;
    left: 78px;

    width: 40px;
    height: 48px;

    opacity: 0;

    transform: rotate(-25deg) scale(.5);

    animation: roseReveal .7s ease-out 2.6s forwards;
}

.petal {
    position: absolute;

    top: 0;
    left: 12px;

    width: 17px;
    height: 19px;

    border-radius: 80% 15% 65% 25%;

    background: #d83259;
}

.p2 {
    transform: rotate(95deg);

    left: 19px;
    top: 4px;

    background: #ed6680;
}

.p3 {
    transform: rotate(-65deg);

    left: 5px;
    top: 5px;

    background: #bd294d;
}

.stem {
    position: absolute;

    top: 15px;
    left: 19px;

    width: 3px;
    height: 34px;

    background: #648b61;
}

.leaf {
    position: absolute;

    top: 29px;
    left: 20px;

    width: 13px;
    height: 7px;

    border-radius: 100% 0;

    background: #6d9b68;
}

/* ==============================
   GIRL HAIR AND BODY
============================== */

.girl-hair {
    position: absolute;

    top: -2px;
    left: 13px;

    width: 67px;
    height: 75px;

    border-radius: 48%;

    background: #4b303b;

    z-index: 2;
}

.girl .head {
    top: 8px;
    left: 22px;
}

.girl-body {
    top: 61px;
    left: 11px;

    width: 72px;
    height: 83px;

    border-radius: 25px 25px 8px 8px;

    background: #d77d91;
}

.girl .leg {
    background: #775c70;
    top: 132px;
}

.girl-arm {
    position: absolute;

    z-index: 4;

    top: 73px;
    left: 73px;

    width: 16px;
    height: 54px;

    border-radius: 20px;

    background: #f1bd9d;

    transform: rotate(-55deg);
    transform-origin: top center;

    animation: receive 1s ease 3s forwards;
}

.blush {
    position: absolute;

    top: 34px;
    left: 7px;

    width: 9px;
    height: 5px;

    border-radius: 50%;

    background: #e88e91;

    box-shadow: 26px 0 #e88e91;
}

/* ==============================
   FLOATING HEARTS
============================== */

.heart {
    position: absolute;

    color: #e75c7d;

    opacity: 0;

    font-size: 22px;

    animation: floatHeart 3s ease-in-out infinite;
}

.h1 {
    left: 48%;
    top: 60px;
    animation-delay: 3s;
}

.h2 {
    left: 58%;
    top: 90px;
    animation-delay: 3.5s;
}

.h3 {
    left: 40%;
    top: 100px;
    animation-delay: 4s;
}

.scene-caption {
    position: absolute;

    bottom: 12px;
    left: 0;
    right: 0;

    color: white;

    font: italic 16px "Playfair Display", serif;
}

/* ==============================
   APOLOGY MESSAGE
============================== */

.quote {
    color: #714b59;

    font: 500 19px/1.6
    "Playfair Display", serif;
}

.small-note {
    color: #987985;

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

.btn-love {
    padding: 13px 25px;

    border-radius: 50px;
    border: none;

    color: white;

    background: linear-gradient(
        100deg,
        #d64e70,
        #e88791
    );

    box-shadow: 0 8px 22px #d94f7038;

    transition: .3s;
}

.btn-love:hover {
    color: white;
    transform: translateY(-3px);
}

/* ==============================
   BIG ATTRACTIVE FOREVER BUTTON
============================== */

.btn-forever {
    display: block;

    margin: 25px auto 15px;

    padding: 20px 45px;

    min-width: 300px;

    font-size: 19px;
    font-weight: 700;
    letter-spacing: 1px;

    color: white;

    background: linear-gradient(
        135deg,
        #ff416c,
        #ff4b8b,
        #d63384
    );

    border: 2px solid white;

    border-radius: 60px;

    box-shadow:
        0 0 15px #ff4b8b,
        0 0 30px #ff4b8b80,
        0 8px 25px #d6338460;

    cursor: pointer;

    animation: lovePulse 1.5s infinite;

    transition: all .3s ease;
}

.btn-forever:hover {
    color: white;

    transform: scale(1.12);

    background: linear-gradient(
        135deg,
        #d63384,
        #ff416c,
        #ff4b8b
    );

    box-shadow:
        0 0 25px #ff4b8b,
        0 0 50px #ff4b8b,
        0 12px 35px #d6338480;
}

.btn-forever:active {
    transform: scale(.95);
}

/* BUTTON HEARTBEAT */

@keyframes lovePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}

/* ==============================
   FOREVER QUESTION
============================== */

.forever-message {
    display: none;

    position: relative;
    isolation: isolate;

    overflow: hidden;

    max-width: 570px;

    margin: 25px auto;

    padding: 35px 20px;

    border: 1px solid #f5c4cf;

    border-radius: 24px;

    background: radial-gradient(
        circle at 50% 0%,
        white,
        #fff0f4 58%,
        #ffe2e9
    );
}

.forever-message.show {
    display: block;

    animation: fadeUp .65s ease both;
}

.forever-heart {
    position: relative;
    z-index: 2;

    font-size: 45px;

    animation: pulse 1.1s infinite;
}

.forever-kicker {
    position: relative;
    z-index: 2;

    color: #c16b80;

    font-size: 11px;
    font-weight: bold;
    letter-spacing: 4px;
}

.forever-message h2 {
    position: relative;
    z-index: 2;

    color: #653c4c;

    font: 700 clamp(32px, 6vw, 52px)/1.1
    "Playfair Display", serif;
}

.forever-message h2 em {
    color: #d94f70;
}

.forever-message p:last-child {
    position: relative;
    z-index: 2;

    color: #98717e;

    font-size: 14px;
}

/* ==============================
   FIREWORKS / CRACKERS
============================== */

.fireworks {
    position: absolute;

    inset: 0;

    z-index: 1;

    pointer-events: none;
}

.firework {
    position: absolute;

    left: var(--x);
    top: var(--y);

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: var(--spark);

    box-shadow: 0 0 8px 2px var(--spark);

    animation: crackerBurst 1.25s ease-out var(--delay) both;
}

/* ==============================
   SECOND SURPRISE
============================== */

.surprise {
    display: none;

    max-width: 510px;

    margin: 25px auto;

    padding: 23px;

    border-radius: 20px;

    background: #fff1f3;
}

.surprise.show {
    display: block;

    animation: fadeUp .6s ease both;
}

.big-heart {
    font-size: 40px;

    animation: pulse 1.2s infinite;
}

.surprise h2 {
    color: #8a4b60;

    font: 600 24px "Playfair Display", serif;
}

.surprise p {
    color: #896b75;

    font-size: 14px;

    line-height: 1.7;
}

.btn-outline-love {
    border: 1px solid #d9798d;

    color: #b94d69;

    border-radius: 30px;
}

.btn-outline-love:hover {
    background: #d9798d;
    color: white;
}

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

footer {
    margin-top: 30px;

    color: #b08c97;

    font-size: 12px;
}

/* ==============================
   FLOATING HEART BURST
============================== */

.burst-heart {
    position: absolute;

    z-index: 10;

    bottom: 45px;

    color: #e34f77;

    font-size: 22px;

    pointer-events: none;

    animation: burst 2s ease-out forwards;
}

/* ==============================
   ALL ANIMATIONS
============================== */

@keyframes approach {
    to {
        transform: translateX(48px);
    }
}

@keyframes offer {
    to {
        transform: rotate(-75deg);
    }
}

@keyframes roseReveal {
    to {
        opacity: 1;

        transform: rotate(-25deg) scale(1);
    }
}

@keyframes receive {
    to {
        transform: rotate(-100deg);
    }
}

@keyframes floatHeart {
    0% {
        opacity: 0;

        transform: translateY(12px) scale(.7);
    }

    35% {
        opacity: 1;
    }

    100% {
        opacity: 0;

        transform: translateY(-55px) scale(1.2);
    }
}

@keyframes twinkle {
    from {
        opacity: .35;
    }

    to {
        opacity: 1;

        transform: scale(1.2);
    }
}

@keyframes pulse {
    50% {
        transform: scale(1.15);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;

        transform: translateY(12px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }
}

@keyframes crackerBurst {
    0% {
        opacity: 0;

        transform: scale(.3);
    }

    12% {
        opacity: 1;
    }

    100% {
        opacity: 0;

        transform: translate(
            var(--dx),
            var(--dy)
        ) scale(.15);
    }
}

@keyframes burst {
    0% {
        opacity: 0;

        transform: translate(0,0) scale(.4);
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;

        transform: translate(
            var(--drift),
            -150px
        ) scale(1.3);
    }
}

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

@media (max-width: 520px) {

    .apology-card {
        padding: 28px 18px;

        border-radius: 24px;
    }

    .garden-scene {
        height: 255px;
    }

    .boy {
        left: 13%;
    }

    .girl {
        right: 10%;
    }

    .intro {
        font-size: 14px;
    }

    .btn-forever {
        min-width: 260px;

        padding: 18px 25px;

        font-size: 16px;
    }

    .quote {
        font-size: 17px;
    }
}
