@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400&display=swap');

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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f0f18;
    --text-primary: #e8e0d8;
    --text-secondary: #9a8f85;
    --accent: #c4a882;
    --accent-glow: rgba(196, 168, 130, 0.3);
    --heart: #8b3a4a;
    --heart-glow: rgba(139, 58, 74, 0.4);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    font-weight: 300;
    overflow-x: hidden;
}

/* ========== Particles Canvas ========== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ========== Sections ========== */
section {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

/* ========== Reveal Animation ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.2s; }
.reveal-delay-2 { transition-delay: 0.4s; }
.reveal-delay-3 { transition-delay: 0.6s; }

/* ========== Hero Section ========== */
.hero {
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 80%, rgba(139, 58, 74, 0.08) 0%, transparent 60%);
}

.hero-heart {
    font-size: 4rem;
    margin-bottom: 24px;
    animation: heartbeat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px var(--heart-glow));
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.15); }
    30% { transform: scale(1); }
    45% { transform: scale(1.1); }
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 16px;
    text-shadow: 0 0 40px rgba(196, 168, 130, 0.15);
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.scroll-hint {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: float 3s ease-in-out infinite;
}

.scroll-hint span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ========== Divider ========== */
.divider {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    max-width: 400px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent), transparent);
    opacity: 0.3;
}

.divider-icon {
    color: var(--heart);
    font-size: 0.8rem;
    filter: drop-shadow(0 0 8px var(--heart-glow));
}

/* ========== Photo Section ========== */
.photo-section {
    background: radial-gradient(ellipse at 50% 50%, rgba(196, 168, 130, 0.04) 0%, transparent 60%);
}

.photo-frame {
    position: relative;
    padding: 8px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(196, 168, 130, 0.2), rgba(139, 58, 74, 0.2));
    box-shadow: 0 0 60px rgba(139, 58, 74, 0.15),
                0 0 120px rgba(196, 168, 130, 0.05);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.photo-frame:hover {
    transform: scale(1.02);
    box-shadow: 0 0 80px rgba(139, 58, 74, 0.25),
                0 0 160px rgba(196, 168, 130, 0.1);
}

.photo-frame img {
    display: block;
    width: 100%;
    max-width: 380px;
    height: auto;
    border-radius: 14px;
    filter: contrast(1.05) brightness(1.02);
}

.photo-caption {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 24px;
    text-align: center;
}

/* ========== Text Sections ========== */
.text-section {
    min-height: 80vh;
}

.text-content {
    max-width: 680px;
    text-align: center;
}

.text-content p {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    font-weight: 300;
    line-height: 2;
    color: var(--text-primary);
    opacity: 0.9;
}

.text-content .accent-text {
    color: var(--accent);
    font-style: italic;
}

.text-content .highlight {
    display: inline;
    background: linear-gradient(to bottom, transparent 60%, rgba(139, 58, 74, 0.25) 60%);
    padding-bottom: 2px;
}

/* ========== Final Section ========== */
.final-section {
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 60%, rgba(139, 58, 74, 0.1) 0%, transparent 50%);
}

.final-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 300;
    font-style: italic;
    text-align: center;
    color: var(--text-primary);
    text-shadow: 0 0 60px rgba(196, 168, 130, 0.2);
    animation: glow-text 4s ease-in-out infinite;
}

@keyframes glow-text {
    0%, 100% { text-shadow: 0 0 40px rgba(196, 168, 130, 0.1); }
    50% { text-shadow: 0 0 80px rgba(196, 168, 130, 0.3), 0 0 120px rgba(139, 58, 74, 0.15); }
}

.final-heart {
    font-size: 2.5rem;
    margin-top: 30px;
    animation: heartbeat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 25px var(--heart-glow));
}

.final-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 40px;
}

/* ========== Floating Hearts ========== */
.floating-heart {
    position: fixed;
    color: var(--heart);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    animation: float-up linear forwards;
    filter: drop-shadow(0 0 6px var(--heart-glow));
}

@keyframes float-up {
    0% {
        opacity: 0;
        transform: translateY(0) rotate(0deg) scale(0.5);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) rotate(360deg) scale(1);
    }
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    section {
        padding: 40px 20px;
    }

    .photo-frame img {
        max-width: 300px;
    }

    .text-content p {
        line-height: 1.9;
    }
    
    .hero-subtitle {
        letter-spacing: 0.15em;
    }
}

@media (max-width: 480px) {
    section {
        padding: 40px 16px;
    }

    .photo-frame {
        padding: 5px;
        border-radius: 14px;
    }

    .photo-frame img {
        max-width: 260px;
        border-radius: 10px;
    }

    .hero-heart {
        font-size: 3rem;
    }
}

/* ========== Safari/iOS fixes ========== */
@supports (-webkit-touch-callout: none) {
    section {
        min-height: -webkit-fill-available;
    }
    
    .hero {
        min-height: -webkit-fill-available;
    }
}

/* ========== Grain overlay ========== */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}
