@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=Montserrat:wght@300;400;500&display=swap');

:root {
    --primary: #d4af37;
    /* Gold */
    --primary-dark: #b5952f;
    --bg-dark: #0a1128;
    /* Midnight Blue */
    --bg-light: #f9f9f9;
    --text-dark: #333333;
    --text-light: #ffffff;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
    scroll-behavior: smooth;
}

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

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Typography */
h1,
h2,
h3,
.logo,
.logo-footer {
    font-family: var(--font-heading);
    font-weight: 400;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--bg-dark);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: var(--primary);
    margin: 15px auto 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 17, 40, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

.logo {
    color: var(--primary);
    font-size: 2rem;
    text-decoration: none;
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -5px;
    left: 0;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.hamburger span {
    width: 30px;
    height: 2px;
    background: var(--text-light);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 800px;
    height: auto;
    padding: 100px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-light);
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: -1;
}

.bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10, 17, 40, 0.4), rgba(10, 17, 40, 0.7));
}

.hero-content {
    z-index: 1;
    padding: 20px;
}

.subtitle {
    font-size: 1.2rem;
    letter-spacing: 4px;
    margin-bottom: 20px;
    color: var(--primary);
    text-transform: uppercase;
}

.names {
    font-size: clamp(3rem, 6vw, 6rem);
    font-style: italic;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.date {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    letter-spacing: 2px;
    margin-bottom: 50px;
}

/* Countdown */
.countdown {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.time-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 20px;
    min-width: 100px;
    transition: transform 0.3s ease;
}

.time-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.time-box span {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    display: block;
    color: var(--primary);
}

.time-box p {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Story Section */
.story-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.story-image {
    flex: 1;
    position: relative;
}

.story-image img {
    width: 100%;
    border-radius: 10px;
    position: relative;
    z-index: 2;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.image-frame {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 10px;
    z-index: 1;
    pointer-events: none;
}

.story-text {
    flex: 1;
}

.story-text h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.story-text p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Event Details */
.details-section {
    background: #f0f4f8;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.event-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.card-img-wrapper {
    height: 250px;
    overflow: hidden;
}

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

.event-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 40px;
    text-align: center;
}

.card-content h3 {
    font-size: 2rem;
    color: var(--bg-dark);
    margin-bottom: 15px;
}

.card-content .time {
    color: var(--primary);
    font-weight: 500;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.card-content .location {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.card-content .address {
    color: #666;
    margin-bottom: 25px;
}

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

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

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

/* Gallery */
.gallery-section {
    position: relative;
    background: var(--bg-light);
    z-index: 2;
    /* Fix overlap with parallax */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 300px;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
    padding-bottom: 40px;
    /* Space for the shifted right column */
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    background: #fff;
    padding: 10px;
    /* White frame effect */
}

/* Make it look like a creative collage without touching */
.gallery-item:nth-child(1) {
    border-radius: 40px 10px 40px 10px;
}

.gallery-item:nth-child(2) {
    border-radius: 10px 40px 10px 40px;
    transform: translateY(40px);
}

.gallery-item:nth-child(3) {
    border-radius: 10px 40px 40px 10px;
}

.gallery-item:nth-child(4) {
    border-radius: 40px 10px 10px 40px;
    transform: translateY(40px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    /* Inherit the creative border-radius */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.08) rotate(2deg);
}

/* RSVP Form */
.rsvp-section {
    position: relative;
    overflow: hidden;
    color: #fff;
}

.rsvp-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 17, 40, 0.85);
}

.rsvp-subtitle {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.rsvp-container {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 50px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-group {
    margin-bottom: 25px;
}

input,
select,
textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

select option {
    background: var(--bg-dark);
    color: #fff;
}

.rsvp-form .btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

.message-box {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
}

.message-box.success {
    background: rgba(46, 204, 113, 0.2);
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.hidden {
    display: none;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 60px 0;
}

.logo-footer {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.footer p {
    margin-bottom: 10px;
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.reveals {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveals.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- New Animations & SVGs --- */
#dust-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.spin-slow {
    animation: spinSlow 15s linear infinite;
}

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

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

.pulse-anim {
    animation: pulseAnim 3s ease-in-out infinite;
}

@keyframes pulseAnim {

    0%,
    100% {
        fill-opacity: 0.5;
        transform: scale(1);
    }

    50% {
        fill-opacity: 1;
        transform: scale(1.3);
    }
}

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

@keyframes floatAnim {

    0%,
    100% {
        transform: translateY(0);
    }

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

.hero-divider {
    margin: 30px 0;
}

/* Dress Code Section */
.dress-code-section {
    position: relative;
    color: #fff;
    text-align: center;
    background: url('assets/hero-bg.webp') center/cover no-repeat fixed;
    padding-bottom: 60px;
    /* Leave space before gallery */
}

.dress-code-section .dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 17, 40, 0.85);
    /* Slightly lighter for better contrast */
}

.dress-code-box {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.08);
    /* Making box slightly more visible */
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    padding: 60px 40px;
    border-radius: 20px;
    z-index: 1;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    /* Add depth */
}

.title-light {
    color: #fff;
}

.svg-icon-wrap {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.gold-text {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 20px;
}

.color-palette {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    position: relative;
    cursor: help;
    transition: transform 0.3s, border-color 0.3s;
}

.color-swatch:hover {
    transform: scale(1.2);
    border-color: var(--primary);
}

.floral-svg-tl {
    position: absolute;
    top: -20px;
    left: -20px;
    pointer-events: none;
}

.floral-svg-br {
    position: absolute;
    bottom: -20px;
    right: -20px;
    pointer-events: none;
}


/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        align-items: center;
        padding: 30px 0;
        gap: 20px;
        transform: translateY(-150%);
        transition: transform 0.4s ease;
        z-index: -1;
    }

    .navbar.active .nav-links {
        transform: translateY(0);
    }

    .navbar.active .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

    .navbar.active .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .story-content {
        flex-direction: column;
    }

    .time-box {
        min-width: 80px;
        padding: 10px;
    }

    .rsvp-container {
        padding: 30px 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 20px;
    }

    .gallery-item {
        aspect-ratio: 4 / 3;
        transform: translateY(0) !important;
        /* Disable collage offset on mobile */
    }
}