:root {
    --emerald: #2D5A3D;
    --emerald-dark: #1e3d28;
    --emerald-light: #3d7a52;
    --gold: #D4AF37;
    --gold-light: #e8c94d;
    --ivory: #FFFEF0;
    --cream: #F5F0E8;
    --charcoal: #2C2C2C;
    --gray: #6B6B6B;
    --light-gray: #E8E8E8;
    --white: #FFFFFF;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-script: 'Great Vibes', cursive;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--charcoal); background: var(--ivory); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Navigation */
.navbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: rgba(255, 254, 240, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(45, 90, 61, 0.1); transition: var(--transition); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: center; height: 70px; }
.nav-logo { font-family: var(--font-script); font-size: 2rem; color: var(--emerald); letter-spacing: 1px; }
.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-link { font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; color: var(--charcoal); letter-spacing: 0.5px; position: relative; padding: 0.5rem 0; transition: var(--transition); }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--gold); transition: var(--transition); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--emerald); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; touch-action: manipulation; }
.nav-toggle span { display: block; width: 25px; height: 2px; background: var(--emerald); transition: var(--transition); border-radius: 2px; }

/* Hero */
.hero { position: relative; height: 100vh; min-height: 700px; display: flex; align-items: center; justify-content: center; text-align: center; background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 50%, var(--emerald-light) 100%); overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('../images/home1.jpg') center/cover no-repeat; opacity: 0.5; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(45,90,61,0.2) 0%, rgba(45,90,61,0.5) 100%); }
.hero-content { position: relative; z-index: 2; color: var(--white); padding: 0 1.5rem; animation: fadeInUp 1s ease-out; }
.hero-hashtag { font-family: var(--font-body); font-size: 0.9rem; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 1.5rem; opacity: 0.9; }
.hero-title { font-family: var(--font-heading); font-size: clamp(3rem, 8vw, 6rem); font-weight: 400; line-height: 1.1; margin-bottom: 1rem; }
.hero-title span { font-family: var(--font-script); color: var(--gold); font-size: 1.2em; }
.hero-subtitle { font-family: var(--font-script); font-size: clamp(1.5rem, 4vw, 2.5rem); color: var(--gold-light); margin-bottom: 1rem; }
.hero-date { font-family: var(--font-body); font-size: 1rem; letter-spacing: 2px; margin-bottom: 2.5rem; opacity: 0.9; }
.hero-scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); color: var(--white); font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; opacity: 0.7; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--gold), transparent); animation: scrollBounce 2s infinite; }

/* Buttons */
.btn { display: inline-block; padding: 1rem 2.5rem; font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; border-radius: 50px; transition: var(--transition); cursor: pointer; border: 2px solid transparent; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn-primary { background: var(--gold); color: var(--charcoal); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; color: var(--emerald); border-color: var(--emerald); margin-right: 1rem; margin-bottom: 1rem; }
.btn-outline:hover { background: var(--emerald); color: var(--white); }

/* Sections */
.section { padding: 6rem 0; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-label { display: block; font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.section-title { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3rem); font-weight: 400; color: var(--emerald); line-height: 1.2; }

/* Story Preview */
.story-preview { background: var(--white); }
.story-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.story-text p { font-size: 1.1rem; color: var(--gray); margin-bottom: 1.5rem; line-height: 1.8; }
.story-image { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.story-image img { width: 100%; height: 500px; object-fit: cover; transition: var(--transition); }
.story-image:hover img { transform: scale(1.05); }

/* Photo Mosaic */
.photo-mosaic { background: var(--cream); padding: 5rem 0; }
.mosaic-header { text-align: center; margin-bottom: 3rem; }
.mosaic-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; grid-template-rows: 1fr 1fr; gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.mosaic-item { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.mosaic-item:hover img { transform: scale(1.05); }
.mosaic-large { grid-row: span 2; height: 500px; }
.mosaic-tall { height: 240px; }
.mosaic-wide { height: 240px; }

/* Timeline */
.timeline-section { background: var(--cream); }
.timeline { display: flex; flex-direction: column; gap: 5rem; max-width: 800px; margin: 0 auto; padding-top: 2rem; }
.timeline-item { display: flex; gap: 2rem; align-items: flex-start; background: var(--white); padding: 2.5rem 5rem 2.5rem 2.5rem; border-radius: 16px; box-shadow: var(--shadow); transition: var(--transition); position: relative; overflow: visible; }
.timeline-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.timeline-marker { flex-shrink: 0; width: 60px; height: 60px; background: var(--emerald); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.timeline-number { font-family: var(--font-heading); font-size: 1.5rem; color: var(--gold); font-weight: 600; }
.timeline-content { flex: 1; }
.timeline-content h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--emerald); margin-bottom: 0.5rem; }
.timeline-tag { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); background: rgba(212, 175, 55, 0.1); padding: 0.25rem 0.75rem; border-radius: 20px; margin-bottom: 0.75rem; }
.timeline-date { font-weight: 600; color: var(--charcoal); margin-bottom: 0.25rem; }
.timeline-time { color: var(--gray); font-size: 0.9rem; margin-bottom: 0.25rem; }
.timeline-venue { color: var(--gray); font-size: 0.95rem; margin-bottom: 0.5rem; }
.timeline-note { font-style: italic; color: var(--emerald); font-size: 0.9rem; }
.timeline-photo { position: absolute; top: 50%; right: -60px; width: 120px; height: 120px; border-radius: 50%; overflow: hidden; border: 5px solid var(--white); box-shadow: 0 8px 30px rgba(0,0,0,0.15); z-index: 10; transform: translateY(-50%); transition: var(--transition); }
.timeline-item:hover .timeline-photo { transform: translateY(-50%) scale(1.08); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.timeline-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Countdown */
.countdown-section { background: var(--emerald); padding: 5rem 0; }
.countdown-box { text-align: center; }
.countdown-label { font-family: var(--font-script); font-size: clamp(1.5rem, 4vw, 2.5rem); color: var(--gold); margin-bottom: 2rem; }
.countdown { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; }
.countdown-item { display: flex; flex-direction: column; align-items: center; min-width: 80px; }
.countdown-number { font-family: var(--font-heading); font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; color: var(--white); line-height: 1; }
.countdown-unit { font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-top: 0.5rem; }
.countdown-separator { font-family: var(--font-heading); font-size: 2rem; color: var(--gold); align-self: flex-start; padding-top: 0.5rem; }

/* Gift */
.gift-section { background: var(--white); }
.gift-card { max-width: 600px; margin: 0 auto; text-align: center; padding: 3rem; background: var(--ivory); border-radius: 20px; border: 1px solid rgba(45, 90, 61, 0.1); }
.gift-icon { font-size: 3rem; display: block; margin-bottom: 1.5rem; }
.gift-card h2 { font-family: var(--font-heading); font-size: 2rem; color: var(--emerald); margin-bottom: 1rem; }
.gift-card p { color: var(--gray); line-height: 1.8; margin-bottom: 1.5rem; }
.gift-thanks { font-style: italic; color: var(--emerald) !important; }

/* Wishes & Forms */
.wishes-section { background: linear-gradient(135deg, var(--cream) 0%, var(--ivory) 100%); }
.wishes-content { max-width: 640px; margin: 0 auto; text-align: center; }
.wishes-text h2 { font-family: var(--font-heading); font-size: 2.5rem; color: var(--emerald); margin-bottom: 1rem; }
.wishes-text p { color: var(--gray); font-size: 1.1rem; line-height: 1.8; margin-bottom: 2rem; }

.wedding-form { max-width: 600px; margin: 2rem auto 0; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.wedding-form input, .wedding-form select, .wedding-form textarea {
    width: 100%; padding: 1rem 1.25rem; border: 1px solid var(--light-gray); border-radius: 12px;
    font-family: var(--font-body); font-size: 1rem; background: var(--white); color: var(--charcoal);
    transition: var(--transition); -webkit-appearance: none; appearance: none;
}
.wedding-form input:focus, .wedding-form select:focus, .wedding-form textarea:focus {
    outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}
.wedding-form textarea { resize: vertical; min-height: 120px; }
.form-status { text-align: center; margin-top: 1rem; font-size: 0.95rem; min-height: 1.5rem; font-weight: 500; }
.form-status.success { color: var(--emerald); }
.form-status.error { color: #c0392b; }

/* RSVP */
.rsvp-section { background: var(--white); padding-bottom: 6rem; }

/* Footer (No bottom nav) */
.footer { background: var(--charcoal); color: var(--white); padding: 4rem 0 2rem; text-align: center; }
.footer-names { font-family: var(--font-script); font-size: 3rem; color: var(--gold); margin-bottom: 0.5rem; }
.footer-names span { color: rgba(255,255,255,0.5); }
.footer-date { font-size: 1rem; letter-spacing: 2px; margin-bottom: 0.5rem; opacity: 0.8; }
.footer-hashtag { font-size: 0.9rem; letter-spacing: 3px; color: var(--gold); margin-bottom: 2rem; }
.footer-credit { font-size: 0.8rem; opacity: 0.5; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }

/* Quote Band */
.quote-band { position: relative; height: 50vh; min-height: 400px; display: flex; align-items: center; justify-content: center; text-align: center; background: url('../images/home9.jpg') center/cover no-repeat fixed; overflow: hidden; }
.quote-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(45,90,61,0.75) 0%, rgba(30,60,40,0.85) 100%); }
.quote-content { position: relative; z-index: 2; color: var(--white); padding: 0 1.5rem; max-width: 700px; }
.quote-text { font-family: var(--font-script); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.3; margin-bottom: 1.5rem; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.quote-source { font-family: var(--font-body); font-size: 0.9rem; letter-spacing: 3px; text-transform: uppercase; opacity: 0.8; color: var(--gold); }

/* Nav Overlay */
.nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; opacity: 0; visibility: hidden; transition: var(--transition); }
.nav-overlay.active { opacity: 1; visibility: visible; }

/* Gift Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: var(--transition); }
.modal.active { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); }
.modal-content { position: relative; background: var(--white); border-radius: 24px; max-width: 480px; width: 90%; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); transform: translateY(30px) scale(0.95); transition: transform 0.4s ease; z-index: 1; }
.modal.active .modal-content { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--cream); color: var(--charcoal); font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); z-index: 2; touch-action: manipulation; }
.modal-close:hover { background: var(--emerald); color: var(--white); }
.modal-header { text-align: center; padding: 2.5rem 2rem 1.5rem; border-bottom: 1px solid var(--light-gray); }
.modal-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.modal-header h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--emerald); margin-bottom: 0.5rem; }
.modal-header p { color: var(--gray); font-size: 0.95rem; }
.modal-body { padding: 2rem; }
.bank-detail { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--light-gray); gap: 1rem; }
.bank-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gray); font-weight: 500; }
.bank-value { font-weight: 600; color: var(--charcoal); font-size: 0.95rem; text-align: right; }
.copy-text { font-family: 'Courier New', monospace; color: var(--emerald); font-size: 1.1rem; }
.copy-btn { padding: 0.4rem 1rem; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; border: 2px solid var(--emerald); background: transparent; color: var(--emerald); border-radius: 20px; cursor: pointer; transition: var(--transition); white-space: nowrap; touch-action: manipulation; min-height: 36px; }
.copy-btn:hover { background: var(--emerald); color: var(--white); }
.modal-note { text-align: center; margin-top: 1.5rem; padding: 1rem; background: var(--ivory); border-radius: 12px; font-size: 0.85rem; color: var(--gray); line-height: 1.6; }

/* Gallery Masonry (Auto-arrange) */
.gallery-hero { position: relative; height: 60vh; min-height: 400px; display: flex; align-items: center; justify-content: center; text-align: center; background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 100%); overflow: hidden; }
.gallery-hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('../images/gallery1.jpg') center/cover no-repeat; opacity: 0.25; }
.gallery-hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(45,90,61,0.3) 0%, rgba(45,90,61,0.8) 100%); }
.gallery-hero-content { position: relative; z-index: 2; color: var(--white); padding: 0 1.5rem; }
.gallery-hero-content h1 { font-family: var(--font-heading); font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 400; margin-bottom: 1rem; }
.gallery-hero-content p { font-size: 1.1rem; opacity: 0.9; max-width: 500px; margin: 0 auto 2rem; line-height: 1.7; }

.gallery-masonry { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 15px; gap: 1rem; padding: 4rem 0; }
.gallery-item { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.download-section { background: var(--cream); padding: 5rem 0; text-align: center; }
.download-card { max-width: 600px; margin: 0 auto; padding: 3rem; background: var(--white); border-radius: 20px; box-shadow: var(--shadow); border: 1px solid rgba(45, 90, 61, 0.1); }
.download-icon { font-size: 3rem; margin-bottom: 1.5rem; }
.download-card h2 { font-family: var(--font-heading); font-size: 2rem; color: var(--emerald); margin-bottom: 1rem; }
.download-card p { color: var(--gray); line-height: 1.8; margin-bottom: 2rem; }
.download-note { font-size: 0.85rem; color: var(--gray); margin-top: 1.5rem; font-style: italic; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(10px); opacity: 0.5; } }

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu { position: fixed; top: 0; left: -100%; width: 100%; height: 100vh; background: var(--ivory); flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem; transition: var(--transition); padding-top: 70px; }
    .nav-menu.active { left: 0; }
    .nav-link { font-size: 1.3rem; padding: 0.75rem 0; }
    .hero { min-height: 600px; }
    .story-content { grid-template-columns: 1fr; gap: 2rem; }
    .story-image img { height: 350px; }
    .mosaic-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .mosaic-large, .mosaic-tall, .mosaic-wide { grid-row: span 1; height: 300px; }
    .timeline { gap: 5rem; padding-top: 2rem; }
    .timeline-item { flex-direction: column; text-align: center; padding: 4rem 1.5rem 2rem; margin-top: 0; }
    .timeline-marker { margin: 0 auto 1rem; }
    .timeline-photo { width: 110px; height: 110px; top: -55px; right: 50%; transform: translateX(50%); border-width: 5px; box-shadow: 0 6px 25px rgba(0,0,0,0.15); }
    .timeline-item:hover .timeline-photo { transform: translateX(50%) scale(1.05); }
    .countdown { gap: 0.5rem; }
    .countdown-item { min-width: 60px; }
    .countdown-separator { display: none; }
    .quote-band { height: 40vh; min-height: 300px; background-attachment: scroll; }
    .section { padding: 4rem 0; }
    .btn-outline { margin-right: 0; display: block; text-align: center; }
    .gallery-masonry { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 10px; gap: 0.75rem; padding: 2rem 0; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
    .section-title { font-size: 1.75rem; }
    .gift-card, .rsvp-card, .download-card { padding: 1.5rem; }
    .modal-content { width: 95%; border-radius: 20px; }
    .modal-header { padding: 2rem 1.5rem 1rem; }
    .modal-body { padding: 1.5rem; }
    .bank-detail { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .bank-value { text-align: left; }
    .gallery-masonry { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 1rem; }
    .gallery-item { grid-row-end: auto !important; }
    .wedding-form { margin-top: 1.5rem; }
    .wishes-text h2 { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}