/* ===========================
   RESET & BASE STYLES
   =========================== */

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

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: 'Crimson Text', serif;
    line-height: 1.8;
    color: #4a4a4a;
    background: linear-gradient(135deg, #fff5f7 0%, #ffe8e8 50%, #fff5f7 100%);
    overflow-x: hidden;
}

/* ===========================
   FLOATING HEARTS ANIMATION
   =========================== */

.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 182, 193, 0.3);
    transform: rotate(45deg);
    animation: float 15s infinite ease-in-out;
    opacity: 0;
}

.heart::before,
.heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 182, 193, 0.3);
    border-radius: 50%;
}

.heart::before {
    top: -10px;
    left: 0;
}

.heart::after {
    top: 0;
    left: -10px;
}

/* Individual heart animations with delays */
.heart:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.heart:nth-child(2) {
    left: 50%;
    animation-delay: 3s;
    animation-duration: 15s;
}

.heart:nth-child(3) {
    left: 70%;
    animation-delay: 6s;
    animation-duration: 13s;
}

.heart:nth-child(4) {
    left: 85%;
    animation-delay: 9s;
    animation-duration: 14s;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(45deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(45deg);
        opacity: 0;
    }
}

/* ===========================
   HERO SECTION
   =========================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #ffb6c1 0%, #ffd4d4 50%, #ffe4e1 100%);
    z-index: 2;
}

.hero-content {
    text-align: center;
    padding: 2rem;
    animation: fadeInUp 1.5s ease-out;
}

.script-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #8b4f5f;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: #a0616a;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.hero-from {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: #b87b84;
    font-style: italic;
}

.scroll-indicator {
    margin-top: 4rem;
    animation: bounce 2s infinite;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.scroll-indicator:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.scroll-indicator:focus-visible {
    outline: 2px solid #a0616a;
    outline-offset: 4px;
    border-radius: 4px;
}

.scroll-indicator span {
    font-size: 2rem;
    color: #a0616a;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-content,
    .scroll-indicator,
    .heart,
    .fade-in {
        animation: none !important;
        transition: none !important;
    }

    .fade-in {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===========================
   LETTER SECTION
   =========================== */

.letter {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: #fffaf0;
    position: relative;
    z-index: 2;
}

.letter-content {
    max-width: 700px;
    width: 100%;
}

.letter-content p {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin-bottom: 2rem;
    color: #4a4a4a;
    text-align: center;
}

.greeting {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #8b4f5f;
    margin-bottom: 2.5rem !important;
}

.emphasis {
    font-weight: 600;
    color: #8b4f5f;
    margin-top: 3rem;
}

/* Proposal Section */
.proposal {
    margin-top: 3rem;
    padding: 2rem;
    text-align: center;
}

.proposal .question {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #c94f6b;
    margin-bottom: 1rem;
}

.proposal .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #a0616a;
    font-style: italic;
}

/* ===========================
   CLOSING SECTION
   =========================== */

.closing {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: linear-gradient(180deg, #fffaf0 0%, #ffe8e8 100%);
    position: relative;
    z-index: 2;
}

.closing-content {
    text-align: center;
}

.signature {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    color: #4a4a4a;
    margin-bottom: 0.5rem;
}

.name {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #8b4f5f;
    margin-bottom: 1rem;
}

.date {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #a0616a;
    font-style: italic;
}

/* ===========================
   FADE-IN ANIMATION
   =========================== */

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
    }

    .letter {
        padding: 3rem 1.5rem;
    }

    .letter-content p {
        text-align: left;
    }

    .proposal {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .heart {
        width: 15px;
        height: 15px;
    }

    .heart::before,
    .heart::after {
        width: 15px;
        height: 15px;
    }

    .letter {
        padding: 2rem 1rem;
    }
}
