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

/* Reset and base styles */
html, body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: 'Cormorant Garamond', Georgia, serif;
    background-color: #000;
    height: 100%;
    color: #fff;
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Left side: Hero image fixed, top-aligned, uncropped */
.left-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100vh;
    background-color: #000;
    z-index: 1;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.left-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top;
    display: block;
}

.mobile-header, .mobile-header p {
    display: none;
}

/* Right side: RSVP form panel */
.right-form {
    position: relative;
    margin-left: 50%;
    width: calc(100% - 50%);
    max-width: 850px;
    height: 100vh;
    overflow-y: auto;
    background: linear-gradient(to bottom right, #d54dc3, #8e2c91);
    color: #fff;
    padding: 40px 5vw;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    z-index: 2;
    scroll-padding-bottom: 60px;
    box-sizing: border-box;
    font-weight: 300;
}

/* Overlap on ultrawide */
@media screen and (min-width: 1800px) {
    .right-form {
        margin-left: 48vw;
        width: 52vw;
        padding-left: 4em;
        padding-right: 4em;
    }
}

.right-form h2 {
    font-size: 1.5em;
    margin-bottom: 30px;
    text-align: center;
}

.right-form p {
    font-size: 1.1em;
    margin: 10px 0 20px 0;
    text-align: center;
}

/* RSVP form */
form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-sizing: border-box;
}

form input,
form select,
form textarea,
form button {
    width: 100%;
    margin-bottom: 15px;
    padding: 12px;
    font-size: 1em;
    border: none;
    border-radius: 4px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    box-sizing: border-box;
}

form input,
form select,
form textarea {
    background-color: #fff;
    color: #000;
}

form textarea {
    resize: vertical;
    min-height: 80px;
}

form button {
    background-color: #000;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

form button:hover {
    background-color: #333;
}

/* Credit */
.credit {
    font-size: 0.75em;
    color: #eee;
    margin-top: 20px;
    text-align: center;
    opacity: 0.7;
}

/* Mobile layout and scaling — trigger below 1025px */
@media screen and (max-width: 1025px) {
    body {
        overflow: auto;
    }

    .left-image {
        display: none !important;
    }

    .right-form {
        margin: 0;
        width: 100%;
        height: auto;
        padding: 40px 40px;
        align-items: flex-start;
    }

    .mobile-header {
        display: block;
        margin-bottom: 20px;
        text-align: left;
    }

    .mobile-header h1 {
        display: block !important;
        font-size: 1.8em;
        margin-bottom: 10px;
    }

    .mobile-header p {
        display: block !important;
        font-size: 1em;
        line-height: 1.5;
        margin: 5px 0;
    }

    form {
        width: 100%;
        max-width: 100%;
    }

    form input,
    form select,
    form textarea,
    form button {
        font-size: 1em;
        padding: 10px;
    }
}
