@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Montserrat:wght@300;400;500&family=Dancing+Script:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Imperial+Script&display=swap');

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

:root {
    --burgundy: #5c1414;
    --beige: #f4e8d8;
    --cream: #faf6f0;
    --gold: #d4af37;
    --dark-burgundy: #3d0c0c;
    --dark-green: rgb(180, 180, 159);
}

body {
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    background: var(--cream);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--burgundy) 0%, var(--dark-burgundy) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s linear infinite;
}

.hero-content {
    text-align: center;
    color: var(--cream);
    z-index: 1;
    padding: 2rem;
    animation: fadeInUp 1.5s ease-out;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: 0.1em;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.date {
    display: inline-block;
    padding: 1rem 2rem;
    border: 1px solid var(--cream);
    margin-top: 2rem;
    font-size: clamp(1rem, 2vw, 1.3rem);
    letter-spacing: 0.1em;
    animation: pulse 2s ease-in-out infinite;
}

/* Golden Moldings */
.golden-molding {
    position: absolute;
    background: linear-gradient(45deg, var(--gold) 0%, #f4d03f 25%, var(--gold) 50%, #f4d03f 75%, var(--gold) 100%);
    opacity: 0.8;
    z-index: 2;
}

.golden-molding-top {
    top: 1rem;
    left: 3rem;
    right: 3rem;
    height: 4px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.golden-molding-bottom {
    bottom: 1rem;
    left: 3rem;
    right: 3rem;
    height: 4px;
    border-radius: 2px;
    box-shadow: 0 -2px 8px rgba(212, 175, 55, 0.3);
}

.golden-molding-left {
    left: 1rem;
    top: 3rem;
    bottom: 3rem;
    width: 4px;
    border-radius: 2px;
    box-shadow: 2px 0 8px rgba(212, 175, 55, 0.3);
}

.golden-molding-right {
    right: 1rem;
    top: 3rem;
    bottom: 3rem;
    width: 4px;
    border-radius: 2px;
    box-shadow: -2px 0 8px rgba(212, 175, 55, 0.3);
}

/* Golden Corners */
.golden-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, var(--gold) 30%, transparent 70%);
    border: 2px solid var(--gold);
    border-radius: 50%;
    opacity: 0.9;
    z-index: 3;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.golden-corner-top-left {
    top: 0.5rem;
    left: 0.5rem;
}

.golden-corner-top-right {
    top: 0.5rem;
    right: 0.5rem;
}

.golden-corner-bottom-left {
    bottom: 0.5rem;
    left: 0.5rem;
}

.golden-corner-bottom-right {
    bottom: 0.5rem;
    right: 0.5rem;
}

/* Schedule Section */
.schedule {
    padding: 4rem 1rem;
    background: var(--cream);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    color: var(--burgundy);
    margin-bottom: 3rem;
    position: relative;
    animation: fadeIn 1s ease-out;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: var(--gold);
}

.timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.timeline-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: slideInUp 0.8s ease-out;
}

.timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(92,20,20,0.2);
}

.timeline-time {
    font-size: 1.5rem;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--burgundy);
    margin-bottom: 1rem;
}

.timeline-location {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.timeline-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.timeline-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--burgundy);
    text-decoration: none;
    border: 1px solid var(--burgundy);
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    text-align: center;
}

.timeline-btn:hover {
    background: var(--burgundy);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(92, 20, 20, 0.2);
}

/* Story Section */
.story {
    padding: 4rem 1rem;
    background: linear-gradient(135deg, var(--burgundy) 0%, var(--dark-burgundy) 100%);
}

.story-header {
    text-align: center;
    margin-bottom: 1rem;
    animation: fadeIn 1.5s ease-out;
}

.story-title-card {
    padding: 1rem 1rem;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.story-ornament {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: auto;
    opacity: 0.2;
    z-index: 1;
}

.story-ornament img {
    width: 100%;
    height: auto;
    filter: brightness(0) saturate(100%) invert(85%) sepia(10%) saturate(547%) hue-rotate(349deg) brightness(106%) contrast(94%);
}

.story-title-main {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--cream);
    margin: 0;
    line-height: 1.7;
    position: relative;
    z-index: 2;
    text-align: center;
}

.story-title-script {
    font-family: "Imperial Script", cursive;
    font-size: clamp(5rem, 6vw, 4.5rem);
    font-weight: 500;
    color: var(--dark-green);
    letter-spacing: 0.02em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    text-align: center;
}

.story-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    animation: fadeIn 1.5s ease-out;
}

.story-text {
    color: var(--cream);
    line-height: 1.8;
    font-size: clamp(1rem, 2vw, 1.1rem);
    margin-bottom: 2rem;
    text-align: center;
}

/* Gallery Section */
.gallery {
    padding: 4rem 1rem;
    background: var(--cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.gallery-item {
    aspect-ratio: 1;
    background: var(--beige);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    animation-play-state: paused;
}

.gallery.visible .gallery-item img {
    animation: subtleMove 8s ease-in-out infinite, subtleZoom 10s ease-in-out infinite;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

@keyframes subtileMove {
    0%, 100% {
        transform: translateX(-15%);
    }
    50% {
        transform: translateX(15%);
    }
}

@keyframes subtleZoom {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.gallery.visible .gallery-item:nth-child(1) img {
    animation-delay: 0s, 0.5s;
}

.gallery.visible .gallery-item:nth-child(2) img {
    animation-delay: 1s, 2s;
}

.gallery.visible .gallery-item:nth-child(3) img {
    animation-delay: 2s, 3.5s;
}

/* Contact Section */
.contact {
    padding: 4rem 1rem;
    background: var(--burgundy);
    color: var(--cream);
    text-align: center;
}

.contact-title {
    color: var(--cream);
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    padding: 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: background 0.3s ease;
}

.contact-card:hover {
    background: rgba(255,255,255,0.15);
}

.contact-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.contact-info {
    line-height: 1.8;
    opacity: 0.9;
}

/* RSVP Buttons */
.rsvp-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.rsvp-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    min-width: 220px;
    text-align: center;
    font-size: 1rem;
    border: 2px solid transparent;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.rsvp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.rsvp-sms {
    background: var(--burgundy);
    color: var(--cream);
}

.rsvp-sms:hover {
    background: var(--dark-burgundy);
    color: var(--cream);
}

.rsvp-email {
    background: var(--cream);
    color: var(--burgundy);
    border: 2px solid var(--burgundy);
}

.rsvp-email:hover {
    background: var(--burgundy);
    color: var(--cream);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

@keyframes float {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator::before {
    content: '⌄';
    font-size: 2rem;
    color: var(--cream);
    opacity: 0.6;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-title {
        letter-spacing: 0.05em;
    }
    
    .timeline {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-cards {
        grid-template-columns: 1fr;
    }
    
    .golden-molding-top,
    .golden-molding-bottom {
        left: 1rem;
        right: 1rem;
    }
    
    .golden-molding-left,
    .golden-molding-right {
        top: 1rem;
        bottom: 1rem;
    }
    
    .golden-corner {
        width: 15px;
        height: 15px;
    }
    
    .rsvp-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .rsvp-btn {
        min-width: 250px;
        border: white solid 1px;
    }
    
    .timeline-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .timeline-btn {
        text-align: center;
    }
}

/* Loading Animation */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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