/* =========================================================
   AGED TO PERFECTION — Brian's 50th
   Dark, warm: oak, leather, smoke, gold.
   ========================================================= */

:root {
  --bg: #14100c;
  --panel: #211a12;
  --panel-2: #2a2117;
  --line: #3d3123;
  --gold: #c9a05a;
  --gold-bright: #e6c37c;
  --gold-dim: #b58c4e;
  --cream: #ece0c9;
  --cream-dim: #c9bb9d;
  --muted: #a2906f;
  --shadow: 0 18px 50px rgba(0,0,0,.55);
  --serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
}

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

body {
  font-family: var(--serif);
  background-color: var(--bg);
  color: var(--cream);
  line-height: 1.6;
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(122,47,29,.22), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.012) 0 2px, transparent 2px 6px),
    radial-gradient(700px 700px at 85% 20%, rgba(201,160,90,.05), transparent 60%);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 2.5rem 1.25rem;
}

.wrap { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 2.5rem; }

/* ---------- invitation ---------- */

.invitation { text-align: center; }

.invitation-img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.invitation-note {
  margin-top: 1.1rem;
  font-style: italic;
  color: var(--cream-dim);
  font-size: 1.05rem;
}

/* ---------- the evening (party details) ---------- */

.details {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold-dim);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 1.8rem 1.5rem 1.6rem;
}

.details-heading {
  font-size: 1.6rem;
  color: var(--gold-bright);
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.3rem;
  letter-spacing: .03em;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: .7rem .5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0,0,0,.15);
}

.detail-label {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .15rem;
}

.detail-value {
  font-size: 1.05rem;
  color: var(--cream);
  font-weight: 500;
}

.detail-sub {
  font-size: .82rem;
  color: var(--cream-dim);
  font-style: italic;
  margin-top: .1rem;
}

/* ---------- RSVP — the guest book ---------- */

.rsvp {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold-dim);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 1.8rem 1.5rem 1.6rem;
}

.rsvp-heading {
  font-size: 1.6rem;
  color: var(--gold-bright);
  font-weight: 600;
  text-align: center;
  margin-bottom: .35rem;
  letter-spacing: .03em;
}

.rsvp-sub {
  text-align: center;
  font-style: italic;
  color: var(--cream-dim);
  font-size: .95rem;
  margin-bottom: 1.3rem;
}

.rsvp-fields {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.rsvp-fields input,
.rsvp-fields select,
.rsvp-fields textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--cream);
  background: rgba(0,0,0,.35);
  border: 1px solid var(--line);
  padding: .6rem .8rem;
  border-radius: 6px;
  outline: none;
  transition: border-color .2s ease;
}

.rsvp-fields input:focus,
.rsvp-fields select:focus,
.rsvp-fields textarea:focus {
  border-color: var(--gold-dim);
}

.rsvp-fields select { cursor: pointer; }
.rsvp-fields select option { background: var(--panel); color: var(--cream); }

.rsvp-fields textarea {
  resize: vertical;
  min-height: 3rem;
}

.rsvp-attending-label {
  font-size: .88rem;
  color: var(--cream-dim);
  display: block;
  margin-bottom: .5rem;
}

.rsvp-radios {
  display: flex;
  gap: .45rem;
}

.rsvp-radio {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .55rem .35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0,0,0,.25);
  cursor: pointer;
  font-size: .9rem;
  color: var(--cream-dim);
  transition: border-color .2s ease, background .2s ease;
}

.rsvp-radio:hover { border-color: var(--gold-dim); }
.rsvp-radio:has(input:checked) {
  border-color: var(--gold);
  background: rgba(201,160,90,.12);
  color: var(--cream);
}

.rsvp-radio input[type="radio"] {
  width: auto;
  accent-color: var(--gold);
  margin: 0;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

.rsvp-party {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.rsvp-party label {
  font-size: .9rem;
  color: var(--cream-dim);
  white-space: nowrap;
  flex: none;
}

.rsvp-party select {
  flex: 1;
  width: auto;
}

.rsvp-submit {
  width: 100%;
  margin-top: .9rem;
  padding: .7rem 1.4rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: #241a0a;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: filter .2s ease;
}

.rsvp-submit:hover { filter: brightness(1.08); }
.rsvp-submit:disabled { opacity: .55; cursor: default; }

.rsvp-error {
  margin-top: .6rem;
  text-align: center;
  color: #c96b5a;
  font-style: italic;
  font-size: .93rem;
}

.rsvp-thanks {
  text-align: center;
  padding: 2rem 1rem;
}

.rsvp-thanks-icon {
  font-size: 2.2rem;
  color: var(--gold-bright);
  margin-bottom: .6rem;
}

.rsvp-thanks-msg {
  font-size: 1.1rem;
  color: var(--cream);
  font-style: italic;
}

/* ---------- the parlor ---------- */

.parlor {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold-dim);
  border-radius: 6px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.parlor-head {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}

.parlor-avatar {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #241a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.3rem;
}

.parlor-title { font-size: 1.5rem; color: var(--gold-bright); font-weight: 600; line-height: 1.1; }
.parlor-sub { font-size: .95rem; color: var(--muted); font-style: italic; }

/* submission form */
.parlor-form {
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  border-bottom: 1px solid var(--line);
}

.parlor-form input,
.parlor-form textarea {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--cream);
  background: rgba(0,0,0,.35);
  border: 1px solid var(--line);
  padding: .6rem .8rem;
  border-radius: 6px;
  outline: none;
  transition: border-color .2s ease;
}

.parlor-form input:focus,
.parlor-form textarea:focus {
  border-color: var(--gold-dim);
}

.parlor-form textarea {
  resize: vertical;
  min-height: 5rem;
}

.parlor-send {
  padding: .6rem 1.2rem;
  font-family: var(--serif);
  font-size: 1rem;
  color: #241a0a;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: filter .2s ease;
}

.parlor-send:hover { filter: brightness(1.08); }
.parlor-send:disabled { opacity: .55; cursor: default; }

.parlor-error {
  text-align: center;
  color: #c96b5a;
  font-style: italic;
  font-size: .93rem;
}

.parlor-thanks {
  text-align: center;
  padding: 2rem 1rem;
  border-bottom: 1px solid var(--line);
}

.parlor-thanks-icon {
  font-size: 2.2rem;
  color: var(--gold-bright);
  margin-bottom: .6rem;
}

.parlor-thanks-msg {
  font-size: 1.05rem;
  color: var(--cream);
  font-style: italic;
}

/* jeeves message board */
.parlor-board {
  padding: 1.25rem;
}

.parlor-board-heading {
  font-size: 1.1rem;
  color: var(--gold-bright);
  font-weight: 500;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: .04em;
}

.parlor-log {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  min-height: 60px;
  max-height: 420px;
  overflow-y: auto;
}

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

.parlor-msg {
  max-width: 100%;
  padding: .65rem .9rem;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  line-height: 1.45;
  font-size: 1.02rem;
  background: var(--panel);
  border: 1px solid var(--gold-dim);
  color: var(--cream);
  animation: pop .2s ease;
}

.parlor-msg .who { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: .15rem; }
.parlor-msg .body { white-space: pre-wrap; overflow-wrap: break-word; }

.parlor-empty { color: var(--muted); font-style: italic; text-align: center; padding: 1.5rem 0; }

@media (max-width: 480px) {
  body { padding: 1.5rem .9rem; }
  .details-grid { grid-template-columns: 1fr; }
  .rsvp-radios { flex-direction: column; }
  .rsvp-party { flex-direction: column; align-items: stretch; }
}