/* Custom variables for a premium, deep-romantic design */
:root {
    --bg-dark-blue: #030712;
    --bg-slate-blue: #0b1530;
    --accent-purple: #3b0764;
    --glow-purple: #7c3aed;
    --neon-pink: #d946ef;
    --text-white: #f8fafc;
    --text-muted: #cbd5e1;
    --text-violet: #a78bfa;
    --glass-bg: rgba(11, 21, 48, 0.45);
    --glass-border: rgba(139, 92, 246, 0.15);
    --glass-border-hover: rgba(217, 70, 239, 0.4);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow-shadow: 0 0 20px rgba(124, 58, 237, 0.2);
    --glow-pink-shadow: 0 0 20px rgba(217, 70, 239, 0.3);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    background-color: var(--bg-dark-blue);
    overflow-x: hidden;
}

body {
    position: relative;
    min-height: 100vh;
}

/* Canvas Background for Floating Hearts */
#heartCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(circle at center, var(--bg-slate-blue) 0%, var(--bg-dark-blue) 100%);
}

/* Ambient glow blobs in background */
.ambient-glow {
    position: fixed;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: -1;
    opacity: 0.12;
}

.glow-1 {
    background: var(--glow-purple);
    top: 10%;
    left: 10%;
    animation: floatGlow 12s infinite alternate ease-in-out;
}

.glow-2 {
    background: var(--neon-pink);
    bottom: 15%;
    right: 10%;
    animation: floatGlow 15s infinite alternate-reverse ease-in-out;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.1); }
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 20px;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
    animation: fadeInScale 1.5s ease-out;
}

.couple-names {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 30%, var(--text-violet) 70%, var(--neon-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.heart-symbol {
    display: inline-block;
    color: var(--neon-pink);
    animation: pulseHeart 1.8s infinite ease-in-out;
    -webkit-text-fill-color: var(--neon-pink);
    margin: 0 10px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 1px;
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Hero Favorites Stickers */
.hero-favorites {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: -15px auto 45px;
    perspective: 1000px;
}

.favorite-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.55);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: default;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.favorite-badge:hover {
    transform: translateY(-5px) rotateX(10deg) rotateY(-10deg);
}

.favorite-badge.airbender:hover {
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 0 6px 25px rgba(96, 165, 250, 0.35);
}

.favorite-badge.hufflepuff:hover {
    border-color: rgba(250, 204, 21, 0.6);
    box-shadow: 0 6px 25px rgba(250, 204, 21, 0.35);
}

.badge-svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.3));
    transition: transform 0.4s ease;
}

.favorite-badge:hover .badge-svg {
    transform: scale(1.15) rotate(-5deg);
}


.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-violet);
    opacity: 0.8;
}

.arrow-down {
    font-size: 1.5rem;
    animation: bounceArrow 1.5s infinite;
}

@keyframes pulseHeart {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 2px rgba(217, 70, 239, 0.5)); }
    50% { transform: scale(1.25); filter: drop-shadow(0 0 12px rgba(217, 70, 239, 0.9)); }
}

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

@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

/* Timeline Container */
.timeline-container {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 20px;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, 
        rgba(139, 92, 246, 0.1) 0%, 
        var(--glow-purple) 15%, 
        var(--accent-purple) 50%, 
        var(--neon-pink) 80%,
        rgba(217, 70, 239, 0.1) 100%
    );
    transform: translateX(-50%);
    z-index: 1;
}

/* Timeline Event Section */
.timeline-event {
    position: relative;
    width: 50%;
    margin-bottom: 80px;
    opacity: 0; /* Animated in via JS scroll trigger */
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 2;
}

.timeline-event.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-event.left {
    left: 0;
    padding-right: 50px;
}

.timeline-event.right {
    left: 50%;
    padding-left: 50px;
}

.timeline-dot {
    position: absolute;
    top: 25px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--bg-dark-blue);
    border: 3px solid var(--glow-purple);
    box-shadow: var(--glow-shadow);
    z-index: 3;
    transition: all 0.3s ease;
}

.timeline-event.left .timeline-dot {
    right: -9px;
}

.timeline-event.right .timeline-dot {
    left: -9px;
}

/* Card glassmorphism styling */
.timeline-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--glow-purple), var(--neon-pink));
    opacity: 0.7;
}

.timeline-card:hover {
    transform: translateY(-5px);
    border-color: var(--glass-border-hover);
    box-shadow: var(--card-shadow), var(--glow-pink-shadow);
}

.timeline-event:hover .timeline-dot {
    background-color: var(--neon-pink);
    border-color: var(--text-white);
    transform: scale(1.3);
    box-shadow: var(--glow-pink-shadow);
}

/* Date and Headings inside Card */
.event-date {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-violet);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.event-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.event-description {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Image styling & placeholder */
.image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px dashed rgba(167, 139, 250, 0.3);
    background: rgba(15, 23, 42, 0.4);
    transition: all 0.3s ease;
}

.image-wrapper:hover {
    border-color: var(--neon-pink);
    box-shadow: 0 4px 15px rgba(217, 70, 239, 0.15);
}

.image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--text-violet);
    font-size: 0.85rem;
    text-align: center;
    padding: 20px;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.image-placeholder svg {
    width: 32px;
    height: 32px;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.image-wrapper:hover .image-placeholder svg {
    transform: scale(1.1);
    opacity: 1;
    color: var(--neon-pink);
}

.story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    transition: opacity 0.5s ease;
}

/* Image wrappers split side by side */
.image-wrapper-split {
    display: flex;
    gap: 15px;
}

.image-wrapper-split .image-wrapper {
    flex: 1;
    height: 180px;
}

/* Image gallery 2x2 grid */
.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.image-gallery-grid .image-wrapper {
    height: 140px;
}

/* Special card styling for the August 2025 Promise letter */
.promise-card {
    border-color: rgba(167, 139, 250, 0.3) !important;
    background: rgba(15, 23, 42, 0.7) !important;
    box-shadow: 0 8px 32px 0 rgba(167, 139, 250, 0.15), var(--glow-shadow) !important;
}

.promise-card::before {
    background: linear-gradient(90deg, var(--text-violet), var(--neon-pink)) !important;
}

.promise-text {
    font-size: 1.05rem;
    line-height: 1.7;
    font-style: italic;
    color: var(--text-muted);
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--neon-pink);
    margin-bottom: 20px;
}

.promise-apology {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--neon-pink);
    text-shadow: 0 0 10px rgba(217, 70, 239, 0.4);
    text-align: right;
    margin-top: 15px;
    font-weight: 600;
    font-style: italic;
}

/* Dark Phase & Today Card variations for emotional accentuation */
.dark-card {
    border-color: rgba(239, 68, 68, 0.2);
}

.dark-card::before {
    background: linear-gradient(90deg, #ef4444, #7f1d1d);
}

.dark-dot {
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.dark-placeholder {
    color: #f87171;
}

.dark-placeholder svg {
    color: #ef4444;
}

.timeline-event.dark-phase-event:hover .timeline-dot {
    background-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

/* Today's Crossroads card */
.today-card {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 8px 32px 0 rgba(245, 158, 11, 0.15);
}

.today-card::before {
    background: linear-gradient(90deg, #f59e0b, var(--neon-pink));
}

.today-dot {
    border-color: #f59e0b;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.today-placeholder {
    color: #fbbf24;
}

.today-placeholder svg {
    color: #f59e0b;
}

.timeline-event.today-event:hover .timeline-dot {
    background-color: #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.7);
}

/* Future / Closing Section */
.future-section {
    padding: 100px 20px 140px;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.glass-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: var(--card-shadow);
    transition: border-color 0.4s ease;
}

.future-heading {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 40%, var(--text-violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.future-intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 40px;
}

/* Heart Mender Widget */
.heart-mender-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 40px 0 20px;
}

.heart-mender {
    position: relative;
    width: 100px;
    height: 100px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.heart-mender:hover {
    transform: scale(1.08);
}

.heart-half {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.half-svg {
    width: 100%;
    height: 100%;
    fill: #ef4444;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.4));
}

.left-half {
    transform: translateX(-8px);
    clip-path: polygon(0% 0%, 50% 0%, 50% 100%, 0% 100%);
}

.right-half {
    transform: translateX(8px);
    clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 50% 100%);
}

.heart-crack {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #030712;
    transform: translateX(-50%);
    clip-path: polygon(50% 0%, 80% 20%, 20% 40%, 80% 60%, 20% 80%, 50% 100%);
    transition: opacity 0.5s ease;
    z-index: 5;
}

.mender-prompt {
    font-size: 0.95rem;
    color: var(--text-violet);
    margin-top: 15px;
    letter-spacing: 1px;
    animation: pulsePrompt 2s infinite ease-in-out;
}

@keyframes pulsePrompt {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Mended animation and messaging states */
.heart-mender.mended .left-half {
    transform: translateX(0);
}

.heart-mender.mended .right-half {
    transform: translateX(0);
}

.heart-mender.mended .half-svg {
    fill: var(--neon-pink);
    filter: drop-shadow(0 0 25px rgba(217, 70, 239, 0.9));
    animation: beatMended 1s infinite alternate 0.6s ease-in-out;
}

@keyframes beatMended {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.heart-mender.mended .heart-crack {
    opacity: 0;
}

.mender-message {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: max-height 0.8s ease, opacity 0.8s ease, transform 0.8s ease;
}

.mender-message.show {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid rgba(139, 92, 246, 0.15);
}

.mender-message h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--neon-pink);
    margin-bottom: 15px;
    text-shadow: 0 0 8px rgba(217, 70, 239, 0.2);
}

.mender-message p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 550px;
    margin: 0 auto;
}

/* Modal Popup Window */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.photo-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-slate-blue);
    border: 1px solid var(--glass-border-hover);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), var(--glow-pink-shadow);
    padding: 40px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.photo-modal.show .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: var(--text-white);
}

.modal-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    margin-bottom: 15px;
}

.modal-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-content code {
    display: block;
    background: var(--bg-dark-blue);
    padding: 12px;
    border-radius: 8px;
    color: var(--neon-pink);
    font-family: monospace;
    font-size: 1rem;
    margin-bottom: 20px;
    border: 1px solid rgba(217, 70, 239, 0.2);
}

.modal-tip {
    font-style: italic;
    color: var(--text-violet) !important;
}

.modal-btn {
    background: linear-gradient(135deg, var(--glow-purple), var(--neon-pink));
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(217, 70, 239, 0.4);
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 70, 239, 0.6);
}

/* Footer Section */
.footer {
    text-align: center;
    padding: 60px 20px;
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--bg-dark-blue);
    z-index: 2;
    position: relative;
}

.footer p {
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.footer-date {
    font-size: 0.8rem;
    color: var(--text-violet);
    opacity: 0.8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .couple-names {
        font-size: 3rem;
    }
    
    .hero-favorites {
        gap: 15px;
        flex-wrap: wrap;
        margin-bottom: 35px;
    }
    
    .favorite-badge {
        padding: 6px 15px;
        font-size: 0.8rem;
    }
    
    .badge-svg {
        width: 26px;
        height: 26px;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .timeline-event {
        width: 100%;
        left: 0 !important;
        padding-left: 50px !important;
        padding-right: 0 !important;
        margin-bottom: 50px;
    }
    
    .timeline-dot {
        left: 11px !important;
        right: auto !important;
    }
    
    .image-wrapper-split {
        flex-direction: column;
        gap: 12px;
    }
    
    .image-wrapper-split .image-wrapper {
        height: 160px;
    }

    .future-heading {
        font-size: 2rem;
    }
    
    .glass-container {
        padding: 35px 20px;
    }
}
