@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Inter:wght@300;400;500&display=swap');


:root {
    --background: #f7f1e8;
    --background-soft: #f2eadf;

    --text: #292521;
    --muted: #746b61;

    --accent: #9a6b62;
    --accent-light: #b99389;

    --border: #ded4c8;
}


* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;
    padding: 0;

    background: var(--background);
    color: var(--text);

    font-family: "Inter", sans-serif;
    font-weight: 300;

    overflow-x: hidden;
}


button {
    font-family: inherit;
}


/* =========================
   OPENING
========================= */

.opening {
    position: fixed;
    inset: 0;

    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--background);

    transition:
        opacity 1.2s ease,
        transform 1.2s ease;
}


.opening.closing {
    opacity: 0;
    transform: translateY(-25px);
    pointer-events: none;
}


.letter {
    text-align: center;

    padding: 40px;

    animation: openingAppear 1.5s ease forwards;
}


@keyframes openingAppear {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================
   TYPOGRAPHY
========================= */

.eyebrow,
.final-small {
    margin: 0 0 20px;

    color: var(--muted);

    font-size: 0.72rem;

    letter-spacing: 0.2em;

    text-transform: uppercase;
}


h1,
h2 {
    margin: 0;

    font-family: "Cormorant Garamond", serif;

    font-weight: 500;
}


h1 {
    font-size: clamp(4rem, 11vw, 8rem);

    line-height: 0.9;
}


h2 {
    font-size: clamp(3.2rem, 8vw, 6rem);

    line-height: 0.95;
}


.divider,
.section-divider,
.final-divider {
    width: 50px;
    height: 1px;

    margin: 35px auto;

    background: var(--border);
}


/* =========================
   BUTTONS
========================= */

.link-button,
.next-button {
    border: 0;

    background: transparent;

    color: var(--accent);

    cursor: pointer;

    font-size: 0.78rem;

    letter-spacing: 0.1em;

    padding: 10px;

    transition:
        opacity 0.3s ease,
        letter-spacing 0.3s ease;
}


.link-button:hover,
.next-button:hover {
    opacity: 0.65;

    letter-spacing: 0.16em;
}


/* =========================
   MAIN
========================= */

.main-content {
    opacity: 0;

    transition:
        opacity 1.4s ease;
}


.main-content.visible {
    opacity: 1;
}


/* =========================
   SECTIONS
========================= */

.section {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 120px 30px;
}


.section-content {
    width: min(760px, 90%);

    text-align: center;
}


.section-number {
    margin: 0 0 25px;

    color: var(--accent);

    font-size: 0.7rem;

    letter-spacing: 0.25em;
}


.text-content {
    width: min(620px, 100%);

    margin: 0 auto;

    color: var(--muted);

    font-size: 1rem;

    line-height: 2;
}


.text-content p {
    margin: 0 0 30px;
}


.next-button {
    margin-top: 35px;
}


/* =========================
   BIRTHDAY
========================= */

.birthday-section {
    background: var(--background);
}


/* =========================
   PERFECT
========================= */

.perfect-section {
    background: var(--background-soft);
}


.photo-frame {
    width: min(430px, 85vw);

    margin: 50px auto;

    overflow: hidden;

    box-shadow:
        0 15px 45px rgba(70, 55, 45, 0.08);

    opacity: 0;

    transform: translateY(25px);

    animation: photoReveal 1.2s ease forwards;
}


.photo-frame img {
    display: block;

    width: 100%;
    height: auto;

    object-fit: cover;
}


.photo-secondary {
    width: min(330px, 75vw);

    margin-top: 70px;
}


@keyframes photoReveal {

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================
   FEELINGS
========================= */

.feelings-section {
    background: var(--background);

    min-height: 110vh;
}


.emotional-text {
    font-family: "Cormorant Garamond", serif;

    font-size: clamp(1.3rem, 2.5vw, 1.7rem);

    line-height: 1.8;

    color: var(--text);
}


.final-photo {
    width: min(390px, 80vw);

    margin: 70px auto 0;

    overflow: hidden;

    box-shadow:
        0 20px 55px rgba(70, 55, 45, 0.1);
}


.final-photo img {
    display: block;

    width: 100%;
    height: auto;
}


/* =========================
   FINAL
========================= */

.final-section {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 80px 30px;

    background: var(--background-soft);

    text-align: center;
}


.final-content {
    width: min(650px, 90%);
}


.final-content h2 {
    font-size: clamp(4rem, 10vw, 7rem);
}


.final-line {
    max-width: 500px;

    margin: 0 auto;

    color: var(--muted);

    font-family: "Cormorant Garamond", serif;

    font-size: 1.4rem;

    line-height: 1.8;
}


/* =========================
   MOBILE
========================= */

@media (max-width: 600px) {

    .section {
        padding: 90px 20px;
    }

    .letter {
        padding: 30px;
    }

    .text-content {
        font-size: 0.95rem;
        line-height: 1.9;
    }

    .emotional-text {
        font-size: 1.25rem;
    }

}
/* =========================
   SPLIT PHOTO SECTION
========================= */

.split-section {
    width: min(1100px, 90%);

    display: grid;
    grid-template-columns: 1fr 1fr;

    align-items: center;

    gap: clamp(50px, 8vw, 120px);

    margin: 0 auto;
}


.split-text {
    text-align: left;
}


.split-text .section-divider {
    margin-left: 0;
}


.split-text .text-content {
    margin-left: 0;
}


.split-text .next-button {
    margin-left: -10px;
}


.split-image {
    display: flex;

    align-items: center;
    justify-content: center;
}


.split-image .photo-frame {
    width: min(440px, 100%);

    margin: 0;

    transform: rotate(1deg);

    box-shadow:
        0 20px 50px rgba(70, 55, 45, 0.12);
}


/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .split-section {
        width: 88%;
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .split-text {
        text-align: center;
    }

    .split-text .section-divider {
        margin: 30px auto;
    }

    .split-text .text-content {
        margin: 0 auto;
    }

    .split-image {
        order: 2;
        padding: 0 8px;
    }

    .split-image .photo-frame {
        width: 100%;
        max-width: 360px;
    }

}