:root {
    --color-bg-start: #fff0f3;
    /* Blush pink light */
    --color-bg-end: #fff5f7;
    /* Very light cool white */
    --color-accent: #ff8fa3;
    /* Soft Pink */
    --color-text-main: #4a4a4a;
    --color-text-light: #888;
    --color-gold: #c5a059;

    --font-heading: 'Dancing Script', cursive;
    --font-body: 'Montserrat', sans-serif;

    --spacing-section: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-main);
    background: linear-gradient(to bottom, var(--color-bg-start), var(--color-bg-end));
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Audio Control */
.audio-control {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.audio-control:hover {
    transform: scale(1.05);
    background: #fff;
}

/* Section Common */
section {
    min-height: 100vh;
    padding: var(--spacing-section) 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 1. Hero Section */
.hero-section {
    text-align: center;
    position: relative;
}

.background-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #fff0f3 0%, #ffe4e8 50%, #fcd5ce 100%);
    opacity: 0.6;
    z-index: -1;
    animation: pulseGradient 10s infinite alternate;
}

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

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

.hero-title {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--color-accent);
    margin-bottom: 20px;
    opacity: 0;
    /* Animated by GSAP */
    transform: translateY(30px);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-text-main);
    opacity: 0;
    transform: translateY(20px);
}

.hero-date {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-accent);
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
    animation: fadeIn 1s 2s forwards, bounce 2s infinite 3s;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeIn {
    to {
        opacity: 0.7;
    }
}

/* 2. Memory Lane */
.memory-section {
    background: transparent;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    margin-bottom: 60px;
    color: var(--color-text-main);
    text-align: center;
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 80px;
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
}

.memory-item {
    display: flex;
    width: 100%;
    opacity: 0;
    /* GSAP */
    transform: translateY(50px);
}

.memory-item.left {
    justify-content: flex-start;
}

.memory-item.right {
    justify-content: flex-end;
}

.polaroid {
    background: #fff;
    padding: 15px 15px 40px 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.memory-item.right .polaroid {
    transform: rotate(2deg);
}

.polaroid:hover {
    transform: scale(1.02) rotate(0deg) !important;
    z-index: 10;
}

.photo-placeholder {
    width: 300px;
    height: 300px;
    background-color: #eee;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="%23ccc" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3E%3Crect x="3" y="3" width="18" height="18" rx="2" ry="2"%3E%3C/rect%3E%3Ccircle cx="8.5" cy="8.5" r="1.5"%3E%3C/circle%3E%3Cpolyline points="21 15 16 10 5 21"%3E%3C/polyline%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 15px;
    border: 1px solid #f0f0f0;
}

.caption {
    font-family: 'Courier New', Courier, monospace;
    /* Typewriter feel */
    color: #555;
    text-align: center;
    font-size: 1rem;
}

/* 3. Love Letter */
.letter-section {
    background-color: #fdf5f6;
    /* Very subtle pink */
}

.envelope-container {
    cursor: pointer;
    perspective: 1000px;
}

/* 3. Love Letter */
.letter-section {
    background-color: #fdf5f6;
    perspective: 1500px;
}

.envelope-container {
    position: relative;
    width: 300px;
    height: 200px;
    cursor: pointer;
}

.envelope {
    position: relative;
    width: 100%;
    height: 100%;
    background: #e0c9cb;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

/* Envelope Flap (Top) */
.flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-top: 110px solid #d4b5b7;
    /* Slightly darker */
    transform-origin: top;
    transition: transform 0.4s 0.2s ease, z-index 0.2s;
    z-index: 5;
}

/* Envelope Body (Bottom triangles to hold letter) */
.body {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 150px solid #e0c9cb;
    border-right: 150px solid #e0c9cb;
    border-top: 100px solid transparent;
    /* This creates the pocket effect */
    z-index: 4;
    /* Above the letter */
}

/* Side folds for realism (Optional but nice) */
.envelope::before,
.envelope::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-top: 100px solid transparent;
    z-index: 4;
}

.envelope::before {
    left: 0;
    border-left: 150px solid #dcb0b3;
    border-bottom: 100px solid #dcb0b3;
}

.envelope::after {
    right: 0;
    border-right: 150px solid #dcb0b3;
    border-bottom: 100px solid #dcb0b3;
}

/* The Letter Inside */
.letter {
    position: absolute;
    bottom: 0;
    left: 15px;
    width: 270px;
    /* Fits inside 300px */
    height: 180px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    z-index: 3;
    /* Starts inside the pocket (below body/flap) */
    transition: transform 0.6s 0.6s ease, height 0.6s 0.6s ease, z-index 0.1s 0.6s;
    overflow: hidden;
}

.letter-content {
    opacity: 0;
    transition: opacity 0.5s 1.2s;
    font-family: 'Dancing Script', cursive;
    font-size: 1.2rem;
    color: #444;
}

.seal {
    position: absolute;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    z-index: 6;
    /* On top of flap */
    transition: opacity 0.2s;
}

/* Open State classes (applied via JS) */
.envelope-container.open .flap {
    transform: rotateX(180deg);
    z-index: 1;
    /* Moves behind the letter */
    transition: transform 0.4s ease, z-index 0.1s 0.4s;
}

.envelope-container.open .seal {
    opacity: 0;
    pointer-events: none;
}

.envelope-container.open .letter {
    transform: translateY(-50px);
    /* Slides up */
    height: 300px;
    /* Expands */
    z-index: 6;
    /* Pops out on top */
}

.envelope-container.open .letter-content {
    opacity: 1;
}

.click-instruction {
    margin-top: 50px;
    /* Push down to accommodate expansion */
    transition: opacity 0.3s;
}

.envelope-container.open .click-instruction {
    opacity: 0;
}

.click-instruction {
    text-align: center;
    margin-top: 20px;
    color: #999;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* 4. Surprise */
.surprise-section {
    background: #fff;
    text-align: center;
}

.big-reveal {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: #ff5e78;
}

.reveal-sub {
    font-size: 1.5rem;
    margin-top: 20px;
    color: #666;
}

.celebrate-btn {
    margin-top: 40px;
    padding: 15px 40px;
    font-size: 1.2rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 94, 120, 0.3);
    transition: transform 0.2s;
}

.celebrate-btn:hover {
    transform: scale(1.05);
}

/* 5. Forever */
.forever-section {
    min-height: 50vh;
    background: #fafafa;
    padding: 0px;
}

.forever-content blockquote {
    font-size: 1.8rem;
    font-style: italic;
    color: #777;
    margin-bottom: 20px;
    line-height: 1.6;
    text-align: center;
}

.signature {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-accent);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .photo-placeholder {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .timeline {
        gap: 50px;
    }
}