:root {
    --primary: #c4a468;
    --primary-dark: #4b6b85;
    /* Updated to a happy sky blue-dark */
    --secondary: #5a8fb3;
    /* Updated to a more vibrant blue */
    --accent: #d15a42;
    --bg-light: #f7f9fb;
    /* Slightly cooler background */
    --text-main: #2c3e50;
    /* Updated to a cleaner dark blue-grey */
    --text-muted: #5d6d7e;
    --glass-bg: rgba(255, 255, 255, 0.85);
    /* Slightly more opaque */
    --glass-border: rgba(255, 255, 255, 0.5);
    --serif-font: 'Playfair Display', serif;
    --sans-font: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--sans-font);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/bg-pattern.png');
    background-repeat: repeat;
    opacity: 0.2;
    /* Even more subtle for the happy blue theme */
    z-index: -1;
}

h1,
h2,
h3 {
    font-family: var(--serif-font);
    font-weight: 700;
}

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

/* Header Section */
header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero-img-container {
    width: 90%;
    max-width: 500px;
    /* Shrunk from 600px */
    margin: 0 auto 4rem auto;
    /* Increased margin for better spacing */
    position: relative;
    animation: float 6s ease-in-out infinite;
    display: flex;
    justify-content: center;
    overflow: hidden;
    /* Prevent parallax from overlapping other elements */
    border-radius: 20px;
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.headline {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.subheading {
    font-size: 1.5rem;
    font-family: var(--serif-font);
    font-style: italic;
    color: var(--text-muted);
}

/* Copy Section */
.copy-section {
    padding: 5rem 0;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.baby-voice {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* Details Section */
.details-section {
    padding: 4rem 0;
    background: rgba(107, 142, 169, 0.1);
    margin: 4rem 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.detail-item {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    animation: drift 8s ease-in-out infinite alternate;
}

.detail-item:nth-child(2) {
    animation-delay: -2s;
}

.detail-item:nth-child(3) {
    animation-delay: -4s;
}

.detail-item h3 {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* RSVP Form */
.rsvp-section {
    padding-bottom: 5rem;
}

.rsvp-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    /* Reduced to accommodate subtext */
    color: var(--primary-dark);
}

.rsvp-subtext {
    text-align: center;
    font-family: var(--serif-font);
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.rsvp-form {
    display: grid;
    gap: 1.5rem;
}

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

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 4px rgba(107, 142, 169, 0.1);
}

.submit-btn {
    background: var(--primary-dark);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.3s ease;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

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

/* Footer */
footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    font-style: italic;
    font-family: var(--serif-font);
}

footer p {
    font-family: var(--serif-font);
    font-style: italic;
    color: var(--text-muted);
    font-size: 1.1rem;
    padding: 0 20px;
}

/* Animations */
@keyframes float {

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

    50% {
        transform: translateY(-15px) rotate(0.5deg);
    }
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(5px, 10px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .headline {
        font-size: 2.2rem;
        padding: 0 10px;
    }

    .subheading {
        font-size: 1.2rem;
        padding: 0 20px;
    }

    .glass-card {
        padding: 2rem 1.5rem;
        margin: 0 10px;
    }

    .hero-img-container {
        max-width: 85%;
    }

    header {
        padding: 4rem 1rem;
    }

    .copy-section {
        padding: 3rem 0;
    }
}