:root {
    /* Colors */
    --kasavu-cream: #FDFBF7;
    --kasavu-dark: #FAF5E8;
    --temple-gold: #D4AF37;
    --temple-gold-dark: #B8860B;
    --temple-gold-light: #E5C158;
    --forest-green: #1B3B2B;
    --terracotta: #A93B2B;
    --text-charcoal: #232323;
    --muted-gold: #7C6C42;
    --white: #ffffff;
    
    /* Typography */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Spacing & Layout */
    --section-padding: 5rem 10%;
    --border-radius: 12px;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

/* Typography Classes */
.section-title {
    font-size: 3rem;
    text-align: center;
    color: var(--forest-green);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--temple-gold);
    margin: 1rem auto 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--forest-green);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--temple-gold-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--temple-gold);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--temple-gold-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--forest-green);
    color: var(--forest-green);
}

.btn-outline:hover {
    background-color: var(--forest-green);
    color: var(--white);
}

/* Floating Audio Toggle */
.audio-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--temple-gold);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    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;
}

.audio-toggle:hover {
    transform: scale(1.1);
    background-color: var(--temple-gold-dark);
}

/* Hero Section */
.section-hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('https://images.unsplash.com/photo-1549416878-b9ca95e1bb30?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(27,59,43,0.7), rgba(253,251,247,0.4));
    z-index: 1;
}

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

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

.hero-heading {
    font-size: 5rem;
    margin-bottom: 1rem;
    color: var(--kasavu-cream);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-heading span {
    color: var(--temple-gold-light);
    font-family: var(--font-body);
    font-weight: 300;
}

.hero-date {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

/* Countdown */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.countdown-item {
    background: rgba(27, 59, 43, 0.65); /* Forest Green with opacity for better contrast */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3); /* Temple gold subtle border */
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    min-width: 100px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.countdown-item span:first-child {
    display: block;
    font-size: 2.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--kasavu-cream); /* Brighter color for the numbers */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.cd-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--temple-gold-light); /* Golden accent for the labels */
    font-weight: 500;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Tale of Two Coasts (Story Section) */
.section-story {
    padding: var(--section-padding);
    background-color: var(--kasavu-cream);
}

.relative-bg {
    position: relative;
    overflow: hidden;
}

.story-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--temple-gold) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.1;
    z-index: 0;
}

.story-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
    font-size: 1.2rem;
    color: var(--muted-gold);
    font-style: italic;
    position: relative;
    z-index: 1;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    z-index: 1;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: rgba(124, 108, 66, 0.2);
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%; /* Animated via GSAP */
    background: linear-gradient(to bottom, var(--temple-gold-light), var(--temple-gold-dark));
    box-shadow: 0 0 10px var(--temple-gold);
}

.timeline-chapter {
    position: relative;
    margin-bottom: 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: var(--temple-gold);
    border-radius: 50%;
    z-index: 2;
    border: 4px solid var(--kasavu-cream);
}

.timeline-content {
    width: 45%;
    opacity: 0; /* For GSAP */
}

.timeline-content.center {
    width: 100%;
    display: flex;
    justify-content: center;
}

.timeline-content.center .story-card {
    max-width: 500px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.story-card {
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border-top: 4px solid var(--forest-green);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

.story-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

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

.card-img-wrapper:hover .story-img {
    transform: scale(1.1);
}

.card-icon {
    width: 56px;
    height: 56px;
    color: var(--temple-gold);
    margin-bottom: 1.5rem;
}

.story-card h3 {
    font-size: 2rem;
    color: var(--forest-green);
    margin-bottom: 0.5rem;
}

.chapter-subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--terracotta);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Animations for cards */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.floating {
    animation: float 4s ease-in-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.pulse-icon {
    animation: pulse 2s infinite;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    padding: 10px;
}

.destiny-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: -1;
    pointer-events: none;
}

.destiny-text {
    font-style: italic;
    color: var(--muted-gold);
    margin-bottom: 1.5rem;
}

/* Balance Sheet */
.balance-sheet {
    margin-top: 1.5rem;
    text-align: left;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.bs-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.bs-row:last-child {
    border-bottom: none;
}

.bs-row.total {
    background-color: var(--forest-green);
    color: var(--white);
    font-weight: 600;
}

/* Gallery Section */
.section-gallery {
    padding: var(--section-padding);
    background-color: var(--kasavu-dark);
}

.masonry-grid {
    column-count: 3;
    column-gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

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

.img-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.masonry-item:hover .img-tag {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
}

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

/* Event Details Section */
.section-details {
    padding: var(--section-padding);
    background-color: var(--kasavu-cream);
    text-align: center;
}

.malayalam-quote {
    font-size: 1.5rem;
    color: var(--terracotta);
    margin-bottom: 3rem;
    font-style: italic;
    opacity: 0.8;
}

.cards-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.event-card {
    background-color: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    width: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid var(--temple-gold);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.event-card:hover {
    transform: translateY(-10px);
}

.event-icon {
    width: 60px;
    height: 60px;
    background-color: var(--kasavu-dark);
    color: var(--terracotta);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.event-icon i {
    width: 30px;
    height: 30px;
}

.event-card h3 {
    font-size: 1.5rem;
    color: var(--forest-green);
    margin-bottom: 0.5rem;
}

.event-time {
    color: var(--temple-gold-dark);
    font-weight: 600;
    margin-bottom: 1rem;
}

.event-desc {
    flex-grow: 1;
}

.event-venue {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 0.85rem;
    color: var(--forest-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}


/* Wishes Section */
.section-wishes {
    padding: var(--section-padding);
    background-color: var(--forest-green);
    color: var(--white);
}

.section-wishes .section-title {
    color: var(--kasavu-cream);
}

.wishes-container {
    display: flex;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.wishes-form {
    flex: 1;
    background-color: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    color: var(--text-charcoal);
}

.wishes-form h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--forest-green);
}

#guestbook-form input,
#guestbook-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
}

#guestbook-form input:focus,
#guestbook-form textarea:focus {
    outline: none;
    border-color: var(--temple-gold);
}

.wishes-board {
    flex: 1.5;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-content: flex-start;
    height: 500px;
    overflow-y: auto;
    padding-right: 1rem;
}

/* Custom scrollbar for wishes board */
.wishes-board::-webkit-scrollbar {
    width: 8px;
}
.wishes-board::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}
.wishes-board::-webkit-scrollbar-thumb {
    background: var(--temple-gold);
    border-radius: 4px;
}

.wish-card {
    background-color: var(--kasavu-cream);
    color: var(--text-charcoal);
    padding: 1.5rem;
    border-radius: 8px;
    width: calc(50% - 0.75rem);
    position: relative;
    box-shadow: 4px 4px 15px rgba(0,0,0,0.2);
}

.wish-card::before {
    content: '"';
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--temple-gold);
    opacity: 0.3;
    position: absolute;
    top: -10px;
    left: 10px;
}

.wish-text {
    font-size: 1rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.wish-author {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--terracotta);
    text-align: right;
}

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

/* Media Queries */
@media (max-width: 992px) {
    .wishes-container {
        flex-direction: column;
    }
    .wishes-board {
        height: auto;
        max-height: 600px;
    }
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .hero-heading {
        font-size: 3.5rem;
    }
    .countdown-container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .countdown-item {
        min-width: 80px;
        padding: 0.8rem 1rem;
    }
    .countdown-item span:first-child {
        font-size: 2rem;
    }
    
    .timeline-line {
        left: 20px;
    }
    .timeline-dot {
        left: 20px;
    }
    .timeline-chapter {
        flex-direction: column;
        align-items: flex-end;
    }
    .timeline-content {
        width: calc(100% - 50px);
        margin-bottom: 2rem;
    }
    .timeline-content.left,
    .timeline-content.right,
    .timeline-content.center {
        width: calc(100% - 50px);
    }
    .timeline-content.center .story-card {
        max-width: 100%;
    }
    
    .wish-card {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }
    .hero-heading {
        font-size: 2.5rem;
    }
    .section-title {
        font-size: 2.2rem;
    }
}
