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

:root {
    --primary: #8B7355;
    --secondary: #A8956F;
    --accent: #C9B8A0;
    --sage: #9CAF88;
    --dusty-blue: #8B9DAF;
    --terracotta: #C97064;
    --cream: #F5F1EB;
    --white: #FEFEFE;
    --charcoal: #2B2B2B;
    --text-dark: #3A3A3A;
    --text-light: #6B6B6B;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background-color: var(--cream);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--cream) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(169, 150, 111, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(156, 175, 136, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.initials {
    font-size: clamp(4rem, 12vw, 8rem);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    color: var(--primary);
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    line-height: 1;
}

.ampersand {
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--secondary);
    font-weight: 300;
    margin: 0 0.5rem;
}

.names {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    color: var(--charcoal);
    margin: 2rem 0;
    letter-spacing: 0.05em;
}

.wedding-date {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.venue {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    color: var(--primary);
    font-style: italic;
    margin-bottom: 3rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: var(--primary);
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--secondary);
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.cta-button:hover {
    color: var(--white);
    border-color: var(--secondary);
}

.cta-button:hover::before {
    left: 0;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.scroll-indicator::before {
    content: '↓';
    font-size: 2rem;
    color: var(--secondary);
    opacity: 0.6;
}

/* Section Styles */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--charcoal);
    letter-spacing: 0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 4rem;
    letter-spacing: 0.05em;
}

/* Story Section */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.story-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.story-year {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    font-weight: 300;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.story-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--charcoal);
}

.story-text {
    color: var(--text-light);
    line-height: 1.8;
}

/* Event Details */
.event-timeline {
    display: grid;
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
}

.event-item {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--sage);
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: start;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.event-item:hover {
    border-left-color: var(--terracotta);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.event-time {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--primary);
    line-height: 1.2;
}

.event-details h3 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--charcoal);
}

.event-details p {
    color: var(--text-light);
    line-height: 1.8;
}

.event-location {
    font-style: italic;
    color: var(--secondary);
    margin-top: 0.5rem;
}

/* RSVP Form */
#rsvp {
    background: linear-gradient(135deg, var(--white) 0%, var(--cream) 100%);
}

.rsvp-form {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--charcoal);
    letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--accent);
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--cream);
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.radio-group {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

/* RSVP custom listbox (replaces native <select> so open/closed state is real DOM state) */
.rsvp-form .rsvp-select {
    position: relative;
    display: block;
}

.rsvp-form .rsvp-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem 1rem 1rem;
    border: 2px solid var(--accent);
    border-radius: 2px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    background: var(--cream);
    color: var(--text-dark);
    transition: border-color 0.25s ease, background 0.25s ease;
}

.rsvp-form .rsvp-select-trigger:hover {
    border-color: var(--primary);
}

.rsvp-form .rsvp-select.is-expanded .rsvp-select-trigger {
    border-color: var(--primary);
    background: var(--white);
}

.rsvp-form .rsvp-select-value {
    flex: 1;
    min-width: 0;
}

.rsvp-form .rsvp-select-chevron {
    flex-shrink: 0;
    width: 1.125rem;
    height: 0.65rem;
    color: var(--primary);
    opacity: 0.85;
    transform: rotate(0deg);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), color 0.25s ease, opacity 0.25s ease;
}

.rsvp-form .rsvp-select-chevron svg {
    display: block;
    width: 100%;
    height: 100%;
}

.rsvp-form .rsvp-select.is-expanded .rsvp-select-chevron {
    transform: rotate(180deg);
    color: var(--secondary);
    opacity: 1;
}

.rsvp-form .rsvp-select-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 40;
    margin: 0;
    padding: 0.35rem 0;
    list-style: none;
    background: var(--white);
    border: 2px solid var(--accent);
    border-radius: 2px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    max-height: 16rem;
    overflow-y: auto;
}

.rsvp-form .rsvp-select-option {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    font: inherit;
    text-align: left;
    color: var(--text-dark);
    cursor: pointer;
    transition: background 0.15s ease;
}

.rsvp-form .rsvp-select-option:hover,
.rsvp-form .rsvp-select-option[aria-selected="true"] {
    background: rgba(156, 175, 136, 0.18);
}

.submit-button {
    width: 100%;
    padding: 1.2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 2px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.submit-button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 115, 85, 0.3);
}

.submit-button:active {
    transform: translateY(0);
}

/* Travel Info */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.info-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.info-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--charcoal);
}

.info-card p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.info-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.info-link:hover {
    border-bottom-color: var(--primary);
}

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

.gallery-item {
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

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

.gallery-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--white);
    opacity: 0.6;
}

/* Footer */
footer {
    background: var(--charcoal);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
}

footer p {
    opacity: 0.8;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.footer-hearts {
    font-size: 1.5rem;
    margin: 1rem 0;
    color: var(--terracotta);
}

/* Success Message */
.success-message {
    display: none;
    background: var(--sage);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 4px;
    text-align: center;
    margin-top: 2rem;
    font-weight: 500;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message.show {
    display: block;
}

.error-message {
    display: none;
    background: var(--terracotta);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 4px;
    text-align: center;
    margin-top: 2rem;
    font-weight: 500;
    animation: slideDown 0.5s ease;
}

.error-message.show {
    display: block;
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .event-time {
        font-size: 2rem;
    }

    .rsvp-form {
        padding: 2rem;
    }

    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }

    section {
        padding: 4rem 1.5rem;
    }
}

/* Decorative Elements */
.section-divider {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary), transparent);
    margin: 3rem auto;
}

/* Fade-in on scroll animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
