/* CSS Custom Properties for Design System */
:root {
    /* Colors - Burgundy & Old Port inspired palette */
    --clr-burgundy: #61182A;
    /* Deep burgundy */
    --clr-burgundy-light: #8B2C42;
    --clr-burgundy-dark: #3E0E19;
    --clr-gold: #D4AF37;
    --clr-gold-light: #F3E5AB;
    --clr-cream: #FAF6F0;
    /* Warm off-white, reminiscent of old paper/stone */
    --clr-dark: #1A1A1A;
    --clr-grey: #666666;
    --clr-light-grey: #F0EBE1;

    /* Typography (V2 Updated elegant fonts) */
    --font-heading: 'Playfair Display', serif;
    /* Elegant, classic for headings */
    --font-script: 'Alex Brush', cursive;
    /* Romantic flowing script */
    --font-body: 'Montserrat', sans-serif;
    /* Clean, modern for readability */

    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 8rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--clr-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.text-center {
    text-align: center;
}

.text-burgundy {
    color: var(--clr-burgundy);
}

.text-light {
    color: var(--clr-cream);
}

.text-gold {
    color: var(--clr-gold);
}

.bg-light {
    background-color: var(--clr-cream);
}

.bg-dark {
    background-color: var(--clr-dark);
}

.bg-burgundy {
    background-color: var(--clr-burgundy);
}

.section {
    padding: var(--space-2xl) 0;
}

.pt-large {
    padding-top: var(--space-2xl);
}

.pb-large {
    padding-bottom: var(--space-2xl);
}

.mt-large {
    margin-top: var(--space-2xl);
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.z-10 {
    z-index: 10;
}

.overflow-hidden {
    overflow: hidden;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--clr-burgundy);
    color: var(--clr-cream);
}

.btn-primary:hover {
    background-color: var(--clr-burgundy-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(97, 24, 42, 0.3);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--clr-burgundy), var(--clr-gold), var(--clr-burgundy-light));
    z-index: -1;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.glow-effect:hover::after {
    opacity: 0.5;
    filter: blur(8px);
}

/* Password Overlay */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--clr-cream);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.password-box {
    background: #fff;
    padding: var(--space-xl);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    max-width: 400px;
    width: 90%;
    border-top: 5px solid var(--clr-burgundy);
}

.password-title {
    color: var(--clr-burgundy);
    margin-bottom: var(--space-sm);
}

.password-text {
    color: var(--clr-grey);
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
}

.password-input-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.password-input-group input {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.password-input-group input:focus {
    border-color: var(--clr-burgundy);
}

.password-error {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: var(--space-sm);
    display: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(250, 246, 240, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

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

/* Connected MK Logo */
.logo-mk {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    position: relative;
    line-height: 1;
    color: var(--clr-burgundy);
}

.navbar:not(.scrolled) .logo-mk {
    color: var(--clr-cream);
}

.logo-mk .m {
    z-index: 2;
}

.logo-mk .k {
    margin-left: -0.6rem;
    /* The snag styling */
    position: relative;
    z-index: 1;
}

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

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--clr-cream);
    font-weight: 500;
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--clr-gold);
    transition: width 0.3s ease;
}

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

.nav-links .nav-btn {
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
}

.navbar.scrolled .nav-links .nav-btn {
    border-color: var(--clr-burgundy);
    color: var(--clr-burgundy);
}

.nav-links .nav-btn:hover {
    background-color: var(--clr-cream);
    color: var(--clr-burgundy);
}

.navbar.scrolled .nav-links .nav-btn:hover {
    background-color: var(--clr-burgundy);
    color: var(--clr-cream);
}

.nav-links .nav-btn::after {
    display: none;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--clr-cream);
    transition: all 0.3s ease-in-out;
}

.navbar.scrolled .hamburger .bar {
    background-color: var(--clr-dark);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    color: var(--clr-cream);
    padding: 0 var(--space-lg);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle gradient overlay to mimic dusk at old port */
    background: linear-gradient(rgba(26, 26, 26, 0.4), rgba(62, 14, 25, 0.7)), url('couple.png') center/cover no-repeat;
    z-index: -1;
    filter: brightness(0.85);
}

.hero-content {
    max-width: 800px;
    animation: fadeIn 1.5s ease-out;
}

.pre-title {
    font-family: var(--font-script);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--clr-gold-light);
    margin-bottom: var(--space-md);
    letter-spacing: 1px;
}

/* New specific class for cursive hero names */
.couple-names {
    font-family: var(--font-script);
    font-size: clamp(4rem, 10vw, 8rem);
    color: var(--clr-cream);
    margin-bottom: var(--space-lg);
    line-height: 1.1;
    text-shadow: 2px 4px 10px rgba(0, 0, 0, 0.3);
    font-weight: 400;
}

.ampersand {
    font-family: var(--font-script);
    font-size: 0.8em;
    color: var(--clr-gold);
    margin: 0 0.2rem;
}

.hero-details {
    font-family: var(--font-body);
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: var(--space-xl);
}

.hero-details p {
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.scroll-down:hover {
    opacity: 1;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--clr-cream);
    border-radius: 14px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background-color: var(--clr-cream);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Section Titles */
.section-title {
    font-size: 3rem;
    margin-bottom: calc(var(--space-xl) * 1.5);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--clr-gold);
}

/* Timeline/Schedule */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: rgba(97, 24, 42, 0.2);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: 50%;
    position: relative;
    margin-bottom: var(--space-xl);
    width: 100%;
}

.timeline-item:nth-child(even) {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: 50%;
}

.timeline-time {
    position: absolute;
    top: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--clr-burgundy);
    background: var(--clr-cream);
    padding: 0.2rem 1rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-time {
    right: 50%;
    transform: translateX(50%) translateY(-20px);
}

.timeline-item:nth-child(even) .timeline-time {
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
}

.timeline-marker {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--clr-gold);
    border: 3px solid var(--clr-cream);
    z-index: 2;
}

.timeline-content {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    position: relative;
    transition: transform 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 2rem;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 2rem;
}

.timeline-content h3 {
    color: var(--clr-burgundy);
    font-size: 1.5rem;
}

/* Our Story Section */
.story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
}

.story-image-container {
    padding: 2rem;
}

.image-frame {
    position: relative;
    border-radius: 8px;
    z-index: 1;
}

.image-frame::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--clr-gold);
    border-radius: 8px;
    z-index: -1;
}

.slideshow-container {
    position: relative;
    overflow: hidden;
    /* Optional fixed aspect ratio or height */
    aspect-ratio: 4/5;
    background: #000;
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.story-image.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    filter: sepia(0.2) contrast(1.1);
}

.story-image.slide.active {
    opacity: 1;
    z-index: 2;
}

/* Slideshow Controls */
.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    font-size: 1.5rem;
    padding: 1rem 0.8rem;
    cursor: pointer;
    z-index: 5;
    transition: background 0.3s, opacity 0.3s;
    opacity: 0;
    border-radius: 4px;
}

.slideshow-container:hover .slide-nav {
    opacity: 1;
}

.slide-nav:hover {
    background: rgba(212, 175, 55, 0.8);
    /* Gold hover */
}

.slide-nav.prev {
    left: 10px;
}

.slide-nav.next {
    right: 10px;
}

/* Dot Indicators */
.slide-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
    /* border: 1px solid rgba(0,0,0,0.3); */
}

.dot.active {
    background: var(--clr-gold);
    transform: scale(1.2);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.9);
}

.story-card {
    margin-bottom: var(--space-lg);
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 8px;
    border-left: 3px solid var(--clr-gold);
}

.story-subtitle {
    font-family: var(--font-script);
    color: var(--clr-gold-light);
    font-size: 2.8rem;
    margin-bottom: var(--space-sm);
    font-weight: 400;
}

.story-card p {
    color: #e0e0e0;
}

/* Decor Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.3;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--clr-burgundy);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--clr-burgundy-dark);
    bottom: 10%;
    left: -200px;
}

/* Wedding Party */
.party-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.party-member {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, background 0.3s ease;
}

.party-member:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.member-name {
    color: var(--clr-gold-light);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.member-role {
    font-family: var(--font-script);
    color: #aaa;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.member-desc {
    font-size: 0.9rem;
    color: #ddd;
}

/* Travel & Accommodations Section */
.travel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: var(--space-md);
    /* Reduced spacing */
}

.travel-card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
    border-top: 3px solid var(--clr-burgundy);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.travel-card:hover {
    transform: translateY(-5px);
}

.travel-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.travel-subtitle {
    font-size: 1.3rem;
    color: var(--clr-burgundy);
    margin-bottom: 0.8rem;
}

.travel-card p {
    font-size: 0.95rem;
    color: var(--clr-grey);
}

.travel-card-wide {
    grid-column: 1 / -1;
    /* Span full width */
    text-align: center;
    align-items: center;
    padding: 3rem;
    /* Uses .travel-card background and border colors now */
}

.travel-card-wide p {
    color: var(--clr-grey);
    max-width: 800px;
}

.border-top-subtle {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* FAQ Details */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.faq-card {
    background: #fff;
    padding: 3rem 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
}

.faq-card:hover {
    transform: translateY(-5px);
}

.faq-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1;
}

.faq-card h3 {
    color: var(--clr-burgundy);
    font-size: 1.5rem;
}

/* RSVP Section */
.rsvp-section {
    position: relative;
}

.rsvp-container {
    background: #fff;
    border-radius: 12px;
    padding: 4rem;
    max-width: 800px;
    margin: 0 auto;
    color: var(--clr-dark);
}

.rsvp-deadline {
    color: var(--clr-grey);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--clr-dark);
}

.form-hint {
    font-size: 0.85rem;
    color: var(--clr-grey);
    margin-top: -0.2rem;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--clr-cream);
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--clr-burgundy);
    box-shadow: 0 0 0 3px rgba(97, 24, 42, 0.1);
}

.song-request input {
    border-bottom: 2px solid var(--clr-gold);
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
    background: transparent;
    padding: 0.5rem 0;
}

.rsvp-success {
    text-align: center;
    padding: 2rem;
    background: #e8f4f0;
    border-radius: 8px;
    color: #2e7d32;
    margin-top: 2rem;
}

.hidden {
    display: none;
}

/* Footer */
.footer {
    background: var(--clr-dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 4rem 0 2rem;
}

.footer-logo {
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.made-with-love {
    font-size: 0.85rem;
    margin-top: 1rem;
    color: var(--clr-burgundy-light);
}

/* Responsive Design */
@media (max-width: 968px) {
    .story-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item {
        justify-content: flex-start;
        padding-right: 0;
        padding-left: 60px;
    }

    .timeline-item:nth-child(even) {
        padding-left: 60px;
    }

    .timeline-time {
        position: relative;
        display: inline-block;
        margin-bottom: 1rem;
        transform: none !important;
        left: 0 !important;
        right: auto !important;
    }

    .timeline-marker {
        left: 30px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin: 0;
        width: 100%;
    }

    .rsvp-container {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(250, 246, 240, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
        gap: 1.5rem;
    }

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

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

    .nav-links .nav-btn {
        color: var(--clr-burgundy);
        border-color: var(--clr-burgundy);
    }

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

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

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

    .navbar {
        background: rgba(250, 246, 240, 0.95);
    }

    .logo-mk,
    .hamburger .bar {
        color: var(--clr-burgundy);
        background-color: var(--clr-burgundy);
    }

    .logo-mk {
        color: var(--clr-burgundy) !important;
    }

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

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