/* ── Fire & Ice theme tokens (fonts match site.css / info page) ── */
.rsvp-page {
    --bg-charcoal: #0F1525;
    --bg-deep: #0a0e18;
    --card-bg: rgba(18, 24, 42, 0.88);
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-muted: #ffffff;
    --border-white: rgba(255, 255, 255, 0.72);
    --border-subtle: rgba(255, 255, 255, 0.22);
    --fire-warm: #e07a2f;
    --fire-glow: rgba(224, 122, 47, 0.35);
    --ice-cool: #8ec4dc;
    --ice-glow: rgba(142, 196, 220, 0.28);
    --input-bg: rgba(255, 255, 255, 0.06);
    --input-border: rgba(255, 255, 255, 0.28);
    --font-display: "Cinzel", "Times New Roman", serif;
    --font-body: "Cormorant Garamond", "Times New Roman", serif;
    --bs-font-sans-serif: var(--font-body);
    --bs-body-font-family: var(--font-body);
    --bs-primary: #8ec4dc;
    --bs-primary-rgb: 142, 196, 220;
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--border-white);
    --bs-btn-color: var(--text-primary);
    --bs-btn-hover-bg: rgba(255, 255, 255, 0.08);
    --bs-btn-hover-border-color: #ffffff;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-active-bg: rgba(255, 255, 255, 0.12);
    --bs-btn-active-border-color: #ffffff;
}

/* ── Page shell & atmosphere ── */
.rsvp-page {
    font-family: var(--font-body);
    background-color: var(--bg-charcoal);
    min-height: 100vh;
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.rsvp-page::before,
.rsvp-page::after {
    content: '';
    position: fixed;
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
    /* Static layers only — no filter/animation (avoids continuous GPU compositing) */
    will-change: auto;
    contain: strict;
}

/* Fire glow — bottom left */
.rsvp-page::before {
    bottom: -5%;
    left: -8%;
    width: min(55vw, 520px);
    height: min(55vw, 520px);
    background:
        radial-gradient(ellipse at 30% 70%, rgba(224, 122, 47, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse at 50% 90%, rgba(180, 70, 20, 0.3) 0%, transparent 50%);
}

/* Ice glow — top right */
.rsvp-page::after {
    top: -5%;
    right: -8%;
    width: min(50vw, 480px);
    height: min(50vw, 480px);
    background:
        radial-gradient(ellipse at 70% 30%, rgba(142, 196, 220, 0.4) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 10%, rgba(200, 230, 245, 0.2) 0%, transparent 45%);
}

.rsvp-page .container {
    position: relative;
    z-index: 1;
}

/* ── Card — double border like the invitation ── */
.rsvp-card {
    max-width: 980px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    /* Opaque enough without backdrop-filter (backdrop blur + animated layers crushed scroll/GPU) */
    background: rgba(18, 24, 42, 0.96);
    border: 1px solid var(--border-white);
    outline: 1px solid var(--border-subtle);
    outline-offset: 8px;
    border-radius: 0;
    box-shadow:
        0 0 60px rgba(0, 0, 0, 0.4),
        inset 0 0 80px rgba(255, 255, 255, 0.02);
}

.rsvp-entry-card {
    max-width: 520px;
    text-align: center;
}

/* ── Typography ── */
.rsvp-page h1 {
    font-family: var(--font-display);
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: clamp(1.4rem, 3.5vw, 1.85rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rsvp-page .entry-subtitle,
.rsvp-page .wedding-date,
.rsvp-page .event-details {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.65;
}

.rsvp-page .entry-subtitle {
    margin-bottom: 1.5rem;
}

.rsvp-page .wedding-date {
    font-style: normal;
    font-size: 1rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.rsvp-page .event-details {
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.rsvp-page .theme-tagline {
    text-align: center;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

/* ── Logo ── */
.logo-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo-header img {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    filter: brightness(1.05);
}

/* ── Forms ── */
.rsvp-code-form {
    text-align: left;
}

.rsvp-code-input {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 1.35rem;
    letter-spacing: 0.2em;
    text-align: center;
    text-transform: uppercase;
}

.rsvp-page .form-label {
    font-family: var(--font-body);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text-secondary);
    font-weight: 500;
}

.rsvp-page .form-control,
.rsvp-page .form-control-lg {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 0;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.1rem;
    padding: 0.65rem 0.85rem;
}

.rsvp-page .form-control::placeholder {
    color: var(--ice-cool);
    opacity: 0.75;
}

.rsvp-page .form-control:focus {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

/* ── Buttons (CTA style only — not guest toggles / form controls) ── */
.rsvp-page .btn-primary,
.rsvp-page a.btn-primary,
.rsvp-page button.btn-primary {
    display: block;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-white);
    border-radius: 0;
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.rsvp-page .btn-primary:hover,
.rsvp-page a.btn-primary:hover,
.rsvp-page button.btn-primary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 0 24px rgba(142, 196, 220, 0.15), 0 0 24px rgba(224, 122, 47, 0.1);
}

.rsvp-page .btn-primary:active,
.rsvp-page .btn-primary:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: none;
}

/* ── Alerts ── */
.rsvp-page .alert {
    border-radius: 0;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-style: italic;
}

.rsvp-page .alert-danger {
    border-color: rgba(224, 122, 47, 0.45);
    background: rgba(224, 122, 47, 0.1);
}

.rsvp-page .alert-warning {
    border-color: rgba(201, 169, 110, 0.45);
    background: rgba(201, 169, 110, 0.1);
}

.rsvp-page .alert-info {
    border-color: rgba(142, 196, 220, 0.45);
    background: rgba(142, 196, 220, 0.1);
}

.rsvp-page .error {
    margin-bottom: 1rem;
}

.rsvp-page .cutoff-message {
    text-align: center;
    font-size: 1.05rem;
    margin-top: 1rem;
}

/* ── Guest cards (mobile-first RSVP) ── */
.rsvp-form-card {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.rsvp-progress {
    margin: 1.5rem 0 1.25rem;
}

.rsvp-progress__label {
    font-family: var(--font-body);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.rsvp-progress__track {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    overflow: hidden;
}

.rsvp-progress__fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--ice-cool), var(--bs-primary));
    border-radius: inherit;
    transition: width 0.35s ease;
}

.rsvp-progress__pct {
    margin-top: 0.4rem;
    font-size: 0.95rem;
    color: var(--ice-cool);
    text-align: right;
}

.guest-cards {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.guest-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.guest-card.is-open {
    border-color: rgba(201, 169, 110, 0.45);
    box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.15);
}

.guest-card__heading {
    margin: 0;
    font-size: inherit;
}

.guest-card__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    font-family: inherit;
}

.guest-card__toggle:hover,
.guest-card__toggle:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    outline: none;
}

.guest-card__title {
    flex: 1;
    min-width: 0;
}

.guest-card__name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guest-card__chevron {
    flex-shrink: 0;
    width: 0.75rem;
    height: 0.75rem;
    margin-left: 0.15rem;
    color: var(--ice-cool);
    transform: rotate(0deg);
    transform-origin: center;
    transition: transform 0.25s ease;
    align-self: center;
}

.guest-card.is-open .guest-card__chevron {
    transform: rotate(180deg);
}

.status-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    border: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.status-pill--unanswered {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
    color: #ffffff;
}

.status-pill--yes {
    background: rgba(90, 160, 110, 0.2);
    border-color: rgba(90, 160, 110, 0.45);
    color: #b8dfc2;
}

.status-pill--no {
    background: rgba(180, 70, 70, 0.2);
    border-color: rgba(180, 70, 70, 0.45);
    color: #efb4b4;
}

.guest-card__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease;
}

.guest-card.is-expanded .guest-card__panel {
    grid-template-rows: 1fr;
}

.guest-card__panel-inner {
    overflow: hidden;
    padding: 0 1.1rem;
    min-height: 0;
}

.guest-card.is-expanded .guest-card__panel-inner {
    padding-top: 0.85rem;
    padding-bottom: 1.15rem;
}

.guest-field {
    margin-bottom: 1.15rem;
}

.guest-field:last-child {
    margin-bottom: 0;
}

.guest-field__label {
    display: block;
    font-family: var(--font-body);
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.guest-field__value {
    color: #ffffff;
    font-size: 1.05rem;
}

.guest-field__control,
.guest-card select,
.guest-card input[type="text"],
.guest-card textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    box-sizing: border-box;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1.05rem;
}

.guest-card input::placeholder,
.guest-card textarea::placeholder,
.additional-fields input::placeholder,
.additional-fields textarea::placeholder {
    color: var(--ice-cool);
    opacity: 0.75;
}

.guest-card select option {
    background: var(--bg-deep);
    color: var(--text-primary);
}

.guest-card select:focus,
.guest-card input[type="text"]:focus,
.guest-card textarea:focus {
    outline: none;
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.2);
}

.guest-card textarea {
    resize: vertical;
    min-height: 4.5rem;
}

.rsvp-form-actions {
    margin-top: 1.5rem;
}

.rsvp-review {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.rsvp-review__title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    margin: 0 0 0.35rem;
}

.rsvp-review__intro {
    color: #ffffff;
    margin-bottom: 1.25rem;
}

.rsvp-review__guest,
.rsvp-review__shared {
    padding: 1rem 0;
    border-top: 1px solid var(--border-subtle);
}

.rsvp-review__guest:first-child {
    border-top: none;
    padding-top: 0;
}

.rsvp-review__guest h3,
.rsvp-review__shared h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.06em;
    margin: 0 0 0.65rem;
}

.rsvp-review__guest dl {
    margin: 0;
    display: grid;
    gap: 0.45rem;
}

.rsvp-review__guest dl > div {
    display: grid;
    grid-template-columns: minmax(8rem, 40%) 1fr;
    gap: 0.5rem;
}

.rsvp-review__guest dt {
    color: var(--ice-cool);
    font-size: 0.9rem;
}

.rsvp-review__guest dd {
    margin: 0;
    color: #ffffff;
}

.rsvp-review__shared p {
    margin: 0.35rem 0;
    color: var(--text-secondary);
}

.rsvp-review__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.rsvp-page .btn-outline-light {
    background: transparent;
    border: 1px solid var(--border-white);
    color: var(--text-primary);
    padding: 0.65rem 1.25rem;
    border-radius: 0;
    font-family: var(--font-display);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.78rem;
    width: auto;
}

.rsvp-page .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ffffff;
    color: #ffffff;
}

.additional-fields input,
.additional-fields textarea,
.extra-sleeping-options select {
    border-radius: 6px;
}

/* ── Stay option & additional fields ── */
.stay-option {
    margin-bottom: 1.25rem;
    padding: 1.15rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
}

.stay-option label {
    display: block;
    font-size: 1.05rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.stay-option input[type="checkbox"] {
    accent-color: var(--ice-cool);
    margin-right: 0.5rem;
}

.room-card {
    margin-bottom: 1.25rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
}

.room-card__title {
    font-size: 1.35rem;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.room-card__intro,
.stay-option__intro {
    color: var(--text-secondary);
    margin: 0 0 0.85rem;
    line-height: 1.55;
    font-size: 1.05rem;
}

.rsvp-stay-section {
    margin-bottom: 1.5rem;
}

.next-day-breakfast-hint {
    margin: 0.75rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: italic;
}

.room-card__photo {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    margin-bottom: 0.85rem;
    border: 1px solid var(--border-subtle);
}

.room-card__details,
.room-card__features {
    color: var(--text-secondary);
    margin: 0 0 0.5rem;
    line-height: 1.5;
}

.room-card__features {
    font-style: italic;
}

.room-card__unit {
    margin: 0 0 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.room-card__unit:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.room-card__unit-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0 0 0.65rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.room-card__unit-cost {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.stay-option--named {
    margin-top: 1rem;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.extra-sleeping-options {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.extra-sleeping-options__hint {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.extra-sleeping-options label {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--text-secondary);
}

.extra-sleeping-options select {
    margin-left: 0.5rem;
    padding: 6px 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    font-family: var(--font-body);
}

.additional-fields label {
    display: block;
    margin-bottom: 0.85rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.additional-fields input,
.additional-fields textarea {
    width: 100%;
    padding: 8px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 0;
    box-sizing: border-box;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    margin-top: 0.35rem;
}

.additional-fields textarea {
    resize: vertical;
    min-height: 100px;
}

.drink-field {
    text-align: center;
}

/* ── Divider ornament ── */
.rsvp-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem 0 1.75rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
}

.rsvp-divider::before,
.rsvp-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--border-subtle) 20%,
        var(--border-subtle) 80%,
        transparent
    );
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .rsvp-card {
        padding: 1.75rem 1.25rem;
        outline-offset: 5px;
    }

    .guest-card__toggle {
        padding: 0.9rem 0.95rem;
        gap: 0.5rem;
    }

    .guest-card__name {
        font-size: 0.95rem;
        white-space: normal;
    }

    .rsvp-review__guest dl > div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rsvp-progress__fill,
    .guest-card__panel,
    .guest-card__chevron,
    .status-pill {
        transition: none;
    }
}

/* Glow pulse animations removed — fixed blurred/scaled layers caused whole-device jank */
