/* ==========================================================================
   CSS Variables & Typography (Romantic Redesign)
   ========================================================================== */
   :root {
    /* Colors - Emerald/Mint Palette */
    --clr-ivory: #F4F7F6; /* Light gray/mint for main bg */
    --clr-champagne: #D8EBE4; /* Soft mint for envelope bg */
    --clr-gold: #40916C; /* Medium emerald for accents/icons/buttons */
    --clr-gold-light: #74C69D; /* Light green for hover states/particles */
    --clr-blush: #B7E4C7; /* Soft green */
    --clr-charcoal: #1B4332; /* Dark pine green for text and overlays */
    --clr-white: #FFFFFF;
    --clr-black: #000000;
    --clr-glass: rgba(255, 255, 255, 0.5);
    --clr-glass-dark: rgba(27, 67, 50, 0.7);

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

    /* Transitions */
    --transition-fast: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--clr-charcoal);
    background-color: var(--clr-ivory);
    line-height: 1.6;
    overflow-x: hidden;
}

body.locked {
    overflow: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    letter-spacing: 1px;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   Particles Container
   ========================================================================== */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1; /* Above background, behind content */
    overflow: hidden;
}

.particle {
    position: absolute;
    color: var(--clr-gold);
    opacity: 0.6;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Ensure sections are relative to stack above particles */
.section, .hero, .navbar, .footer, .envelope-overlay, .floating-btn, .lightbox {
    position: relative;
    z-index: 2;
}

/* ==========================================================================
   Layout & Utilities
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.bg-light {
    background-color: #EBF3F0;
}

.divider {
    height: 2px;
    width: 60px;
    background: var(--clr-gold);
    margin: 0 auto;
}

.glass {
    background: var(--clr-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(64, 145, 108, 0.15); /* Soft emerald shadow */
}

/* ==========================================================================
   Envelope Overlay
   ========================================================================== */
.envelope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--clr-charcoal);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    perspective: 1500px;
}

.envelope {
    position: relative;
    width: 90%;
    max-width: 480px;
    height: 320px;
    background-color: #f7f9f6; /* Ivory cotton cardstock */
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 50px rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    border: 1px solid rgba(27, 67, 50, 0.08);
    transform-style: preserve-3d;
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 55%;
    background-color: #ebf0ec; /* Slightly darker shade to give dimensional contrast */
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    z-index: 2;
    transform-origin: top;
    transition: transform 1.0s cubic-bezier(0.16, 1, 0.3, 1);
    /* Real drop-shadow simulation on flap */
    filter: drop-shadow(0 8px 12px rgba(0,0,0,0.18));
}

.stamp-seal {
    position: absolute;
    top: 55%; /* Centered right on the flap tip */
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stamp-seal:hover {
    transform: translate(-50%, -50%) scale(1.1) rotate(4deg);
}

/* Luxury CSS Wax Seal */
.css-wax-seal {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    /* Rich Emerald Wax Gradient with subtle gold flecks simulated in lighting */
    background: radial-gradient(circle at 35% 35%, #2a684c 0%, #153a2a 70%, #0d251b 100%);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Soft wax drop-shadow and bevel highlights */
    box-shadow: 
        0 8px 16px rgba(0, 0, 0, 0.45),
        inset 0 2px 4px rgba(255, 255, 255, 0.25),
        inset 0 -6px 12px rgba(0, 0, 0, 0.6),
        /* Double ring outer organic wax melt spill overflow */
        0 0 0 4px rgba(27, 67, 50, 0.3);
}

.seal-ring {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    /* Recessed stamp impress boundary ring */
    border: 2px solid rgba(0, 0, 0, 0.25);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 1px 1px rgba(255, 255, 255, 0.15);
}

.seal-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    font-weight: 500;
    color: #e5c07b; /* Elegant gold/bronze foil impress text */
    text-shadow: 
        0 -1px 1px rgba(0, 0, 0, 0.8),
        0 1px 1px rgba(255, 255, 255, 0.2);
    z-index: 2;
    letter-spacing: 2px;
}

.envelope-body-text {
    position: absolute;
    bottom: 3.5rem; /* Aligns names beautifully in the bottom half */
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 1;
}

.envelope-body-text h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    margin-bottom: 0.2rem;
    color: var(--clr-charcoal);
    letter-spacing: 4px;
    font-weight: 400;
}

.envelope-body-text p {
    font-size: 0.9rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--clr-gold);
    font-weight: 500;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition-fast);
}

.navbar.scrolled {
    background: var(--clr-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--clr-white);
    transition: color var(--transition-fast);
}

.navbar.scrolled .logo {
    color: var(--clr-charcoal);
}

.logo span {
    color: var(--clr-gold);
    font-style: italic;
    font-weight: 400;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--clr-white);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
}

.navbar.scrolled .nav-links a {
    color: var(--clr-charcoal);
}

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

.nav-rsvp {
    border: 1px solid var(--clr-gold);
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
}

.navbar.scrolled .nav-rsvp {
    border-color: var(--clr-charcoal);
}

/* Hamburger */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background-color: var(--clr-white);
    transition: all 0.3s ease;
}

.navbar.scrolled .hamburger span {
    background-color: var(--clr-charcoal);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero.save-the-date-layout {
    height: 100vh;
    height: 100dvh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1.5rem 3.5rem 1.5rem; /* Reduced bottom padding to 3.5rem */
    background-color: var(--clr-charcoal); /* Elegant solid dark pine green background */
    overflow: hidden;
}

/* Top & Bottom Horizontal Floral Swag Banners */
.hero-swag {
    position: absolute;
    left: 0;
    right: 0;
    height: clamp(56px, 9vh, 100px);
    pointer-events: none;
    z-index: 2;
}

.hero-swag svg {
    width: 100%;
    height: 100%;
}

.swag-top    { top: 0; }
.swag-bottom { bottom: 0; transform: scaleY(-1); }

/* Names Flourish Divider */
.names-flourish {
    display: flex;
    justify-content: center;
    margin-top: 0.8rem;
    opacity: 0.9;
}

/* Luxury Typography Container */
.hero-names-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    z-index: 2;
}

/* Twinkling Gold Sparkles */
.sparkle {
    position: absolute;
    color: rgba(229, 192, 123, 0.5);
    font-size: clamp(0.9rem, 2vh, 1.4rem);
    pointer-events: none;
    user-select: none;
    animation: floatSparkle 7s infinite ease-in-out;
    z-index: 1;
    text-shadow: 0 0 8px rgba(229, 192, 123, 0.3);
}

.sparkle-1 { top: 12%; left: 12%; animation-delay: 0s; }
.sparkle-2 { top: 22%; right: 15%; animation-delay: 1.8s; font-size: 1.1rem; }
.sparkle-3 { bottom: 25%; left: 15%; animation-delay: 3.6s; font-size: 1rem; }
.sparkle-4 { bottom: 15%; right: 12%; animation-delay: 5.4s; }

@keyframes floatSparkle {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(0.9);
        opacity: 0.2;
    }
    50% {
        transform: translateY(-12px) rotate(45deg) scale(1.15);
        opacity: 0.7;
    }
}

/* Title Gold Divider */
.title-divider-gold {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.6rem;
    opacity: 0.85;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    max-width: 800px;
    z-index: 2;
}

.hero-top, .hero-middle, .hero-bottom {
    width: 100%;
}

.hero-top {
    padding-top: clamp(1.5rem, 5vh, 3.5rem); /* Push SAVE THE DATE lower */
}

.hero-bottom {
    padding-bottom: clamp(1.5rem, 5vh, 3.5rem); /* Pull date section higher */
}

/* Typography for SAVE the DATE */
.std-title {
    font-size: clamp(1.2rem, 3.5vh + 0.5rem, 2.5rem);
    letter-spacing: clamp(2px, 0.5vw + 2px, 6px);
    font-family: 'Cormorant Garamond', serif;
    color: #e5c07b; /* Premium gold foil accent text */
    text-transform: uppercase;
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* Typography for Middle Names */
.couple-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-bottom: clamp(1rem, 2vh, 2rem);
}

.name-aria, .name-julian {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 8vh + 1.2rem, 5.0rem);
    color: var(--clr-white);
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
    letter-spacing: 1px;
}

.ampersand-wreath-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(75px, 14vh, 100px);
    height: clamp(75px, 14vh, 100px);
    margin: clamp(0.1rem, 0.5vh, 0.4rem) 0;
}

.gold-wreath {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    animation: slowRotate 30s linear infinite;
    pointer-events: none;
}

@keyframes slowRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.name-ampersand {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 4vh + 0.4rem, 2.8rem);
    color: #e5c07b; /* Gold foil color accent */
    font-style: italic;
    font-weight: 300;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 2;
    position: relative;
}

/* Date Layout Grid */
.date-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    color: var(--clr-white);
    font-family: var(--font-body);
    text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

.date-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.date-col.left { text-align: right; }
.date-col.right { text-align: left; }

.date-col span {
    display: block;
    line-height: 1.3;
    font-size: clamp(0.75rem, 1.8vh + 0.2rem, 1.1rem);
}

.date-col .day, .date-col .month {
    text-transform: capitalize;
}

.date-col .time, .date-col .year {
    font-size: clamp(0.65rem, 1.5vh + 0.1rem, 0.9rem);
    color: rgba(255, 255, 255, 0.85);
}

.date-num {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 9vh + 1rem, 5.5rem) !important;
    line-height: 0.9 !important;
}

.date-divider {
    height: clamp(35px, 8vh, 65px);
    width: 1px;
    background-color: rgba(255, 255, 255, 0.7);
}

/* Scroll Down */
.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    color: var(--clr-white);
    animation: bounce 2s infinite;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    opacity: 0.8;
}

/* Mobile Hero Section Optimizations */
@media (max-width: 480px) {
    .hero.save-the-date-layout {
        padding: 3rem 1.2rem 4.5rem 1.2rem;
    }

    .couple-names {
        margin-bottom: 0;
    }
    .name-aria, .name-julian {
        font-size: clamp(1.8rem, 5vh + 0.8rem, 3rem);
    }
    .name-ampersand {
        font-size: clamp(1.3rem, 3.5vh + 0.3rem, 2.2rem);
    }
    .date-layout {
        gap: 0.5rem;
    }
    .date-col span {
        font-size: 0.85rem;
    }
    .date-col .time, .date-col .year {
        font-size: 0.75rem;
    }
    .date-num {
        font-size: 2.8rem !important;
    }
    .date-divider {
        height: 35px;
        opacity: 0.6;
    }
    .scroll-down {
        bottom: 1.2rem;
        font-size: 1rem;
    }
}

@media (max-height: 600px) {
    .hero.save-the-date-layout {
        padding: 1.8rem 1.2rem 3rem 1.2rem;
    }

    .couple-names {
        margin-bottom: 0;
    }
    .name-aria, .name-julian {
        font-size: 1.8rem;
    }
    .name-ampersand {
        font-size: 1.3rem;
    }
    .date-layout {
        gap: 0.8rem;
    }
    .date-num {
        font-size: 2.5rem !important;
    }
    .date-divider {
        height: 30px;
    }
}

/* ==========================================================================
   Story Section
   ========================================================================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 4rem auto 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--clr-gold);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--clr-ivory);
    border: 3px solid var(--clr-gold);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -8px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -8px;
}

.timeline-content {
    padding: 20px 30px;
    background: var(--clr-white);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(27, 67, 50, 0.08); /* Pine shadow */
}

.timeline-content h3 {
    font-family: var(--font-heading);
    color: var(--clr-gold);
    margin-bottom: 0.5rem;
}

.timeline-content .date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   Events Section
   ========================================================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.event-card {
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(27, 67, 50, 0.15);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--clr-gold);
    margin-bottom: 1.5rem;
}

.event-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.event-card .time {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.event-card .venue {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.event-card .address {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-link {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--clr-charcoal);
    border-radius: 30px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--clr-charcoal);
    text-decoration: none;
    transition: var(--transition-fast);
}

.btn-link:hover {
    background: var(--clr-charcoal);
    color: var(--clr-white);
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.polaroid-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 3rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.polaroid-item {
    width: 280px;
    background: #fff;
    padding: 15px 15px 50px 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    /* Use variables for transform to allow reveal animation integration */
    --final-transform: rotate(0deg);
    transform: translateY(80px) var(--final-transform);
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.polaroid-item.active {
    opacity: 1;
    transform: translateY(0) var(--final-transform);
}

.polaroid-item:hover {
    --final-transform: scale(1.05) translateY(-10px) rotate(0deg) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    z-index: 10;
    transition: all 0.4s ease;
    transition-delay: 0s !important;
}

/* Specific overlapping rotations */
.polaroid-item:nth-child(1) { --final-transform: rotate(-8deg); z-index: 1; transition-delay: 0s; }
.polaroid-item:nth-child(2) { --final-transform: rotate(4deg) translateY(-20px); z-index: 2; transition-delay: 0.1s; }
.polaroid-item:nth-child(3) { --final-transform: rotate(-3deg); z-index: 3; transition-delay: 0.2s; }
.polaroid-item:nth-child(4) { --final-transform: rotate(6deg) translateY(15px); z-index: 4; transition-delay: 0.3s; }
.polaroid-item:nth-child(5) { --final-transform: rotate(-5deg); z-index: 5; transition-delay: 0.4s; }

/* Responsive overlaps */
@media (min-width: 768px) {
    .polaroid-item {
        margin: 0 -20px; /* Scattered overlapping on desktop */
    }
}

.polaroid-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 2px;
}

.polaroid-caption {
    position: absolute;
    bottom: 12px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font-body);
    font-weight: 500;
    color: #444;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--clr-white);
    font-size: 40px;
    cursor: pointer;
    z-index: 2001;
}

/* ==========================================================================
   Details / Countdown Section
   ========================================================================== */
.details-section {
    text-align: center;
    background: #EBF3F0; /* Light gray-green mint */
}

.countdown-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.countdown-intro {
    font-family: var(--font-body);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--clr-gold);
    margin-bottom: 2rem;
    font-weight: 500;
}

.countdown-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--clr-white);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(27, 67, 50, 0.08);
    min-width: 110px;
    position: relative;
    border: 1px solid rgba(27, 67, 50, 0.05);
}

.countdown-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 500;
    color: var(--clr-charcoal);
    line-height: 1.1;
}

.countdown-label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--clr-gold);
    margin-top: 0.5rem;
    font-weight: 500;
}

.countdown-colon {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 400;
    color: var(--clr-gold);
    margin-bottom: 1.5rem;
    user-select: none;
}

/* Responsive details/countdown */
@media (max-width: 768px) {
    .countdown-grid {
        gap: 0.5rem;
    }
    
    .countdown-item {
        padding: 1rem 1rem;
        min-width: 75px;
    }
    
    .countdown-number {
        font-size: 2.2rem;
    }
    
    .countdown-label {
        font-size: 0.6rem;
        letter-spacing: 1px;
    }
    
    .countdown-colon {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .countdown-container h2 {
        font-size: 2rem;
    }
}

/* ==========================================================================
   RSVP Section
   ========================================================================== */
.rsvp-section {
    position: relative;
    background-image: url('assets/images/gallery_detail.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.rsvp-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(27, 67, 50, 0.85); /* Dark pine overlay */
}

.rsvp-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    color: var(--clr-charcoal);
}

.rsvp-container h2 {
    color: var(--clr-charcoal);
}

.rsvp-container p {
    margin-bottom: 2rem;
    color: rgba(27, 67, 50, 0.8);
}

.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.rsvp-form h3 {
    color: var(--clr-charcoal);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.rsvp-form .input-group input {
    background: rgba(27, 67, 50, 0.05);
    border: 1px solid rgba(27, 67, 50, 0.2);
    color: var(--clr-charcoal);
}

.rsvp-form .input-group input:focus {
    background: rgba(27, 67, 50, 0.08);
    border-color: var(--clr-charcoal);
}

.rsvp-form .input-group label {
    color: rgba(27, 67, 50, 0.6);
}

.rsvp-form .input-group input:focus + label,
.rsvp-form .input-group input:not(:placeholder-shown) + label {
    background: #eef3f0; /* Soft off-white green to match card */
    color: var(--clr-charcoal);
}

/* Unified color styling for RSVP buttons (before, after/hover, active remain identical) */
.rsvp-form .btn-primary,
.attendance-toggle .btn-primary {
    background: var(--clr-charcoal) !important;
    border-color: var(--clr-charcoal) !important;
    color: var(--clr-white) !important;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast) !important;
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.08);
}

.rsvp-form .btn-primary:hover,
.rsvp-form .btn-primary:active,
.attendance-toggle .btn-primary:hover,
.attendance-toggle .btn-primary:active {
    background: var(--clr-charcoal) !important;
    border-color: var(--clr-charcoal) !important;
    color: var(--clr-white) !important;
}

.attendance-toggle .btn-outline {
    background: transparent !important;
    border-color: var(--clr-charcoal) !important;
    color: var(--clr-charcoal) !important;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast) !important;
    box-shadow: 0 4px 12px rgba(27, 67, 50, 0.04);
}

.attendance-toggle .btn-outline:hover,
.attendance-toggle .btn-outline:active {
    background: transparent !important;
    border-color: var(--clr-charcoal) !important;
    color: var(--clr-charcoal) !important;
}

/* Elegant springy pop-up micro-interactions */
.rsvp-form .btn-primary:hover,
.attendance-toggle .btn-primary:hover,
.attendance-toggle .btn-outline:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(27, 67, 50, 0.14);
}

.rsvp-form .btn-primary:active,
.attendance-toggle .btn-primary:active,
.attendance-toggle .btn-outline:active {
    transform: translateY(-5px) scale(1.05) !important; /* Springy physical scale up pop-up on click! */
    box-shadow: 0 12px 28px rgba(27, 67, 50, 0.18) !important;
}

.input-group {
    position: relative;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: var(--clr-white);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--clr-gold);
    background: rgba(255,255,255,0.15);
}

.input-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: rgba(255,255,255,0.6);
    transition: all 0.3s ease;
    pointer-events: none;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label,
.input-group textarea:focus + label,
.input-group textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    left: 0.8rem;
    font-size: 0.8rem;
    background: var(--clr-charcoal);
    padding: 0 0.5rem;
    color: var(--clr-gold);
    border-radius: 4px;
}

.radio-group {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-primary {
    background: var(--clr-gold);
    color: var(--clr-white);
    border: 2px solid var(--clr-gold);
    padding: 1rem 2rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background: transparent;
    color: var(--clr-white);
}

.btn-outline {
    background: transparent;
    color: var(--clr-white);
    border: 2px solid var(--clr-white);
    padding: 1rem 2rem;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-outline:hover {
    background: var(--clr-white);
    color: var(--clr-charcoal);
}

.hidden {
    display: none;
}

#rsvp-success {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(64, 145, 108, 0.1);
    border: 1px solid var(--clr-gold);
    border-radius: 8px;
    color: var(--clr-charcoal);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: var(--clr-charcoal);
    color: var(--clr-white);
    text-align: center;
    padding: 4rem 0;
}

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

.footer h2 span {
    color: var(--clr-gold);
    font-style: italic;
    font-weight: 300;
}

.footer-divider {
    height: 1px;
    width: 100px;
    background: rgba(255,255,255,0.2);
    margin: 2rem auto;
}

.thank-you {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--clr-gold);
}



/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 992px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--clr-charcoal);
        flex-direction: column;
        justify-content: center;
        transition: 0.5s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }
    
    .navbar.scrolled .nav-links a {
        color: var(--clr-white);
    }
    
    .navbar.scrolled .nav-links a:hover {
        color: var(--clr-gold);
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }



    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0%;
    }

    .timeline-item:nth-child(odd) {
        text-align: left;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 23px;
    }
    
    .masonry-grid {
        column-count: 1;
    }

}
