/* Kaffeehaus de Châtillon motif: the venue's own red, parchment, ink and
   gilt, set in its own typefaces (Vollkorn for display, Libre Baskerville
   for text). One memorable element: the engraved invitation card. */

:root {
  --red: #8e0505;
  --red-deep: #6d0303;
  --parchment: #eae6e5;
  --paper: #fbf8f4;
  --ink: #000c10;
  --ink-soft: #3d3a38;
  --gilt: #b8924e;
  --gilt-pale: #d9c69a;
  --display: "Vollkorn", "Times New Roman", serif;
  --text: "Libre Baskerville", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--text);
  font-size: 15px;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--red); text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.page {
  flex: 1;
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 40px 16px 24px;
}
@media (min-width: 700px) { .page { padding-top: 56px; } }

/* The card ----------------------------------------------------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--gilt);
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--gilt-pale), 0 18px 40px -24px rgba(0, 12, 16, .45);
  margin: 6px 5px 44px;
}
.card.wide { max-width: none; }

.card-head {
  background: var(--red);
  color: var(--paper);
  text-align: center;
  padding: 34px 24px 18px;
  border-bottom: 1px solid var(--gilt);
}
.card-head .crest { display: block; margin: 0 auto 8px; height: auto; }
.venue-line {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: .04em;
  font-variant: small-caps;
}

.card-body { padding: 28px 28px 32px; }
@media (min-width: 560px) { .card-body { padding: 36px 56px 40px; } }

.rule {
  border: 0;
  height: 1px;
  background: var(--gilt-pale);
  margin: 0 56px;
  position: relative;
}
.rule::after {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--gilt);
  box-shadow: 0 0 0 5px var(--paper);
}

/* The invitation text: centred, as stationery is --------------------- */
.invite-text { text-align: center; }
.invite-text p { margin: 0; }
.hosts {
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1.25;
}
.request {
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 10px !important;
}
.invite-text h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.1;
  color: var(--red);
  margin: 14px 0 22px;
}
.when {
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.4;
}
.where {
  margin-top: 18px !important;
  color: var(--ink-soft);
}

/* Particulars: a definition list, not cards -------------------------- */
.particulars dl { margin: 0; }
.particulars dl > div {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 0 20px;
  padding: 10px 0;
  border-top: 1px dotted var(--gilt-pale);
}
.particulars dl > div:first-child { border-top: 0; padding-top: 0; }
.particulars dt {
  font-family: var(--display);
  font-size: 1.1rem;
  color: var(--red);
}
.particulars dd { margin: 0; }
@media (max-width: 480px) {
  .particulars dl > div { grid-template-columns: 1fr; gap: 2px; }
}

/* Forms ---------------------------------------------------------------- */
h2, .page-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.2;
  margin: 0 0 8px;
}
.page-title { font-size: 2rem; margin-bottom: 4px; }
.lede { margin: 0 0 22px; color: var(--ink-soft); }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span, .field legend {
  font-family: var(--display);
  font-size: 1.05rem;
}
.field small { font-family: var(--text); font-size: .8rem; color: var(--ink-soft); margin-left: 6px; }
input[type="text"], input[type="email"], input[type="password"], textarea {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b9b0ab;
  border-radius: 0;
  padding: 10px 12px;
  width: 100%;
}
input:focus, textarea:focus { border-color: var(--red); outline: 2px solid var(--red); outline-offset: 0; }
textarea { resize: vertical; }

fieldset.party { border: 0; padding: 0; margin: 0; }
fieldset.party legend { padding: 0; margin-bottom: 6px; }
.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #b9b0ab;
  background: #fff;
  cursor: pointer;
}
.choice + .choice { margin-top: -1px; }
.choice input { accent-color: var(--red); width: 18px; height: 18px; margin: 0; }
.choice span { flex: 1; display: flex; justify-content: space-between; }
.choice em { font-style: normal; font-family: var(--display); color: var(--red); }
.choice:has(input:checked) { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); position: relative; }
.field-stack { display: grid; gap: 18px; align-content: start; }
.guest-field { display: none; }
.form:has(input[name="party"][value="2"]:checked) .guest-field { display: grid; }

.button {
  font-family: var(--display);
  font-size: 1.15rem;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red-deep);
  padding: 13px 24px;
  cursor: pointer;
  justify-self: start;
  border-radius: 0;
}
.button:hover { background: var(--red-deep); }

.trap { position: absolute; left: -9999px; top: -9999px; }
.fine { font-size: .85rem; color: var(--ink-soft); margin: 0; }
.keep { margin-top: 26px; }

.error, .flash, .notice {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-left: 3px solid var(--red);
  background: #f4e9e9;
}
.flash { border-left-color: var(--gilt); background: #f3ecdc; }
.notice { border-left-color: var(--gilt); background: #f3ecdc; }

/* Registration page ---------------------------------------------------- */
.status {
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--red);
  margin: 0 0 24px;
}
.status.paid { color: #2f5d2a; }
.details { margin: 0 0 26px; }
.details > div {
  display: grid; grid-template-columns: 7.5em 1fr; gap: 0 20px;
  padding: 9px 0; border-top: 1px dotted var(--gilt-pale);
}
.details > div:last-child { border-bottom: 1px dotted var(--gilt-pale); }
.details dt { font-family: var(--display); font-size: 1.05rem; color: var(--ink-soft); }
.details dd { margin: 0; }
@media (max-width: 480px) { .details > div { grid-template-columns: 1fr; gap: 2px; } }

/* Riddle ----------------------------------------------------------------- */
.riddle { padding: 26px 28px; text-align: center; }
.riddle h2 { font-size: 1.3rem; }
.verse { font-family: var(--display); font-style: italic; font-size: 1.15rem; line-height: 1.5; margin: 8px 0 12px; }

/* Guest list ------------------------------------------------------------- */
.guests { width: 100%; border-collapse: collapse; font-size: .9rem; }
.guests th, .guests td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--gilt-pale); vertical-align: top; }
.guests th { font-family: var(--display); font-weight: 400; color: var(--red); }
.guests tr.paid td:nth-child(3) { color: #2f5d2a; }

/* Colophon --------------------------------------------------------------- */
.colophon {
  text-align: center;
  padding: 26px 16px 40px;
  color: #606060;
  font-size: .85rem;
  background: #f1eeee;
  border-top: 1px solid var(--gilt-pale);
}
.colophon p { margin: 0 0 8px; }
.colophon .motto { font-family: var(--display); font-variant: small-caps; letter-spacing: .12em; color: var(--gilt); font-size: 1rem; }
.colophon a { color: #606060; }

@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color .15s ease; }
}
@media print {
  body { background: #fff; }
  .card { box-shadow: none; }
  .rsvp, .riddle, .colophon { display: none; }
}

/* Public guest list -------------------------------------------------------- */
.names {
  list-style: none;
  padding: 0;
  margin: 18px 0 20px;
  columns: 2;
  column-gap: 32px;
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.7;
}
.names li { break-inside: avoid; }
@media (max-width: 480px) { .names { columns: 1; } }

/* Admin ---------------------------------------------------------------------- */
.page:has(.admin) { max-width: 1100px; }
.admin .guests { font-size: .85rem; }
.actions { white-space: nowrap; }
.actions form { display: inline; }
.actions form + form::before { content: " · "; color: var(--gilt); }
button.link {
  font: inherit; color: var(--red); background: none; border: 0; padding: 0;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
button.link.danger { color: #606060; }
.form.two-col { grid-template-columns: 1fr 1fr; }
.form.two-col .span { grid-column: 1 / -1; }
@media (max-width: 640px) { .form.two-col { grid-template-columns: 1fr; } }
h2.sub { margin-top: 30px; font-size: 1.3rem; }
code { font-size: .9em; background: #f1eeee; padding: 1px 5px; }

.signout { margin: -14px 0 20px; }