:root {
    --bg: #f0f0ff;
    --surface: #ffffff;
    --ink: #202838;
    --muted: #667085;
    --purple: #4b3df2;
    --gold: #df9100;
    --deep-gold: #b98900;
    --sun: #ffbf00;
    --line: rgba(32, 40, 56, 0.14);
    --shadow: 0 24px 70px rgba(32, 40, 56, 0.16);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

.page-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(23rem, 29rem);
    gap: 2rem;
    width: min(73rem, calc(100% - 2rem));
    min-height: 100vh;
    margin: 0 auto;
    padding: 3rem 0;
    align-items: center;
}

.decor-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.decor-item {
    position: absolute;
    display: block;
    user-select: none;
}

.decor-leaf-left {
    top: -9rem;
    left: -21rem;
    width: 26rem;
    transform: rotate(-16deg);
}

.decor-flower-top {
    top: -6.5rem;
    left: 48vw;
    width: 14rem;
    transform: rotate(8deg);
}

.decor-leaf-right {
    top: -8.5rem;
    right: -13.5rem;
    width: 26rem;
    transform: rotate(18deg);
}

.decor-flower-left {
    top: 48vh;
    left: -9.5rem;
    width: 15rem;
    transform: rotate(26deg);
}

.decor-leaf-mid-right {
    top: 35vh;
    right: -10.5rem;
    width: 18rem;
    transform: rotate(-18deg);
}

.decor-flower-bottom-left {
    bottom: -7rem;
    left: -5.5rem;
    width: 22rem;
    transform: rotate(-8deg);
}

.decor-leaf-bottom-right {
    right: -8rem;
    bottom: -10rem;
    width: 25rem;
    transform: rotate(202deg);
}

.decor-flower-bottom {
    bottom: -5rem;
    left: 48vw;
    width: 12rem;
    transform: rotate(-12deg);
}

.event-copy {
    position: relative;
    display: grid;
    gap: 1.5rem;
    padding: 1rem 0;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 12rem;
    height: 3rem;
}

.kicker,
.form-eyebrow {
    margin: 0;
    color: var(--deep-gold);
    font-size: 0.82rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

.event-copy h1 {
    max-width: 43rem;
    margin-bottom: 0;
    color: var(--gold);
    font-family: "Bodoni 72", Didot, "Bodoni MT", Georgia, serif;
    font-size: 7rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 0.86;
    text-transform: uppercase;
}

.event-facts {
    display: grid;
    gap: 1rem;
    max-width: 43rem;
    margin: 0;
}

.event-facts div {
    display: grid;
    grid-template-columns: 5.5rem 1fr;
    gap: 1rem;
    align-items: baseline;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.event-facts dt {
    color: var(--deep-gold);
    font-size: 0.74rem;
    font-weight: 850;
    line-height: 1.45;
    text-transform: uppercase;
}

.event-facts dd {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 760;
    line-height: 1.45;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1rem;
    align-items: center;
}

.primary-link,
.submit-button {
    display: inline-flex;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--purple);
    box-shadow: 0 12px 30px rgba(75, 61, 242, 0.24);
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
}

.primary-link {
    padding: 0 1.3rem;
}

.submit-button {
    width: 100%;
    gap: 0.55rem;
    padding: 0 1.2rem;
}

.submit-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    animation: spin 0.75s linear infinite;
}

.submit-spinner svg {
    display: block;
    width: 100%;
    height: 100%;
}

.submit-spinner circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 44;
    stroke-dashoffset: 14;
    opacity: 0.95;
}

.rsvp-form.is-submitting .submit-spinner,
.submit-button.is-pending .submit-spinner,
.submit-button[aria-busy="true"] .submit-spinner {
    display: inline-block;
}

.submit-button:disabled {
    cursor: progress;
    opacity: 0.82;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.deadline {
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 700;
}

.rsvp-panel,
.message-panel {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.rsvp-panel {
    padding: 1.5rem;
}

.rsvp-panel h2 {
    margin: 0.35rem 0 1.25rem;
    font-size: 2rem;
    line-height: 1.1;
}

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

.segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin: 0;
    padding: 0.25rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(240, 240, 255, 0.72);
}

.segmented-control label {
    position: relative;
}

.segmented-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-control span {
    display: grid;
    min-height: 2.65rem;
    place-items: center;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
}

.segmented-control input:checked + span {
    color: #ffffff;
    background: var(--ink);
}

.field {
    display: grid;
    gap: 0.42rem;
}

.field span,
.guest-heading span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: rgba(255, 255, 255, 0.9);
    outline: 0;
}

.field input {
    height: 3rem;
    padding: 0 0.9rem;
}

.field textarea {
    min-height: 5.5rem;
    resize: vertical;
    padding: 0.8rem 0.9rem;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(75, 61, 242, 0.14);
}

.guest-block {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.guest-heading {
    display: flex;
    align-items: center;
}

.guest-heading span {
    color: var(--ink);
    font-size: 0.92rem;
}

.ghost-button {
    justify-self: start;
    border: 0;
    color: var(--purple);
    background: transparent;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 850;
}

.guest-list {
    display: grid;
    gap: 0.75rem;
}

.guest-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 1.75rem;
    column-gap: 0.5rem;
    row-gap: 0.65rem;
    align-items: end;
}

.icon-button {
    display: grid;
    width: 1.75rem;
    height: 3rem;
    padding: 0;
    place-items: center;
    border: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    text-align: center;
}

.icon-button:hover,
.icon-button:focus-visible {
    color: var(--ink);
}

.message-shell {
    display: grid;
    min-height: 100vh;
    width: min(42rem, calc(100% - 2rem));
    margin: 0 auto;
    place-items: center;
    padding: 2rem 0;
}

.message-panel {
    width: 100%;
    padding: 2rem;
}

.message-panel h1 {
    margin: 0.3rem 0 1rem;
    color: var(--gold);
    font-family: "Bodoni 72", Didot, "Bodoni MT", Georgia, serif;
    font-size: 3.4rem;
    line-height: 0.95;
    text-transform: uppercase;
}

.message-panel p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.5;
}

.error-list {
    margin: 0 0 1.5rem;
    padding-left: 1.2rem;
}

.error-list li {
    margin-bottom: 0.45rem;
}

@media (max-width: 920px) {
    .page-shell {
        grid-template-columns: 1fr;
        align-items: start;
        padding: 2rem 0;
    }

    .event-copy h1 {
        font-size: 5rem;
    }

}

@media (max-width: 560px) {
    .decor-item {
        opacity: 0.72;
    }

    .decor-leaf-left,
    .decor-flower-top,
    .decor-leaf-right,
    .decor-flower-left,
    .decor-leaf-mid-right,
    .decor-flower-bottom {
        display: none;
    }

    .decor-flower-bottom-left {
        bottom: -5.5rem;
        left: -5rem;
        width: 13rem;
        transform: rotate(-18deg);
    }

    .decor-leaf-bottom-right {
        right: -7.5rem;
        bottom: -7rem;
        width: 16rem;
        transform: rotate(202deg);
    }

    .page-shell {
        width: min(100% - 1rem, 73rem);
        gap: 1rem;
        padding: 1rem 0;
    }

    .event-copy {
        gap: 1rem;
        padding: 0.4rem;
    }

    .brand-logo {
        height: 2.35rem;
    }

    .event-copy h1 {
        font-size: 3.7rem;
    }

    .event-facts div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
        align-items: start;
    }

    .event-facts dd {
        font-size: 1rem;
    }

    .rsvp-panel {
        padding: 1rem;
    }

    .guest-row {
        grid-template-columns: 1fr;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--line);
    }

    .icon-button {
        width: 100%;
    }

    .message-panel {
        padding: 1.35rem;
    }

    .message-panel h1 {
        font-size: 2.7rem;
    }
}
