
/* =================================
   KAVAN ❤️ NANCY ROMANTIC WEBSITE
================================= */

/* BASIC SETTINGS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background: linear-gradient(
        135deg,
        #160b20,
        #42152f,
        #791d45,
        #220d2b
    );
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

/* MAIN CONTAINER */

.main-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 30px 20px;
}

/* HEADER */

.header {
    padding: 55px 10px 30px;
}

.small-text {
    color: #ffb5ce;
    letter-spacing: 4px;
    font-size: 12px;
    font-weight: 500;
}

.main-title {
    font-size: clamp(32px, 7vw, 65px);
    font-weight: 700;
    color: #ffb4cd;
    margin-top: 20px;
    letter-spacing: 3px;
    text-shadow: 0 0 25px #ff4d8d;
}

.main-heart {
    display: inline-block;
    animation: heartbeat 1.2s infinite;
}

.infinity-text {
    margin-top: 15px;
    letter-spacing: 4px;
    color: #ffd1df;
    font-size: 14px;
}

/* LOVE SECTION */

.love-section {
    padding: 45px 10px;
}

/* LOVE LETTER CARD - REPLACES OUR LOVE STORY */

.love-section .love-letter-text {
    max-width: 850px;
    width: 95%;
    margin: 20px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 182, 193, 0.3);
    border-radius: 25px;
    box-shadow: 0 0 35px rgba(255, 60, 130, 0.15);
    backdrop-filter: blur(12px);
    text-align: center;
    line-height: 1.9;
}

.love-letter-text h2 {
    color: #ff8fab;
    font-size: clamp(24px, 5vw, 32px);
    font-weight: 600;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(255, 100, 160, 0.4);
}

.love-letter-text p {
    font-size: 15px;
    line-height: 2;
    margin-bottom: 22px;
    text-align: left;
    color: #ffeaf0;
}

.love-letter-text h3 {
    color: #ff8fab;
    font-size: clamp(18px, 4vw, 24px);
    margin-top: 30px;
    line-height: 1.7;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(255, 100, 160, 0.4);
}

/* MEMORY SECTION */

.memory-section {
    padding: 40px 10px;
}

.memory-card {
    max-width: 550px;
    margin: auto;
    padding: 40px 25px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 25px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    box-shadow: 0 0 35px rgba(255,60,130,0.15);
}

.memory-icon {
    font-size: 45px;
}

.memory-card h2 {
    font-size: 28px;
    font-weight: 600;
    color: #ffb4cd;
    margin: 15px;
}

.memory-card p {
    font-size: 14px;
    line-height: 2;
    color: #ffe1eb;
}

.infinity-decoration {
    font-size: 40px;
    color: #ff9fbd;
    margin-top: 20px;
    animation: glow 2s infinite alternate;
}

/* LETTER SECTION */

.letter-section {
    padding: 80px 10px;
    min-height: 500px;
}

.letter-small-title {
    font-size: 12px;
    letter-spacing: 3px;
    color: #ffb4cd;
}

.letter-heading {
    font-size: clamp(25px, 5vw, 38px);
    font-weight: 600;
    color: #ffb4cd;
    margin-top: 15px;
}

.letter-description {
    color: #ffe1eb;
    margin: 15px 0 35px;
    font-size: 14px;
}

/* ENVELOPE BUTTON */

.envelope-button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-direction: column;
    margin: auto;
    color: white;
    width: 100%;
}

.envelope {
    position: relative;
    width: min(330px, 85vw);
    height: 220px;
    background: #ff8bab;
    border-radius: 8px;
    box-shadow: 0 0 35px rgba(255,80,140,0.45);
    transition: transform 0.5s;
    perspective: 1000px;
}

.envelope-back {
    position: absolute;
    inset: 0;
    background: #ffadc4;
    border-radius: 8px;
}

.letter-inside {
    position: absolute;
    width: 90%;
    height: 90%;
    left: 5%;
    bottom: 5px;
    background: #fff2f5;
    color: #d6336c;
    border-radius: 5px;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1s ease;
}

.envelope-front {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: #f46c96;
    clip-path: polygon(
        0 0, 50% 55%, 100% 0,
        100% 100%, 0 100%
    );
    border-radius: 0 0 8px 8px;
    z-index: 3;
}

.envelope-flap {
    position: absolute;
    top: 0;
    width: 100%;
    height: 60%;
    background: #ffbfd0;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    transform-origin: top;
    transition: transform 0.8s ease;
    z-index: 4;
}

.envelope-heart {
    position: absolute;
    z-index: 5;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 38px;
    transition: opacity 0.4s;
}

/* CLICK TEXT */

.click-text {
    margin-top: 30px;
    padding: 18px 35px;
    border-radius: 50px;
    background: linear-gradient(45deg, #ff477e, #ff80a5);
    box-shadow: 0 0 25px rgba(255,70,130,0.5);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.5px;
    animation: glow 1.5s infinite alternate;
}

.envelope-button:hover .envelope {
    transform: translateY(-8px);
}

/* ENVELOPE OPENING */

.envelope-button.opened .envelope-flap {
    transform: rotateX(180deg);
    z-index: 1;
}

.envelope-button.opened .envelope-heart {
    opacity: 0;
}

.envelope-button.opened .letter-inside {
    transform: translateY(-130px);
    transition-delay: 0.5s;
}

.envelope-button.opened {
    pointer-events: none;
}

/* LOVE LETTER CONTENT */

.letter-content {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    visibility: hidden;
    transition:
        grid-template-rows 1s ease,
        opacity 0.8s ease,
        visibility 0.8s;
    margin: 0 auto;
    max-width: 650px;
}

.letter-content > .letter-paper {
    min-height: 0;
    overflow: hidden;
}

.letter-content.show-letter {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
    margin-top: 65px;
}

/* LETTER PAPER */

.letter-paper {
    background: #fff3f5;
    color: #74334b;
    border-radius: 15px;
    padding: 35px 25px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    text-align: center;
}

.letter-top {
    color: #d6336c;
    letter-spacing: 2px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 25px;
}

.letter-paper h2 {
    font-size: 27px;
    font-weight: 600;
    color: #d6336c;
    margin-bottom: 20px;
}

.letter-paragraph {
    font-size: 14px;
    line-height: 2;
    margin: 20px 0;
}

.letter-paper h3 {
    font-size: 22px;
    font-weight: 600;
    color: #c72d64;
    margin-top: 25px;
}

.letter-paper .signature {
    font-size: 26px;
    margin-top: 10px;
}

/* COUPLE PHOTO */

.couple-photo {
    width: 100%;
    max-width: 400px;
    margin: 25px auto;
    padding: 8px;
    border: 3px solid #ff9db9;
    border-radius: 15px;
    background: white;
    box-shadow: 0 0 25px rgba(255,80,140,0.2);
}

.love-photo {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.letter-bottom {
    color: #d6336c;
    font-size: 10px;
    letter-spacing: 2px;
    margin-top: 30px;
}

/* FOOTER */

.footer {
    padding: 50px 10px 20px;
    color: #ffd1df;
    font-size: 13px;
}

.footer h2 {
    font-size: 25px;
    font-weight: 600;
    color: #ff9fbd;
    margin: 15px;
}

/* FLOATING HEARTS */

.floating-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.floating-item {
    position: absolute;
    bottom: -50px;
    animation: floatUp linear forwards;
    opacity: 0;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-110vh) rotate(360deg);
        opacity: 0;
    }
}

/* HEARTBEAT */

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* GLOW */

@keyframes glow {
    from {
        filter: drop-shadow(0 0 3px #ff75a5);
    }

    to {
        filter: drop-shadow(0 0 15px #ff75a5);
    }
}

/* MOBILE RESPONSIVE */

@media (max-width: 600px) {

    .main-container {
        padding: 15px 12px;
    }

    .header {
        padding-top: 40px;
    }

    .small-text {
        letter-spacing: 2px;
    }

    .love-section {
        padding: 30px 5px;
    }

    .love-section .love-letter-text {
        width: 100%;
        padding: 25px 18px;
        margin: 15px auto;
        border-radius: 18px;
    }

    .love-letter-text h2 {
        font-size: 23px;
        margin-bottom: 22px;
    }

    .love-letter-text p {
        font-size: 14px;
        line-height: 1.9;
        margin-bottom: 18px;
    }

    .love-letter-text h3 {
        font-size: 18px;
    }

    .memory-card {
        padding: 30px 18px;
    }

    .letter-section {
        padding: 60px 5px;
    }

    .letter-paper {
        padding: 25px 15px;
    }

    .letter-paragraph {
        font-size: 13px;
    }

    .love-photo {
        height: 280px;
    }

    .click-text {
        font-size: 11px;
        padding: 16px 22px;
    }
}
