/* ── Ryan & Jada Wedding RSVP — Frontend Form ── */

:root {
    --rj-dark:   #2c1810;
    --rj-gold:   #c9a96e;
    --rj-cream:  #faf7f3;
    --rj-border: #e0d5c5;
    --rj-text:   #4a4035;
    --rj-muted:  #9a8f85;
    --rj-error:  #a0392e;
    --rj-green:  #4a7c59;
    --rj-radius: 12px;
}

/* ── Container ── */
.rj-rsvp-app {
    max-width: 560px;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
    color: var(--rj-text);
    position: relative;
    padding-bottom: 16px;
}

/* ── Steps ── */
.rj-step {
    display: none;
    animation: rj-fade-in .4s ease;
}
.rj-step--active {
    display: block;
}
@keyframes rj-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Ornament & titles ── */
.rj-step__ornament {
    text-align: center;
    font-size: 20px;
    letter-spacing: 8px;
    color: var(--rj-gold);
    margin-bottom: 12px;
}
.rj-step__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 400;
    color: var(--rj-dark);
    text-align: center;
    margin: 0 0 8px;
    letter-spacing: .04em;
}
.rj-step__subtitle {
    text-align: center;
    font-size: 14px;
    font-weight: 300;
    color: var(--rj-muted);
    line-height: 1.7;
    margin: 0 0 32px;
}

/* ── Field ── */
.rj-field {
    margin-bottom: 20px;
}
.rj-field label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rj-muted);
    margin-bottom: 8px;
}
.rj-optional {
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0;
    font-size: 11px;
}
.rj-field__hint {
    font-size: 12px;
    color: var(--rj-muted);
    font-weight: 300;
    margin-top: 6px;
}

/* ── Inputs ── */
.rj-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    border: 1.5px solid var(--rj-border);
    border-radius: var(--rj-radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 300;
    background: #fff;
    color: var(--rj-text);
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
}
.rj-input:focus {
    outline: none;
    border-color: var(--rj-gold);
    box-shadow: 0 0 0 3px rgba(201,169,110,.12);
}
.rj-input--code {
    text-transform: uppercase;
    letter-spacing: .25em;
    font-size: 20px;
    font-weight: 500;
    text-align: center;
    background: var(--rj-cream);
}
.rj-input--select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a8f85' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}
.rj-input--textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* ── Attendance cards ── */
.rj-attendance-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
}
.rj-card {
    background: var(--rj-cream);
    border: 2px solid var(--rj-border);
    border-radius: var(--rj-radius);
    padding: 28px 20px;
    cursor: pointer;
    text-align: center;
    transition: all .25s;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.rj-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.rj-card--attend:hover, .rj-card--attend.rj-card--selected {
    border-color: var(--rj-green);
    background: #f0f8f3;
}
.rj-card--decline:hover, .rj-card--decline.rj-card--selected {
    border-color: var(--rj-muted);
    background: #f5f3f1;
}
.rj-card__icon  { font-size: 32px; }
.rj-card__title { font-family: 'Cormorant Garamond', serif; font-size: 20px; color: var(--rj-dark); font-weight: 400; }
.rj-card__sub   { font-size: 12px; color: var(--rj-muted); font-weight: 300; }

/* ── Guest fields ── */
.rj-guest-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 8px;
}
.rj-guest-card {
    background: var(--rj-cream);
    border: 1px solid var(--rj-border);
    border-radius: var(--rj-radius);
    padding: 20px;
    position: relative;
}
.rj-guest-card__num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--rj-gold);
    margin-bottom: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.rj-guest-card__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.rj-guest-card__grid .rj-field {
    margin-bottom: 0;
}
.rj-guest-card__full {
    grid-column: 1 / -1;
}
.rj-guest-card .rj-input {
    padding: 10px 14px;
    font-size: 14px;
}
@media (max-width: 460px) {
    .rj-guest-card__grid { grid-template-columns: 1fr; }
    .rj-attendance-cards { grid-template-columns: 1fr; }
}

/* ── Buttons ── */
.rj-btn--primary, .rj-btn--ghost {
    display: block;
    width: 100%;
    padding: 16px 32px;
    border-radius: var(--rj-radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .25s;
    border: none;
}
.rj-btn--primary {
    background: var(--rj-dark);
    color: #f0e8d8;
    box-shadow: 0 4px 16px rgba(44,24,16,.2);
}
.rj-btn--primary:hover {
    background: #1e0e08;
    box-shadow: 0 6px 20px rgba(44,24,16,.3);
    transform: translateY(-1px);
}
.rj-btn--primary:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}
.rj-btn__loader {
    display: inline-block;
    animation: rj-spin 1s linear infinite;
}
@keyframes rj-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.rj-btn--ghost {
    background: transparent;
    color: var(--rj-muted);
    border: 1.5px solid var(--rj-border);
}
.rj-btn--ghost:hover {
    border-color: var(--rj-muted);
    color: var(--rj-text);
}

/* ── Step nav ── */
.rj-step__nav {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}
.rj-step__nav .rj-btn--ghost {
    flex: 0 0 auto;
    width: auto;
    padding: 16px 20px;
}
.rj-step__nav .rj-btn--primary {
    flex: 1;
}

/* ── Error ── */
.rj-error {
    background: #fdf0f0;
    border: 1px solid #f5c6cb;
    color: var(--rj-error);
    border-radius: var(--rj-radius);
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* ── Review ── */
.rj-review {
    background: var(--rj-cream);
    border: 1px solid var(--rj-border);
    border-radius: var(--rj-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}
.rj-review-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rj-border);
}
.rj-review-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.rj-review-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--rj-muted); font-weight: 500; margin-bottom: 4px; }
.rj-review-value { font-size: 15px; font-weight: 300; color: var(--rj-dark); line-height: 1.5; }
.rj-review-guest { font-size: 14px; font-weight: 300; color: var(--rj-text); padding: 4px 0; }
.rj-review-dietary { font-size: 12px; color: var(--rj-muted); margin-left: 8px; }

/* ── Success ── */
.rj-step--success { text-align: center; }
.rj-success { padding: 20px 0; }
.rj-success__icon { font-size: 52px; margin-bottom: 20px; }
.rj-success__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 40px;
    font-weight: 400;
    color: var(--rj-dark);
    margin: 0 0 16px;
}
.rj-success__body {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--rj-text);
    margin-bottom: 20px;
}
.rj-success__note {
    font-size: 13px;
    font-weight: 300;
    color: var(--rj-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}
.rj-success__ornament {
    font-size: 18px;
    letter-spacing: 8px;
    color: var(--rj-gold);
}

/* ── Progress bar ── */
.rj-progress {
    height: 3px;
    background: var(--rj-border);
    border-radius: 3px;
    margin-top: 32px;
    overflow: hidden;
}
.rj-progress__bar {
    height: 100%;
    background: var(--rj-gold);
    border-radius: 3px;
    transition: width .4s ease;
}

/* ── Returning guest notice ── */
.rj-returning-notice {
    background: #fff8ec;
    border: 1px solid var(--rj-gold);
    border-radius: var(--rj-radius);
    padding: 14px 18px;
    font-size: 13px;
    color: var(--rj-text);
    font-weight: 300;
    line-height: 1.6;
    margin-bottom: 24px;
}
.rj-returning-notice strong { color: var(--rj-dark); }
