/* Base Styles & Paper Texture */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    background: linear-gradient(180deg, #e8e4de 0%, #ddd8d0 100%);
    color: #3d3d3d;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

/* Opening Animations */
@keyframes dropCard {
    0% {
        transform: translateY(-400px);
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    75% {
        transform: translateY(8px);
    }
    90% {
        transform: translateY(-3px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}


/* Details Section */
.details {
    padding: 8rem 2rem 4rem;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 20;
    pointer-events: none;
}

.details-content {
    max-width: 600px;
    width: 100%;
    text-align: center;
    background: #fffdf9;
    padding: 4rem 5rem;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.03);
    opacity: 0;
    animation: dropCard 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
    animation-delay: 0.2s;
}

.details h2 {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    font-size: 0.95rem;
    color: #999;
    letter-spacing: 0.15em;
    margin: 1.5rem 0 1rem;
}

.separator .line {
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.15);
    max-width: 120px;
}

.couple-intro {
    font-size: 1.1rem;
    font-style: italic;
    color: #666;
    margin-bottom: 0.5rem;
}

.couple-names {
    font-size: 1.4rem;
    font-style: italic;
    color: #3d3d3d;
    font-weight: 600;
}

.detail-value {
    font-size: 1.3rem;
    color: #3d3d3d;
}

.detail-value sup {
    font-size: 0.65em;
    vertical-align: super;
}

.card-divider {
    width: 60%;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
}

.more-details-link {
    display: block;
    font-size: 1.1rem;
    font-style: italic;
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
    pointer-events: auto;
    line-height: 1.6;
}

.more-details-link:hover {
    color: #555;
}


/* RSVP Section */
.rsvp {
    padding: 2rem 2rem;
    max-width: 600px;
    margin: 12rem auto 4rem;
    scroll-margin-top: 2rem;
    position: relative;
    z-index: 20;
    background: #fffdf9;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.03);
    pointer-events: auto;
}

.rsvp h2 {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
}

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

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

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

.form-field input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.7);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-field input:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-group > label {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.7);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #999;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-group input[type="tel"] {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.7);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
    font-style: italic;
}

.form-field input::placeholder {
    color: #999;
    font-style: italic;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 1.1rem;
}

.radio-label input[type="radio"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: #666;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    margin-top: 1rem;
    font-family: inherit;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: #3d3d3d;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #555;
}

.submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.form-success {
    text-align: center;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    opacity: 0;
    animation: fadeIn 0.6s ease forwards;
}

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

.form-success h3 {
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: #3d3d3d;
}

.form-success p {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
}

/* Photo Gallery Section */
.photos {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
    overflow: visible;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.photos.loaded {
    opacity: 1;
}

.photos h2 {
    display: none;
}

.photo-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.photo {
    position: absolute;
    left: var(--x, 0);
    top: var(--y, 0);
    transform: rotate(var(--rotate, 0deg));
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: auto;
    z-index: 15;
}

.photo:active {
    cursor: grabbing;
}

.photo-inner {
    background: linear-gradient(145deg, #fefefe 0%, #f8f6f2 100%);
    padding: 0.8rem 0.8rem 2.5rem;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.08),
        inset 0 0 0 1px rgba(0, 0, 0, 0.02);
    border-radius: 1px;
    position: relative;
    transform: scale(var(--photo-scale, 1));
    transform-origin: top left;
}

/* Subtle paper texture on polaroid frame */
.photo-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    border-radius: 1px;
}

.photo-placeholder {
    width: 220px;
    height: 266px;
    background: linear-gradient(135deg, #e8e4de 0%, #d9d5ce 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-style: italic;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
}

.photo-inner img {
    width: 220px;
    height: 266px;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Footer */
footer {
    padding: 4rem 2rem;
    text-align: center;
    color: #888;
    font-style: italic;
    position: relative;
    z-index: 5;
}

/* Mobile Photo Gallery (hidden on desktop) */
.photos-mobile,
.photos-mobile-bottom {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .details {
        padding: 4rem 1rem 2rem;
    }

    .details-content {
        padding: 2.5rem 1.5rem;
    }

    .details h2 {
        font-size: 1.8rem;
        letter-spacing: 0.15em;
    }

    .couple-names {
        font-size: 1.1rem;
    }

    .separator {
        font-size: 0.85rem;
        margin: 1rem 0 0.75rem;
        gap: 0.6rem;
    }

    .separator .line {
        max-width: 80px;
    }

    .couple-intro {
        font-size: 1rem;
    }

    .couple-names {
        font-size: 1.2rem;
    }

    .detail-value {
        font-size: 1.1rem;
    }

    .card-divider {
        margin: 1.5rem auto;
    }

    .more-details-link {
        font-size: 1rem;
    }

    .rsvp {
        padding: 2rem 1.5rem;
        margin: 2rem 1rem;
        width: auto;
    }

    .rsvp h2 {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

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

    .form-row .form-field {
        margin-bottom: 2rem;
    }

    /* Hide desktop floating photos on mobile */
    .photos {
        display: none;
    }

    /* Show mobile photos in grid */
    .photos-mobile,
    .photos-mobile-bottom {
        display: block;
        width: 100%;
        padding: 1rem;
        margin: 0 auto;
        max-width: 400px;
    }

    .photo-container-mobile {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .photo-mobile {
        transform: rotate(var(--rotate, 0deg));
    }

    .photo-mobile .photo-inner {
        transform: scale(0.5);
        transform-origin: top left;
        margin-bottom: -130px;
        margin-right: -110px;
    }

    .photo-mobile .photo-inner img {
        width: 220px;
        height: 266px;
        object-fit: cover;
    }

    footer {
        padding: 2rem 1rem;
    }

}
