/* =========================
   GOOGLE FONTS
========================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Playfair+Display:wght@400;500;600&display=swap');


/* =========================
   RESET
========================= */

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



/* =========================
    BODY
========================= */

html,
body{
    width: 100%;
    min-height: 100%;
}

body{
    background-color: #f4EEE4;
    color: #342d28;
    font-family: "Playfair Display", serif;
}


/* =========================
    PAGE
========================= */

.letters-page{
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    padding: 60px 40px 100px;
}

.letters-container{
    width: 100%;
    max-width: 900px;

    margin: 0 auto;
}

/* =========================
   BACK LINK
========================= */

.back-link{
    display: inline-block;

    margin-bottom: 80px;
    color: #342d28;
    font-size: 14px;
    text-decoration: none;
    opacity: 0.6;
    transition: 0.3s ease;
}

.back-link:hover{
    opacity: 1;
    transform: translateX(-5px);
}


/* =========================
   HEADER
========================= */

.letters-header{
    text-align: center;

    margin-bottom: 100px;
}

.section-label{
    margin-bottom: 25px;

    font-size: 13px;

    letter-spacing: 5px;

    text-transform: uppercase;

    opacity: 0.5;
}

.letters-header h1{
    margin-bottom: 30px;

    font-family: "Cormorant Garamond", serif;

    font-size: clamp(55px, 8vw, 95px);

    font-weight: 500;

    line-height: 0.9;
}

.letters-description{
    max-width: 500px;

    margin: 0 auto;

    font-size: 17px;

    line-height: 1.8;

    opacity: 0.7;
}

/* =========================
   DAYS
========================= */

.days{
    display: flex;

    flex-direction: column;

    gap: 35px;
}

/* =========================
   DAY CARD
========================= */

.day-card{
    position: relative;

    width: 100%;

    padding: 45px 50px;

    background-color: #fffdf8;

    box-shadow:
        0 15px 35px rgba(50, 40, 30, 0.10);

    transition:
        transform 0.4s ease,
        box-shadow 0.4s ease;
}

.day-card.unlocked{
    cursor: pointer;
}

.day-card.unlocked:hover{
    transform: translateY(-5px);

    box-shadow:
        0 20px 45px rgba(50, 40, 30, 0.16);
}

/* =========================
   DAY NUMBER
========================= */

.day-number{
    margin-bottom: 25px;
    font-size: 11px;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.45;
}

/* =========================
   DAY CONTENT
========================= */

.day-content{
    text-align: center;
}

.day-icon{
    display: block;

    margin-bottom: 20px;

    font-size: 28px;

    opacity: 0.65;
}

.day-content h2{
    margin-bottom: 15px;

    font-family: "Cormorant Garamond", serif;

    font-size: 38px;

    font-weight: 500;
}

.day-content p{
    margin-bottom: 25px;

    font-size: 15px;

    line-height: 1.7;

    opacity: 0.65;
}


/* =========================
   BUTTON
========================= */

.open-button{
    padding: 12px 28px;

    border: 1px solid #8d7665;

    background: transparent;

    color: #342d28;

    font-family: inherit;

    font-size: 14px;

    cursor: pointer;

    transition: 0.3s ease;
}

.open-button:hover{
    background-color: #342d28;
    color: #f4eee4;

    transform: translateY(-2px);
}

/* =========================
   LOCKED
========================= */

.day-card.locked{
    opacity: 0.55;
}

.day-card.locked .day-icon{
    font-size: 22px;
}

.day-card.locked:hover{
    transform: none;
}


/* =========================
   LETTER MODAL
========================= */

.letter-modal {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: flex;

    justify-content: center;
    align-items: center;

    padding: 30px;

    visibility: hidden;

    opacity: 0;

    pointer-events: none;

    transition:
        opacity 0.4s ease,
        visibility 0.4s ease;
}


.letter-modal.active {
    visibility: visible;

    opacity: 1;

    pointer-events: auto;
}


/* =========================
   OVERLAY
========================= */

.letter-modal-overlay {
    position: absolute;

    inset: 0;

    background: rgba(52, 45, 40, 0.45);

    backdrop-filter: blur(5px);
}


/* =========================
   MODAL
========================= */

.letter-modal-content {
    position: relative;

    z-index: 2;

    width: min(650px, 100%);

    max-height: 85vh;

    overflow-y: auto;

    padding: 70px;

    background-color: #fffdf8;

    box-shadow:
        0 30px 80px rgba(30, 25, 20, 0.30);

    text-align: center;

    transform: translateY(20px) scale(0.97);

    transition:
        transform 0.4s ease;
}


.letter-modal.active .letter-modal-content {
    transform: translateY(0) scale(1);
}


/* =========================
   CLOSE
========================= */

.modal-close {
    position: absolute;

    top: 18px;
    right: 22px;

    z-index: 3;

    width: 35px;
    height: 35px;

    padding: 0;

    border: none;

    background: transparent;

    color: #342d28;

    font-family: Arial, sans-serif;

    font-size: 28px;

    font-weight: 300;

    line-height: 35px;

    cursor: pointer;

    opacity: 0.5;
}


.modal-close:hover {
    opacity: 1;

    transform: rotate(90deg);
}


/* =========================
   MODAL ITEM
========================= */

.modal-item {
    margin-bottom: 60px;
}


.modal-item:last-child {
    margin-bottom: 0;
}


.modal-item-icon {
    display: block;

    margin-bottom: 25px;

    font-size: 30px;

    opacity: 0.6;
}


.modal-item h2 {
    margin-bottom: 30px;

    font-family: "Cormorant Garamond", serif;

    font-size: clamp(38px, 6vw, 60px);

    font-weight: 500;

    line-height: 1;
}


.modal-item p {
    font-family: "Cormorant Garamond", serif;

    font-size: 22px;

    line-height: 1.8;

    white-space: pre-line;

    opacity: 0.8;
}


/* =========================
   LETTER
========================= */

.modal-letter {
    position: relative;

    padding: 35px 25px 25px;

    background:
        linear-gradient(
            rgba(255, 253, 248, 0.96),
            rgba(250, 245, 235, 0.96)
        );

    border: 1px solid rgba(141, 118, 101, 0.25);
}


/* decorative line */

.modal-letter::before {
    content: "";

    display: block;

    width: 70px;
    height: 1px;

    margin: 0 auto 30px;

    background-color: #8d7665;

    opacity: 0.5;
}


.modal-letter .modal-item-icon {
    font-size: 26px;

    margin-bottom: 15px;

    opacity: 0.5;
}


.modal-letter h2 {
    margin-bottom: 12px;

    font-size: clamp(42px, 6vw, 62px);
}


.modal-date {
    margin-bottom: 45px;

    font-size: 11px;

    letter-spacing: 4px;

    text-transform: uppercase;

    opacity: 0.45;
}


.modal-letter p {
    max-width: 500px;

    margin: 0 auto;

    font-size: 21px;

    line-height: 2;

    text-align: left;
}


.modal-signature {
    max-width: 500px;

    margin: 45px auto 0;

    font-family: "Cormorant Garamond", serif;

    font-size: 32px;

    font-style: italic;

    text-align: right;

    opacity: 0.8;
}


/* =========================
   POEM
========================= */

.modal-poem {
    padding: 50px 25px;
}


.modal-poem .modal-item-icon {
    font-size: 38px;

    margin-bottom: 35px;

    opacity: 0.65;
}


.modal-poem h2 {
    margin-bottom: 50px;

    font-size: clamp(45px, 7vw, 70px);

    font-weight: 400;

    font-style: italic;
}


.modal-poem p {
    max-width: 450px;

    margin: 0 auto;

    font-family: "Cormorant Garamond", serif;

    font-size: 25px;

    line-height: 2.2;

    font-style: italic;

    text-align: center;
}


/* decorative poem lines */

.modal-poem::before,
.modal-poem::after {
    content: "✦";

    display: block;

    margin: 0 auto 25px;

    font-size: 14px;

    opacity: 0.35;
}


.modal-poem::after {
    margin-top: 45px;

    margin-bottom: 0;
}


/* =========================
   MESSAGE
========================= */

.modal-message {
    width: 85%;

    margin: 20px auto;

    padding: 55px 40px 45px;

    background-color: #f4eee4;

    border: 1px solid rgba(141, 118, 101, 0.3);

    box-shadow:
        0 15px 35px rgba(50, 40, 30, 0.12);

    transform: rotate(1.5deg);
}


/* big heart */

.modal-message .modal-item-icon {
    font-size: 55px;

    margin-bottom: 25px;

    opacity: 0.55;
}


/* title */

.modal-message h2 {
    margin-bottom: 30px;

    font-family: "Cormorant Garamond", serif;

    font-size: 36px;

    font-weight: 500;

    letter-spacing: 1px;
}


/* message text */

.modal-message p {
    max-width: 330px;

    margin: 0 auto;

    font-family: "Cormorant Garamond", serif;

    font-size: 25px;

    line-height: 1.8;

    text-align: center;
}


/* little heart */

.message-heart {
    display: block;

    margin-top: 35px;

    font-size: 28px;

    opacity: 0.45;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .letter-modal {
        padding: 20px;
    }


    .letter-modal-content {
        padding: 60px 30px;

        max-height: 90vh;
    }


    .modal-item p {
        font-size: 19px;
    }

}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px)
{
    .letters-page{
        padding: 40px 25px 80px;
    }

    .back-link{
        margin-bottom: 60px;
    }

    .letters-header{
        margin-bottom: 70px;
    }

    .day-card{
        padding: 35px 25px;
    }

    .day-content h2{
        font-size: 32px;
    }

    .letter-modal {
        padding: 20px;
    }


    .letter-modal-content {
        padding: 60px 30px;

        max-height: 90vh;
    }


    .modal-item p {
        font-size: 19px;
    }
}