/* Base Reset & Variables */
:root {
    /* Color Palette derived from the provided image */
    --color-bg-cream: #FCFAF6;
    --color-bg-card: #F4F1E8;
    --color-text-dark: #2F3630;
    /* Deep botanical green/grey */
    --color-text-light: #5A6359;
    --color-accent-green: #526B57;
    --color-accent-gold: #C09A58;
    /* 'Reception to follow' gold tone */

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;

    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body.locked {
    overflow: hidden;
    /* Prevent scrolling when envelope is closed */
}

/* Typography */
h1,
h2,
h3,
.pre-title,
.post-title,
.ampersand {
    font-family: var(--font-heading);
    font-weight: 400;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    color: var(--color-accent-green);
    margin-bottom: 2rem;
    font-style: italic;
}

/* --- Main Content --- */
.main-visible {
    opacity: 1;
    visibility: visible;
}


/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    background-color: var(--color-bg-cream);
    display: block;
}

.hero-invitation-image {
    width: 100%;
    height: auto;
    display: block;
    /* Blend the bottom edge smoothly into the background */
    -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 90%, transparent 100%);
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 2rem;
    max-width: 800px;
}

.pre-title {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    color: var(--color-text-light);
}

.couple-names {
    font-size: 4.5rem;
    line-height: 1.2;
    margin-bottom: 3rem;
    font-style: italic;
    color: var(--color-accent-green);
}

.ampersand {
    display: inline-block;
    color: var(--color-accent-gold);
    font-size: 3.5rem;
    margin: 0 0.5rem;
}

.hero-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    font-family: var(--font-body);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.date-large {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--color-accent-green);
    line-height: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-large::before,
.date-large::after {
    content: '';
    position: absolute;
    top: 10%;
    height: 80%;
    width: 2px;
    background-color: var(--color-accent-gold);
}

.date-large::before {
    left: -1.5rem;
}

.date-large::after {
    right: -1.5rem;
}

.month-year {
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 4px;
    margin-top: 0.5rem;
    color: var(--color-text-dark);
}

.post-title {
    font-size: 1.8rem;
    color: var(--color-accent-gold);
    font-style: italic;
    margin-top: 2rem;
}

.scroll-down-btn {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(252, 250, 246, 0.8);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent-green);
    cursor: pointer;
    animation: bounce 2s infinite;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

@keyframes bounce {

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

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

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


/* --- Shared Section Styles --- */
section:not(.hero-section) {
    padding: 6rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* Scroll Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}


/* --- Countdown Section --- */
.countdown-section {
    background-color: var(--color-bg-card);
    border-radius: 20px;
    margin-top: 4rem;
    margin-bottom: 4rem;
    text-align: center;
}

.timer-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.time-block .number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--color-accent-green);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.time-block .label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-text-light);
}

/* --- Details Section --- */
.details-content {
    text-align: center;
}

.details-card {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.detail-item h3 {
    font-size: 1.5rem;
    color: var(--color-accent-gold);
    margin-bottom: 1rem;
    font-style: italic;
}

.detail-item p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.venue-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.map-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* --- Embedded Map --- */
.map-embed-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(82, 107, 87, 0.2);
}

.map-embed-container iframe {
    display: block;
    width: 100%;
}

/* --- Buttons --- */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-primary {
    background-color: var(--color-accent-green);
    color: var(--color-bg-cream);
}

.btn-primary:hover {
    background-color: var(--color-text-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    border-color: var(--color-accent-green);
    color: var(--color-accent-green);
    background: transparent;
}

.btn-secondary:hover {
    background-color: var(--color-bg-card);
    transform: translateY(-2px);
}

/* --- RSVP Section --- */
.rsvp-section {
    background-image: url('assets/invitation-bg.png');
    /* Subtle floral bg */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    padding: 6rem 1.5rem;
    border-radius: 20px;
    margin-bottom: 4rem;
    color: var(--color-text-dark);
}

.rsvp-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(252, 250, 246, 0.9);
    border-radius: 20px;
}

.rsvp-container {
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.rsvp-subtitle {
    margin-bottom: 3rem;
}

.rsvp-form {
    text-align: left;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-accent-green);
}

input[type="text"],
textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(82, 107, 87, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.7);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-accent-green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(82, 107, 87, 0.1);
}

.radio-group {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400 !important;
    font-family: var(--font-body) !important;
    font-size: 1rem !important;
    color: var(--color-text-dark) !important;
}

.radio-label input[type="radio"] {
    accent-color: var(--color-accent-green);
    width: 1.2rem;
    height: 1.2rem;
}

.form-submit {
    width: 100%;
    border: none;
}

.form-feedback {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #e8f5e9;
    color: #2e7d32;
    border-radius: 8px;
    text-align: center;
}

.form-feedback.hidden {
    display: none;
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 4rem 1.5rem;
    background-color: var(--color-bg-card);
    font-family: var(--font-heading);
}

.footer-names {
    font-size: 2rem;
    color: var(--color-accent-green);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.footer-date {
    letter-spacing: 2px;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

/* --- Music Toggle Button --- */
.music-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(252, 250, 246, 0.85);
    /* Cream semi-transparent */
    border: 1px solid var(--color-accent-gold);
    color: var(--color-accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.music-toggle-btn:hover {
    transform: scale(1.05);
    background-color: var(--color-bg-cream);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.music-toggle-btn svg {
    pointer-events: none;
}

.hidden {
    display: none !important;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .couple-names {
        font-size: 3rem;
    }

    .hero-date {
        flex-direction: column;
        gap: 0.5rem;
    }

    .date-large::before,
    .date-large::after {
        display: none;
    }

    .date-large {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .timer-container {
        gap: 1rem;
    }

    .time-block .number {
        font-size: 2.5rem;
    }

    .details-card {
        flex-direction: column;
        gap: 2rem;
    }

    section:not(.hero-section) {
        padding: 4rem 1rem;
    }
}