/* =====================================================
   RESET
===================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", Arial, sans-serif;

    color: #351329;

    background: #fff0f5;

    overflow-x: hidden;
}


/* =====================================================
   LOADING SCREEN
===================================================== */

#loader {
    position: fixed;

    inset: 0;

    z-index: 9999;

    background: #0c0812;

    color: white;

    display: grid;

    place-items: center;

    align-content: center;

    gap: 12px;

    transition:
        opacity 0.6s ease;
}

#loader.hide {
    opacity: 0;

    pointer-events: none;
}

.loader-heart {
    font-size: 65px;

    color: #ff72aa;

    animation:
        pulse 1s infinite;
}


/* =====================================================
   TOP BUTTONS
===================================================== */

.music-btn,
.top-heart {
    position: fixed;

    z-index: 1000;

    top: 18px;

    border: 1px solid #ff71ae;

    background:
        rgba(70, 15, 60, 0.7);

    color: white;

    backdrop-filter: blur(10px);

    cursor: pointer;
}

.music-btn {
    left: 18px;

    padding: 9px 17px;

    border-radius: 30px;
}

.top-heart {
    right: 18px;

    width: 42px;

    height: 42px;

    border-radius: 50%;

    font-size: 18px;
}


/* =====================================================
   HERO
===================================================== */

.hero {
    min-height: 100svh;

    position: relative;

    display: grid;

    place-items: center;

    text-align: center;

    overflow: hidden;

    color: white;

    background:
        radial-gradient(
            circle at 50% 70%,
            #40143d 0%,
            #14091e 45%,
            #070711 100%
        );
}

.stars {
    position: absolute;

    inset: 0;

    background-image:
        radial-gradient(
            white 1px,
            transparent 1px
        ),
        radial-gradient(
            #f9a7d1 1px,
            transparent 1px
        );

    background-size:
        90px 90px,
        140px 140px;

    background-position:
        0 0,
        35px 50px;

    opacity: 0.55;
}

.hero::after {
    content: "";

    position: absolute;

    bottom: -20px;

    left: -5%;

    width: 110%;

    height: 180px;

    background:
        radial-gradient(
            ellipse at center,
            #3b1232 0 35%,
            transparent 70%
        );

    filter: blur(4px);
}

.hero-content {
    position: relative;

    z-index: 5;

    width: 100%;

    padding: 30px 20px;
}

.eyebrow {
    font-weight: 600;

    margin-bottom: 30px;
}

.eyebrow span {
    color: #ff5da2;
}

.hey {
    font-family:
        "Playfair Display",
        serif;

    font-size: 44px;
}

.hero h1 {
    font-family:
        "Caveat",
        cursive;

    font-size:
        clamp(
            80px,
            14vw,
            150px
        );

    line-height: 0.9;

    color: #ff9dcc;

    text-shadow:
        0 0 30px
        rgba(255, 79, 158, 0.5);
}

.hero h1 span {
    color: white;
}

.subtitle {
    font-size: 20px;

    margin: 28px 0;
}


/* =====================================================
   MAIN BUTTON
===================================================== */

.primary-btn {
    border: 1px solid #ff8fbe;

    background: #ff3d89;

    color: white;

    font-size: 17px;

    font-weight: 700;

    padding: 17px 28px;

    border-radius: 16px;

    box-shadow:
        0 0 25px
        rgba(255, 76, 154, 0.6);

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.primary-btn:hover {
    transform:
        translateY(-3px)
        scale(1.03);

    box-shadow:
        0 0 40px
        rgba(255, 76, 154, 0.8);
}

.scroll-hint {
    font-size: 32px;

    margin-top: 35px;

    animation:
        bounce 1.4s infinite;
}


/* =====================================================
   SHOOTING STARS
===================================================== */

.shooting-star {
    position: absolute;

    width: 120px;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            white
        );

    opacity: 0.8;
}

.shooting-star-one {
    top: 18%;
    left: 17%;

    transform:
        rotate(-35deg);
}

.shooting-star-two {
    top: 25%;
    right: 18%;

    transform:
        rotate(-145deg);
}


/* =====================================================
   REVEAL
===================================================== */

.reveal {
    position: relative;

    overflow: hidden;

    padding:
        90px 7%;

    background:
        linear-gradient(
            135deg,
            #fff4f7,
            #ffe7ef
        );
}

.reveal-grid {
    max-width: 1100px;

    margin: auto;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    align-items: center;

    gap: 60px;
}

.reveal-copy {
    text-align: center;

    font-size: 18px;

    line-height: 1.7;
}

.script {
    font-family:
        "Caveat",
        cursive;

    font-size: 45px;

    font-weight: 600;
}

.reveal h2 {
    font-family:
        "Caveat",
        cursive;

    font-size: 80px;

    color: #e64282;

    margin-bottom: 15px;
}

.reveal h2 span {
    font-family: serif;
}

.reveal-copy strong {
    color: #a71f60;
}


/* =====================================================
   POLAROID
===================================================== */

.polaroid-wrap {
    position: relative;

    display: grid;

    place-items: center;
}

.polaroid {
    width:
        min(
            350px,
            90vw
        );

    padding:
        14px
        14px
        24px;

    background: white;

    box-shadow:
        0 20px 40px
        rgba(139, 49, 83, 0.2);

    transform:
        rotate(4deg);
}

.polaroid p {
    font-family:
        "Caveat",
        cursive;

    font-size: 25px;

    text-align: center;

    margin-top: 8px;
}


/* =====================================================
   BALLOONS
===================================================== */

.balloons {
    position: absolute;

    top: -35px;

    right: 4%;

    display: flex;

    gap: 8px;

    z-index: 3;
}

.balloons i {
    display: block;

    width: 45px;

    height: 65px;

    border-radius: 50%;

    background: #f58eb7;

    box-shadow:
        inset -8px -8px 15px
        rgba(217, 77, 139, 0.4);

    transform:
        rotate(10deg);
}

.balloons i:nth-child(2) {
    height: 75px;

    background: #ffb0cc;

    transform:
        rotate(-5deg);
}

.balloons i:nth-child(3) {
    background: #e96ca2;
}


/* =====================================================
   PHOTO ERROR
===================================================== */

.photo-placeholder {
    min-height: 180px;

    border-radius: 10px;

    display: grid;

    place-items: center;

    overflow: hidden;
}

.big-photo {
    height: 300px;

    min-height: 300px;
}

.error-photo {
    position: relative;

    padding: 18px;

    background:
        radial-gradient(
            circle at center,
            #351936,
            #100a17
        ) !important;

    border:
        1px solid
        rgba(255, 120, 180, 0.35);

    text-align: center;

    overflow: hidden;
}

.error-content {
    width: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 9px;
}

.searching {
    font-size: 12px;

    color: white;

    opacity: 0.9;

    animation:
        searchingBlink 1.5s infinite;
}

.loading-bar {
    width: 85%;

    max-width: 240px;

    height: 12px;

    background: #241426;

    border:
        1px solid
        #6d3657;

    border-radius: 20px;

    overflow: hidden;
}

.loading-bar span {
    display: block;

    width: 100%;

    height: 100%;

    background:
        repeating-linear-gradient(
            90deg,
            #ff4d91 0 8px,
            #ff85b6 8px 16px
        );

    animation:
        loadingGlow 1.5s infinite;
}

.loading-text {
    font-size: 10px;

    color: #ff9fc5;
}

.error-title {
    font-size: 15px;

    font-weight: 800;

    color: #ff6b9f;

    animation:
        errorPulse 1.5s infinite;
}

.error-message {
    font-family:
        "Caveat",
        cursive;

    font-size: 22px;

    font-weight: 700;

    color: white;

    line-height: 1.1;
}

.error-subtitle {
    font-family:
        "Caveat",
        cursive;

    font-size: 18px;

    color: #ff9fc5;

    line-height: 1.1;
}


/* =====================================================
   DARK SECTION
===================================================== */

.dark-section {
    color: white;

    background:
        radial-gradient(
            circle at 50% 0,
            #32103a,
            #10091d 70%
        );
}


/* =====================================================
   MEMORIES
===================================================== */

.memories {
    padding:
        70px 5%
        80px;

    text-align: center;
}

.section-kicker {
    font-family:
        "Caveat",
        cursive;

    font-size: 34px;

    font-weight: 600;
}

.section-sub {
    margin:
        0 0 30px;

    opacity: 0.8;
}

.memory-grid {
    max-width: 1150px;

    margin: auto;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;
}

.memory-card {
    font-size: 12px;

    transition:
        transform 0.25s ease;
}

.memory-card:hover {
    transform:
        translateY(-6px);
}

.memory-card .photo-placeholder {
    min-height: 190px;

    margin-bottom: 10px;
}


/* =====================================================
   DOTS
===================================================== */

.dots {
    margin-top: 25px;

    display: flex;

    gap: 10px;

    justify-content: center;
}

.dots > * {
    width: 8px;

    height: 8px;

    border-radius: 50%;

    background: #777;
}

.dots b {
    background: #ff7eb4;
}


/* =====================================================
   REASONS
===================================================== */

.reasons {
    padding:
        70px 5%;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            #fff4f7,
            #ffe7ef
        );
}

.pink {
    color: #b72b6c;
}

.reason-grid {
    max-width: 1100px;

    margin:
        30px auto 0;

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;
}

.reason-grid article {
    padding: 28px 20px;

    border:
        1px solid
        #f3a8c2;

    background:
        rgba(
            255,
            255,
            255,
            0.7
        );

    border-radius: 16px;

    box-shadow:
        0 8px 20px
        rgba(
            173,
            77,
            108,
            0.1
        );

    transition:
        transform 0.25s ease;
}

.reason-grid article:hover {
    transform:
        translateY(-6px);
}

.icon {
    font-size: 40px;

    color: #ee6d9d;
}

.reason-grid h3 {
    margin:
        10px 0 7px;
}

.reason-grid p {
    color: #654456;

    line-height: 1.5;
}


/* =====================================================
   CAKE
===================================================== */

.cake-section {
    min-height: 500px;

    padding:
        70px 8%;

    display: grid;

    grid-template-columns:
        1fr 1fr;

    align-items: center;

    gap: 50px;
}

.cake-copy {
    font-size: 17px;

    line-height: 1.7;
}

.white {
    color: white;
}

.wish-heart {
    display: inline-block;

    font-size: 55px;

    margin-top: 10px;

    animation:
        pulse 1.5s infinite;
}

.cake-area {
    position: relative;

    text-align: center;

    min-height: 300px;
}

.cake {
    width: 330px;

    max-width: 80vw;

    margin:
        90px auto 0;

    position: relative;
}

.cake-top {
    height: 55px;

    background:
        linear-gradient(
            #ffd3dd,
            #f9a5bc
        );

    border-radius: 50%;

    border: 5px solid white;
}

.cake-body {
    height: 85px;

    background:
        linear-gradient(
            90deg,
            #ffb3c7,
            #f47da2,
            #ffb3c7
        );

    border-radius:
        0 0 20px 20px;

    border:
        5px solid white;

    border-top: 0;
}

.icing {
    position: absolute;

    z-index: 2;

    top: 34px;

    left: 10px;

    right: 10px;

    height: 50px;

    background: #fff0f4;

    border-radius: 45%;

    box-shadow:
        0 10px 0 #fff0f4;
}


/* =====================================================
   CANDLES
===================================================== */

.candles {
    position: absolute;

    z-index: 5;

    left: 50%;

    top: 30px;

    transform:
        translateX(-50%);

    display: flex;

    gap: 25px;
}

.candle {
    width: 15px;

    height: 65px;

    border: none;

    border-radius: 5px;

    background:
        repeating-linear-gradient(
            135deg,
            #fff 0 8px,
            #d988e9 8px 16px
        );

    cursor: pointer;

    position: relative;
}

.flame {
    position: absolute;

    width: 15px;

    height: 24px;

    background: #ffc45b;

    border-radius:
        50% 50% 50% 0;

    transform:
        rotate(-45deg);

    top: -22px;

    left: 0;

    box-shadow:
        0 0 15px #ffb52c;

    animation:
        flame 0.8s
        infinite alternate;
}

.candle.out .flame {
    display: none;
}

.cake-tip {
    opacity: 0.7;

    margin-top: 15px;
}


/* =====================================================
   LETTER
===================================================== */

.letter {
    padding:
        80px 8%;

    background:
        linear-gradient(
            135deg,
            #fff4f7,
            #ffe7ef
        );
}

.letter-layout {
    max-width: 950px;

    margin:
        35px auto;

    display: grid;

    grid-template-columns:
        350px 1fr;

    gap: 70px;

    align-items: center;
}


/* =====================================================
   ENVELOPE
===================================================== */

.envelope {
    height: 230px;

    background: #f06c9f;

    position: relative;

    box-shadow:
        0 15px 30px
        rgba(
            158,
            60,
            100,
            0.12
        );
}

.envelope::after {
    content: "";

    position: absolute;

    inset: 0;

    background: #ff9fc2;

    clip-path:
        polygon(
            0 0,
            50% 55%,
            100% 0,
            100% 12%,
            50% 68%,
            0 12%
        );
}

.envelope-heart {
    position: absolute;

    z-index: 3;

    top: 82px;

    left: 50%;

    transform:
        translateX(-50%);

    background: white;

    color: #ed5790;

    border-radius: 50%;

    width: 55px;

    height: 55px;

    display: grid;

    place-items: center;

    font-size: 26px;
}

.paper {
    position: absolute;

    z-index: 1;

    background: #fffafc;

    left: 18%;

    right: 18%;

    top: 15%;

    height: 80%;

    display: grid;

    place-items: center;

    font-family:
        "Caveat",
        cursive;

    font-size: 28px;

    font-weight: 600;

    color: #b72b6c;

    transform:
        rotate(-3deg);
}


/* =====================================================
   MESSAGE
===================================================== */

.message {
    font-size: 16px;

    line-height: 1.8;
}

.message p {
    margin-bottom: 15px;
}

.message p:first-child {
    font-family:
        "Caveat",
        cursive;

    font-size: 32px;

    font-weight: 600;
}

.message strong {
    color: #a51e5d;
}

.signature {
    font-family:
        "Caveat",
        cursive;

    font-size: 21px;

    color: #8a5570;
}


/* =====================================================
   FOOTER
===================================================== */

footer {
    background: #120a19;

    color: white;

    text-align: center;

    padding: 30px 20px;
}

footer button {
    background: none;

    border: none;

    color: #ff9fc5;

    cursor: pointer;

    font-weight: 600;

    margin-top: 8px;
}


/* =====================================================
   FLOATING HEARTS
===================================================== */

.floating-heart {
    position: fixed;

    z-index: 3000;

    pointer-events: none;

    animation:
        floatUp 2.5s
        ease-out forwards;

    color: #ff76ac;
}


/* =====================================================
   CONFETTI
===================================================== */

.confetti {
    position: absolute;

    animation:
        fall 3s
        linear forwards;
}


/* =====================================================
   TOAST
===================================================== */

#toast {
    position: fixed;

    z-index: 5000;

    left: 50%;

    bottom: 25px;

    transform:
        translate(
            -50%,
            30px
        );

    background: #2a1026;

    color: white;

    padding:
        12px 20px;

    border-radius: 30px;

    opacity: 0;

    pointer-events: none;

    transition:
        0.3s ease;

    width: max-content;

    max-width: 90%;
}

#toast.show {
    opacity: 1;

    transform:
        translate(
            -50%,
            0
        );
}


/* =====================================================
   ANIMATIONS
===================================================== */

@keyframes pulse {

    50% {
        transform:
            scale(1.15);
    }

}


@keyframes bounce {

    50% {
        transform:
            translateY(8px);
    }

}


@keyframes loadingGlow {

    0% {
        transform:
            translateX(-100%);

        opacity: 0.6;
    }

    50% {
        transform:
            translateX(0);

        opacity: 1;
    }

    100% {
        transform:
            translateX(100%);

        opacity: 0.6;
    }

}


@keyframes searchingBlink {

    0%,
    100% {
        opacity: 0.55;
    }

    50% {
        opacity: 1;
    }

}


@keyframes errorPulse {

    0%,
    100% {
        transform:
            scale(1);
    }

    50% {
        transform:
            scale(1.06);
    }

}


@keyframes flame {

    from {
        transform:
            rotate(-45deg)
            scale(0.95);
    }

    to {
        transform:
            rotate(-45deg)
            scale(1.08);
    }

}


@keyframes floatUp {

    to {
        transform:
            translateY(-100vh)
            rotate(30deg);

        opacity: 0;
    }

}


@keyframes fall {

    to {
        transform:
            translateY(110vh)
            rotate(600deg);

        opacity: 0;
    }

}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 900px) {

    .reveal-grid {
        grid-template-columns: 1fr;

        gap: 70px;
    }

    .polaroid {
        transform:
            rotate(3deg);
    }

    .memory-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .reason-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .cake-section {
        grid-template-columns: 1fr;

        text-align: center;
    }

    .cake-area {
        margin-top: 20px;
    }

    .letter-layout {
        grid-template-columns: 1fr;

        gap: 50px;
    }

    .envelope {
        width: 350px;

        max-width: 90vw;

        margin: auto;
    }

}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {

    body {
        width: 100%;
    }


    /* TOP BUTTONS */

    .music-btn {
        top: 12px;

        left: 12px;

        padding:
            8px 12px;

        font-size: 13px;
    }

    .top-heart {
        top: 12px;

        right: 12px;

        width: 38px;

        height: 38px;
    }


    /* HERO */

    .hero {
        min-height: 100svh;

        padding:
            20px 15px;
    }

    .eyebrow {
        font-size: 14px;

        margin-bottom: 22px;
    }

    .hey {
        font-size: 32px;
    }

    .hero h1 {
        font-size:
            clamp(
                75px,
                25vw,
                110px
            );
    }

    .subtitle {
        font-size: 16px;

        margin:
            22px 0;
    }

    .primary-btn {
        width: 100%;

        max-width: 300px;

        padding:
            15px 20px;

        font-size: 15px;
    }


    /* REVEAL */

    .reveal {
        padding:
            65px 20px;
    }

    .reveal-grid {
        gap: 55px;
    }

    .reveal-copy {
        font-size: 16px;
    }

    .script {
        font-size: 38px;
    }

    .reveal h2 {
        font-size: 65px;
    }

    .polaroid {
        width: 100%;

        max-width: 320px;
    }

    .big-photo {
        height: 270px;

        min-height: 270px;
    }


    /* ERROR */

    .error-message {
        font-size: 19px;
    }

    .error-subtitle {
        font-size: 16px;
    }

    .searching {
        font-size: 10px;
    }

    .loading-bar {
        max-width: 200px;
    }


    /* MEMORIES */

    .memories {
        padding:
            60px 15px;
    }

    .section-kicker {
        font-size: 30px;
    }

    .section-sub {
        font-size: 14px;
    }

    .memory-grid {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 10px;
    }

    .memory-card {
        font-size: 10px;
    }

    .memory-card .photo-placeholder {
        min-height: 155px;

        padding: 10px;
    }


    /* REASONS */

    .reasons {
        padding:
            60px 15px;
    }

    .reason-grid {
        grid-template-columns: 1fr;

        gap: 13px;
    }

    .reason-grid article {
        padding:
            23px 18px;
    }


    /* CAKE */

    .cake-section {
        padding:
            65px 15px;
    }

    .cake-copy {
        font-size: 15px;
    }

    .cake {
        width: 280px;

        max-width: 85vw;
    }

    .candles {
        gap: 16px;
    }

    .candle {
        width: 13px;

        height: 60px;
    }


    /* LETTER */

    .letter {
        padding:
            65px 20px;
    }

    .letter-layout {
        gap: 40px;
    }

    .envelope {
        height: 210px;

        width: 100%;

        max-width: 330px;
    }

    .message {
        font-size: 15px;

        line-height: 1.7;

        text-align: center;
    }

    .message p:first-child {
        font-size: 30px;
    }


    /* FOOTER */

    footer {
        font-size: 13px;

        padding:
            25px 15px;
    }

}


/* =====================================================
   VERY SMALL PHONES
===================================================== */

@media (max-width: 380px) {

    .hero h1 {
        font-size: 75px;
    }

    .memory-grid {
        gap: 7px;
    }

    .memory-card .photo-placeholder {
        min-height: 140px;

        font-size: 9px;
    }

    .error-message {
        font-size: 17px;
    }

    .error-subtitle {
        font-size: 14px;
    }

    .loading-bar {
        width: 90%;
    }

    .cake {
        width: 250px;
    }

    .candles {
        gap: 11px;
    }

}