/* --- CSS Variables: Colors & Typography --- */
:root {
    /* Natural / Floral Palette */
    --color-dark-blue: #1A365D;
    --color-blue: #2B6CB0;
    --color-light-blue: #BEE3F8;
    --color-green: #68D391;
    --color-dark-green: #2F855A;
    --color-yellow: #FAF089;
    --color-light-yellow: #FEFCBF;
    --color-white: #FFFFFF;
    --color-bg: #F0FDF4; /* Very light green tint */
    --color-text: #2D3748;

    /* Fonts */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
}

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

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    /* We'll set the background image via JS so we can easily swap the red railing one */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 54, 93, 0.4), rgba(47, 133, 90, 0.6));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: var(--color-white);
    padding: 2rem;
}

.pre-title {
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-weight: 300;
}

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

.date {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.scroll-btn {
    display: inline-block;
    color: var(--color-white);
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* --- Phrase Section --- */
.phrase-section {
    padding: 5rem 0;
    background-color: var(--color-white);
    text-align: center;
}

.phrase {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--color-dark-blue);
    max-width: 800px;
    margin: 0 auto 1rem auto;
    line-height: 1.5;
}

.phrase-sub {
    font-size: 0.9rem;
    color: #718096;
}

/* --- Section Backgrounds (Parallax) --- */
.section-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
    background-color: transparent !important; /* Override linear gradients */
}

.section-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.55);
    z-index: 0;
}

.section-bg .container {
    position: relative;
    z-index: 1;
}

.section-bg h2, .section-bg h3, .section-bg p, .section-bg .icon, .section-bg .phrase, .section-bg .phrase-sub, .section-bg .event-date, .section-bg .note {
    color: var(--color-white) !important;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.section-bg .rsvp-card, .section-bg .music-card, .section-bg .info-card {
    background: transparent;
    box-shadow: none;
}


/* --- Countdown Section --- */
.countdown-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--color-light-blue) 0%, var(--color-light-yellow) 100%);
    text-align: center;
}

.countdown-section h2 {
    font-size: 2.5rem;
    color: var(--color-dark-blue);
    margin-bottom: 3rem;
}

.countdown-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.time-box {
    padding: 1.5rem;
    min-width: 120px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.time-box span {
    display: block;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-blue);
    font-family: var(--font-heading);
}

.time-box p {
    font-size: 1rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.event-date {
    font-size: 1.2rem;
    color: var(--color-dark-green);
    font-weight: 500;
}

/* --- Info Section --- */
.info-section {
    padding: 6rem 0;
    background-color: var(--color-white);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.info-card {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--color-bg);
    border-radius: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.info-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.8rem;
    color: var(--color-dark-blue);
    margin-bottom: 1rem;
}

.info-card p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-card .note {
    font-size: 0.9rem;
    color: #E53E3E;
    margin-top: 1rem;
    font-style: italic;
}

.btn-primary {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    background-color: var(--color-blue);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-primary:hover {
    background-color: var(--color-dark-blue);
}

/* --- Gallery Section --- */
.gallery-section {
    padding: 6rem 0;
    background-color: var(--color-bg);
}

.gallery-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--color-dark-blue);
    margin-bottom: 3rem;
}

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

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    aspect-ratio: 4/5;
}

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

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

/* --- RSVP Section --- */
.rsvp-section {
    padding: 6rem 0;
    background-color: var(--color-light-blue);
}

.rsvp-card {
    background: var(--color-white);
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.rsvp-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.rsvp-card h3 {
    font-size: 1.8rem;
    color: var(--color-dark-blue);
    margin-bottom: 1rem;
}

.rsvp-card p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.btn-whatsapp {
    background-color: #25D366; /* WhatsApp Green */
    color: white;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

/* --- Music Section --- */
.music-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--color-yellow) 0%, var(--color-green) 100%);
}

.music-card {
    background: var(--color-white);
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.music-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.music-card h3 {
    font-size: 1.8rem;
    color: var(--color-dark-green);
    margin-bottom: 1rem;
}

.music-card p {
    margin-bottom: 2rem;
}

.music-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.music-form input {
    padding: 1rem;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.music-form input:focus {
    border-color: var(--color-green);
}

/* --- Footer --- */
footer {
    background-color: var(--color-dark-blue);
    color: var(--color-white);
    text-align: center;
    padding: 4rem 2rem;
}

footer h2 {
    font-size: 2.5rem;
    margin-top: 1rem;
    color: var(--color-light-yellow);
}

.credits {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.credits a {
    color: var(--color-light-yellow);
    text-decoration: none;
    font-weight: 500;
}

.credits a:hover {
    text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .title {
        font-size: 4rem;
    }
    
    .pre-title {
        font-size: 1.5rem;
    }
    
    /* Fix for iOS Safari background-attachment: fixed bug that zooms images way too much */
    .section-bg {
        background-attachment: scroll !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-size: cover !important;
    }

    .countdown-container {
        gap: 0.5rem;
    }
    
    .time-box {
        min-width: 70px;
        padding: 0.5rem;
    }
    
    .time-box span {
        font-size: 2.5rem;
    }
    
    .time-box p {
        font-size: 0.8rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .info-card, .rsvp-card, .music-card {
        padding: 2rem 1.5rem;
    }

    .modal-content {
        padding: 2rem;
    }
    
    .modal-content h2 {
        font-size: 2.8rem;
    }
    
    .music-toggle-btn {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .music-toggle-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0,0,0,0.1);
    border-top: 5px solid var(--color-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Welcome Modal --- */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.welcome-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-content {
    background: var(--color-white);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    max-width: 90%;
}

.modal-content h2 {
    font-size: 3.5rem;
    color: var(--color-dark-blue);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.modal-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
}

/* --- Music Toggle Button --- */
.music-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.music-toggle-btn.playing {
    animation: pulse 2s infinite;
}

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


