/* CSS Variables & Reset */
:root {
    --primary-color: #2C5F2D;
    /* Deep Jungle Green */
    --secondary-color: #97BC62;
    /* Soft Green */
    --accent-color: #D4AF37;
    /* Gold */
    --bg-color: #FDFBF7;
    /* Cream/Off-white */
    --text-color: #333333;
    --light-text: #ffffff;

    --font-heading: 'Great Vibes', cursive;
    --font-subheading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;

    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

ul {
    list-style: none;
}

/* Typography Helpers */
h1 {
    font-family: var(--font-heading);
    font-weight: 400;
}

h2 {
    font-family: var(--font-subheading);
    font-weight: 700;
    color: var(--primary-color);
}

h3 {
    font-family: var(--font-subheading);
    font-weight: 400;
    color: var(--accent-color);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(253, 251, 247, 0.95);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.logo {
    font-family: var(--font-subheading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-color);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    width: 100%;
    /* Fallback background if no image is present */
    background: black;
    /* Ideally replace this URL with the actual image path once the user provides it */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--light-text);
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0;
    /* Hide the video element */
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: cover;
    /* This doesn't apply to canvas directly but good for reference */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    /* Darkens the bg for text readability */
}

/* Create a nice placeholder pattern since we don't have an image */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(44, 95, 45, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.2) 0%, transparent 20%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    margin-bottom: 35vh;
    /* Moves text up to clear faces */
}

.eyebrow {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.main-title {
    font-size: 6rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-family: var(--font-subheading);
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--accent-color);
    color: white;
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    transition: transform 0.2s, background 0.2s;
}

.cta-button:hover {
    background-color: #bfa13f;
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid white;
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: scrollMouse 1.5s infinite;
}

/* Section Common Styles */
.section {
    padding: 5rem 1rem;
    position: relative;
}

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

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    opacity: 0.6;
}

.divider::before,
.divider::after {
    content: '';
    height: 1px;
    width: 60px;
    background: var(--accent-color);
}

.flower-icon {
    color: var(--accent-color);
}

/* Story Section */
.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.story-image img.couple-photo {
    width: 100%;
    border-radius: 8px;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.2);
    border: 5px solid white;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    height: 300px;
}

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

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

.story-text blockquote {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 2rem;
    line-height: 1.4;
}

/* Countdown Section */
.countdown-section {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.time-box {
    display: flex;
    flex-direction: column;
}

.time-box span:first-child {
    font-size: 3rem;
    font-family: var(--font-subheading);
    font-weight: 700;
}

.time-box .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
}

/* Details Section */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.detail-card {
    background: white;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    transition: var(--transition-speed);
}

.detail-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.detail-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.detail-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.time {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.map-link {
    display: inline-block;
    margin-top: 1.5rem;
    text-decoration: underline;
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* RSVP Section */
.rsvp-section {
    background-color: #f7f7f7;
}

.rsvp-box {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    text-align: center;
}

.rsvp-box h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.rsvp-box p {
    margin-bottom: 2rem;
    color: #666;
}

.form-group {
    margin-bottom: 1.5rem;
}

input,
select {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 4px;
}

.submit-btn:hover {
    background: #1f4420;
}

.alt-rsvp {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.alt-rsvp a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* Animations */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@keyframes scrollMouse {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hover-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.hover-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 3.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Could add a JS toggle for mobile menu later */
    .story-grid {
        grid-template-columns: 1fr;
    }

    .hamburger {
        display: block;
        width: 30px;
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--primary-color);
        margin-bottom: 5px;
    }
}


/* Music Control */
.music-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s;
    border: 2px solid var(--accent-color);
}

.music-control:hover {
    transform: scale(1.1);
}

.music-control .icon {
    font-size: 1.5rem;
}

.music-control.playing .icon {
    animation: rotateMusic 3s linear infinite;
}

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

    to {
        transform: rotate(360deg);
    }
}