:root {
    --bg: #3a2637;
    --bg-light: #553e51;
    --cream: #f1e5d1;
    --rose: #dbb5b5;
    --blush: #c39898;
    --mauve: #987070;
    --white: #ffffff;
    --text-light: rgba(241, 229, 209, 0.92);
    --text-dark: #3b2634;
    --border-light: rgba(219, 181, 181, 0.16);
    --border-dark: rgba(152, 112, 112, 0.28);
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    min-width: 320px;
    background: var(--bg);
    color: var(--text-light);
    font-family: var(--font-body);
    line-height: 1.8;
}

a {
    color: inherit;
    text-decoration: none;
}

input,
textarea,
select,
button {
    width: 100%;
    font: inherit;
}

.rsvp-header {
    background: linear-gradient(180deg, var(--bg-light), var(--bg));
    color: var(--white);
    padding: 34px 22px 82px;
    text-align: center;
    border-bottom: 1px solid rgba(219, 181, 181, 0.24);
}

.back-btn,
.subtitle,
.group-label,
.form-group label {
    letter-spacing: 3px;
    font-size: 11px;
    text-transform: uppercase;
}

.back-btn {
    display: inline-block;
    margin-bottom: 52px;
    color: rgba(241, 229, 209, 0.88);
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: var(--rose);
}

.subtitle {
    margin-bottom: 18px;
    color: rgba(241, 229, 209, 0.88);
}

.rsvp-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 18vw, 6rem);
    font-weight: 500;
    line-height: 0.95;
}

.divider {
    width: 150px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 32px auto;
    position: relative;
}

.divider::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rose);
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
}

.description {
    max-width: 540px;
    margin: auto;
    color: rgba(241, 229, 209, 0.88);
}

.rsvp-container {
    width: min(100%, 880px);
    margin: -48px auto 70px;
    padding: 0 18px;
}

.rsvp-card {
    background: rgba(241, 229, 209, 0.08);
    border: 1px solid rgba(219, 181, 181, 0.22);
    padding: 38px 28px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.16);
    text-align: center;
    border-radius: 14px;
    backdrop-filter: blur(4px);
}

.rsvp-card + .rsvp-card {
    margin-top: 24px;
}

.rsvp-card h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 9vw, 2.7rem);
    font-weight: 500;
    line-height: 1.05;
    margin-bottom: 28px;
    color: var(--rose);
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label,
.group-label {
    display: block;
    margin-bottom: 10px;
    color: rgba(241, 229, 209, 0.88);
}

input,
textarea,
select {
    min-height: 52px;
    padding: 14px 16px;
    border: 1px solid rgba(219, 181, 181, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    font-size: 16px;
    border-radius: 8px;
}

input::placeholder,
textarea::placeholder {
    color: rgba(241, 229, 209, 0.56);
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--rose);
    outline: none;
    background: rgba(255, 255, 255, 0.12);
}

.attendance-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.option-card {
    min-height: 72px;
    display: grid;
    place-items: center;
    padding: 16px;
    border: 1px solid rgba(219, 181, 181, 0.24);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    text-align: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.option-card input {
    position: absolute;
    opacity: 0;
}

.option-card span {
    letter-spacing: 2px;
    font-size: 11px;
    text-transform: uppercase;
}

.option-card:has(input:checked) {
    border-color: var(--rose);
    background: rgba(219, 181, 181, 0.16);
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border: 1px solid rgba(219, 181, 181, 0.35);
    background: transparent;
    color: var(--text-light);
    letter-spacing: 3px;
    font-size: 11px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.submit-btn:hover {
    background: rgba(219, 181, 181, 0.16);
    border-color: var(--rose);
}

.submit-btn:disabled {
    cursor: wait;
    opacity: 0.72;
}

.form-status {
    min-height: 24px;
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
}

.form-status.error {
    color: #ff9999;
}

.form-status.loading {
    color: rgba(241, 229, 209, 0.75);
}

.success-card[hidden] {
    display: none;
}

.success-icon {
    width: 80px;
    height: 80px;
    display: grid;
    place-items: center;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: rgba(219, 181, 181, 0.2);
    color: var(--rose);
    font-size: 2rem;
}

@media (max-width: 640px) {
    .rsvp-header {
        padding: 28px 18px 74px;
    }

    .back-btn {
        margin-bottom: 42px;
    }

    .rsvp-card {
        padding: 32px 20px;
    }

    .attendance-options {
        grid-template-columns: 1fr;
    }
}
