/* Editorial theme · RSVP page */

.rsvp-page { background: var(--ivory); color: var(--ink); }

.rsvp-shell {
  display: grid;
  grid-template-columns: minmax(320px, 5fr) 7fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ===== Photograph side ===== */
.rsvp-aside {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--white);
  background: var(--navy);
}

.rsvp-aside-photo {
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1465495976277-4387d4b0b4c6?w=1400&q=80') center / cover no-repeat;
  animation: heroSettle 2.6s var(--ease) both;
}

.rsvp-aside::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 27, 42, 0.15) 30%, rgba(20, 27, 42, 0.75) 100%);
}

.rsvp-aside-text {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: clamp(40px, 8vh, 80px);
  padding: 0 clamp(28px, 4vw, 60px);
  text-align: center;
}

.rsvp-aside-monogram {
  width: 72px;
  margin: 0 auto 1.4rem;
  background-color: var(--white);
  opacity: 0.92;
}

.rsvp-aside-names {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 1rem;
}

.rsvp-aside-date {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

/* ===== Form side ===== */
.rsvp-body {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rsvp-topbar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 76px;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
}

.rsvp-topbar-title {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--navy);
}

.rsvp-back,
.rsvp-close {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rsvp-back:hover, .rsvp-close:hover { color: var(--navy); }
.rsvp-back { justify-self: start; }
.rsvp-close { justify-self: end; font-size: 1.6rem; letter-spacing: 0; line-height: 1; }

.rsvp-decor {
  position: absolute;
  width: clamp(150px, 18vw, 240px);
  aspect-ratio: 1;
  pointer-events: none;
  opacity: 0.8;
}

.rsvp-decor--left { left: -40px; bottom: -20px; background: var(--sprig-blush) center / contain no-repeat; }
.rsvp-decor--right { right: -40px; top: 90px; background: var(--sprig) center / contain no-repeat; transform: rotate(180deg); }

.rsvp-main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(48px, 9vh, 110px) clamp(20px, 5vw, 72px);
}

.rsvp-panel {
  width: min(500px, 100%);
  text-align: center;
  animation: rsvpIn 0.8s var(--ease) both;
}

.rsvp-panel[hidden] { display: none !important; }

.rsvp-panel--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

@keyframes rsvpIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.rsvp-heading {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4.4vw, 3.4rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.rsvp-heading::after {
  content: '\2661';
  display: block;
  margin: 1.2rem 0 1.4rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--blush-ink);
}

.rsvp-lead {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 2.4rem;
}

.rsvp-deadline {
  margin-top: 2rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.rsvp-deadline strong { font-weight: 600; color: var(--navy); }

/* Forms */
.rsvp-lookup-form,
.rsvp-response-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  text-align: left;
}

.rsvp-response-form {
  background: var(--white);
  border: 1px solid var(--line);
  padding: clamp(24px, 4vw, 40px);
}

.rsvp-field { display: flex; flex-direction: column; }

.rsvp-response-form label,
.rsvp-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--powder-ink);
  margin-bottom: 0.6rem;
}

.rsvp-lookup-form input,
.rsvp-response-form input[type="email"],
.rsvp-response-form input[type="text"] {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--navy);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0.8rem 0;
  outline: none;
  transition: border-color var(--t-fast) var(--ease);
}

.rsvp-lookup-form input { text-align: center; }

.rsvp-lookup-form input::placeholder,
.rsvp-response-form input::placeholder { color: #8C93A1; font-style: italic; }

.rsvp-lookup-form input:focus,
.rsvp-response-form input:focus { border-bottom-color: var(--navy); }

/* Buttons */
.rsvp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 0.6rem;
  padding: 0 1.5rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--navy);
  border: 1px solid var(--navy);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), color var(--t-fast);
}

.rsvp-btn:hover { background: var(--navy-2); color: var(--white); transform: translateY(-2px); }

.rsvp-btn--dark { background: var(--navy); }

.rsvp-btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line-strong);
}

.rsvp-btn--ghost:hover { background: transparent; color: var(--navy); border-color: var(--navy); }

.rsvp-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* Error state */
.rsvp-error {
  font-size: 0.86rem;
  line-height: 1.6;
  text-align: left;
  color: #8E3B36;
  background: #FBEDEB;
  border-left: 2px solid #B4524B;
  padding: 0.8rem 1rem;
}

/* Guests */
.rsvp-guest-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.rsvp-guest-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  user-select: none;
}

.rsvp-guest-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.rsvp-guest-box {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--powder-2);
  background: var(--white);
  transition: background var(--t-fast), border-color var(--t-fast);
}

.rsvp-guest-box::after {
  content: '';
  width: 9px;
  height: 5px;
  border-left: 1.5px solid var(--white);
  border-bottom: 1.5px solid var(--white);
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.rsvp-guest-option input:checked + .rsvp-guest-box { background: var(--navy); border-color: var(--navy); }
.rsvp-guest-option input:checked + .rsvp-guest-box::after { opacity: 1; }
.rsvp-guest-option input:focus-visible + .rsvp-guest-box { outline: 2px solid var(--powder-ink); outline-offset: 2px; }

.rsvp-guest-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--navy);
  word-break: break-word;
}

/* Recap (success) */
.rsvp-recap-card {
  text-align: left;
  background: var(--white);
  border: 1px solid var(--powder-2);
  outline: 1px solid var(--powder-2);
  outline-offset: -10px;
  padding: clamp(28px, 4vw, 44px);
  margin: 0 0 1.4rem;
}

.rsvp-recap-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--powder-ink);
}

.rsvp-text-link {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid var(--blush-2);
  padding: 0 0 2px;
  cursor: pointer;
}

.rsvp-text-link:hover { color: var(--blush-ink); border-bottom-color: var(--blush-ink); }

.rsvp-rule { border: 0; border-top: 1px solid var(--line); margin: 1.1rem 0 1.4rem; }

.rsvp-event-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.rsvp-event-name { font-family: var(--serif); font-size: 1.7rem; font-weight: 400; color: var(--navy); line-height: 1.1; }
.rsvp-event-meta { font-size: 0.84rem; color: var(--ink-soft); margin-top: 0.2rem; }

.rsvp-attendees { display: flex; flex-direction: column; border-top: 1px solid var(--line); }

.rsvp-attendees li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--navy);
}

.rsvp-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--navy);
  color: var(--white);
}

.rsvp-check svg { display: block; }
.rsvp-check--no { background: transparent; border: 1px solid var(--powder-2); color: transparent; }

.rsvp-spinner {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .rsvp-shell { grid-template-columns: 1fr; }

  .rsvp-aside {
    position: relative;
    height: 280px;
  }

  .rsvp-aside-text { bottom: 26px; }
  .rsvp-aside-monogram { display: none; }
  .rsvp-aside-names { font-size: 2.2rem; margin-bottom: 0.6rem; }

  .rsvp-topbar { order: -1; position: absolute; inset: 0 0 auto 0; border-bottom: 0; }
  .rsvp-body { overflow: visible; }
  .rsvp-shell { position: relative; }
  .rsvp-topbar { position: absolute; top: -280px; color: var(--white); }
  .rsvp-topbar-title, .rsvp-back, .rsvp-close { color: rgba(255, 255, 255, 0.9); }
  .rsvp-decor--right { top: 20px; }
}

@media (max-width: 600px) {
  .rsvp-main { padding: 40px 18px 56px; }
  .rsvp-heading { font-size: 2.1rem; }
  .rsvp-response-form { padding: 22px 18px; }
  .rsvp-recap-card { padding: 24px 20px; outline-offset: -7px; }
  .rsvp-recap-head, .rsvp-event-row { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .rsvp-lookup-form input,
  .rsvp-response-form input[type="email"],
  .rsvp-response-form input[type="text"] { font-size: 16px; font-family: var(--sans); }
  .rsvp-decor { opacity: 0.4; }
}
