/* =========================================
   THEME 6: RUSTIC VINTAGE
   Colors: Warm wood brown, Sepia, Parchment, Olive
   Fonts: Cinzel (Serif), Libre Baskerville (Body), Pinyon Script (Cursive)
   ========================================= */

:root {
    --wood-dark: #3e2723;
    --rustic-brown: #5d4037;
    --parchment: #f4ecd8;
    --paper-light: #fbf8f1;
    --muted-green: #6b8e23;
    --text-color: #2c2925;
    
    --font-serif: 'Cinzel', serif;
    --font-body: 'Libre Baskerville', serif;
    --font-cursive: 'Pinyon Script', cursive;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--wood-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, .title { font-family: var(--font-serif); font-weight: 700; letter-spacing: 1px; }
.cursive-text { font-family: var(--font-cursive); font-size: 40px; }
.rustic-brown { color: var(--rustic-brown); }
.italic { font-style: italic; }
.bold { font-weight: bold; }
.text-muted { color: #666; }
.text-center { text-align: center; }
.mt-2 { margin-top: 10px; } .mt-3 { margin-top: 15px; } .mt-4 { margin-top: 20px; } .mt-5 { margin-top: 30px; } .mb-4 { margin-bottom: 20px; } .mb-5 { margin-bottom: 30px; }
.section { padding: 60px 20px; }
.hidden { display: none !important; }

/* Textures */
.wood-texture {
    background-color: var(--wood-dark);
    background-image: repeating-linear-gradient(to bottom, transparent, transparent 40px, rgba(0,0,0,0.1) 40px, rgba(0,0,0,0.1) 80px),
                      linear-gradient(to right, rgba(0,0,0,0.1), transparent, rgba(0,0,0,0.1));
}
.paper-texture {
    background-color: var(--paper-light);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}
.filter-sepia {
    filter: sepia(0.6) contrast(1.1) brightness(0.9);
}
.rustic-shadow { box-shadow: 3px 3px 10px rgba(0,0,0,0.3); }

/* UI Elements */
.btn-rustic, .btn-rustic-outline {
    font-family: var(--font-serif);
    padding: 12px 30px;
    font-size: 16px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-transform: uppercase;
}
.btn-rustic {
    background-color: var(--rustic-brown);
    color: var(--parchment);
    border: 2px solid var(--rustic-brown);
}
.btn-rustic:hover { background-color: var(--wood-dark); border-color: var(--wood-dark); transform: translateY(-2px); }
.btn-rustic-outline {
    background-color: transparent;
    color: var(--rustic-brown);
    border: 2px solid var(--rustic-brown);
}
.btn-rustic-outline:hover { background-color: var(--rustic-brown); color: var(--paper-light); }

/* Animation Classes */
.stamp-in { opacity: 0; transform: scale(1.3); transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.stamp-in.visible { opacity: 1; transform: scale(1); }
.fade-in-up { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Audio Control */
.music-btn {
    position: fixed; bottom: 30px; left: 30px;
    width: 50px; height: 50px;
    background-color: var(--parchment); border: 2px solid var(--rustic-brown);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; cursor: pointer; color: var(--rustic-brown); font-size: 20px;
}
.music-btn.playing .icon { animation: rotate 3s linear infinite; }
@keyframes rotate { 100% { transform: rotate(360deg); } }

/* Cover Page */
.cover-page {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    text-align: center; transition: transform 1s ease-in-out, opacity 1s ease-in-out;
}
.cover-page.slide-up { transform: translateY(-100%); opacity: 0; }
.cover-content {
    background-color: var(--parchment); padding: 50px 30px;
    border: 2px solid var(--rustic-brown); border-radius: 8px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1), 0 10px 30px rgba(0,0,0,0.5);
    width: 85%; max-width: 450px; position: relative;
}
.cover-content::before {
    content: ''; position: absolute; inset: 10px; border: 1px dashed var(--rustic-brown); opacity: 0.5; pointer-events: none;
}
.cover-content .title { font-size: 36px; margin: 20px 0; line-height: 1.2; }
.cover-content .ampersand { font-family: var(--font-cursive); font-size: 50px; color: var(--rustic-brown); }
.cover-content .date { font-family: var(--font-body); font-style: italic; margin-bottom: 20px; }
.cover-content .guest-name { margin-bottom: 30px; border-top: 1px solid rgba(0,0,0,0.1); padding-top: 20px; }
.guest-name .highlight { font-weight: bold; display: block; font-size: 20px; margin-top: 5px; }

/* Main Paper Container */
.paper-container {
    background-color: var(--parchment);
    max-width: 600px; margin: 0 auto;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    position: relative; overflow: hidden;
}
.paper-container::after { /* Rough edge effect */
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.1); pointer-events: none;
}

/* Hero Section */
.hero { position: relative; padding: 0; height: 60vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-image-wrapper { position: absolute; inset: 0; border-bottom: 5px solid var(--rustic-brown); }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.hero-card {
    position: relative; z-index: 2; text-align: center;
    padding: 40px 30px; border-radius: 4px;
    width: 85%; border: 3px double var(--rustic-brown);
}
.hero-card .title { font-size: 32px; margin: 15px 0; }
.hero-card .date { font-style: italic; letter-spacing: 1px; }

/* Verse */
.ornament { width: 80px; margin: 0 auto 20px; display: block; opacity: 0.8; }
.arabic { font-size: 24px; line-height: 2; margin-bottom: 15px; }

/* Couple */
.couple-layout { display: flex; flex-direction: column; align-items: center; gap: 30px; }
.avatar-frame {
    width: 140px; height: 140px; margin: 0 auto 15px;
    border-radius: 50%;
    border: 4px solid var(--parchment);
    box-shadow: 0 0 0 2px var(--rustic-brown), 0 10px 20px rgba(0,0,0,0.2);
    overflow: hidden;
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.couple-card { text-align: center; }
.couple-card .name { font-size: 24px; margin-bottom: 5px; }
.ig-link { display: inline-block; margin-top: 10px; color: var(--rustic-brown); text-decoration: none; border-bottom: 1px dashed; }
.connector { font-family: var(--font-cursive); font-size: 50px; color: var(--rustic-brown); }

/* Timeline */
.rustic-timeline { position: relative; padding: 20px 0; }
.rustic-timeline::before {
    content: ''; position: absolute; left: 30px; top: 0; bottom: 0;
    width: 2px; border-left: 2px dashed var(--rustic-brown);
}
.r-timeline-item { position: relative; margin-bottom: 40px; padding-left: 70px; }
.wax-seal {
    position: absolute; left: 10px; top: 0;
    width: 45px; height: 45px;
    background-color: var(--rustic-brown); color: var(--paper-light);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 14px; font-weight: bold; border: 2px solid var(--parchment);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); z-index: 2;
}
.r-content { padding: 20px; border-radius: 4px; border-left: 4px solid var(--rustic-brown); position: relative; }
.r-content::before {
    content: ''; position: absolute; left: -10px; top: 15px;
    border-width: 10px 10px 10px 0; border-style: solid; border-color: transparent var(--rustic-brown) transparent transparent;
}

/* Events */
.countdown-rustic { display: flex; justify-content: center; gap: 10px; }
.c-box {
    background-color: var(--rustic-brown); color: var(--parchment);
    padding: 15px 10px; text-align: center; border-radius: 4px; min-width: 65px;
}
.c-box span { display: block; font-family: var(--font-serif); font-size: 24px; font-weight: bold; }
.c-box small { font-size: 12px; letter-spacing: 1px; }
.events-grid { display: grid; gap: 20px; }
.e-card { padding: 30px; text-align: center; border: 1px solid rgba(0,0,0,0.1); }
.border-bottom { border-bottom: 1px solid rgba(0,0,0,0.1); padding-bottom: 15px; }

/* Itinerary */
.itinerary-board { padding: 30px 20px; border: 2px solid var(--rustic-brown); position: relative; }
.it-row { display: flex; margin-bottom: 20px; border-bottom: 1px dashed rgba(0,0,0,0.1); padding-bottom: 10px; }
.it-row:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.it-time { width: 100px; font-weight: bold; flex-shrink: 0; }
.it-desc { padding-left: 15px; border-left: 1px solid rgba(0,0,0,0.1); }

/* Polaroid Gallery */
.polaroid-gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding: 20px 0; }
.polaroid {
    background: white; padding: 10px 10px 30px 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: calc(50% - 10px);
}
.polaroid img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: sepia(0.3); }
.rotate-left { transform: rotate(-3deg); }
.rotate-right { transform: rotate(3deg); }

/* Gift */
.gift-board { padding: 30px; border: 1px dashed var(--rustic-brown); }
.qr-rustic { max-width: 200px; width: 100%; border: 5px solid white; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }

/* Footer */
.footer { border-top: 1px solid rgba(0,0,0,0.1); }

/* =========================================
   DESKTOP RESPONSIVENESS
   ========================================= */
@media (min-width: 768px) {
    .paper-container { max-width: 800px; margin: 40px auto; border-radius: 8px; }
    .hero { height: 75vh; }
    .couple-layout { flex-direction: row; justify-content: space-between; }
    .couple-card { flex: 1; }
    .connector { padding: 0 20px; transform: translateY(-20px); }
    
    .rustic-timeline::before { left: 50%; transform: translateX(-50%); }
    .r-timeline-item { width: 50%; padding-left: 0; padding-right: 40px; text-align: right; }
    .r-timeline-item:nth-child(odd) { float: left; clear: both; padding-right: 40px; padding-left: 0; text-align: right; }
    .r-timeline-item:nth-child(even) { float: right; clear: both; padding-right: 0; padding-left: 40px; text-align: left; }
    .r-timeline-item:nth-child(odd) .wax-seal { right: -22.5px; left: auto; }
    .r-timeline-item:nth-child(even) .wax-seal { left: -22.5px; }
    
    .r-timeline-item:nth-child(odd) .r-content { border-left: none; border-right: 4px solid var(--rustic-brown); }
    .r-timeline-item:nth-child(odd) .r-content::before {
        left: auto; right: -10px;
        border-width: 10px 0 10px 10px; border-color: transparent transparent transparent var(--rustic-brown);
    }
    .rustic-timeline::after { content: ""; display: table; clear: both; }

    .events-grid { grid-template-columns: 1fr 1fr; }
    .polaroid { width: calc(33.333% - 14px); }
}

@media (min-width: 1024px) {
    .paper-container { max-width: 1000px; }
    .polaroid { width: calc(25% - 15px); }
}
